This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18625] New: [3.4/4.0 regression] triple error message for invalid typedef
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Nov 2004 12:15:10 -0000
- Subject: [Bug c++/18625] New: [3.4/4.0 regression] triple error message for invalid typedef
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet causes a very redundant error message
since gcc 3.4.0:
===================
typedef int X;
typedef void X;
===================
bug.cc:2: error: conflicting declaration 'typedef void X'
bug.cc:1: error: 'X' has a previous declaration as `typedef int X'
bug.cc:2: error: declaration of `typedef void X'
bug.cc:1: error: conflicts with previous declaration `typedef int X'
bug.cc:2: error: declaration of `typedef void X'
bug.cc:1: error: conflicts with previous declaration `typedef int X'
With previous compilers I just get two line:
bug.cc:2: error: conflicting types for `typedef void X'
bug.cc:1: error: previous declaration as `typedef int X'
The C frontend is not affected.
--
Summary: [3.4/4.0 regression] triple error message for invalid
typedef
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18625