This is the mail archive of the gcc-help@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]

Re: C++ static integer class constants...


* Alex J. Dam:

> This is usually only needed when, e. g., you take the address of a
> constant:
>
> const int *x = &foo::X;

Not quite.  This is needed if you use the constant in a context which
does not *require* an integral constant.  However, GCC does not
provide a diagnostics for this case (and the C++ spec does not require
one).


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