From aa99bd097969b1be33198b73898b4f8a3021a837 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 18 Nov 2001 17:16:24 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/c-decl.c | 1 + gcc/doc/invoke.texi | 2 ++ gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/cpp/assert_trad1.c | 2 +- gcc/testsuite/gcc.dg/cpp/tr-paste.c | 2 +- gcc/testsuite/gcc.dg/cpp/tr-str.c | 2 +- gcc/testsuite/gcc.dg/ext-glob.c | 1 + 8 files changed, 20 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4ed1c413e7..dd33c36d6ad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-11-18 Joseph S. Myers + + * 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 * config/alpha/alpha.c (alpha_start_function, VMS): Cast shift diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 5a34a2c1a40..4d7ca2b8936 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -457,6 +457,7 @@ c_decode_option (argc, argv) if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional")) { + warning ("-traditional is deprecated and may be removed"); flag_traditional = 1; flag_writable_strings = 1; } diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 83e5c97e8f6..32a2b353afb 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1147,6 +1147,8 @@ literal characters @samp{x} and @samp{a} respectively. Without representation of a character, and @samp{\a} produces a bell. @end itemize +This option is deprecated and may be removed. + 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 other purposes of its own. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 154d9c5ca3f..a4038a75f30 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2001-11-18 Joseph S. Myers + + * 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 * gcc.dg/no-builtin-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/cpp/assert_trad1.c b/gcc/testsuite/gcc.dg/cpp/assert_trad1.c index 69f644bd7b0..6d3c04e1a0d 100644 --- a/gcc/testsuite/gcc.dg/cpp/assert_trad1.c +++ b/gcc/testsuite/gcc.dg/cpp/assert_trad1.c @@ -1,6 +1,6 @@ /* Basic tests of the #assert preprocessor extension. */ /* { dg-do compile } */ -/* { dg-options "-traditional" } */ +/* { dg-options "-traditional-cpp" } */ /* #define def unused expansion */ /* tradcpp can't handle macros in answers. */ #define fail int failit diff --git a/gcc/testsuite/gcc.dg/cpp/tr-paste.c b/gcc/testsuite/gcc.dg/cpp/tr-paste.c index ac8a47bcbf5..e884e83c8d5 100644 --- a/gcc/testsuite/gcc.dg/cpp/tr-paste.c +++ b/gcc/testsuite/gcc.dg/cpp/tr-paste.c @@ -3,7 +3,7 @@ Test case by Jason R. Thorpe . */ /* { dg-do compile } */ -/* { dg-options "-traditional" } */ +/* { dg-options "-traditional-cpp" } */ #define A(name) X/**/name diff --git a/gcc/testsuite/gcc.dg/cpp/tr-str.c b/gcc/testsuite/gcc.dg/cpp/tr-str.c index bc749ba1035..342347381d0 100644 --- a/gcc/testsuite/gcc.dg/cpp/tr-str.c +++ b/gcc/testsuite/gcc.dg/cpp/tr-str.c @@ -1,6 +1,6 @@ /* Test whether traditional stringify works. */ /* { dg-do run } */ -/* { dg-options "-traditional" } */ +/* { dg-options "-traditional-cpp" } */ #define foo(a, b) c="a"; d="b"; extern void abort (); diff --git a/gcc/testsuite/gcc.dg/ext-glob.c b/gcc/testsuite/gcc.dg/ext-glob.c index cc772f574a3..deb51f50ea4 100644 --- a/gcc/testsuite/gcc.dg/ext-glob.c +++ b/gcc/testsuite/gcc.dg/ext-glob.c @@ -5,6 +5,7 @@ /* { dg-do compile } */ /* { dg-options -traditional } */ +/* { dg-warning "-traditional is deprecated" "deprecation warning" { target *-*-* } 0 } */ int main () -- 2.30.2