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 jsm at polyomino dot org dot uk  2004-05-02 19:06 -------
Subject: Re:  pessimization of "goto *"

On Sun, 2 May 2004, anton at a0 dot complang dot tuwien dot ac dot at wrote:

> And that refers to a discussion in the mailing list, and the only
> mention of a problem with jumping out that I found there was in
> <http://gcc.gnu.org/ml/gcc/2000-07/msg00721.html>.  For this example
> the semantics seem pretty obvious and well-defined to me (in contrast
> to the jump-into example), and this was just a compiler bug.

The semantics are neither obvious nor well-defined, because other parts of
the larger expression containing the statement expression might or might
not have been evaluated.  The only thing in C giving rise to such a
situation (where parts of an expression might or might not have been
evaluated when a jump occurs) is setjmp/longjmp, and you should be able to
use longjmp in statement expressions; goto can't have such effects in C so
it's dubious allowing them in GNU C.



-- 


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]