+2004-01-14 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * c-parse.in (stmts_and_decls): Make label at end of compound
+ statement a hard error.
+
2004-01-14 Jan Hubicka <jh@suse.cz>
* cgraph.c (create_edge): Use local.redefined_extern_inline.
/* YACC parser for C syntax and for Objective C. -*-c-*-
- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC.
| lineno_stmt_decl_or_labels_ending_decl
| lineno_stmt_decl_or_labels_ending_label
{
- pedwarn ("deprecated use of label at end of compound statement");
+ error ("label at end of compound statement");
}
| lineno_stmt_decl_or_labels_ending_error
;
+2004-01-14 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * gcc.dg/label-compound-stmt-1.c: New test.
+ * gcc.c-torture/compile/950922-1.c,
+ gcc.c-torture/compile/20000211-3.c,
+ gcc.c-torture/compile/20000518-1.c,
+ gcc.c-torture/compile/20021108-1.c: Avoid labels at and of
+ compound statements.
+
2004-01-14 Hartmut Penner <hpenner@de.ibm.com>
* gcc.dg/ppc64-abi-1.c: New test.
--- /dev/null
+/* Test that labels at ends of compound statements are hard errors. */
+/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void f(void) { g: } /* { dg-bogus "warning" "warning in place of error" } */
+/* { dg-error "label|parse|syntax" "label at end of compound statement" { target *-*-* } 6 } */