* c-decl.c (c_decode_option): Give deprecation warning for -traditional. * doc/invoke.texi (-traditional): Note that this option is deprecated. testsuite: * gcc.dg/cpp/assert_trad1.c, gcc.dg/cpp/tr-paste.c, gcc.dg/cpp/tr-str.c: Use -traditional-cpp instead of -traditional. * gcc.dg/ext-glob.c: Expect -traditional deprecation warning. From-SVN: r47147
20 lines
594 B
C
20 lines
594 B
C
/* Test for the warning about external functions with non-global
|
|
types. In -traditional mode, these functions are globally visible
|
|
even if declared in an inner scope, so their return types should
|
|
also be visible. */
|
|
|
|
/* { dg-do compile } */
|
|
/* { dg-options -traditional } */
|
|
/* { dg-warning "-traditional is deprecated" "deprecation warning" { target *-*-* } 0 } */
|
|
|
|
int
|
|
main ()
|
|
{
|
|
struct foo { int a, b; };
|
|
|
|
extern struct foo *bar(); /* { dg-warning "type of external" "good warn" } */
|
|
extern int baz(); /* { dg-bogus "type of external" "bad warn" } */
|
|
|
|
return 0;
|
|
}
|