![]() |
![]() |
1043 | ![]() |
||||
![]() | |||||||
| Language extensions | |||||||
This is a declaration of an anonymous union. Anonymous unions are a feature of C++ but are not supported in ISO:C Standard. An anonymous union is an unnamed object of an unnamed union type. The names of the members of an anonymous union must be distinct from the names of any other ordinary identifiers in the scope in which the anonymous union is declared. The members of an anonymous union are treated as ordinary objects within the scope in which the anonymous union is declared and can be addressed as ordinary objects. For example:
/*PRQA S 750,2017,3132,3227,3408 ++*/
union /* Message 1043 */
{
unsigned short us;
unsigned char uc[2];
};
extern void foo(unsigned short usx)
{
us = usx;
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |