aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-11-13 20:00:22 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2000-11-13 20:00:22 +0000
commitebf025238d9ed9a5039c539d7fd735e6e70180d8 (patch)
treef450d36b5d0117e10264bd68421184415c062777 /gcc
parent29b10746ab46f5901534d712d6108f219aceff97 (diff)
downloadgcc-ebf025238d9ed9a5039c539d7fd735e6e70180d8.zip
gcc-ebf025238d9ed9a5039c539d7fd735e6e70180d8.tar.gz
gcc-ebf025238d9ed9a5039c539d7fd735e6e70180d8.tar.bz2
c-parse.in (stmts_and_decls): Deprecate use of label at end of compound statement.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-parse.in3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/990214-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/wtr-label-1.c4
5 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e980c45..bf184f5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 0f3d2ab..288d248 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 3cd833b..16e51fd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/gcc.dg/990214-1.c b/gcc/testsuite/gcc.dg/990214-1.c
index 5701b5d..492c6a7 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 8c7d73a..98f3eeb 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: ;
}