* c-parse.in (stmts_and_decls): Deprecate use of label at end of
compound statement.
testsuite:
* gcc.dg/wtr-label-1.c, gcc.dg/990214-1.c: Add semicolons after
labels at end of compound statements.
From-SVN: r37435
+2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * c-parse.in (stmts_and_decls): Deprecate use of label at end of
+ compound statement.
+
2000-11-13 Neil Booth <neilb@earthling.net>
* cpplex.c (_cpp_lex_token): CPP_COMMENT and true CPP_EOF
| lineno_stmt_decl_or_labels_ending_decl
| lineno_stmt_decl_or_labels_ending_label
{
- if (pedantic)
- pedwarn ("ISO C forbids label at end of compound statement");
+ pedwarn ("deprecated use of label at end of compound statement");
}
| lineno_stmt_decl_or_labels_ending_error
;
+2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * gcc.dg/wtr-label-1.c, gcc.dg/990214-1.c: Add semicolons after
+ labels at end of compound statements.
+
2000-11-13 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/loop-7.c: New test.
break;
case 1 :
case 5 :
- case 2 :
+ case 2 : ;
}
}
testfunc1: /* { dg-warning "traditional C lacks" "label conflicts with identifier" } */
a: /* { dg-warning "traditional C lacks" "label conflicts with identifier" } */
i:
- j:
+ j: ;
}
#line 32 "sys-header.h" 3
testfunc2:
a:
i:
- j:
+ j: ;
}