« Bugzilla Issues Index
#1550 — `if (0) do {} while (0); else {}` prohibited in draft but allowed in consensus reality
- bug_id:
1550
- creation_ts:
2013-06-06 09:41:00 -0700
- short_desc:
`if (0) do {} while (0); else {}` prohibited in draft but allowed in consensus reality
- delta_ts:
2013-07-15 17:03:44 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 15: May 14, 2013 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
Jason Orendorff
- assigned_to:
Allen Wirfs-Brock
- commentid:
4146
- comment_count:
0
- who:
Jason Orendorff
- bug_when:
2013-06-06 09:41:06 -0700
In response to bug 157, the semicolon was removed from the production for do-while loops.
But then this IfStatement:
if (0)
do {} while (0);
else
{}
would fail to parse because of the extra semicolon; the do-while line would parse as two statements (a do-while loop followed by an EmptyStatement) rather than one.
Putting the ";" back on that production, and adding an "opt", might work.
- commentid:
4246
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2013-06-18 10:41:46 -0700
fixed in rev 16 editor's draft
but ' back and added opt
- commentid:
4438
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2013-07-15 17:03:44 -0700
fixed in rev16 draft. July 15, 2013