![]() |
![]() |
1314 | ![]() |
||||
![]() | |||||||
| C++ compatibility | |||||||
A struct or union tag has been defined within the definition of another struct or union. C++ has different scope rules to C that may cause problems for nested tags. In C a nested tag can be accessed outside of the 'struct' or 'union' in which it is defined; but C++ treats 'struct' / 'union' types as scopes and requires scope resolution to access nested tags such as "outer_tag::inner_tag" For example:
/*PRQA S 553,3210,3447 ++*/
struct ST1
{
int n;
struct ST2
{ /* Message 1314 */
int i;
int j;
} b;
};
extern struct ST1 st1;
extern struct ST2 st2;
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |