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: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2004 19:06:40 -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 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