[Bug optimization/15242] pessimization of "goto *"

anton at a0 dot complang dot tuwien dot ac dot at gcc-bugzilla@gcc.gnu.org
Sat May 1 15:03:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list