This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C++ static integer class constants...
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: "Alex J. Dam" <alexjdam at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 17 Oct 2005 21:12:29 +0200
- Subject: Re: C++ static integer class constants...
- References: <435202e6.3d759d8f.4550.fffff1e6SMTPIN_ADDED@mx.gmail.com><20051016145136.GA3165@hymen>
* 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).