https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49779
Martin Sebor changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49779
--- Comment #6 from joseph at codesourcery dot com 2011-07-21 14:26:05 UTC ---
See PR 44715 for previous discussion of issues with loop control
statements in statement expressions.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49779
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #5 f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49779
--- Comment #4 from bagnara at cs dot unipr.it 2011-07-20 06:44:25 UTC ---
Well... do you agree that the condition of a while loop has to be
evaluated at each iteration? If so, then we agree that the condition
is inside the while loop, not outsid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49779
--- Comment #3 from Andrew Pinski 2011-07-18
17:47:49 UTC ---
(In reply to comment #2)
> An extension that is still supported by GCC, right?
Yes but the semantics are not well defined in this area IIRC.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49779
--- Comment #2 from bagnara at cs dot unipr.it 2011-07-18 17:42:39 UTC ---
An extension that is still supported by GCC, right?
Here is another testcase showing the same phenomenon with `break':
int main() {
do {
while (({ break; 1; })) {
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49779
--- Comment #1 from Andrew Pinski 2011-07-18
17:36:38 UTC ---
Hmm, statement expressions are an extension to the C language.