This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16785] New: [PR c++/16637 followup] syntax error on valid code
- From: "gbeauchesne at mandrakesoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jul 2004 16:33:06 -0000
- Subject: [Bug c++/16785] New: [PR c++/16637 followup] syntax error on valid code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
I believe the following code is also valid.
typedef int I;
namespace A {
typedef I I;
}
struct B {
typedef I I;
};
struct C {
typedef ::I I;
};
Fix to PR c++/16637 doesn't cover B::I case.
[gb@n2 gcc]$ ./g++ -B$PWD -c /home/gb/vrac/lookup.cpp
/home/gb/vrac/lookup.cpp:8: error: declaration of `typedef I B::I'
/home/gb/vrac/lookup.cpp:1: error: changes meaning of `I' from `typedef int I'
Previous versions of gcc (3.3.X) accepts it, even icc 8.X recent enough with
-strict_ansi.
--
Summary: [PR c++/16637 followup] syntax error on valid code
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gbeauchesne at mandrakesoft dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16785