Commit c7412148 by Tom Tromey Committed by Tom Tromey

c-parser.c (c_parser_translation_unit): Use location in error.

gcc
	* c-parser.c (c_parser_translation_unit): Use location in error.
	(c_parser_external_declaration): Likewise.
	(c_parser_declaration_or_fndef): Likewise.
	(c_parser_enum_specifier): Likewise.
	(c_parser_struct_or_union_specifier): Likewise.
	(c_parser_struct_declaration): Likewise.
	(c_parser_typeof_specifier): Likewise.
	(c_parser_parms_list_declarator): Likewise.
	(c_parser_asm_string_literal): Likewise.
	(c_parser_braced_init): Likewise.
	(c_parser_initelt): Likewise.
	(c_parser_compound_statement_nostart): Likewise.
	(c_parser_statement_after_labels): Likewise.
	(c_parser_do_statement): Likewise.
	(c_parser_asm_statement): Likewise.
	(c_parser_conditional_expression): Likewise.
	(c_parser_unary_expression): Likewise.
	(c_parser_sizeof_expression): Likewise.
	(c_parser_postfix_expression): Likewise.
	(c_parser_postfix_expression_after_paren_type): Likewise.
	(c_parser_objc_class_instance_variables): Likewise.
	(c_parser_objc_method_definition): Likewise.
	(c_parser_objc_methodprotolist): Likewise.
	(c_parser_pragma): Likewise.
	(c_parser_omp_clause_num_threads): Likewise.
	(c_parser_omp_clause_schedule): Likewise.
	(c_parser_omp_all_clauses): Likewise.
	(c_parser_omp_sections_scope): Likewise.
	(c_parser_label): Use location of label, not colon.
gcc/testsuite
	* gcc.dg/empty-source-3.c: Update warning location.
	* gcc.dg/gomp/barrier-2.c: Likewise.
	* gcc.dg/label-decl-3.c: Likewise.
	* gcc.dg/label-decl-2.c: Likewise.
	* gcc.dg/empty-source-2.c: Likewise.

From-SVN: r130025
parent 349fcd78
2007-11-08 Tom Tromey <tromey@redhat.com>
* c-parser.c (c_parser_translation_unit): Use location in error.
(c_parser_external_declaration): Likewise.
(c_parser_declaration_or_fndef): Likewise.
(c_parser_enum_specifier): Likewise.
(c_parser_struct_or_union_specifier): Likewise.
(c_parser_struct_declaration): Likewise.
(c_parser_typeof_specifier): Likewise.
(c_parser_parms_list_declarator): Likewise.
(c_parser_asm_string_literal): Likewise.
(c_parser_braced_init): Likewise.
(c_parser_initelt): Likewise.
(c_parser_compound_statement_nostart): Likewise.
(c_parser_statement_after_labels): Likewise.
(c_parser_do_statement): Likewise.
(c_parser_asm_statement): Likewise.
(c_parser_conditional_expression): Likewise.
(c_parser_unary_expression): Likewise.
(c_parser_sizeof_expression): Likewise.
(c_parser_postfix_expression): Likewise.
(c_parser_postfix_expression_after_paren_type): Likewise.
(c_parser_objc_class_instance_variables): Likewise.
(c_parser_objc_method_definition): Likewise.
(c_parser_objc_methodprotolist): Likewise.
(c_parser_pragma): Likewise.
(c_parser_omp_clause_num_threads): Likewise.
(c_parser_omp_clause_schedule): Likewise.
(c_parser_omp_all_clauses): Likewise.
(c_parser_omp_sections_scope): Likewise.
(c_parser_label): Use location of label, not colon.
2007-11-08 Danny Smith <dannysmith@users.sourceforge.net>
PR target/33774
2007-11-08 Tom Tromey <tromey@redhat.com>
* gcc.dg/empty-source-3.c: Update warning location.
* gcc.dg/gomp/barrier-2.c: Likewise.
* gcc.dg/label-decl-3.c: Likewise.
* gcc.dg/label-decl-2.c: Likewise.
* gcc.dg/empty-source-2.c: Likewise.
2007-11-08 Tom Tromey <tromey@redhat.com>
PR c++/30297:
* g++.dg/inherit/pr30297.C: New file.
......@@ -3,4 +3,4 @@
/* { dg-do compile } */
/* { dg-options "-pedantic" } */
/* { dg-warning "ISO C forbids an empty source file" "empty" { target *-*-* } 1 } */
/* { dg-warning "ISO C forbids an empty source file" "empty" { target *-*-* } 6 } */
......@@ -4,4 +4,4 @@
/* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */
/* { dg-error "ISO C forbids an empty source file" "empty" { target *-*-* } 1 } */
/* { dg-error "ISO C forbids an empty source file" "empty" { target *-*-* } 7 } */
......@@ -15,9 +15,9 @@ void f1(void)
void f2(void)
{
label:
label: /* { dg-error "label at end of compound statement" } */
#pragma omp barrier
} /* { dg-error "label at end of compound statement" } */
}
void f3(_Bool p)
{
......
......@@ -10,7 +10,7 @@ f (void)
{
__label__ a, b, c, d;
__extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
/* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } 12 } */
/* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } 11 } */
goto c; /* { dg-error "label 'c' used but not defined" } */
a: (void)0;
b: (void)0;
......
......@@ -11,7 +11,7 @@ f (void)
{
__label__ a, b, c, d;
__extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
/* { dg-error "ISO C forbids label declarations" "label decls" { target *-*-* } 13 } */
/* { dg-error "ISO C forbids label declarations" "label decls" { target *-*-* } 12 } */
goto c; /* { dg-error "label 'c' used but not defined" } */
a: (void)0;
b: (void)0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment