http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47772

Jonathan 'Sky' Squirawski <webmas...@sky-siteweb.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |webmas...@sky-siteweb.com

--- Comment #2 from Jonathan 'Sky' Squirawski <webmas...@sky-siteweb.com> 
2011-02-21 16:55:39 UTC ---
I've the same problem with gcc 4.5.2.

Here another test case:

/*==================================*/
typedef struct bar_t {
    int a;
    int b;
} bar_t;

typedef struct foo_ok_t {
    int   bar;
    bar_t foo;
} foo_ok_t;

typedef struct foo_nok_t {
    bar_t bar;
    bar_t foo;
} foo_nok_t;

int main(void) {
    foo_ok_t foo_ok;
    foo_nok_t foo_nok;

    foo_ok = (foo_ok_t){
        .bar = 32,
    };

    foo_nok = (foo_nok_t){
        .bar = (bar_t){ .a = 32, .b = 42 },
    };

    return 0;
}
/*==================================*/


The first assignment doesn't trigger any warning, but the second one gives:
test.c:29:5: warning: missing initializer
test.c:29:5: warning: (near initialization for ‘(anonymous).foo’)

Reply via email to