This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/201
- To: nobody at gcc dot gnu dot org
- Subject: Re: c/201
- From: jsm28 at gcc dot gnu dot org
- Date: 7 Aug 2000 17:16:00 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: jsm28 at gcc dot gnu dot org
The following reply was made to PR c/201; it has been noted by GNATS.
From: jsm28@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, jsm28@cam.ac.uk, nobody@gcc.gnu.org,
tron.thomas@sierra.com
Cc:
Subject: Re: c/201
Date: 7 Aug 2000 17:12:47 -0000
Synopsis: Switch statement will not accept constant integer variable as case label
State-Changed-From-To: open->closed
State-Changed-By: jsm28
State-Changed-When: Mon Aug 7 10:12:47 2000
State-Changed-Why:
const int variables are not within the scope of integral constant
expressions as defined by the standard (6.4 in the 1990 standard, 6.6
in the 1999 standard). While implementations may accept other forms
of constant expressions, I don't think this extension would be in the
spirit of C. G++ will accept your code as C++.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=201&database=gcc