This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2003 18:10:21 -0000
- Subject: [Bug c++/13451] New: [3.4 regression] Wrong error message with qualified names for member declarations
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider this:
template <class T>
struct A
{
struct B;
struct A::B { }; // #1
void A::foo(void); // #2
};
>From the standard it's not clear whether #1 and #2 should be accepted or
rejected. We used to accept both since 2.95, but on mainline we now get a hard
error on #1:
test.cc:5: error: too few template-parameter-lists
Looks like the injected class name confuses the parser. I rate this a
regression because:
1) It's an unwanted change of behaviour.
2) Even if we now want to reject #1 for some reason, we need to do that with a
proper error message.
Then, we could discuss what to do with these. EDG rejects both saying that
member declarations can't be qualified. For not, I assume we want to preserve
our historical behaviour, so this is reject-valid.
--
Summary: [3.4 regression] Wrong error message with qualified
names for member declarations
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: giovannibajo at libero dot it
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13451