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++/13902] Misleading diagnostic for static data member definition


------- 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


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