c++/9384: [3.4 Regression] ICE in validate_nonmember_using_decl, at cp/decl2.c:4152
Volker Reichelt
reichelt@igpm.rwth-aachen.de
Tue Jan 21 22:26:00 GMT 2003
The following reply was made to PR c++/9384; it has been noted by GNATS.
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, rguenth@tat.physik.uni-tuebingen.de,
gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: c++/9384: [3.4 Regression] ICE in validate_nonmember_using_decl, at cp/decl2.c:4152
Date: Wed, 22 Jan 2003 00:25:04 +0100
The ICEs in the 3.3 branch and mainline are completely unrelated
as the follwoing reduced testcases show.
The bug on mainline can be triggered with the following line of code:
----------------------snip here----------------------
namespace A { using ::B; }
----------------------snip here----------------------
Compiling this with mainline I get
PR9384A.cc:1: internal compiler error: in validate_nonmember_using_decl, at
cp/decl2.c:4152
This is a regression on mainline.
The bug on the 3.3 branch can be triggered with the following testcase:
----------------------snip here--------------------------------------
template <typename T> struct A
{
A(int);
};
template <typename T> A<T>::A(int i __attribute__ ((__unused__)) ) {}
----------------------snip here--------------------------------------
The code causes a compiler crash since gcc 3.0 (which is changed to a
"confused by earlier errors, ..." message in release versions):
PR9384B.cc:6: error: parse error before `__attribute__'
PR9384B.cc:6: internal compiler error: in poplevel, at cp/decl.c:1283
(gcc 2.95.3 rejects the code and mainline accepts it).
I don't know where you have to place the attribute, but placing it in
front of "int i" makes the code compile, writing just "int" without "i"
and attribute "__unused__" should have the same effect, right?
Given that this is just an error recovery problem and that there's an
easy workaround, I don't think that this will be fixed on 3.3 branch.
Regards,
Volker
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9384
More information about the Gcc-prs
mailing list