c/772: Statement expressions issues

Joseph Myers jsm28@cam.ac.uk
Sat Nov 11 04:36:00 GMT 2000


>Number:         772
>Category:       c
>Synopsis:       Statement expressions issues
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 11 04:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Joseph S. Myers
>Release:        2.97 20001110 (experimental)
>Organization:
none
>Environment:
System: Linux decomino 2.2.17 #1 Mon Sep 4 20:22:16 UTC 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
>Description:

There was a long discussion on the gcc mailing list starting with
<URL: http://gcc.gnu.org/ml/gcc/2000-07/msg00689.html > concerning
problems with GCC's statement expression extension.  The problems with
statement expressions in C++ have been documented, but nothing has
been done concerning the problem cases in C of jumping in and out of
statement expressions.

>How-To-Repeat:

>Fix:

Disallow jumps out of statement expressions, whether through goto or
return.  Disallow jumps into statement expressions, whether through
goto or switch statements, by making all labels in statement
expressions local to that statement expression and requiring that the
surrounding switch for case labels be within the statement expression.
Document these restrictions.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-bugs mailing list