This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/4784: Anonymous structs issues
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, jsm28 at cam dot ac dot uk, nobody at gcc dot gnu dot org
- Date: 7 Mar 2003 02:24:47 -0000
- Subject: Re: c/4784: Anonymous structs issues
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, jsm28 at cam dot ac dot uk, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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