This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/15242] pessimization of "goto *"
- From: "anton at a0 dot complang dot tuwien dot ac dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 May 2004 15:03:57 -0000
- Subject: [Bug optimization/15242] pessimization of "goto *"
- References: <20040501142654.15242.anton@mips.complang.tuwien.ac.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From anton at a0 dot complang dot tuwien dot ac dot at 2004-05-01 15:03 -------
Subject: Re: pessimization of "goto *"
pinskia at gcc dot gnu dot org wrote:
> Note jumping out of a statement expression is really illegal and should not be done.
Statement expressions are used here just to produce a way to include a
statement sequence in a macro. Do you recommend that we should switch
from
({ ... })
to
do { ... } while (0)
?
Or do you have a different suggestion?
BTW, looking in the gcc-3.4.0 manual, I don't see the restrictions you
mention, and gcc-3.4.0 -Wall also does not complain about this usage.
Actually the manual explicitly says:
|(If you use some other kind of statement last within the braces, the
|construct has type `void', and thus effectively no value.)
which I would interpret as "Anything goes, as long as you don't use
the value of the statement expression".
- anton
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15242