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

Re: Var length array's vs. const int


On Sat, Aug 11, 2001 at 07:08:18PM +0100, Joseph S. Myers wrote:
> On Sat, 11 Aug 2001, Gordon Sadler wrote:
> 
> > The final sentence there is the relevant one. Is there some reason
> > gcc doesn't consider 'const int' an integer constant expression when
> 
> Re-read 6.6, which defines integer constant expressions.  Compare ISO/IEC
> 14882 subclause 5.19 [expr.const] which defines them for C++, and be
> careful not to confuse C and C++ here.
> 
Thanks for pointing this out. I've been mixing the languages at various
times, and never had the actual standard until recently.

If I read it correctly, the difference lies in the c++ standard allowing
for const variables to qualify as an expr.const. Thanks for the
clarification.

-- 
Gordon Sadler


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