]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* c-parse.in (stmts_and_decls): Deprecate use of label at end of
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Nov 2000 20:00:22 +0000 (20:00 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Nov 2000 20:00:22 +0000 (20:00 +0000)
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

gcc/ChangeLog
gcc/c-parse.in
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/990214-1.c
gcc/testsuite/gcc.dg/wtr-label-1.c

index e980c45b086c5eebeb8b54590c321cfed613ed08..bf184f5d3ef743f326c229020f2c5419d5094da5 100644 (file)
@@ -1,3 +1,8 @@
+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
index 0f3d2ab5bef05755c51cbf6a69b053396272b841..288d248e52a5b8becea5c191a2f44bbce8ba5c80 100644 (file)
@@ -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
        ;
index 3cd833b512cacffd9c19d4bd9e7494ace4e61ec1..16e51fde621b63eb8a954896693ae0c5c99e23be 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 5701b5df7136837da0c26aa21ae6ca4ee58e3d22..492c6a7dcea29e60ef2bd2ea066cc201a555067b 100644 (file)
@@ -10,6 +10,6 @@ bar (int64_t which)
                break;
        case 1 :
        case 5 :
-       case 2 :
+       case 2 : ;
        }
 }
index 8c7d73ac6207fb197cf0b2ce03858c538f61593b..98f3eeba17313d9b8fdfeefb99cb4accffed27a6 100644 (file)
@@ -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: ;
 }