c/4784: Anonymous structs issues

bangerth@dealii.org bangerth@dealii.org
Fri Mar 7 02:26:00 GMT 2003


Synopsis: Anonymous structs issues

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Fri Mar  7 02:24:47 2003
State-Changed-Why:
    Hm, with 3.3 and present mainline, we get on this code
    -----------------------
    struct s {
        int x;
        struct { int x; };
    };
    ------------------
    the following message:
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -W -Wall -std=c99 -c x.c
    x.c:3: warning: declaration does not declare anything
    
    gcc3.2 is quiet. If compiled in C++ mode, we get this:
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -W -Wall -c x.cc
    x.cc:3: error: declaration of `int s::<anonymous struct>::x'
    x.cc:2: error: conflicts with previous declaration `int s::x'
    x.cc:3: error: duplicate member `s::<anonymous struct>::x'
    
    Joseph, is this approximately what you wanted gcc to
    tell us?
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4784



More information about the Gcc-bugs mailing list