Bug 42064 - g++ violate [class.qual]
Summary: g++ violate [class.qual]
Status: RESOLVED DUPLICATE of bug 11764
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.4
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 05:51 UTC by Nan Wang
Modified: 2009-11-16 06:21 UTC (History)
17 users (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 Nan Wang 2009-11-16 05:51:14 UTC
below is an example in standard N2960. 

struct A { A(); };
struct B : public A { B(); };
A::A() { }
B::B() { }
A::A a;
int main()
{
	return 0;
}

According to the standard [class.qual]/2, 'A::A a;' is error because A::A is not a type name. But g++ can compile it without error or warning.
Comment 1 Andrew Pinski 2009-11-16 06:21:57 UTC

*** This bug has been marked as a duplicate of 11764 ***