From: jsm28 Date: Mon, 13 Nov 2000 20:00:22 +0000 (+0000) Subject: * c-parse.in (stmts_and_decls): Deprecate use of label at end of X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36096599684f7c20f62a2c3bce659e32f04fbd2a;p=thirdparty%2Fgcc.git * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37435 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e980c45b086c..bf184f5d3ef7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-11-13 Joseph S. Myers + + * c-parse.in (stmts_and_decls): Deprecate use of label at end of + compound statement. + 2000-11-13 Neil Booth * cpplex.c (_cpp_lex_token): CPP_COMMENT and true CPP_EOF diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 0f3d2ab5bef0..288d248e52a5 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1584,8 +1584,7 @@ stmts_and_decls: | 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 ; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3cd833b512ca..16e51fde621b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2000-11-13 Joseph S. Myers + + * 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 * gcc.c-torture/execute/loop-7.c: New test. diff --git a/gcc/testsuite/gcc.dg/990214-1.c b/gcc/testsuite/gcc.dg/990214-1.c index 5701b5df7136..492c6a7dcea2 100644 --- a/gcc/testsuite/gcc.dg/990214-1.c +++ b/gcc/testsuite/gcc.dg/990214-1.c @@ -10,6 +10,6 @@ bar (int64_t which) break; case 1 : case 5 : - case 2 : + case 2 : ; } } diff --git a/gcc/testsuite/gcc.dg/wtr-label-1.c b/gcc/testsuite/gcc.dg/wtr-label-1.c index 8c7d73ac6207..98f3eeba1731 100644 --- a/gcc/testsuite/gcc.dg/wtr-label-1.c +++ b/gcc/testsuite/gcc.dg/wtr-label-1.c @@ -25,7 +25,7 @@ testfunc1 (int foo6) 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 @@ -46,5 +46,5 @@ testfunc2 (int foo6) testfunc2: a: i: - j: + j: ; }