diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-parser.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/empty-source-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/empty-source-3.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pack-test-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pragma-ep-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pragma-re-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/va-arg-2.c | 2 |
9 files changed, 23 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 906f1c5e7de..a033d4be8ad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-02-26 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR c/28800 + * c-parser.c (c_parser_translation_unit): Warn for empty + translation unit, not empty source file. + 2008-02-26 Paul Brook <paul@codesourcery.com> * config/arm/arm.c (thumb_set_frame_pointer): Ensure SP is first diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 72f8a21c0fe..1e63c14ef8b 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -1069,7 +1069,7 @@ c_parser_translation_unit (c_parser *parser) if (c_parser_next_token_is (parser, CPP_EOF)) { if (pedantic) - pedwarn ("%HISO C forbids an empty source file", + pedwarn ("%HISO C forbids an empty translation unit", &c_parser_peek_token (parser)->location); } else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 15853bc81bf..027543ef929 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2008-02-26 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR c/28800 + * gcc.dg/empty-source-2.c: Adjust for warning message. + * gcc.dg/empty-source-3.c: Likewise. + * gcc.dg/pack-test-2.c: Adjust comment. + * gcc.dg/pragma-ep-2.c: Likewise. + * gcc.dg/pragma-re-2.c: Likewise. + * gcc.dg/va-arg-2.c: Likewise. + 2008-02-26 Tobias Burnus <burnus@net-b.de> PR fortran/35033 diff --git a/gcc/testsuite/gcc.dg/empty-source-2.c b/gcc/testsuite/gcc.dg/empty-source-2.c index 4d9cc25ff7e..8ce201c13cd 100644 --- a/gcc/testsuite/gcc.dg/empty-source-2.c +++ b/gcc/testsuite/gcc.dg/empty-source-2.c @@ -3,4 +3,4 @@ /* { dg-do compile } */ /* { dg-options "-pedantic" } */ -/* { dg-warning "ISO C forbids an empty source file" "empty" { target *-*-* } 6 } */ +/* { dg-warning "ISO C forbids an empty translation unit" "empty" { target *-*-* } 6 } */ diff --git a/gcc/testsuite/gcc.dg/empty-source-3.c b/gcc/testsuite/gcc.dg/empty-source-3.c index 4facdab3e7e..0fd7be77754 100644 --- a/gcc/testsuite/gcc.dg/empty-source-3.c +++ b/gcc/testsuite/gcc.dg/empty-source-3.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-pedantic-errors" } */ -/* { dg-error "ISO C forbids an empty source file" "empty" { target *-*-* } 7 } */ +/* { dg-error "ISO C forbids an empty translation unit" "empty" { target *-*-* } 7 } */ diff --git a/gcc/testsuite/gcc.dg/pack-test-2.c b/gcc/testsuite/gcc.dg/pack-test-2.c index 8cb89f488e3..86e4d8df4ac 100644 --- a/gcc/testsuite/gcc.dg/pack-test-2.c +++ b/gcc/testsuite/gcc.dg/pack-test-2.c @@ -22,4 +22,4 @@ #pragma pack(push, foo, 3) /* { dg-warning "small power of two" } */ -extern int blah; /* prevent "ISO C forbids an empty source file" */ +extern int blah; /* prevent "ISO C forbids an empty translation unit" */ diff --git a/gcc/testsuite/gcc.dg/pragma-ep-2.c b/gcc/testsuite/gcc.dg/pragma-ep-2.c index 6e5c46704c9..1151d9b4bf1 100644 --- a/gcc/testsuite/gcc.dg/pragma-ep-2.c +++ b/gcc/testsuite/gcc.dg/pragma-ep-2.c @@ -4,4 +4,4 @@ #pragma extern_prefix foo /* { dg-warning "malformed" } */ #pragma extern_prefix "foo" 1 /* { dg-warning "junk" } */ -int bar; /* silence `ISO C forbids an empty source file' warning */ +int bar; /* silence `ISO C forbids an empty translation unit' warning */ diff --git a/gcc/testsuite/gcc.dg/pragma-re-2.c b/gcc/testsuite/gcc.dg/pragma-re-2.c index 40b9148dcc8..e86bb87c818 100644 --- a/gcc/testsuite/gcc.dg/pragma-re-2.c +++ b/gcc/testsuite/gcc.dg/pragma-re-2.c @@ -5,4 +5,4 @@ #pragma redefine_extname foo 1 /* { dg-warning "malformed" } */ #pragma redefine_extname foo bar 2 /* { dg-warning "junk" } */ -int bar; /* silence `ISO C forbids an empty source file' warning */ +int bar; /* silence `ISO C forbids an empty translation unit' warning */ diff --git a/gcc/testsuite/gcc.dg/va-arg-2.c b/gcc/testsuite/gcc.dg/va-arg-2.c index 597bf98d540..2fd0ed97e3f 100644 --- a/gcc/testsuite/gcc.dg/va-arg-2.c +++ b/gcc/testsuite/gcc.dg/va-arg-2.c @@ -9,4 +9,4 @@ /* { dg-error "no longer implements" "#error 1" { target *-*-* } 4 } */ /* { dg-error "Revise your code" "#error 2" { target *-*-* } 5 } */ -int x; /* prevent empty-source-file warning */ +int x; /* prevent empty-translation-unit warning */ |