c/201
jsm28@gcc.gnu.org
jsm28@gcc.gnu.org
Mon Aug 7 10:16:00 GMT 2000
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
More information about the Gcc-prs
mailing list