Commit aa99bd09 by Joseph Myers Committed by Joseph Myers

c-decl.c (c_decode_option): Give deprecation warning for -traditional.

	* 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
parent 6f4fdd10
2001-11-18 Joseph S. Myers <jsm28@cam.ac.uk>
* c-decl.c (c_decode_option): Give deprecation warning for
-traditional.
* doc/invoke.texi (-traditional): Note that this option is
deprecated.
Sun Nov 18 07:40:07 2001 Douglas B. Rupp <rupp@gnat.com> Sun Nov 18 07:40:07 2001 Douglas B. Rupp <rupp@gnat.com>
* config/alpha/alpha.c (alpha_start_function, VMS): Cast shift * config/alpha/alpha.c (alpha_start_function, VMS): Cast shift
......
...@@ -457,6 +457,7 @@ c_decode_option (argc, argv) ...@@ -457,6 +457,7 @@ c_decode_option (argc, argv)
if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional")) if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
{ {
warning ("-traditional is deprecated and may be removed");
flag_traditional = 1; flag_traditional = 1;
flag_writable_strings = 1; flag_writable_strings = 1;
} }
......
...@@ -1147,6 +1147,8 @@ literal characters @samp{x} and @samp{a} respectively. Without ...@@ -1147,6 +1147,8 @@ literal characters @samp{x} and @samp{a} respectively. Without
representation of a character, and @samp{\a} produces a bell. representation of a character, and @samp{\a} produces a bell.
@end itemize @end itemize
This option is deprecated and may be removed.
You may wish to use @option{-fno-builtin} as well as @option{-traditional} You may wish to use @option{-fno-builtin} as well as @option{-traditional}
if your program uses names that are normally GNU C built-in functions for if your program uses names that are normally GNU C built-in functions for
other purposes of its own. other purposes of its own.
......
2001-11-18 Joseph S. Myers <jsm28@cam.ac.uk> 2001-11-18 Joseph S. Myers <jsm28@cam.ac.uk>
* 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.
2001-11-18 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/no-builtin-1.c: New test. * gcc.dg/no-builtin-1.c: New test.
2001-11-16 Jakub Jelinek <jakub@redhat.com> 2001-11-16 Jakub Jelinek <jakub@redhat.com>
......
/* Basic tests of the #assert preprocessor extension. */ /* Basic tests of the #assert preprocessor extension. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-traditional" } */ /* { dg-options "-traditional-cpp" } */
/* #define def unused expansion */ /* tradcpp can't handle macros in answers. */ /* #define def unused expansion */ /* tradcpp can't handle macros in answers. */
#define fail int failit #define fail int failit
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Test case by Jason R. Thorpe <thorpej@zembu.com>. */ Test case by Jason R. Thorpe <thorpej@zembu.com>. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-traditional" } */ /* { dg-options "-traditional-cpp" } */
#define A(name) X/**/name #define A(name) X/**/name
......
/* Test whether traditional stringify works. */ /* Test whether traditional stringify works. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-traditional" } */ /* { dg-options "-traditional-cpp" } */
#define foo(a, b) c="a"; d="b"; #define foo(a, b) c="a"; d="b";
extern void abort (); extern void abort ();
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options -traditional } */ /* { dg-options -traditional } */
/* { dg-warning "-traditional is deprecated" "deprecation warning" { target *-*-* } 0 } */
int int
main () main ()
......
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