This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14668] declaration of `A*B::A' changes meaning of `A' from `class A'...


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-21 15:13 -------
Subject: Re:  New: declaration of `A*B::A' changes meaning of `A' from `class A'...

"pluto at ds14 dot agh dot edu dot pl" <gcc-bugzilla@gcc.gnu.org> writes:

| class A {}; 
| class B { 
|   static A *A; 
| }; 
| A *B::A = 0; 
|  
| g++3.4-20040317 compiles code without errors. 
| g++3.3 reports error: declaration of `A*B::A' changes meaning of `A' from 
| `class A' 
|  
| which behavior is correct?

The code is ill-formed.  No diagnostic is required.  GCC used to
diagnose that in the past.  This is a regression.  I would think it is
a serious one (a frequent mistake).

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]