This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]