This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17913] [4.0 Regression] ICE jumping into statement expression
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2004 12:25:16 -0000
- Subject: [Bug c/17913] [4.0 Regression] ICE jumping into statement expression
- References: <20041009192304.17913.jsm28@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2004-10-27 12:25 -------
Surely this is not valid?
A statement expression is an _expression_ so any kind of control
flow into or out of a statement expression is just wrong IMHO.
It's like jumping into "a + b", try defining semantics for such
a construct.
Looking at the documentation as an indication of the intent of
this extension, it appears that control flow into and out of
statement expressions is not supposed to happen:
" A compound statement enclosed in parentheses may appear as an
expression in GNU C. This allows you to use loops, switches, and
local variables within an expression."
Note, [various control structures] *within* an expression".
So statement expressions are still just expressions, and control
flow is supposed to be within the expression. Jumping into or
out of statement expressions was apparently not intended to be
supported.
So I think this really should be a hard error.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |loki at inf dot u-szeged dot
| |hu
Last reconfirmed|2004-10-09 20:18:31 |2004-10-27 12:25:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17913