[Bug c/17913] [4.0 Regression] ICE jumping into statement expression
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Oct 27 12:25:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list