This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14668] declaration of `A*B::A' changes meaning of `A' from `class A'...
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2004 15:13:25 -0000
- Subject: [Bug c++/14668] declaration of `A*B::A' changes meaning of `A' from `class A'...
- References: <20040321130905.14668.pluto@ds14.agh.edu.pl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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