[previous] 0662 [next] [E] Accessing a member of an unnamed struct or union member in this way is a language extension.
Language extensions

A nested structure member is being accessed in a non-standard way.

In the example below, 'a' and 'b' are defined as members of a nested unnamed structure. This language extension allows these elements to be accessed directly, just as if they were members of the parent structure.


/*PRQA S 1314,2017,3408,3447 ++*/


struct AT
{
    int n;
    struct SID
    {
        int a;
        int b;
    };                          /* Message 0660 */
};

extern struct AT atx;

extern void foo(void)
{
    atx.n = 1;
    atx.a = 1;                  /* Message 0662 */
}


See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents