This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
switch statement question
- To: (gcc list) <gcc at gcc dot gnu dot org>
- Subject: switch statement question
- From: Greg Hosler <hosler at lugs dot org dot sg>
- Date: Thu, 14 Jun 2001 09:13:24 +0800 (SGT)
- Reply-To: Greg Hosler <hosler at lugs dot org dot sg>
Hi,
I have a switch / case statement that is breaking under recent versions of
gcc, that used to be ok. I am guessing that the the language specification
has been tightened up (or the implementation). In my code, the case values are
longs (as opposed to int's) - I get compiler warnings, and it appears that
either the case code is not generated, or the switch is not handling the long's
in the fashion that it used to.
what is the definition of what is allowed for the "case values" of
switch statements ?
thank you, and regards,
-Greg
+---------------------------------------------------------------------+
"DOS Computers manufactured by companies such as IBM, Compaq, Tandy, and
millions of others are by far the most popular, with about 70 million
machines in use wordwide. Macintosh fans, on the other hand, may note that
cockroaches are far more numerous than humans, and that numbers alone do
not denote a higher life form." (New York Times, November 26, 1991)
| Greg Hosler i-net: hosler@lugs.org.sg |
+---------------------------------------------------------------------+