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++/21499] declaration/initialization of non-integral member constants: compiler does not emit error


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-10 17:58 -------
(In reply to comment #2)
> I don't understand.
> 
> If it is a problem, how does the standard not require to diagnostic?
> 
> At least the Stroustrup book is very clear about this. Anyway...

No what I mean the problem with non-integral member constant is required to be diagnose but the 
requirement for integral member constants being defined does not have to be.

And the reason for not requiring the diagnose is the following, take the following two TUs:
---- tu1 ----
class a { static const int i = 0; }
int f = a::i;
---- tu2 -----
class a { static const int i = 0; }
const int a::i;

so how would we actually cause diagnose the problem for not defining a::i.

-- 


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


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