gcc/:
PR c/28800
* c-parser.c (c_parser_translation_unit): Warn for empty
translation unit, not empty source file.
gcc/testsuite/:
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.
From-SVN: r132690
+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
2008-02-26 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (thumb_set_frame_pointer): Ensure SP is first
if (c_parser_next_token_is (parser, CPP_EOF))
{
if (pedantic)
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
&c_parser_peek_token (parser)->location);
}
else
+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
2008-02-26 Tobias Burnus <burnus@net-b.de>
PR fortran/35033
/* { dg-do compile } */
/* { dg-options "-pedantic" } */
/* { 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 } */
/* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */
/* { 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 } */
#pragma pack(push, foo, 3) /* { dg-warning "small power of two" } */
#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" */
#pragma extern_prefix foo /* { dg-warning "malformed" } */
#pragma extern_prefix "foo" 1 /* { dg-warning "junk" } */
#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 */
#pragma redefine_extname foo 1 /* { dg-warning "malformed" } */
#pragma redefine_extname foo bar 2 /* { dg-warning "junk" } */
#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 */
/* { dg-error "no longer implements" "#error 1" { target *-*-* } 4 } */
/* { dg-error "Revise your code" "#error 2" { target *-*-* } 5 } */
/* { 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 */