[PATCH] Fix to PR8880 (clang dies processing a for loop).
Richard Smith
richard at metafoo.co.uk
Wed Dec 11 14:07:28 PST 2013
================
Comment at: test/Parser/bad-control.c:22-30
@@ +21,11 @@
+
+// GCC rejects this code
+void pr8880_3(int first) {
+ for ( ; ; (void)({ if (first) { first = 0; continue; } 0; })) {}
+}
+
+// GCC rejects this code (see also tests/Analysis/dead-stores.c rdar8014335()
+void pr8880_4(int first) {
+ for ( ; ; (void)({ if (first) { first = 0; break; } 0; })) {}
+}
+
----------------
Does this mean we're misinterpreting pr8880_10 and pr8880_11 below?
================
Comment at: test/Sema/statements.c:94-95
@@ -93,4 +93,4 @@
// PR 8880
// FIXME: Clang should reject this, since GCC does. Previously this
// was causing a crash in the CFG builder.
int test_pr8880() {
----------------
Remove this FIXME.
http://llvm-reviews.chandlerc.com/D2018
More information about the cfe-commits
mailing list