Bug 23156 - Fails valid? (valid according to Comeau anyway)
Summary: Fails valid? (valid according to Comeau anyway)
Status: RESOLVED DUPLICATE of bug 17353
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-31 05:37 UTC by Ivan Godard
Modified: 2005-07-31 05:39 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Godard 2005-07-31 05:37:01 UTC
typedef int A;
struct foo{
A A;
};

compiles in 3.4.0 and on Comeau, but on 3.4.2 you get:


changedMeaning.cc:3: error: declaration of `A foo::A'
changedMeaning.cc:1: error: changes meaning of `A' from `typedef int A'

So who's right, you or EDG?

Ivan
Comment 1 Andrew Pinski 2005-07-31 05:39:56 UTC
GCC is.  See PR 17353 and [basic.scope.class] of the standard.

*** This bug has been marked as a duplicate of 17353 ***
Comment 2 Gabriel Dos Reis 2005-07-31 08:52:38 UTC
Subject: Re:  New: Fails valid? (valid according to Comeau anyway)

"igodard at pacbell dot net" <gcc-bugzilla@gcc.gnu.org> writes:

| typedef int A;
| struct foo{
| A A;
| };
| 
| compiles in 3.4.0 and on Comeau, but on 3.4.2 you get:

The code is ill-formed; no diagnostic required.  GCC-3.x, x < 4 used to
issue a diagnostic as a QoI.  A regression was introduced in 3.4.0,
and fixed later.

| changedMeaning.cc:3: error: declaration of `A foo::A'
| changedMeaning.cc:1: error: changes meaning of `A' from `typedef int A'
| 
| So who's right, you or EDG?

Both, but we're better ;-)

-- Gaby