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

             Bug #: 53196
           Summary: unknown struct name in C99 compound initializer
                    doesn't generate error
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: lzie5...@frolickingcow.net


I think this code shouldn't compile (see foo_typo). It compiles on 4.5.3 and
4.7.0.

#include <stdio.h>

struct foo {
    int i;
};

int
main(void)
{
    struct foo f = (struct foo_typo) { };
    printf("%d\n", f.i);
    return 0;
}

Reply via email to