This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13902] Misleading diagnostic for static data member definition
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2004 21:55:00 -0000
- Subject: [Bug c++/13902] Misleading diagnostic for static data member definition
- References: <20040128214801.13902.gdr@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-28 21:54 -------
The mainline gives:
pr13902.cc:5: error: `T' was not declared in this scope
pr13902.cc:9: error: conflicting declaration 'char X< <template-parameter-1-1> >::buf[(sizeof (T)
* X< <template-parameter-1-1> >::S)]'
pr13902.cc:5: error: 'X< <template-parameter-1-1> >::buf' has a previous declaration as `char
X< <template-parameter-1-1> >::buf[(<expression error> * X< <template-parameter-1-1> >::
S)]'
pr13902.cc:9: error: template definition of non-template `char X< <template-parameter-1-1> >::
buf[(sizeof (T) * X< <template-parameter-1-1> >::S)]'
While 2.95.3 to 3.3.3 gives about the same
from 2.95.3:
pr13902.cc:9: conflicting types for `char X<{anonymous template type parm}>::buf[(sizeof (T) *
X<{anonymous template type parm}>::S)]'
pr13902.cc:5: previous declaration as `char X<{anonymous template type parm}>::buf[(sizeof
((*T)) * X<{anonymous template type parm}>::S)]'
>From 3.3:
pr13902.cc:9: error: conflicting types for `char X<<anonymous template type
parameter> >::buf[(sizeof (T) * X<<anonymous template type parameter> >::S)]
'
pr13902.cc:5: error: previous declaration as `char X<<anonymous template type
parameter> >::buf[(sizeof ((*T)) * X<<anonymous template type parameter>
>::S)]'
I do not know if you would count this as fixed though, I am leaving it up to you, Gaby or someone
else.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13902