c-common.c, [...]: Delete code implementing -traditional mode.
authorZack Weinberg <zack@codesourcery.com>
Wed, 27 Feb 2002 18:48:07 +0000 (18:48 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Wed, 27 Feb 2002 18:48:07 +0000 (18:48 +0000)
* c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in,
c-tree.h, c-typeck.c, cppexp.c, cpplex.c, cpplib.c, cpplib.h,
cppmacro.c, objc/lang-specs.h, objc/objc-act.c,
builtin-types.def, builtins.def, dwarf2out.c, dwarfout.c,
gcc.c, toplev.c: Delete code implementing -traditional mode.

* ada/misc.c, ch/ch-tree.h, ch/decl.c, cp/decl2.c, f/com.c,
f/lex.c, f/top.c, java/builtins.c, java/decl.c: Delete
traditional-mode-related code copied from the C front end
but not used, or used only to permit the compiler to link.

* doc/bugreport.texi, doc/cpp.texi, doc/extend.texi,
doc/invoke.texi, doc/standards.texi, doc/trouble.texi:
Document removal of -traditional mode for compilation, and
remove documentation only relevant to that mode.

* config/nextstep.h, config/ptx4.h, config/svr4.h,
config/convex/convex.h, config/d30v/d30v.h,
config/i386/dgux.h, config/i386/osf1elf.h,
config/i386/osfelf.h, config/i386/osfrose.h,
config/i386/sco5.h, config/i386/sol2.h, config/m68k/a-ux.h,
config/m68k/hp310.h, config/m88k/dgux.h,
config/m88k/dguxbcs.h, config/m88k/luna.h, config/m88k/m88k.c,
config/m88k/m88k.h, config/m88k/openbsd.h,
config/mips/abi64.h, config/mips/osfrose.h,
config/mips/svr4-5.h, config/mips/svr4-t.h,
config/sparc/sol2-sld-64.h, config/sparc/sol2.h,
config/stormy16/stormy16.h: Remove all references to
-traditional from target specs.  Delete all mention of the
no-longer-necessary TRADITIONAL_RETURN_FLOAT macro.  Also
delete a couple of commented-out definitions of
DOLLARS_IN_IDENTIFIERS, with (incorrect) commentary referring
to -traditional.

* system.h: Poison TRADITIONAL_RETURN_FLOAT.
* doc/tm.texi: Remove mention of TRADITIONAL_RETURN_FLOAT macro.

* testsuite/gcc.c-torture/execute/920730-1t.c,
testsuite/gcc.c-torture/execute/920730-1t.x,
testsuite/gcc.dg/ext-glob.c: Delete test cases, only relevant
to -traditional.

From-SVN: r50110

73 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/misc.c
gcc/builtin-types.def
gcc/builtins.def
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/c-lex.c
gcc/c-parse.in
gcc/c-tree.h
gcc/c-typeck.c
gcc/ch/ChangeLog
gcc/ch/ch-tree.h
gcc/ch/decl.c
gcc/config/convex/convex.h
gcc/config/d30v/d30v.h
gcc/config/i386/dgux.h
gcc/config/i386/osf1elf.h
gcc/config/i386/osfelf.h
gcc/config/i386/osfrose.h
gcc/config/i386/sco5.h
gcc/config/i386/sol2.h
gcc/config/m68k/a-ux.h
gcc/config/m68k/hp310.h
gcc/config/m88k/dgux.h
gcc/config/m88k/dguxbcs.h
gcc/config/m88k/luna.h
gcc/config/m88k/m88k.c
gcc/config/m88k/m88k.h
gcc/config/m88k/openbsd.h
gcc/config/mips/abi64.h
gcc/config/mips/osfrose.h
gcc/config/mips/svr4-5.h
gcc/config/mips/svr4-t.h
gcc/config/nextstep.h
gcc/config/ptx4.h
gcc/config/sparc/sol2-sld-64.h
gcc/config/sparc/sol2.h
gcc/config/stormy16/stormy16.h
gcc/config/svr4.h
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cppexp.c
gcc/cpplex.c
gcc/cpplib.c
gcc/cpplib.h
gcc/cppmacro.c
gcc/doc/bugreport.texi
gcc/doc/cpp.texi
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/doc/standards.texi
gcc/doc/tm.texi
gcc/doc/trouble.texi
gcc/dwarf2out.c
gcc/dwarfout.c
gcc/f/ChangeLog
gcc/f/com.c
gcc/f/lex.c
gcc/f/top.c
gcc/gcc.c
gcc/java/ChangeLog
gcc/java/builtins.c
gcc/java/decl.c
gcc/objc/lang-specs.h
gcc/objc/objc-act.c
gcc/system.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/920730-1t.c [deleted file]
gcc/testsuite/gcc.c-torture/execute/920730-1t.x [deleted file]
gcc/testsuite/gcc.dg/ext-glob.c [deleted file]
gcc/toplev.c

index d963520a6d9f07a38220d455036791b78238d3e9..e7abb1659a3bca771642822c3ddf8519f460c352 100644 (file)
@@ -1,3 +1,37 @@
+2002-02-27  Zack Weinberg  <zack@codesourcery.com>
+
+       * c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in,
+       c-tree.h, c-typeck.c, cppexp.c, cpplex.c, cpplib.c, cpplib.h,
+       cppmacro.c, objc/lang-specs.h, objc/objc-act.c,
+       builtin-types.def, builtins.def, dwarf2out.c, dwarfout.c,
+       gcc.c, toplev.c: Delete code implementing -traditional mode.
+
+       * doc/bugreport.texi, doc/cpp.texi, doc/extend.texi,
+       doc/invoke.texi, doc/standards.texi, doc/trouble.texi:
+       Document removal of -traditional mode for compilation, and
+       remove documentation only relevant to that mode.
+
+       * config/nextstep.h, config/ptx4.h, config/svr4.h,
+       config/convex/convex.h, config/d30v/d30v.h,
+       config/i386/dgux.h, config/i386/osf1elf.h,
+       config/i386/osfelf.h, config/i386/osfrose.h,
+       config/i386/sco5.h, config/i386/sol2.h, config/m68k/a-ux.h,
+       config/m68k/hp310.h, config/m88k/dgux.h,
+       config/m88k/dguxbcs.h, config/m88k/luna.h, config/m88k/m88k.c,
+       config/m88k/m88k.h, config/m88k/openbsd.h,
+       config/mips/abi64.h, config/mips/osfrose.h,
+       config/mips/svr4-5.h, config/mips/svr4-t.h,
+       config/sparc/sol2-sld-64.h, config/sparc/sol2.h,
+       config/stormy16/stormy16.h: Remove all references to
+       -traditional from target specs.  Delete all mention of the
+       no-longer-necessary TRADITIONAL_RETURN_FLOAT macro.  Also
+       delete a couple of commented-out definitions of
+       DOLLARS_IN_IDENTIFIERS, with (incorrect) commentary referring
+       to -traditional.
+
+       * system.h: Poison TRADITIONAL_RETURN_FLOAT.
+       * doc/tm.texi: Remove mention of TRADITIONAL_RETURN_FLOAT macro.
+
 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
 
        * mklibgcc.in: Don't use \n in a line subject to
index 896382e5942e8616da4e5239e9dc724e1948bed7..1443a9052cd45f5463d2497dcc1550570d4ae927 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-27  Zack Weinberg  <zack@codesourcery.com>
+
+       * misc.c: Delete traditional-mode-related code copied from the
+       C front end but not used, or used only to permit the compiler
+       to link.
+
 2002-02-07  Richard Henderson  <rth@redhat.com>
 
        * adaint.c (__gnat_to_gm_time): First arg is int, not time_t.
index d422f60f9b265282bade4046b232742a007b7d6d..c4da9226dd8bb7a5739d920800c21b107919c980 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                           C Implementation File                          *
  *                                                                          *
- *                             $Revision$
+ *                             $Revision: 1.17 $
  *                                                                          *
  *          Copyright (C) 1992-2001 Free Software Foundation, Inc.          *
  *                                                                          *
@@ -152,7 +152,6 @@ extern char **gnat_argv;
 
 /* Global Variables Expected by gcc: */
 
-int flag_traditional;          /* Used by dwarfout.c.  */
 int ggc_p = 1;
 
 static void internal_error_function    PARAMS ((const char *, va_list *));
index 6cefb322f204b761f07ba2242e6de6ccd6842cb9..24b87d30cfa3e22bdd70a9563ec1a4ecd028537b 100644 (file)
@@ -73,13 +73,10 @@ DEF_PRIMITIVE_TYPE (BT_COMPLEX_LONG_DOUBLE, complex_long_double_type_node)
 
 DEF_PRIMITIVE_TYPE (BT_PTR, ptr_type_node)
 DEF_PRIMITIVE_TYPE (BT_CONST_PTR, const_ptr_type_node)
-DEF_PRIMITIVE_TYPE (BT_TRAD_PTR, traditional_ptr_type_node)
-DEF_PRIMITIVE_TYPE (BT_TRAD_CONST_PTR, traditional_cptr_type_node)
 DEF_PRIMITIVE_TYPE (BT_PTRMODE, type_for_mode (ptr_mode, 0))
 DEF_PRIMITIVE_TYPE (BT_SIZE, c_size_type_node)
 DEF_PRIMITIVE_TYPE (BT_STRING, string_type_node)
 DEF_PRIMITIVE_TYPE (BT_CONST_STRING, const_string_type_node)
-DEF_PRIMITIVE_TYPE (BT_LEN, traditional_len_type_node)
 
 DEF_PRIMITIVE_TYPE (BT_VALIST_REF, va_list_ref_type_node)
 DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_list_arg_type_node)
@@ -112,7 +109,7 @@ DEF_FUNCTION_TYPE_1 (BT_FN_PTR_SIZE, BT_PTR, BT_SIZE)
 DEF_FUNCTION_TYPE_1 (BT_FN_INT_INT, BT_INT, BT_INT)
 DEF_FUNCTION_TYPE_1 (BT_FN_INT_PTR, BT_INT, BT_PTR)
 DEF_FUNCTION_TYPE_1 (BT_FN_VOID_PTR, BT_VOID, BT_PTR)
-DEF_FUNCTION_TYPE_1 (BT_FN_LEN_CONST_STRING, BT_LEN, BT_CONST_STRING)
+DEF_FUNCTION_TYPE_1 (BT_FN_SIZE_CONST_STRING, BT_SIZE, BT_CONST_STRING)
 DEF_FUNCTION_TYPE_1 (BT_FN_INT_CONST_STRING, BT_INT, BT_CONST_STRING)
 DEF_FUNCTION_TYPE_1 (BT_FN_PTR_PTR, BT_PTR, BT_PTR)
 DEF_FUNCTION_TYPE_1 (BT_FN_VOID_VALIST_REF, BT_VOID, BT_VALIST_REF)
@@ -141,21 +138,19 @@ DEF_FUNCTION_TYPE_2 (BT_FN_LONG_LONG_LONG,
                     BT_LONG, BT_LONG, BT_LONG)
 DEF_FUNCTION_TYPE_2 (BT_FN_INT_PTR_CONST_STRING,
                     BT_INT, BT_PTR, BT_CONST_STRING)
-DEF_FUNCTION_TYPE_2 (BT_FN_VOID_TRAD_PTR_LEN,
-                    BT_VOID, BT_TRAD_PTR, BT_LEN)
+DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_SIZE,
+                    BT_VOID, BT_PTR, BT_SIZE)
 
 DEF_FUNCTION_TYPE_3 (BT_FN_STRING_STRING_CONST_STRING_SIZE,
                     BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE)
 DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_CONST_STRING_SIZE,
                     BT_INT, BT_CONST_STRING, BT_CONST_STRING, BT_SIZE)
-DEF_FUNCTION_TYPE_3 (BT_FN_TRAD_PTR_PTR_CONST_PTR_SIZE,
-                    BT_TRAD_PTR, BT_PTR, BT_CONST_PTR, BT_SIZE)
+DEF_FUNCTION_TYPE_3 (BT_FN_PTR_PTR_CONST_PTR_SIZE,
+                    BT_PTR, BT_PTR, BT_CONST_PTR, BT_SIZE)
 DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
                     BT_INT, BT_CONST_PTR, BT_CONST_PTR, BT_SIZE)
-DEF_FUNCTION_TYPE_3 (BT_FN_TRAD_PTR_PTR_INT_SIZE,
-                    BT_TRAD_PTR, BT_PTR, BT_INT, BT_SIZE)
-DEF_FUNCTION_TYPE_3 (BT_FN_INT_TRAD_CONST_PTR_TRAD_CONST_PTR_LEN,
-                    BT_INT, BT_TRAD_CONST_PTR, BT_TRAD_CONST_PTR, BT_LEN)
+DEF_FUNCTION_TYPE_3 (BT_FN_PTR_PTR_INT_SIZE,
+                    BT_PTR, BT_PTR, BT_INT, BT_SIZE)
 DEF_FUNCTION_TYPE_3 (BT_FN_VOID_PTR_INT_INT, BT_VOID, BT_PTR, BT_INT, BT_INT)
 
 DEF_FUNCTION_TYPE_4 (BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR,
index c6f6dc426f9c8334074c40ce484fdbf2bad9872e..7bfe7c2a1585f1d8a56db92449b755e7aee83647 100644 (file)
@@ -211,13 +211,13 @@ DEF_UNUSED_BUILTIN(BUILT_IN_FREM)
 DEF_BUILTIN (BUILT_IN_BZERO,
             "__builtin_bzero",
             BUILT_IN_NORMAL,
-            BT_FN_VOID_TRAD_PTR_LEN
+            BT_FN_VOID_PTR_SIZE
             BT_FN_VOID_VAR,
             true, true, true)
 DEF_BUILTIN (BUILT_IN_BCMP,
             "__builtin_bcmp",
             BUILT_IN_NORMAL,
-            BT_FN_INT_TRAD_CONST_PTR_TRAD_CONST_PTR_LEN,
+            BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
             BT_FN_INT_VAR,
             true, true, true)
 
@@ -233,13 +233,13 @@ DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX,
 
 DEF_LIB_BUILTIN(BUILT_IN_MEMCPY,
                "__builtin_memcpy",
-               BT_FN_TRAD_PTR_PTR_CONST_PTR_SIZE)
+               BT_FN_PTR_PTR_CONST_PTR_SIZE)
 DEF_LIB_BUILTIN(BUILT_IN_MEMCMP,
                "__builtin_memcmp",
                BT_FN_INT_CONST_PTR_CONST_PTR_SIZE)
 DEF_LIB_BUILTIN(BUILT_IN_MEMSET,
                "__builtin_memset",
-               BT_FN_TRAD_PTR_PTR_INT_SIZE)
+               BT_FN_PTR_PTR_INT_SIZE)
 
 DEF_LIB_BUILTIN(BUILT_IN_STRCAT,
                "__builtin_strcat",
@@ -261,7 +261,7 @@ DEF_LIB_BUILTIN(BUILT_IN_STRNCMP,
                BT_FN_INT_CONST_STRING_CONST_STRING_SIZE)
 DEF_LIB_BUILTIN(BUILT_IN_STRLEN,
                "__builtin_strlen",
-               BT_FN_LEN_CONST_STRING)
+               BT_FN_SIZE_CONST_STRING)
 DEF_LIB_BUILTIN(BUILT_IN_STRSTR,
                "__builtin_strstr",
                BT_FN_STRING_CONST_STRING_CONST_STRING)
index 1e49104d5631154078a7d4fd9f3eadfe7fba0e6d..ed67bb05b9109cc54e429e1011d637d76ae6475f 100644 (file)
@@ -663,8 +663,7 @@ combine_strings (strings)
      -Wwrite-strings says make the string constant an array of const char
      so that copying it to a non-const pointer will get a warning.
      For C++, this is the standard behavior.  */
-  if (flag_const_strings
-      && (! flag_traditional  && ! flag_writable_strings))
+  if (flag_const_strings && ! flag_writable_strings)
     {
       tree elements
        = build_type_variant (wide_flag ? wchar_type_node : char_type_node,
@@ -2529,11 +2528,6 @@ c_common_nodes_and_builtins ()
   tree builtin_types[(int) BT_LAST];
   int wchar_type_size;
   tree array_domain_type;
-  /* Either char* or void*.  */
-  tree traditional_ptr_type_node;
-  /* Either const char* or const void*.  */
-  tree traditional_cptr_type_node;
-  tree traditional_len_type_node;
   tree va_list_ref_type_node;
   tree va_list_arg_type_node;
 
@@ -2607,8 +2601,6 @@ c_common_nodes_and_builtins ()
   c_size_type_node =
     TREE_TYPE (identifier_global_value (get_identifier (SIZE_TYPE)));
   signed_size_type_node = signed_type (c_size_type_node);
-  if (flag_traditional)
-    c_size_type_node = signed_size_type_node;
   set_sizetype (c_size_type_node);
 
   build_common_tree_nodes_2 (flag_short_double);
@@ -2655,13 +2647,6 @@ c_common_nodes_and_builtins ()
     = build_pointer_type (build_qualified_type
                          (char_type_node, TYPE_QUAL_CONST));
 
-  traditional_ptr_type_node = ((flag_traditional && 
-                               c_language != clk_cplusplus)
-                              ? string_type_node : ptr_type_node);
-  traditional_cptr_type_node = ((flag_traditional && 
-                                c_language != clk_cplusplus)
-                              ? const_string_type_node : const_ptr_type_node);
-
   (*targetm.init_builtins) ();
 
   /* This is special for C++ so functions can be overloaded.  */
@@ -2721,10 +2706,6 @@ c_common_nodes_and_builtins ()
       va_list_ref_type_node = build_reference_type (va_list_type_node);
     }
  
-  traditional_len_type_node = ((flag_traditional && 
-                               c_language != clk_cplusplus)
-                              ? integer_type_node : sizetype);
-
 #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \
   builtin_types[(int) ENUM] = VALUE;
 #define DEF_FUNCTION_TYPE_0(ENUM, RETURN)              \
@@ -3020,11 +3001,9 @@ simple_type_promotes_to (type)
 
   if (c_promoting_integer_type_p (type))
     {
-      /* Traditionally, unsignedness is preserved in default promotions.
-         Also preserve unsignedness if not really getting any wider.  */
+      /* Preserve unsignedness if not really getting any wider.  */
       if (TREE_UNSIGNED (type)
-          && (flag_traditional
-              || TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node)))
+          && (TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node)))
         return unsigned_type_node;
       return integer_type_node;
     }
index 9bb2d1ac23398c218716dcc97f172c7c69197b92..a7581df696eb79a47c86ffa61778d2cfd48e82d7 100644 (file)
@@ -420,10 +420,6 @@ extern int warn_pointer_arith;
 /* Nonzero means to warn about compile-time division by zero.  */
 extern int warn_div_by_zero;
 
-/* Nonzero means do some things the same way PCC does.  */
-
-extern int flag_traditional;
-
 /* Nonzero means enable C89 Amendment 1 features.  */
 
 extern int flag_isoc94;
index 23c37ef8d93ae1473def30611409676d73882e2c..177bcea5744c302f7b2b2e5113e40ab6ad0e9bc0 100644 (file)
@@ -299,10 +299,6 @@ int flag_cond_mismatch;
 
 int flag_no_asm;
 
-/* Nonzero means do some things the same way PCC does.  */
-
-int flag_traditional;
-
 /* Nonzero means enable C89 Amendment 1 features.  */
 
 int flag_isoc94 = 0;
@@ -320,10 +316,6 @@ int flag_hosted = 1;
 
 int flag_noniso_default_format_attributes = 1;
 
-/* Nonzero means to allow single precision math even if we're generally
-   being traditional.  */
-int flag_allow_single_precision = 0;
-
 /* Nonzero means to treat bitfields as signed unless they say `unsigned'.  */
 
 int flag_signed_bitfields = 1;
@@ -470,15 +462,7 @@ c_decode_option (argc, argv)
 
   strings_processed = cpp_handle_option (parse_in, argc, argv, 0);
 
-  if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
-    {
-      warning ("-traditional is deprecated and may be removed");
-      flag_traditional = 1;
-      flag_writable_strings = 1;
-    }
-  else if (!strcmp (p, "-fallow-single-precision"))
-    flag_allow_single_precision = 1;
-  else if (!strcmp (p, "-fhosted") || !strcmp (p, "-fno-freestanding"))
+  if (!strcmp (p, "-fhosted") || !strcmp (p, "-fno-freestanding"))
     {
       flag_hosted = 1;
       flag_no_builtin = 0;
@@ -491,11 +475,6 @@ c_decode_option (argc, argv)
       if (warn_main == 2)
        warn_main = 0;
     }
-  else if (!strcmp (p, "-fnotraditional") || !strcmp (p, "-fno-traditional"))
-    {
-      flag_traditional = 0;
-      flag_writable_strings = 0;
-    }
   else if (!strncmp (p, "-std=", 5))
     {
       /* Select the appropriate language standard.  We currently
@@ -516,7 +495,6 @@ c_decode_option (argc, argv)
        iso_1990:
          flag_isoc94 = 0;
        iso_1994:
-         flag_traditional = 0;
          flag_writable_strings = 0;
          flag_no_asm = 1;
          flag_no_nonansi_builtin = 1;
@@ -533,7 +511,6 @@ c_decode_option (argc, argv)
               || !strcmp (argstart, "c9x")
               || !strcmp (argstart, "c99"))
        {
-         flag_traditional = 0;
          flag_writable_strings = 0;
          flag_no_asm = 1;
          flag_no_nonansi_builtin = 1;
@@ -543,7 +520,6 @@ c_decode_option (argc, argv)
        }
       else if (!strcmp (argstart, "gnu89"))
        {
-         flag_traditional = 0;
          flag_writable_strings = 0;
          flag_no_asm = 0;
          flag_no_nonansi_builtin = 0;
@@ -553,7 +529,6 @@ c_decode_option (argc, argv)
        }
       else if (!strcmp (argstart, "gnu9x") || !strcmp (argstart, "gnu99"))
        {
-         flag_traditional = 0;
          flag_writable_strings = 0;
          flag_no_asm = 0;
          flag_no_nonansi_builtin = 0;
@@ -1482,14 +1457,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
      match enough.  Ultimately, copy most of the information from the new
      decl to the old one, and keep using the old one.  */
 
-  if (flag_traditional && TREE_CODE (newdecl) == FUNCTION_DECL
-      && IDENTIFIER_IMPLICIT_DECL (DECL_NAME (newdecl)) == olddecl
-      && DECL_INITIAL (olddecl) == 0)
-    /* If -traditional, avoid error for redeclaring fcn
-       after implicit decl.  */
-    ;
-  else if (TREE_CODE (olddecl) == FUNCTION_DECL
-          && DECL_BUILT_IN (olddecl))
+  if (TREE_CODE (olddecl) == FUNCTION_DECL && DECL_BUILT_IN (olddecl))
     {
       /* A function declaration for a built-in function.  */
       if (!TREE_PUBLIC (newdecl))
@@ -1738,12 +1706,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
                }
              /* Type for passing arg must be consistent
                 with that declared for the arg.  */
-             if (! comptypes (TREE_VALUE (parm), TREE_VALUE (type))
-                 /* If -traditional, allow `unsigned int' instead of `int'
-                    in the prototype.  */
-                 && (! (flag_traditional
-                        && TYPE_MAIN_VARIANT (TREE_VALUE (parm)) == integer_type_node
-                        && TYPE_MAIN_VARIANT (TREE_VALUE (type)) == unsigned_type_node)))
+             if (! comptypes (TREE_VALUE (parm), TREE_VALUE (type)))
                {
                  error_with_decl (newdecl,
                                   "prototype for `%s' follows and argument %d doesn't match",
@@ -2194,10 +2157,7 @@ pushdecl (x)
                 IDENTIFIER_POINTER (name));
 
       t = lookup_name_current_level (name);
-      /* Don't type check externs here when -traditional.  This is so that
-        code with conflicting declarations inside blocks will get warnings
-        not errors.  X11 for instance depends on this.  */
-      if (! t && DECL_EXTERNAL (x) && TREE_PUBLIC (x) && ! flag_traditional)
+      if (! t && DECL_EXTERNAL (x) && TREE_PUBLIC (x))
        {
          t = IDENTIFIER_GLOBAL_VALUE (name);
          /* Type decls at global scope don't conflict with externs declared
@@ -2216,9 +2176,8 @@ pushdecl (x)
        }
 
       /* If this decl is `static' and an implicit decl was seen previously,
-        warn.  But don't complain if -traditional,
-        since traditional compilers don't complain.  */
-      if (! flag_traditional && TREE_PUBLIC (name)
+        warn.  */
+      if (TREE_PUBLIC (name)
          /* Don't test for DECL_EXTERNAL, because grokdeclarator
             sets this for all functions.  */
          && ! TREE_PUBLIC (x)
@@ -2312,9 +2271,6 @@ pushdecl (x)
        }
 
       /* Multiple external decls of the same identifier ought to match.
-        Check against both global declarations (when traditional) and out of
-        scope (limbo) block level declarations.
-
         We get warnings about inline functions where they are defined.
         Avoid duplicate warnings where they are used.  */
       if (TREE_PUBLIC (x)
@@ -2322,11 +2278,7 @@ pushdecl (x)
        {
          tree decl;
 
-         if (flag_traditional && IDENTIFIER_GLOBAL_VALUE (name) != 0
-             && (DECL_EXTERNAL (IDENTIFIER_GLOBAL_VALUE (name))
-                 || TREE_PUBLIC (IDENTIFIER_GLOBAL_VALUE (name))))
-           decl = IDENTIFIER_GLOBAL_VALUE (name);
-         else if (IDENTIFIER_LIMBO_VALUE (name) != 0)
+         if (IDENTIFIER_LIMBO_VALUE (name) != 0)
            /* Decls in limbo are always extern, so no need to check that.  */
            decl = IDENTIFIER_LIMBO_VALUE (name);
          else
@@ -2356,39 +2308,6 @@ pushdecl (x)
                             "previous implicit declaration of `%s'");
        }
 
-      /* In PCC-compatibility mode, extern decls of vars with no current decl
-        take effect at top level no matter where they are.  */
-      if (flag_traditional && DECL_EXTERNAL (x)
-         && lookup_name (name) == 0)
-       {
-         tree type = TREE_TYPE (x);
-
-         /* But don't do this if the type contains temporary nodes.  */
-         while (type)
-           {
-             if (type == error_mark_node)
-               break;
-             if (TYPE_CONTEXT (type))
-               {
-                 warning_with_decl (x, "type of external `%s' is not global");
-                 /* By exiting the loop early, we leave TYPE nonzero,
-                    and thus prevent globalization of the decl.  */
-                 break;
-               }
-             else if (TREE_CODE (type) == FUNCTION_TYPE
-                      && TYPE_ARG_TYPES (type) != 0)
-               /* The types might not be truly local,
-                  but the list of arg types certainly is temporary.
-                  Since prototypes are nontraditional,
-                  ok not to do the traditional thing.  */
-               break;
-             type = TREE_TYPE (type);
-           }
-
-         if (type == 0)
-           b = global_binding_level;
-       }
-
       /* This name is new in its binding level.
         Install the new declaration and return it.  */
       if (b == global_binding_level)
@@ -2622,8 +2541,7 @@ implicitly_declare (functionid)
   IDENTIFIER_IMPLICIT_DECL (functionid) = decl;
 
   /* ANSI standard says implicit declarations are in the innermost block.
-     So we record the decl in the standard fashion.
-     If flag_traditional is set, pushdecl does it top-level.  */
+     So we record the decl in the standard fashion.  */
   pushdecl (decl);
 
   /* This is a no-op in c-lang.c or something real in objc-actions.c.  */
@@ -2671,17 +2589,8 @@ redeclaration_error_message (newdecl, olddecl)
 {
   if (TREE_CODE (newdecl) == TYPE_DECL)
     {
-      if (flag_traditional && TREE_TYPE (newdecl) == TREE_TYPE (olddecl))
-       return 0;
-      /* pushdecl creates distinct types for TYPE_DECLs by calling
-        build_type_copy, so the above comparison generally fails.  We do
-        another test against the TYPE_MAIN_VARIANT of the olddecl, which
-        is equivalent to what this code used to do before the build_type_copy
-        call.  The variant type distinction should not matter for traditional
-        code, because it doesn't have type qualifiers.  */
-      if (flag_traditional
-         && TYPE_MAIN_VARIANT (TREE_TYPE (olddecl)) == TREE_TYPE (newdecl))
-       return 0;
+      /* Do not complain about type redeclarations where at least one
+        declaration was in a system header.  */
       if (DECL_IN_SYSTEM_HEADER (olddecl) || DECL_IN_SYSTEM_HEADER (newdecl))
        return 0;
       return 1;
@@ -3226,11 +3135,6 @@ builtin_function (name, type, function_code, class, library_name)
   tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
   DECL_EXTERNAL (decl) = 1;
   TREE_PUBLIC (decl) = 1;
-  /* If -traditional, permit redefining a builtin function any way you like.
-     (Though really, if the program redefines these functions,
-     it probably won't work right unless compiled with -fno-builtin.)  */
-  if (flag_traditional && name[0] != '_')
-    DECL_BUILT_IN_NONANSI (decl) = 1;
   if (library_name)
     SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
   make_decl_rtl (decl, NULL);
@@ -4319,9 +4223,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
   /* Decide whether an integer type is signed or not.
      Optionally treat bitfields as signed by default.  */
   if (specbits & 1 << (int) RID_UNSIGNED
-      /* Traditionally, all bitfields are unsigned.  */
-      || (bitfield && flag_traditional
-         && (! explicit_flag_signed_bitfields || !flag_signed_bitfields))
       || (bitfield && ! flag_signed_bitfields
          && (explicit_int || defaulted_int || explicit_char
              /* A typedef for plain `int' without `signed'
@@ -4735,13 +4636,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
              type = integer_type_node;
            }
 
-#ifndef TRADITIONAL_RETURN_FLOAT
-         /* Traditionally, declaring return type float means double.  */
-
-         if (flag_traditional && TYPE_MAIN_VARIANT (type) == float_type_node)
-           type = double_type_node;
-#endif /* TRADITIONAL_RETURN_FLOAT */
-
          /* Construct the function type and go to the next
             inner layer of declarator.  */
 
@@ -5634,7 +5528,7 @@ finish_struct (t, fieldlist, attributes)
        if (pedantic)
          pedwarn ("%s defined inside parms",
                   TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure"));
-       else if (! flag_traditional)
+       else
          warning ("%s defined inside parms",
                   TREE_CODE (t) == UNION_TYPE ? _("union") : _("structure"));
       }
@@ -6172,8 +6066,7 @@ build_enumerator (name, value)
   type = TREE_TYPE (value);
   type = type_for_size (MAX (TYPE_PRECISION (type),
                             TYPE_PRECISION (integer_type_node)),
-                       ((flag_traditional
-                         || TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node))
+                       (TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node)
                         && TREE_UNSIGNED (type)));
 
   decl = build_decl (CONST_DECL, name, type);
@@ -6402,12 +6295,10 @@ start_function (declspecs, declarator, attributes)
   /* Promote the value to int before returning it.  */
   if (c_promoting_integer_type_p (restype))
     {
-      /* It retains unsignedness if traditional
-        or if not really getting wider.  */
+      /* It retains unsignedness if not really getting wider.  */
       if (TREE_UNSIGNED (restype)
-         && (flag_traditional
-             || (TYPE_PRECISION (restype)
-                 == TYPE_PRECISION (integer_type_node))))
+         && (TYPE_PRECISION (restype)
+                 == TYPE_PRECISION (integer_type_node)))
        restype = unsigned_type_node;
       else
        restype = integer_type_node;
@@ -6626,15 +6517,6 @@ store_parm_decls ()
              layout_decl (found, 0);
            }
 
-         /* Traditionally, a parm declared float is actually a double.  */
-         if (found && flag_traditional
-             && TYPE_MAIN_VARIANT (TREE_TYPE (found)) == float_type_node)
-           {
-             TREE_TYPE (found) = double_type_node;
-             DECL_ARG_TYPE (found) = double_type_node;
-             layout_decl (found, 0);
-           }
-
          /* If no declaration found, default to int.  */
          if (!found)
            {
@@ -6768,11 +6650,7 @@ store_parm_decls ()
                             "prototype declaration");
                        }
                    }
-                 /* If -traditional, allow `int' argument to match
-                    `unsigned' prototype.  */
-                 else if (! (flag_traditional
-                             && TYPE_MAIN_VARIANT (TREE_TYPE (parm)) == integer_type_node
-                             && TYPE_MAIN_VARIANT (TREE_VALUE (type)) == unsigned_type_node))
+                 else
                    {
                      error ("argument `%s' doesn't match prototype",
                             IDENTIFIER_POINTER (DECL_NAME (parm)));
@@ -6903,13 +6781,6 @@ finish_function (nested)
 
   DECL_CONTEXT (DECL_RESULT (fndecl)) = fndecl;
 
-  /* Obey `register' declarations if `setjmp' is called in this fn.  */
-  if (flag_traditional && current_function_calls_setjmp)
-    {
-      setjmp_protect (DECL_INITIAL (fndecl));
-      setjmp_protect_args ();
-    }
-
   if (MAIN_NAME_P (DECL_NAME (fndecl)) && flag_hosted)
     {
       if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (fndecl)))
index a0d2bbdf2fd476eba6505a176261ade19c68207f..8c5c3e7e0b8a6a2dc410d3284affc9d3f8d68e62 100644 (file)
@@ -1065,7 +1065,7 @@ lex_number (str, len)
 #ifdef ERANGE
       /* ERANGE is also reported for underflow,
         so test the value to distinguish overflow from that.  */
-      if (conversion_errno == ERANGE && !flag_traditional && pedantic
+      if (conversion_errno == ERANGE && pedantic
          && (REAL_VALUES_LESS (dconst1, real)
              || REAL_VALUES_LESS (real, dconstm1)))
        warning ("floating point number exceeds range of 'double'");
@@ -1080,7 +1080,7 @@ lex_number (str, len)
     }
   else
     {
-      tree trad_type, ansi_type, type;
+      tree trad_type, type;
       HOST_WIDE_INT high, low;
       int spec_unsigned = 0;
       int spec_long = 0;
@@ -1089,7 +1089,7 @@ lex_number (str, len)
       int suffix_lu = 0;
       int warn = 0, i;
 
-      trad_type = ansi_type = type = NULL_TREE;
+      trad_type = type = NULL_TREE;
       while (p < str + len)
        {
          c = *p++;
@@ -1161,11 +1161,9 @@ lex_number (str, len)
       TREE_TYPE (value) = long_long_unsigned_type_node;
 
       /* If warn_traditional, calculate both the ISO type and the
-        traditional type, then see if they disagree.
-        Otherwise, calculate only the type for the dialect in use.  */
-      if (warn_traditional || flag_traditional)
+        traditional type, then see if they disagree.  */
+      if (warn_traditional)
        {
-         /* Calculate the traditional type.  */
          /* Traditionally, any constant is signed; but if unsigned is
             specified explicitly, obey that.  Use the smallest size
             with the right number of bits, except for one special
@@ -1195,50 +1193,46 @@ lex_number (str, len)
                         ? widest_unsigned_literal_type_node
                         : widest_integer_literal_type_node);
        }
-      if (warn_traditional || ! flag_traditional)
-       {
-         /* Calculate the ISO type.  */
-         if (! spec_long && ! spec_unsigned
-             && int_fits_type_p (value, integer_type_node))
-           ansi_type = integer_type_node;
-         else if (! spec_long && (base != 10 || spec_unsigned)
-                  && int_fits_type_p (value, unsigned_type_node))
-           ansi_type = unsigned_type_node;
-         else if (! spec_unsigned && !spec_long_long
-                  && int_fits_type_p (value, long_integer_type_node))
-           ansi_type = long_integer_type_node;
-         else if (! spec_long_long
-                  && int_fits_type_p (value, long_unsigned_type_node))
-           ansi_type = long_unsigned_type_node;
-         else if (! spec_unsigned
-                  && int_fits_type_p (value, long_long_integer_type_node))
-           ansi_type = long_long_integer_type_node;
-         else if (int_fits_type_p (value, long_long_unsigned_type_node))
-           ansi_type = long_long_unsigned_type_node;
-         else if (! spec_unsigned
-                  && int_fits_type_p (value, widest_integer_literal_type_node))
-           ansi_type = widest_integer_literal_type_node;
-         else
-           ansi_type = widest_unsigned_literal_type_node;
-       }
-
-      type = flag_traditional ? trad_type : ansi_type;
+       
+       /* Calculate the ISO type.  */
+       if (! spec_long && ! spec_unsigned
+           && int_fits_type_p (value, integer_type_node))
+         type = integer_type_node;
+       else if (! spec_long && (base != 10 || spec_unsigned)
+                && int_fits_type_p (value, unsigned_type_node))
+         type = unsigned_type_node;
+       else if (! spec_unsigned && !spec_long_long
+                && int_fits_type_p (value, long_integer_type_node))
+         type = long_integer_type_node;
+       else if (! spec_long_long
+                && int_fits_type_p (value, long_unsigned_type_node))
+         type = long_unsigned_type_node;
+       else if (! spec_unsigned
+                && int_fits_type_p (value, long_long_integer_type_node))
+         type = long_long_integer_type_node;
+       else if (int_fits_type_p (value, long_long_unsigned_type_node))
+         type = long_long_unsigned_type_node;
+       else if (! spec_unsigned
+                && int_fits_type_p (value, widest_integer_literal_type_node))
+         type = widest_integer_literal_type_node;
+       else
+         type = widest_unsigned_literal_type_node;
 
       /* We assume that constants specified in a non-decimal
         base are bit patterns, and that the programmer really
         meant what they wrote.  */
       if (warn_traditional && !in_system_header
-         && base == 10 && trad_type != ansi_type)
+         && base == 10 && trad_type != type)
        {
-         if (TYPE_PRECISION (trad_type) != TYPE_PRECISION (ansi_type))
-           warning ("width of integer constant changes with -traditional");
-         else if (TREE_UNSIGNED (trad_type) != TREE_UNSIGNED (ansi_type))
-           warning ("integer constant is unsigned in ISO C, signed with -traditional");
+         if (TYPE_PRECISION (trad_type) != TYPE_PRECISION (type))
+           warning ("width of integer constant is different in traditional C");
+         else if (TREE_UNSIGNED (trad_type) != TREE_UNSIGNED (type))
+           warning ("integer constant is unsigned in ISO C, signed in traditional C");
          else
-           warning ("width of integer constant may change on other systems with -traditional");
+           warning ("width of integer constant may change on other systems in traditional C");
        }
 
-      if (pedantic && !flag_traditional && (flag_isoc99 || !spec_long_long)
+      if (pedantic && (flag_isoc99 || !spec_long_long)
          && !warn
          && ((flag_isoc99
               ? TYPE_PRECISION (long_long_integer_type_node)
@@ -1265,15 +1259,6 @@ lex_number (str, len)
          else
            ERROR ("complex integer constant is too wide for 'complex int'");
        }
-      else if (flag_traditional && !int_fits_type_p (value, type))
-       /* The traditional constant 0x80000000 is signed
-          but doesn't fit in the range of int.
-          This will change it to -0x80000000, which does fit.  */
-       {
-         TREE_TYPE (value) = unsigned_type (type);
-         value = convert (type, value);
-         TREE_OVERFLOW (value) = TREE_CONSTANT_OVERFLOW (value) = 0;
-       }
       else
        TREE_TYPE (value) = type;
 
@@ -1345,8 +1330,7 @@ lex_string (str, len, wide)
          else
            mask = ~0;
          c = cpp_parse_escape (parse_in, (const unsigned char **) &p,
-                               (const unsigned char *) limit,
-                               mask, flag_traditional);
+                               (const unsigned char *) limit, mask);
        }
        
       /* Add this single character into the buffer either as a wchar_t
@@ -1409,7 +1393,7 @@ lex_charconst (token)
   unsigned int chars_seen;
  
   result = cpp_interpret_charconst (parse_in, token, warn_multichar,
-                                   flag_traditional, &chars_seen);
+                                   &chars_seen);
   if (token->type == CPP_WCHAR)
     {
       value = build_int_2 (result, 0);
index 176041bf0c86876515bb83f0f6aa3f7c2f489aaa..bae43d5761db1db2c3a918f647e5ffb45a2d4076 100644 (file)
@@ -367,7 +367,7 @@ datadef:
          setspecs notype_initdecls ';'
                { if (pedantic)
                    error ("ISO C forbids data definition with no type or storage class");
-                 else if (!flag_traditional)
+                 else
                    warning ("data definition has no type or storage class"); 
 
                  POP_DECLSPEC_STACK; }
@@ -3280,11 +3280,10 @@ struct resword
 
 /* Disable mask.  Keywords are disabled if (reswords[i].disable & mask) is
    _true_.  */
-#define D_TRAD 0x01    /* not in traditional C */
-#define D_C89  0x02    /* not in C89 */
-#define D_EXT  0x04    /* GCC extension */
-#define D_EXT89        0x08    /* GCC extension incorporated in C99 */
-#define D_OBJC 0x10    /* Objective C only */
+#define D_C89  0x01    /* not in C89 */
+#define D_EXT  0x02    /* GCC extension */
+#define D_EXT89        0x04    /* GCC extension incorporated in C99 */
+#define D_OBJC 0x08    /* Objective C only */
 
 static const struct resword reswords[] =
 {
@@ -3337,7 +3336,7 @@ static const struct resword reswords[] =
   { "break",           RID_BREAK,      0 },
   { "case",            RID_CASE,       0 },
   { "char",            RID_CHAR,       0 },
-  { "const",           RID_CONST,      D_TRAD },
+  { "const",           RID_CONST,      0 },
   { "continue",                RID_CONTINUE,   0 },
   { "default",         RID_DEFAULT,    0 },
   { "do",              RID_DO,         0 },
@@ -3349,24 +3348,24 @@ static const struct resword reswords[] =
   { "for",             RID_FOR,        0 },
   { "goto",            RID_GOTO,       0 },
   { "if",              RID_IF,         0 },
-  { "inline",          RID_INLINE,     D_TRAD|D_EXT89 },
+  { "inline",          RID_INLINE,     D_EXT89 },
   { "int",             RID_INT,        0 },
   { "long",            RID_LONG,       0 },
   { "register",                RID_REGISTER,   0 },
-  { "restrict",                RID_RESTRICT,   D_TRAD|D_C89 },
+  { "restrict",                RID_RESTRICT,   D_C89 },
   { "return",          RID_RETURN,     0 },
   { "short",           RID_SHORT,      0 },
-  { "signed",          RID_SIGNED,     D_TRAD },
+  { "signed",          RID_SIGNED,     0 },
   { "sizeof",          RID_SIZEOF,     0 },
   { "static",          RID_STATIC,     0 },
   { "struct",          RID_STRUCT,     0 },
   { "switch",          RID_SWITCH,     0 },
   { "typedef",         RID_TYPEDEF,    0 },
-  { "typeof",          RID_TYPEOF,     D_TRAD|D_EXT },
+  { "typeof",          RID_TYPEOF,     D_EXT },
   { "union",           RID_UNION,      0 },
   { "unsigned",                RID_UNSIGNED,   0 },
   { "void",            RID_VOID,       0 },
-  { "volatile",                RID_VOLATILE,   D_TRAD },
+  { "volatile",                RID_VOLATILE,   0 },
   { "while",           RID_WHILE,      0 },
 ifobjc
   { "id",              RID_ID,                 D_OBJC },
@@ -3545,7 +3544,6 @@ init_reswords ()
   unsigned int i;
   tree id;
   int mask = (flag_isoc99 ? 0 : D_C89)
-             | (flag_traditional ? D_TRAD : 0)
              | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0);
 
   if (c_language != clk_objective_c)
index 8f53b17e6bce7b1808cd1d9d9e2f320930993ec4..064ee0889a9e26018a3bc27ea03563ce6ac3cbca 100644 (file)
@@ -348,10 +348,6 @@ extern int warn_char_subscripts;
 
 extern int warn_main;
 
-/* Nonzero means to allow single precision math even if we're generally
-   being traditional.  */
-extern int flag_allow_single_precision;
-
 /* Warn if initializer is not completely bracketed.  */
 
 extern int warn_missing_braces;
index 2646a558850ad1500d0e1e441c7f97606b91b0d7..780a3f2ce821e1ff031f0e786654603bdfd17f82 100644 (file)
@@ -996,9 +996,8 @@ default_conversion (exp)
     {
       type = type_for_size (MAX (TYPE_PRECISION (type),
                                 TYPE_PRECISION (integer_type_node)),
-                           ((flag_traditional
-                             || (TYPE_PRECISION (type)
-                                 >= TYPE_PRECISION (integer_type_node)))
+                           ((TYPE_PRECISION (type)
+                             >= TYPE_PRECISION (integer_type_node))
                             && TREE_UNSIGNED (type)));
 
       return convert (type, exp);
@@ -1010,26 +1009,18 @@ default_conversion (exp)
         c_promoting_integer_type_p, otherwise leave it alone.  */
       && 0 > compare_tree_int (DECL_SIZE (TREE_OPERAND (exp, 1)),
                               TYPE_PRECISION (integer_type_node)))
-    return convert (flag_traditional && TREE_UNSIGNED (type)
-                   ? unsigned_type_node : integer_type_node,
-                   exp);
+    return convert (integer_type_node, exp);
 
   if (c_promoting_integer_type_p (type))
     {
-      /* Traditionally, unsignedness is preserved in default promotions.
-         Also preserve unsignedness if not really getting any wider.  */
+      /* Preserve unsignedness if not really getting any wider.  */
       if (TREE_UNSIGNED (type)
-         && (flag_traditional
-             || TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node)))
+         && TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))
        return convert (unsigned_type_node, exp);
 
       return convert (integer_type_node, exp);
     }
 
-  if (flag_traditional && !flag_allow_single_precision
-      && TYPE_MAIN_VARIANT (type) == float_type_node)
-    return convert (double_type_node, exp);
-
   if (code == VOID_TYPE)
     {
       error ("void value not ignored as it ought to be");
@@ -2120,18 +2111,14 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
                }
            }
 
-         /* Use the type of the value to be shifted.
-            This is what most traditional C compilers do.  */
+         /* Use the type of the value to be shifted.  */
          result_type = type0;
-         /* Unless traditional, convert the shift-count to an integer,
-            regardless of size of value being shifted.  */
-         if (! flag_traditional)
-           {
-             if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node)
-               op1 = convert (integer_type_node, op1);
-             /* Avoid converting op1 to result_type later.  */
-             converted = 1;
-           }
+         /* Convert the shift-count to an integer, regardless of size
+            of value being shifted.  */
+         if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node)
+           op1 = convert (integer_type_node, op1);
+         /* Avoid converting op1 to result_type later.  */
+         converted = 1;
        }
       break;
 
@@ -2147,18 +2134,14 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
                warning ("left shift count >= width of type");
            }
 
-         /* Use the type of the value to be shifted.
-            This is what most traditional C compilers do.  */
+         /* Use the type of the value to be shifted.  */
          result_type = type0;
-         /* Unless traditional, convert the shift-count to an integer,
-            regardless of size of value being shifted.  */
-         if (! flag_traditional)
-           {
-             if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node)
-               op1 = convert (integer_type_node, op1);
-             /* Avoid converting op1 to result_type later.  */
-             converted = 1;
-           }
+         /* Convert the shift-count to an integer, regardless of size
+            of value being shifted.  */
+         if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node)
+           op1 = convert (integer_type_node, op1);
+         /* Avoid converting op1 to result_type later.  */
+         converted = 1;
        }
       break;
 
@@ -2174,18 +2157,14 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
                warning ("shift count >= width of type");
            }
 
-         /* Use the type of the value to be shifted.
-            This is what most traditional C compilers do.  */
+         /* Use the type of the value to be shifted.  */
          result_type = type0;
-         /* Unless traditional, convert the shift-count to an integer,
-            regardless of size of value being shifted.  */
-         if (! flag_traditional)
-           {
-             if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node)
-               op1 = convert (integer_type_node, op1);
-             /* Avoid converting op1 to result_type later.  */
-             converted = 1;
-           }
+         /* Convert the shift-count to an integer, regardless of size
+            of value being shifted.  */
+         if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node)
+           op1 = convert (integer_type_node, op1);
+         /* Avoid converting op1 to result_type later.  */
+         converted = 1;
        }
       break;
 
@@ -2239,14 +2218,12 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
       else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
        {
          result_type = type0;
-         if (! flag_traditional)
-           pedwarn ("comparison between pointer and integer");
+         pedwarn ("comparison between pointer and integer");
        }
       else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
        {
          result_type = type1;
-         if (! flag_traditional)
-           pedwarn ("comparison between pointer and integer");
+         pedwarn ("comparison between pointer and integer");
        }
       break;
 
@@ -2315,14 +2292,12 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
       else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
        {
          result_type = type0;
-         if (! flag_traditional)
-           pedwarn ("comparison between pointer and integer");
+         pedwarn ("comparison between pointer and integer");
        }
       else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
        {
          result_type = type1;
-         if (! flag_traditional)
-           pedwarn ("comparison between pointer and integer");
+         pedwarn ("comparison between pointer and integer");
        }
       break;
 
@@ -4818,44 +4793,6 @@ digest_init (type, init, require_constant, constructor_constant)
       return error_mark_node;
     }
 
-  /* Traditionally, you can write  struct foo x = 0;
-     and it initializes the first element of x to 0.  */
-  if (flag_traditional)
-    {
-      tree top = 0, prev = 0, otype = type;
-      while (TREE_CODE (type) == RECORD_TYPE
-            || TREE_CODE (type) == ARRAY_TYPE
-            || TREE_CODE (type) == QUAL_UNION_TYPE
-            || TREE_CODE (type) == UNION_TYPE)
-       {
-         tree temp = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE);
-         if (prev == 0)
-           top = temp;
-         else
-           TREE_OPERAND (prev, 1) = build_tree_list (NULL_TREE, temp);
-         prev = temp;
-         if (TREE_CODE (type) == ARRAY_TYPE)
-           type = TREE_TYPE (type);
-         else if (TYPE_FIELDS (type))
-           type = TREE_TYPE (TYPE_FIELDS (type));
-         else
-           {
-             error_init ("invalid initializer");
-             return error_mark_node;
-           }
-       }
-
-      if (otype != type)
-       {
-         TREE_OPERAND (prev, 1)
-           = build_tree_list (NULL_TREE,
-                              digest_init (type, init, require_constant,
-                                           constructor_constant));
-         return top;
-       }
-      else
-       return error_mark_node;
-    }
   error_init ("invalid initializer");
   return error_mark_node;
 }
index 64d271daf9e9de126c90df7a51591e2ed75baef9..da5796e8c31235ca93d8968f1a0d351e34fa61b7 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-27  Zack Weinberg  <zack@codesourcery.com>
+
+       * ch-tree.h, decl.c: Delete traditional-mode-related code
+       copied from the C front end but not used, or used only to
+       permit the compiler to link.
+
 2002-01-11  Craig Rodrigues  <rodrigc@gcc.gnu.org>
 
        PR other/5299
index 62aae2c9f2d24df0e75ff8e7a22597cd616f969a..4b26e006c954fba7ebb32eccd23e75b50bb277d7 100644 (file)
@@ -427,10 +427,6 @@ extern int warn_nested_externs;
 
 extern int warn_cast_qual;
 
-/* Warn about traditional constructs whose meanings changed in ANSI C.  */
-
-extern int warn_traditional;
-
 /* Warn about *printf or *scanf format/argument anomalies. */
 
 extern int warn_format;
@@ -447,10 +443,6 @@ extern int warn_conversion;
 
 extern int warn_switch;
 
-/* Nonzero means do some things the same way PCC does.  */
-
-extern int flag_traditional;
-
 /* Nonzero means warn about suggesting putting in ()'s.  */
 
 extern int warn_parentheses;
index d0188f88c6c3f24db1f56b82e758421aaf0ede63..02070baffdd2bce281efb3775ba77fffd4453ec0 100644 (file)
@@ -462,14 +462,6 @@ int flag_no_builtin;
 
 int flag_no_nonansi_builtin;
 
-/* Nonzero means do some things the same way PCC does.  */
-
-int flag_traditional;
-
-/* Nonzero means to allow single precision math even if we're generally
-   being traditional. */
-int flag_allow_single_precision = 0;
-
 /* Nonzero means to treat bitfields as signed unless they say `unsigned'.  */
 
 int flag_signed_bitfields = 1;
@@ -617,21 +609,8 @@ c_decode_option (argc, argv)
      char **argv;
 {
   char *p = argv[0];
-  if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
-    {
-      flag_traditional = 1;
-      flag_writable_strings = 1;
-#if DOLLARS_IN_IDENTIFIERS > 0
-      dollars_in_ident = 1;
-#endif
-    }
-  else if (!strcmp (p, "-fnotraditional") || !strcmp (p, "-fno-traditional"))
-    {
-      flag_traditional = 0;
-      flag_writable_strings = 0;
-      dollars_in_ident = DOLLARS_IN_IDENTIFIERS > 1;
-    }
-  else if (!strcmp (p, "-fsigned-char"))
+
+  if (!strcmp (p, "-fsigned-char"))
     flag_signed_char = 1;
   else if (!strcmp (p, "-funsigned-char"))
     flag_signed_char = 0;
@@ -4071,11 +4050,6 @@ builtin_function (name, type, function_code, class, library_name)
   tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
   DECL_EXTERNAL (decl) = 1;
   TREE_PUBLIC (decl) = 1;
-  /* If -traditional, permit redefining a builtin function any way you like.
-     (Though really, if the program redefines these functions,
-     it probably won't work right unless compiled with -fno-builtin.)  */
-  if (flag_traditional && name[0] != '_')
-    DECL_BUILT_IN_NONANSI (decl) = 1;
   if (library_name)
     DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
   make_decl_rtl (decl, NULL_PTR, 1);
index 72224630c68a420ab29ed4b6e984c67092dd7f82..8c0fffabadce23bce1da38fd96f8b5eada4da5c8 100644 (file)
@@ -126,9 +126,8 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_IEEE_FLOAT_                                                                \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
@@ -144,21 +143,20 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_CONVEX_FLOAT_                                                      \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
 #endif
 
 #define LIB_SPEC                                                       \
-"%{!mc2:%{!mc32:%{!mc34:%{!mc38:-lC1%{traditional:_old}%{p:_p}%{pg:_p}}}}} \
- %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- -lc%{traditional:_old}%{p:_p}%{pg:_p}"
+"%{!mc2:%{!mc32:%{!mc34:%{!mc38:-lC1%{p:_p}%{pg:_p}}}}} \
+ %{mc2:-lC2%{p:_p}%{pg:_p}}                            \
+ %{mc32:-lC2%{p:_p}%{pg:_p}}                           \
+ %{mc34:-lC2%{p:_p}%{pg:_p}}                           \
+ %{mc38:-lC2%{p:_p}%{pg:_p}}                           \
+ -lc%{p:_p}%{pg:_p}"
 
 #endif
 
@@ -178,9 +176,8 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_IEEE_FLOAT_                                                                \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
@@ -196,21 +193,20 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_CONVEX_FLOAT_                                                      \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
 #endif
 
 #define LIB_SPEC                                                       \
-"%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{!mc1:%{!mc32:%{!mc34:%{!mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \
- %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- -lc%{traditional:_old}%{p:_p}%{pg:_p}"
+"%{mc1:-lC1%{p:_p}%{pg:_p}}                            \
+ %{!mc1:%{!mc32:%{!mc34:%{!mc38:-lC2%{p:_p}%{pg:_p}}}}} \
+ %{mc32:-lC2%{p:_p}%{pg:_p}}                           \
+ %{mc34:-lC2%{p:_p}%{pg:_p}}                           \
+ %{mc38:-lC2%{p:_p}%{pg:_p}}                           \
+ -lc%{p:_p}%{pg:_p}"
 
 #endif
 
@@ -230,9 +226,8 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_IEEE_FLOAT_                                                                \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
@@ -248,21 +243,20 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_CONVEX_FLOAT_                                                      \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
 #endif
 
 #define LIB_SPEC                                                       \
-"%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{!mc1:%{!mc2:%{!mc34:%{!mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \
- %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- -lc%{traditional:_old}%{p:_p}%{pg:_p}"
+"%{mc1:-lC1%{p:_p}%{pg:_p}}                            \
+ %{mc2:-lC2%{p:_p}%{pg:_p}}                            \
+ %{!mc1:%{!mc2:%{!mc34:%{!mc38:-lC2%{p:_p}%{pg:_p}}}}} \
+ %{mc34:-lC2%{p:_p}%{pg:_p}}                           \
+ %{mc38:-lC2%{p:_p}%{pg:_p}}                           \
+ -lc%{p:_p}%{pg:_p}"
 
 #endif
 
@@ -282,9 +276,8 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_IEEE_FLOAT_                                                                \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
@@ -300,21 +293,20 @@ extern int target_flags;
  -D__NO_INLINE_MATH -D__NO_INLINE_STDLIB                               \
  -D_CONVEX_FLOAT_                                                      \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
 #endif
 
 #define LIB_SPEC                                                       \
-"%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{!mc1:%{!mc2:%{!mc32:%{!mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \
- %{mc38:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- -lc%{traditional:_old}%{p:_p}%{pg:_p}"
+"%{mc1:-lC1%{p:_p}%{pg:_p}}                            \
+ %{mc2:-lC2%{p:_p}%{pg:_p}}                            \
+ %{mc32:-lC2%{p:_p}%{pg:_p}}                           \
+ %{!mc1:%{!mc2:%{!mc32:%{!mc38:-lC2%{p:_p}%{pg:_p}}}}} \
+ %{mc38:-lC2%{p:_p}%{pg:_p}}                           \
+ -lc%{p:_p}%{pg:_p}"
 
 #endif
 
@@ -334,9 +326,8 @@ extern int target_flags;
  -D_IEEE_FLOAT_                                                                \
  %{!mc1:%{!mc2:%{!mc32:%{!mc34:-D__convex_c38__}}}}                    \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
@@ -352,21 +343,20 @@ extern int target_flags;
  -D_CONVEX_FLOAT_                                                      \
  %{!mc1:%{!mc2:%{!mc32:%{!mc34:-D__convex_c38__}}}}                    \
  %{.S:-P}                                                              \
- %{!traditional:-D__stdc__}                                            \
- %{!traditional:-D_LONGLONG}                                           \
- %{!traditional:-Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long}    \
+ -D__stdc__ -D_LONGLONG                                                        \
+ -Ds64_t=long\\ long -Du64_t=unsigned\\ long\\ long                    \
  %{!ansi:-D_POSIX_SOURCE}                                              \
  %{!ansi:-D_CONVEX_SOURCE}"
 
 #endif
 
-#define LIB_SPEC                                                       \
-"%{mc1:-lC1%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{mc2:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                         \
- %{mc32:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}                                \
- %{!mc1:%{!mc2:%{!mc32:%{!mc34:-lC2%{traditional:_old}%{p:_p}%{pg:_p}}}}} \
- -lc%{traditional:_old}%{p:_p}%{pg:_p}"
+#define LIB_SPEC                                       \
+"%{mc1:-lC1%{p:_p}%{pg:_p}}                            \
+ %{mc2:-lC2%{p:_p}%{pg:_p}}                            \
+ %{mc32:-lC2%{p:_p}%{pg:_p}}                           \
+ %{mc34:-lC2%{p:_p}%{pg:_p}}                           \
+ %{!mc1:%{!mc2:%{!mc32:%{!mc34:-lC2%{p:_p}%{pg:_p}}}}} \
+ -lc%{p:_p}%{pg:_p}"
 
 #endif
 
@@ -377,14 +367,13 @@ extern int target_flags;
 #define ASM_SPEC "-fi"
 
 #define LINK_SPEC                                                      \
-"-E%{traditional:no}posix                                              \
+"-Eposix                                                               \
  -X                                                                    \
  %{F} %{M*} %{y*}                                                      \
  -fi                                                                   \
  -A__iob=___ap$iob                                                     \
  -A_use_libc_sema=___ap$use_libc_sema                                  \
- %{traditional:-A___gcc_cleanup=__cleanup}                             \
- %{!traditional:-A___gcc_cleanup=___ap$do_registered_functions}                \
+ %-A___gcc_cleanup=___ap$do_registered_functions                       \
  -L/usr/lib"
 
 #define STARTFILE_SPEC                                                 \
@@ -400,14 +389,13 @@ extern int target_flags;
 #define ASM_SPEC "-fn"
 
 #define LINK_SPEC                                                      \
-"-E%{traditional:no}posix                                              \
+"-Eposix                                                               \
  -X                                                                    \
  %{F} %{M*} %{y*}                                                      \
  -fn                                                                   \
  -A__iob=___ap$iob                                                     \
  -A_use_libc_sema=___ap$use_libc_sema                                  \
- %{traditional:-A___gcc_cleanup=__cleanup}                             \
- %{!traditional:-A___gcc_cleanup=___ap$do_registered_functions}                \
+ -A___gcc_cleanup=___ap$do_registered_functions                                \
  -L/usr/lib"
 
 #define STARTFILE_SPEC                                                 \
@@ -1342,7 +1330,7 @@ enum reg_class {
 #define FASCIST_ASSEMBLER
 
 /* __gcc_cleanup is loader-aliased to __ap$do_registered_functions if we
-   are linking against standard libc, 0 if old (-traditional) libc.  */
+   are linking against standard libc  */
 
 #define EXIT_BODY \
 {                                                                      \
index 5be4d47e1f0800f873529b7b83cb34e84a2f13ca..37dd1cfee51d2fea33348ea113e33cb529007d3a 100644 (file)
@@ -1700,10 +1700,6 @@ typedef int CUMULATIVE_ARGS;
 \f
 /* How Scalar Function Values are Returned */
 
-/* Define this macro if `-traditional' should not cause functions declared to
-   return `float' to convert the value to `double'.  */ /* #define
-   TRADITIONAL_RETURN_FLOAT */
-
 /* A C expression to create an RTX representing the place where a function
    returns a value of data type VALTYPE.  VALTYPE is a tree node representing a
    data type.  Write `TYPE_MODE (VALTYPE)' to get the machine mode used to
@@ -4606,13 +4602,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
    must also be defined).  */
 /* #define HANDLE_WEAK_PRAGMA */
 
-/* Define this macro to control use of the character `$' in identifier names.
-   The value should be 0, 1, or 2.  0 means `$' is not allowed by default; 1
-   means it is allowed by default if `-traditional' is used; 2 means it is
-   allowed by default provided `-ansi' is not used.  1 is the default; there is
-   no need to define this macro in that case.  */
-/* #define DOLLARS_IN_IDENTIFIERS */
-
 /* Define this macro if the assembler does not accept the character `$' in
    label names.  By default constructors and destructors in G++ have `$' in the
    identifiers.  If this macro is defined, `.' is used instead.
index f1707c1a614bbb9bd5060670d8cdc2d290da8365..cd344f4b2c2f6114f93ea9df95dc4ab85d984739 100644 (file)
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA.  */
 */
 
 #ifndef VERSION_INFO2
-#define VERSION_INFO2   "$Revision: 1.15 $"
+#define VERSION_INFO2   "$Revision: 1.16 $"
 #endif
 
 #ifndef VERSION_STRING
@@ -157,18 +157,17 @@ Boston, MA 02111-1307, USA.  */
    -Asystem=unix -Asystem=svr4"
 
    /*
-     If not -ansi, -traditional, or restricting include files to one
+     If not -ansi, or restricting include files to one
      specific source target, specify full DG/UX features.
    */
 #undef CPP_SPEC
-#define        CPP_SPEC "%(cpp_cpu) %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}"
+#define        CPP_SPEC "%(cpp_cpu) %{!ansi:-D__OPEN_NAMESPACE__}"
 
 /* Assembler support (legends for mxdb).  */
 #undef ASM_SPEC
 #define ASM_SPEC "\
 %{mno-legend:%{mstandard:-Wc,off}}\
-%{g:%{!mno-legend:-Wc,-fix-bb,-s\"%i\"\
-%{traditional:,-lc}%{!traditional:,-lansi-c}\
+%{g:%{!mno-legend:-Wc,-fix-bb,-s\"%i\",-lansi-c\
 %{mstandard:,-keep-std}\
 %{mexternal-legend:,-external}}}"
 
@@ -205,8 +204,7 @@ Boston, MA 02111-1307, USA.  */
                         %{pg:gcrti.o%s}%{!pg:crti.o%s}                 \
                         crtbegin.o%s                                   \
                         %{ansi:values-Xc.o%s}                          \
-                        %{!ansi:%{traditional:values-Xt.o%s}           \
-                                %{!traditional:values-Xa.o%s}}"
+                        %{!ansi:values-Xa.o%s}"
 
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:crtn.o%s}"
@@ -220,8 +218,7 @@ Boston, MA 02111-1307, USA.  */
                       %{pg:gcrti.o%s}%{!pg:/lib/crti.o%s}           \
                        crtbegin.o%s                                    \
                        %{ansi:/lib/values-Xc.o%s}                      \
-                       %{!ansi:%{traditional:/lib/values-Xt.o%s}       \
-                               %{!traditional:/lib/values-Xa.o%s}}"
+                       %{!ansi:/lib/values-Xa.o%s}"
 
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:/lib/crtn.o}"
index 812e9914a5448d5bf302fd463fe581885f3ac624..1f0c635730af6abb1ce40746fd4496fecea9b31e 100644 (file)
@@ -22,7 +22,7 @@
 #define CPP_SPEC "\
 %(cpp_cpu) \
 %{fpic: -D__SHARED__} %{fPIC: %{!fpic: -D__SHARED__}} \
-%{.S:  %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
+%{.S:  %{!ansi:%{!traditional-cpp: -traditional}}} \
 %{.S:  -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
 %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
 %{.cxx:        -D__LANGUAGE_C_PLUS_PLUS} \
index 9b0e63396bfd8fbbf131e99e24801998d25fe691..886dd1a4c2969c8df24ec9d1e172b9985b2da6ba 100644 (file)
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA.  */
 %{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \
 %{mno-underscores: -D__NO_UNDERSCORES__} \
 %{!mrose: %{!munderscores: -D__NO_UNDERSCORES__}} \
-%{.S:  %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
+%{.S:  %{!ansi:%{!traditional-cpp: -traditional}}} \
 %{.S:  -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
 %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
 %{.cxx:        -D__LANGUAGE_C_PLUS_PLUS} \
index 36d6345685b31c807a53bb2d4c28aea13bedcd13..4580e0ef56d02fca8b68c010b882e059aba83a92 100644 (file)
@@ -101,7 +101,7 @@ Boston, MA 02111-1307, USA.  */
 %{melf: -D__ELF__ %{fpic: -D__SHARED__}} \
 %{mno-underscores: -D__NO_UNDERSCORES__} \
 %{melf: %{!munderscores: -D__NO_UNDERSCORES__}} \
-%{.S:  %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
+%{.S:  %{!ansi:%{!traditional-cpp: -traditional}}} \
 %{.S:  -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
 %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
 %{.cxx:        -D__LANGUAGE_C_PLUS_PLUS} \
index 211ca366ab7a24641e57c7a69421d8d46b511b69..e449e866e9c9ac670dc3f0a4e10d9975a760adc0 100644 (file)
@@ -676,13 +676,11 @@ init_section ()                                                           \
     %{pg:gcrt.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}} \
   %{ansi:values-Xc.o%s} \
   %{!ansi: \
-   %{traditional:values-Xt.o%s} \
-    %{!traditional: \
-     %{Xa:values-Xa.o%s} \
-      %{!Xa:%{Xc:values-Xc.o%s} \
-       %{!Xc:%{Xk:values-Xk.o%s} \
-        %{!Xk:%{Xt:values-Xt.o%s} \
-         %{!Xt:values-Xa.o%s}}}}}} \
+   %{Xa:values-Xa.o%s} \
+    %{!Xa:%{Xc:values-Xc.o%s} \
+     %{!Xc:%{Xk:values-Xk.o%s} \
+      %{!Xk:%{Xt:values-Xt.o%s} \
+       %{!Xt:values-Xa.o%s}}}}} \
   %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}"
 
 #undef ENDFILE_SPEC
@@ -719,7 +717,6 @@ init_section ()                                                             \
                       -DM_BITFIELDS -DM_SYS5 -DM_SYSV -DM_INTERNAT -DM_SYSIII \
                       -DM_WORDSWAP}}}} \
   %{scointl:-DM_INTERNAT -D_M_INTERNAT} \
-  %{traditional:-D_KR -D_SVID -D_NO_PROTOTYPE} \
   %{!mcoff:-D_SCO_ELF} \
   %{mcoff:-D_M_COFF -D_SCO_COFF} \
   %{!mcoff:%{fpic:-D__PIC__ -D__pic__} \
@@ -728,8 +725,7 @@ init_section ()                                                             \
   %{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \
    %{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \
     %{!Xk:%{Xt:-D_SCO_C_DIALECT=2} \
-     %{!Xt:-D_SCO_C_DIALECT=1}}}} \
-  %{traditional:-traditional -D_KR -D_NO_PROTOTYPE}"
+     %{!Xt:-D_SCO_C_DIALECT=1}}}}"
 
 #undef LINK_SPEC
 #define LINK_SPEC \
index fb9d74530bdba9ee93c5adf371f77cd20d226ac8..6fb2eb598f0bb3299f2bd5de3ead147c689768cf 100644 (file)
@@ -113,9 +113,7 @@ Boston, MA 02111-1307, USA.  */
                          %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
                        %{pg:gmon.o%s} crti.o%s \
                        %{ansi:values-Xc.o%s} \
-                       %{!ansi: \
-                        %{traditional:values-Xt.o%s} \
-                        %{!traditional:values-Xa.o%s}} \
+                       %{!ansi:values-Xa.o%s} \
                        crtbegin.o%s"
   
 /* This should be the same as in svr4.h, except with -R added.  */
index 761bf73e01ae253b43f6a113c8043b26a9e4c25a..c4c6c448b5280e314ba9b105d3a934035dae7c44 100644 (file)
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA.  */
 %{!mc68000:%{!m68000:-Acpu=mc68020 -D__mc68020__ %{!ansi:-Dmc68020 }}}\
 %{m68030:-Acpu=mc68030 -D__mc68030__ %{!ansi:-Dmc68030 }}\
 %{m68040:-Acpu=mc68040 -D__mc68040__ %{!ansi:-Dmc68040 }}\
-%{!ansi:%{!traditional:-D__STDC__=2 }}\
+%{!ansi:-D__STDC__=2 }\
 %{sbsd:-D_BSD_SOURCE -DBSD }%{ZB:-D_BSD_SOURCE -DBSD }\
 %{ssysv:-D_SYSV_SOURCE -DSYSV -DUSG }%{ZS:-D_SYSV_SOURCE -DSYSV -DUSG }\
 %{sposix:-D_POSIX_SOURCE -DPOSIX }%{ZP:-D_POSIX_SOURCE -DPOSIX }\
index 8f1d9c7adfddabf9b5eb45e76a69353654931a7e..4c765b89f55a157916a4fd4417bf9ecdd182df06 100644 (file)
 #ifdef HPUX_ASM
 
 #define CPP_SPEC "-D__HPUX_ASM__ %{m68881: -D__HAVE_68881__}\
-%{m68020: -Dmc68020}%{mc68020: -Dmc68020}\
-%{!traditional:-D_INCLUDE__STDC__}"
+%{m68020: -Dmc68020}%{mc68020: -Dmc68020} -D_INCLUDE__STDC__"
 
 #define ASM_SPEC "%{!m68020:%{!mc68020:+X}}"
 
 #else  /* not HPUX_ASM */
 
 #define CPP_SPEC "%{m68881: -D__HAVE_68881__}\
-%{m68020: -Dmc68020}%{mc68020: -Dmc68020}\
-%{!traditional:-D_INCLUDE__STDC__}"
+%{m68020: -Dmc68020}%{mc68020: -Dmc68020} -D_INCLUDE__STDC__"
 
 #define ASM_SPEC \
  "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}"
index a789f395450de8824563dab4a9bbafdfbcd663a0..b7d134d4e6abfffd450dc93b3099ba55140072ee 100644 (file)
@@ -80,7 +80,7 @@ Boston, MA 02111-1307, USA.  */
 
 /* If -m88100 is in effect, add -Dm88100; similarly for -m88110.
    Here, the CPU_DEFAULT is assumed to be -m88000.  If not -ansi,
-   -traditional, or restricting include files to one specific source
+   or restricting include files to one specific source
    target, specify full DG/UX features.  */
 #undef CPP_SPEC
 #define        CPP_SPEC "%(cpp_cpu) %{msvr3:-D_M88KBCS_TARGET} %{!msvr3:-D_DGUX_TARGET}"
@@ -140,9 +140,7 @@ Boston, MA 02111-1307, USA.  */
                  %{v:-V}\
                  %{g:\
 %{mno-legend:-Wc,off}\
-%{!mno-legend:-Wc,-fix-bb,-s\"%i\"\
-%{traditional:,-lc}\
-%{!traditional:,-lansi-c}\
+%{!mno-legend:-Wc,-fix-bb,-s\"%i\",-lansi-c\
 %{mstandard:,-keep-std}\
 %{mexternal-legend:,-external}\
 %{mocs-frame-position:,-ocs}}}"
@@ -150,15 +148,14 @@ Boston, MA 02111-1307, USA.  */
 #define CPP_CPU_SPEC "\
                   %{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \
                  %{!m88000:%{!m88110:%{m88100:-D__m88100__}}} \
-                 %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}"
+                 %{!ansi:-D__OPEN_NAMESPACE__}"
 
 #define STARTFILE_DEFAULT_SPEC "\
                         %{!shared:%{!symbolic:%{pg:gcrt0.o%s} \
                         %{!pg:%{p:/lib/mcrt0.o}%{!p:/lib/crt0.o}} \
                          %(startfile_crtbegin) \
                         %{svr4:%{ansi:/lib/values-Xc.o} \
-                         %{!ansi:%{traditional:/lib/values-Xt.o} \
-                          %{!traditional:/usr/lib/values-Xa.o}}}}}"
+                         %{!ansi:/usr/lib/values-Xa.o}}}}"
 
 #define STARTFILE_CRTBEGIN_SPEC "\
                         %{msvr3:m88kdgux.ld%s bcscrtbegin.o%s} \
@@ -189,7 +186,7 @@ Boston, MA 02111-1307, USA.  */
       {                                                                        \
        fprintf (FILE, ";legend_info -fix-bb -h\"gcc-%s\" -s\"%s\"",    \
                 version_string, main_input_filename);                  \
-       fputs (flag_traditional ? " -lc" : " -lansi-c", FILE);          \
+       fputs (" -lansi-c", FILE);                                      \
        if (TARGET_STANDARD)                                            \
          fputs (" -keep-std", FILE);                                   \
        if (TARGET_EXTERNAL_LEGEND)                                     \
index a7b506035bfd4f09961a74688e663a7f9f31bc16..92109c0f8ae784b0a51cc0ce4c0fe1ccb2c65a4d 100644 (file)
@@ -41,9 +41,7 @@ Boston, MA 02111-1307, USA.  */
                  %(asm_cpu)"
 
 /* If -m88100 is in effect, add -Dm88100; similarly for -m88110.
-   Here, the CPU_DEFAULT is assumed to be -m88000.  If not -ansi,
-   -traditional, or restricting include files to one specific source
-   target, specify full DG/UX features.  */
+   Here, the CPU_DEFAULT is assumed to be -m88000.  */
 #undef CPP_SPEC
 #define        CPP_SPEC "%(cpp_cpu) \
                  %{!msvr4:-D_M88KBCS_TARGET} %{msvr4:-D_DGUX_TARGET}"
index 694177f238c255df5b5882a65a39bc3e32bea250..ca2e683ee224d4ee51689c7cbfff762e8b7a44f0 100644 (file)
@@ -46,13 +46,8 @@ Boston, MA 02111-1307, USA.  */
 #define        CPP_SPEC "%{m88000:-D__mc88000__} \
                  %{!m88000:%{m88100:%{m88110:-D__mc88000__}}} \
                  %{!m88000:%{!m88100:%{m88110:-D__mc88110__}}} \
-                 %{!m88000:%{!m88110:%{!ansi:%{traditional:-Dmc88100}} \
-                                     -D__mc88100__ -D__mc88100}}"
+                 %{!m88000:%{!m88110:-D__mc88100__ -D__mc88100}}"
 
 /* Specify extra dir to search for include files.  */
 #undef SYSTEM_INCLUDE_DIR
 #define SYSTEM_INCLUDE_DIR "/usr/mach/include"
-
-/* For the Omron Luna/88k, a float function returns a double in traditional
-   mode (and a float in ansi mode).  */
-#undef TRADITIONAL_RETURN_FLOAT
index c1c2146603e90bdea5dca6d2ca76f35a4c6f4d4b..d53bffdfffb18b315356be8415aa490367bf4c08 100644 (file)
@@ -43,7 +43,6 @@ Boston, MA 02111-1307, USA.  */
 #include "target.h"
 #include "target-def.h"
 
-extern int flag_traditional;
 extern FILE *asm_out_file;
 
 const char *m88k_pound_sign = ""; /* Either # for SVR4 or empty for SVR3 */
@@ -1567,8 +1566,6 @@ output_options (file, f_options, f_len, W_options, W_len,
     pos = output_option (file, sep, "-O", "", indent, pos, max);
   if (write_symbols != NO_DEBUG)
     pos = output_option (file, sep, "-g", "", indent, pos, max);
-  if (flag_traditional)
-    pos = output_option (file, sep, "-traditional", "", indent, pos, max);
   if (profile_flag)
     pos = output_option (file, sep, "-p", "", indent, pos, max);
   for (j = 0; j < f_len; j++)
index 5fbad59cfded065fdd999e3d6117510c9d65609b..c002809ec94ec6e95c17cf10ca18d950ddec1634 100644 (file)
@@ -1516,10 +1516,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
    mismatch, it also makes for better code on certain machines.  */
 #define PROMOTE_PROTOTYPES 1
 
-/* Define this macro if a float function always returns float
-   (even in traditional mode).  Redefined in luna.h.  */
-#define TRADITIONAL_RETURN_FLOAT
-
 /* We assume that the store-condition-codes instructions store 0 for false
    and some other value for true.  This is the value stored for true.  */
 #define STORE_FLAG_VALUE (-1)
index 57ac92437a4ca1517983f98898a992e3beaa1e5e..56891e8f0837bd9af5fe91fbd79afac81822e76f 100644 (file)
@@ -33,14 +33,10 @@ Boston, MA 02111-1307, USA.  */
 #define        CPP_SPEC "%{m88000:-D__mc88000__} \
                  %{!m88000:%{m88100:%{m88110:-D__mc88000__}}} \
                  %{!m88000:%{!m88100:%{m88110:-D__mc88110__}}} \
-                 %{!m88000:%{!m88110:%{!ansi:%{traditional:-Dmc88100}} \
-                 -D__mc88100__ -D__mc88100}} %{posix:-D_POSIX_SOURCE} \
+                 %{!m88000:%{!m88110:-D__mc88100__ -D__mc88100}} \
+                 %{posix:-D_POSIX_SOURCE} \
                  %{pthread:-D_POSIX_THREADS}"
 
-/* For the Omron Luna/88k, a float function returns a double in traditional
-   mode (and a float in ansi mode).  */
-#undef TRADITIONAL_RETURN_FLOAT
-
 /* Layout of source language data types. */
 
 /* This must agree with <machine/ansi.h> */
index 9109d43b633dd4007f450b9dc88d1fa04491ab8e..13581a3a712d763fe6b1ae86e298454effef6f64 100644 (file)
@@ -209,11 +209,7 @@ Boston, MA 02111-1307, USA.  */
    does not make a copy.  Instead, it passes a pointer to the "live"
    value.  The called function must not modify this value.  If it can
    be determined that the value won't be modified, it need not make a
-   copy; otherwise a copy must be made.
-
-   ??? The MIPS EABI says that the caller should copy in ``K&R mode.''
-   I don't know how to detect that here, since flag_traditional is not
-   a back end flag.  */
+   copy; otherwise a copy must be made.  */
 #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED)             \
   (mips_abi == ABI_EABI && (NAMED)                                     \
    && FUNCTION_ARG_PASS_BY_REFERENCE (CUM, MODE, TYPE, NAMED))
index c15754d8971b2b4b605d0f13736651112d0a6637..aa9a585d2b87616ca1e4e5b68d9bf8a46f61d019 100644 (file)
@@ -39,8 +39,7 @@ Boston, MA 02111-1307, USA.  */
 %{!mlong64:-D__PTRDIFF_TYPE__=int}"
 
 #define SUBTARGET_CPP_SPEC "\
-%{.S:  %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
-%{.s:  %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}}"
+%{.S:  %{!ansi:%{!traditional-cpp: -traditional}}}"
 
 /* ??? This assumes that GNU as is always used with GNU ld, and MIPS as is
    always used with MIPS ld.  */
index 875493875d53cfde3d5eb1be9ef8824f256b6547..d432b42e17af390f757d30c2b4b9660eb02e6966 100644 (file)
@@ -40,9 +40,7 @@ Boston, MA 02111-1307, USA.  */
 
 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}\
        %{ansi:/svr4/usr/ccs/lib/values-Xc.o%s} \
-                          %{!ansi: \
-                           %{traditional:/svr4/usr/ccs/lib/values-Xt.o%s} \
-                           %{!traditional:/svr4/usr/ccs/lib/values-Xa.o%s}}"
+        %{!ansi:/svr4/usr/ccs/lib/values-Xa.o%s}"
 
 #define MACHINE_TYPE "RISC-OS System V.4 Mips"
 
index 25a5d5383ca6d08c03c72c62e3485420f9c57537..62bf664feb9dc730d64eb53ee89923610d71fc12 100644 (file)
@@ -17,9 +17,7 @@
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}\
        %{ansi:/usr/lib/values-Xc.o%s} \
-                          %{!ansi: \
-                           %{traditional:/usr/lib/values-Xt.o%s} \
-                           %{!traditional:/usr/lib/values-Xa.o%s}}"
+        %{!ansi:/usr/lib/values-Xa.o%s}"
 
 #undef LINK_SPEC
 #define LINK_SPEC "\
index 8089633a7c184a5c8919d8969b7c3624fe47e198..850f0e64137ae94406ecc04ecd192600449f4a25 100644 (file)
@@ -129,8 +129,7 @@ Boston, MA 02111-1307, USA.  */
 /* Machine dependent ccp options.  */
 
 #undef CPP_SPEC
-#define CPP_SPEC "%{!traditional: -D__STDC__}            \
-                  %{posixstrict:-D_POSIX_SOURCE}         \
+#define CPP_SPEC "%{posixstrict:-D_POSIX_SOURCE}         \
                   %{!posixstrict:%{bsd:-D__STRICT_BSD__} \
                   %{posix:-D_POSIX_SOURCE}               \
                   %{!ansi:-D_NEXT_SOURCE}}               \
index c934c1ceafd9b71fc86eec6464f064f49fe38e85..c30f3a55332b4e61907ec8e89e0e88b6336a3cf7 100644 (file)
@@ -160,16 +160,15 @@ Boston, MA 02111-1307, USA.
                    %{!p:-Y P,/lib:/usr/lib}} \
                   %{Qy:} %{!Qn:-Qy}"
 
-/* Gcc automatically adds in one of the files /lib/values-Xc.o,
-   /lib/values-Xa.o, or /lib/values-Xt.o for each final link
-   step (depending upon the other gcc options selected, such as
-   -traditional and -ansi).  These files each contain one (initialized)
-   copy of a special variable called `_lib_version'.  Each one of these
-   files has `_lib_version' initialized to a different (enum) value.
-   The SVR4 library routines query the value of `_lib_version' at run
-   to decide how they should behave.  Specifically, they decide (based
-   upon the value of `_lib_version') if they will act in a strictly ANSI
-   conforming manner or not.
+/* Gcc automatically adds in one of the files /lib/values-Xc.o
+   or /lib/values-Xa.o, for each final link step (depending upon the other
+   gcc options selected, such as -ansi).  These files each contain one
+   (initialized) copy of a special variable called `_lib_version'.  Each
+   one of these files has `_lib_version' initialized to a different (enum)
+   value.  The SVR4 library routines query the value of `_lib_version'
+   at run to decide how they should behave.  Specifically, they decide
+   (based upon the value of `_lib_version') if they will act in a strictly
+   ANSI conforming manner or not.
 */
 
 #undef STARTFILE_SPEC
@@ -178,9 +177,7 @@ Boston, MA 02111-1307, USA.
                          %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
                        %{pg:gcrti.o%s}%{!pg:crti.o%s} \
                        %{ansi:values-Xc.o%s} \
-                       %{!ansi: \
-                        %{traditional:values-Xt.o%s} \
-                        %{!traditional:values-Xa.o%s}} \
+                       %{!ansi:values-Xa.o%s} \
                        crtbegin.o%s"
 
 /* Allow #sccs in preprocessor.  */
index b46912293510700fe9b3a133b216b8ad4a88759f..73b0822400feed8aeea2fa835c363b1244ec1623 100644 (file)
 
 #define STARTFILE_SPEC32 "\
 %{ansi:values-Xc.o%s} \
-%{!ansi: \
- %{traditional:values-Xt.o%s} \
- %{!traditional:values-Xa.o%s}}"
+%{!ansi:values-Xa.o%s}"
 
 #define STARTFILE_SPEC64 "\
 %{ansi:/usr/lib/sparcv9/values-Xc.o%s} \
-%{!ansi: \
- %{traditional:/usr/lib/sparcv9/values-Xt.o%s} \
- %{!traditional:/usr/lib/sparcv9/values-Xa.o%s}}"
+%{!ansi:/usr/lib/sparcv9/values-Xa.o%s}"
  
 #ifdef SPARC_BI_ARCH
 
index 9f9ca235d2d1cb0d640808b6d7a6c77a1134d69f..1f86a50f5fddc18ef8cc23dc907ae7307848d5cf 100644 (file)
@@ -131,9 +131,7 @@ Boston, MA 02111-1307, USA.  */
                             %{!pg:crt1.o%s}}}} \
                        crti.o%s \
                        %{ansi:values-Xc.o%s} \
-                       %{!ansi: \
-                        %{traditional:values-Xt.o%s} \
-                        %{!traditional:values-Xa.o%s}} \
+                       %{!ansi:values-Xa.o%s} \
                        crtbegin.o%s"
 
 /* ??? Note: in order for -compat-bsd to work fully,
index b4ceb3efe3f1270041b123c09d7a14fcceb34113..b2a2ad1e3d4035ae121143ad956b08e5a3c8e495 100644 (file)
@@ -1415,10 +1415,6 @@ typedef int CUMULATIVE_ARGS;
    function call.  */
 #define RETURN_VALUE_REGNUM    FIRST_ARGUMENT_REGISTER
      
-/* Define this macro if `-traditional' should not cause functions declared to
-   return `float' to convert the value to `double'.  */
-/* #define TRADITIONAL_RETURN_FLOAT */
-
 /* A C expression to create an RTX representing the place where a function
    returns a value of data type VALTYPE.  VALTYPE is a tree node representing a
    data type.  Write `TYPE_MODE (VALTYPE)' to get the machine mode used to
@@ -4138,13 +4134,6 @@ do {                                                                     \
    #pragma pack(push,<n>) and #pragma pack(pop).  */
 /* HANDLE_PRAGMA_PACK_PUSH_POP 1 */
    
-/* Define this macro to control use of the character `$' in identifier names.
-   The value should be 0, 1, or 2.  0 means `$' is not allowed by default; 1
-   means it is allowed by default if `-traditional' is used; 2 means it is
-   allowed by default provided `-ansi' is not used.  1 is the default; there is
-   no need to define this macro in that case.  */
-/* #define DOLLARS_IN_IDENTIFIERS */
-
 /* Define this macro if the assembler does not accept the character `$' in
    label names.  By default constructors and destructors in G++ have `$' in the
    identifiers.  If this macro is defined, `.' is used instead.
index 5f74453c35ababf777a82af57ea7ca9757342036..09646775129bd9c25ef61c89a89878dfde1d877a 100644 (file)
@@ -173,16 +173,15 @@ Boston, MA 02111-1307, USA.
                   %{Qy:} %{!Qn:-Qy}"
 #endif
 
-/* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o,
-   /usr/ccs/lib/values-Xa.o, or /usr/ccs/lib/values-Xt.o for each final
-   link step (depending upon the other gcc options selected, such as
-   -traditional and -ansi).  These files each contain one (initialized)
-   copy of a special variable called `_lib_version'.  Each one of these
-   files has `_lib_version' initialized to a different (enum) value.
-   The SVR4 library routines query the value of `_lib_version' at run
-   to decide how they should behave.  Specifically, they decide (based
-   upon the value of `_lib_version') if they will act in a strictly ANSI
-   conforming manner or not.  */
+/* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o
+   or /usr/ccs/lib/values-Xa.o for each final link step (depending
+   upon the other gcc options selected, such as -ansi).  These files
+   each contain one (initialized) copy of a special variable called
+   `_lib_version'.  Each one of these files has `_lib_version' initialized
+   to a different (enum) value.  The SVR4 library routines query the
+   value of `_lib_version' at run to decide how they should behave.
+   Specifically, they decide (based upon the value of `_lib_version')
+   if they will act in a strictly ANSI conforming manner or not.  */
 
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "%{!shared: \
@@ -190,9 +189,7 @@ Boston, MA 02111-1307, USA.
                          %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
                        %{pg:gcrti.o%s}%{!pg:crti.o%s} \
                        %{ansi:values-Xc.o%s} \
-                       %{!ansi: \
-                        %{traditional:values-Xt.o%s} \
-                        %{!traditional:values-Xa.o%s}} \
+                       %{!ansi:values-Xa.o%s} \
                        crtbegin.o%s"
 
 /* Allow #sccs in preprocessor.  */
index 9cd1487b1735d350b9181fd0d99f99094eacd6c6..d2c80e0302fe47cd482d1375e22f7374858f2966 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-27  Zack Weinberg  <zack@codesourcery.com>
+
+       * decl2.c: Delete traditional-mode-related code copied from
+       the C front end but not used, or used only to permit the
+       compiler to link.
+
 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org> 
 
        PR c++/4093
index ea1d2978d2bb8147395105a2e30f06f12e262751..ff6ae1ecd7c1a989301a5dfa1fe3d343db45d333 100644 (file)
@@ -131,11 +131,6 @@ int flag_no_asm;
 
 int flag_no_gnu_keywords;
 
-/* Nonzero means do some things the same way PCC does.  Only provided so
-   the compiler will link.  */
-
-int flag_traditional;
-
 /* Nonzero means to treat bitfields as unsigned unless they say `signed'.  */
 
 int flag_signed_bitfields = 1;
@@ -495,9 +490,7 @@ cxx_decode_option (argc, argv)
 
   strings_processed = cpp_handle_option (parse_in, argc, argv, 0);
 
-  if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
-    /* ignore */;
-  else if (p[0] == '-' && p[1] == 'f')
+  if (p[0] == '-' && p[1] == 'f')
     {
       /* Some kind of -f option.
         P's value is the option sans `-f'.
index 1d4ceccde956462398139e0ff779d17a7e344c59..5a58556ead48289e0b827d2dacedeac3f48d1f33 100644 (file)
@@ -298,7 +298,7 @@ lex (pfile, skip_evaluation)
        else
          op.unsignedp = WCHAR_UNSIGNED;
        op.op = CPP_NUMBER;
-       op.value = cpp_interpret_charconst (pfile, token, 1, 0, &chars_seen);
+       op.value = cpp_interpret_charconst (pfile, token, 1, &chars_seen);
        return op;
       }
 
index a5a20db73d10c829b68ee673bbdd16df026fe6a4..1a602885d18dd5c9f75e2c5bea2e7693f880e55e 100644 (file)
@@ -1635,7 +1635,7 @@ maybe_read_ucs (pfile, pstr, limit, pc)
     return 1;
 
   if (CPP_WTRADITIONAL (pfile))
-    cpp_warning (pfile, "the meaning of '\\%c' varies with -traditional", c);
+    cpp_warning (pfile, "the meaning of '\\%c' is different in traditional C", c);
 
   length = (c == 'u' ? 4: 8);
 
@@ -1688,17 +1688,15 @@ maybe_read_ucs (pfile, pstr, limit, pc)
 /* Interpret an escape sequence, and return its value.  PSTR points to
    the input pointer, which is just after the backslash.  LIMIT is how
    much text we have.  MASK is a bitmask for the precision for the
-   destination type (char or wchar_t).  TRADITIONAL, if true, does not
-   interpret escapes that did not exist in traditional C.
+   destination type (char or wchar_t).
 
    Handles all relevant diagnostics.  */
 unsigned int
-cpp_parse_escape (pfile, pstr, limit, mask, traditional)
+cpp_parse_escape (pfile, pstr, limit, mask)
      cpp_reader *pfile;
      const unsigned char **pstr;
      const unsigned char *limit;
      unsigned HOST_WIDE_INT mask;
-     int traditional;
 {
   int unknown = 0;
   const unsigned char *str = *pstr;
@@ -1722,9 +1720,7 @@ cpp_parse_escape (pfile, pstr, limit, mask, traditional)
 
     case 'a':
       if (CPP_WTRADITIONAL (pfile))
-       cpp_warning (pfile, "the meaning of '\\a' varies with -traditional");
-      if (!traditional)
-       c = TARGET_BELL;
+       cpp_warning (pfile, "the meaning of '\\a' is different in traditional C");
       break;
 
     case 'e': case 'E':
@@ -1739,9 +1735,8 @@ cpp_parse_escape (pfile, pstr, limit, mask, traditional)
 
     case 'x':
       if (CPP_WTRADITIONAL (pfile))
-       cpp_warning (pfile, "the meaning of '\\x' varies with -traditional");
+       cpp_warning (pfile, "the meaning of '\\x' is different in traditional C");
 
-      if (!traditional)
        {
          unsigned int i = 0, overflow = 0;
          int digits_found = 0;
@@ -1822,16 +1817,13 @@ cpp_parse_escape (pfile, pstr, limit, mask, traditional)
 #endif
 
 /* Interpret a (possibly wide) character constant in TOKEN.
-   WARN_MULTI warns about multi-character charconsts, if not
-   TRADITIONAL.  TRADITIONAL also indicates not to interpret escapes
-   that did not exist in traditional C.  PCHARS_SEEN points to a
-   variable that is filled in with the number of characters seen.  */
+   WARN_MULTI warns about multi-character charconsts.  PCHARS_SEEN points
+   to a variable that is filled in with the number of characters seen.  */
 HOST_WIDE_INT
-cpp_interpret_charconst (pfile, token, warn_multi, traditional, pchars_seen)
+cpp_interpret_charconst (pfile, token, warn_multi, pchars_seen)
      cpp_reader *pfile;
      const cpp_token *token;
      int warn_multi;
-     int traditional;
      unsigned int *pchars_seen;
 {
   const unsigned char *str = token->val.str.text;
@@ -1886,7 +1878,7 @@ cpp_interpret_charconst (pfile, token, warn_multi, traditional, pchars_seen)
 #endif
 
       if (c == '\\')
-       c = cpp_parse_escape (pfile, &str, limit, mask, traditional);
+       c = cpp_parse_escape (pfile, &str, limit, mask);
 
 #ifdef MAP_CHARACTER
       if (ISPRINT (c))
@@ -1910,7 +1902,7 @@ cpp_interpret_charconst (pfile, token, warn_multi, traditional, pchars_seen)
       chars_seen = max_chars;
       cpp_warning (pfile, "character constant too long");
     }
-  else if (chars_seen > 1 && !traditional && warn_multi)
+  else if (chars_seen > 1 && warn_multi)
     cpp_warning (pfile, "multi-character character constant");
 
   /* If relevant type is signed, sign-extend the constant.  */
index d9f95bd216d196decc374781570a3ce0ac88541d..b6c3805b2dc08818a5fa76f5cf78e63a3b901111 100644 (file)
@@ -287,7 +287,7 @@ directive_diagnostics (pfile, dir, indented)
         compilers, directives added by C89 must have their #
         indented, and directives present in traditional C must not.
         This is true even of directives in skipped conditional
-        blocks.  */
+        blocks.  #elif cannot be used at all.  */
       if (CPP_WTRADITIONAL (pfile))
        {
          if (dir == &dtable[T_ELIF])
index 47169dcf27d843e8a77e171ead702bc9dab44342..de5dd54bacfd2d5d531cad6fea08941d1ba7d7ef 100644 (file)
@@ -527,7 +527,7 @@ extern void _cpp_backup_tokens PARAMS ((cpp_reader *, unsigned int));
 /* Evaluate a CPP_CHAR or CPP_WCHAR token.  */
 extern HOST_WIDE_INT
 cpp_interpret_charconst PARAMS ((cpp_reader *, const cpp_token *,
-                                int, int, unsigned int *));
+                                int, unsigned int *));
 
 extern void cpp_define PARAMS ((cpp_reader *, const char *));
 extern void cpp_assert PARAMS ((cpp_reader *, const char *));
@@ -575,7 +575,7 @@ extern const char *cpp_type2name    PARAMS ((enum cpp_ttype));
 extern unsigned int cpp_parse_escape   PARAMS ((cpp_reader *,
                                                 const unsigned char **,
                                                 const unsigned char *,
-                                                unsigned HOST_WIDE_INT, int));
+                                                unsigned HOST_WIDE_INT));
 
 /* In cpphash.c */
 
index d44ac498658d2c7848f067ea92a59e7a5458c59a..302e0bd421b3bf5162f49ec9dcaff40766c8086d 100644 (file)
@@ -1478,7 +1478,7 @@ check_trad_stringification (pfile, macro, string)
              && !memcmp (p, NODE_NAME (node), len))
            {
              cpp_warning (pfile,
-          "macro argument \"%s\" would be stringified with -traditional",
+          "macro argument \"%s\" would be stringified in traditional C",
                           NODE_NAME (node));
              break;
            }
index 1ac26c5fa5df9b6ca9ed5f937bbb718ea11f53d3..b6e5ef1e752107451f1f9accc827316bc88bfb7a 100644 (file)
@@ -64,13 +64,9 @@ prevent the assembler from being run.
 If the compiler produces valid assembly code that does not correctly
 execute the input source code, that is a compiler bug.
 
-However, you must double-check to make sure, because you may have run
-into an incompatibility between GNU C and traditional C
-(@pxref{Incompatibilities}).  These incompatibilities might be considered
-bugs, but they are inescapable consequences of valuable features.
-
-Or you may have a program whose behavior is undefined, which happened
-by chance to give the desired results with another C or C++ compiler.
+However, you must double-check to make sure, because you may have a
+program whose behavior is undefined, which happened by chance to give
+the desired results with another C or C++ compiler.
 
 For example, in many nonoptimizing compilers, you can write @samp{x;}
 at the end of a function instead of @samp{return x;}, with the same
index 9e28e92e8005689d845dc466d0f3a96781495670..5e11ff8faae5d23f2a44d1eb7744bbdede0dc6e6 100644 (file)
@@ -3343,8 +3343,8 @@ preprocessor.  We do not guarantee that GCC's behavior under
 
 Traditional mode exists only for backward compatibility.  We have no
 plans to augment it in any way nor will we change it except to fix
-catastrophic bugs.  You should be aware that modern C libraries often
-have header files which are incompatible with traditional mode.
+catastrophic bugs.  As of GCC 3.2, traditional mode is not supported for
+compilation, only preprocessing.
 
 This is a list of the differences.  It may not be complete, and may not
 correspond exactly to the behavior of either GCC or a true traditional
@@ -4351,8 +4351,8 @@ Define the macros @sc{__gnuc__}, @sc{__gnuc_minor__} and
 @option{-no-gcc}.
 
 @item -traditional
-Try to imitate the behavior of old-fashioned C, as opposed to ISO
-C@.  @xref{Traditional Mode}.
+Try to imitate the behavior of the old-fashioned C preprocessor, as
+opposed to the behavior specified by ISO C@.  @xref{Traditional Mode}.
 
 @item -trigraphs
 Process trigraph sequences.  @xref{Initial processing}.
index f9870e779cfb612299ed4bfb58fd6307d7f9d026..96db4ad944e16f817eadfdab4eb6bf2a96c1dde8 100644 (file)
@@ -1453,8 +1453,8 @@ argument, these arguments are not macro expanded.
 @cindex escaped newlines
 @cindex newlines (escaped)
 
-Recently, the non-traditional preprocessor has relaxed its treatment of
-escaped newlines.  Previously, the newline had to immediately follow a
+Recently, the preprocessor has relaxed its treatment of escaped
+newlines.  Previously, the newline had to immediately follow a
 backslash.  The current implementation allows whitespace in the form of
 spaces, horizontal and vertical tabs, and form feeds between the
 backslash and the subsequent newline.  The preprocessor issues a
@@ -2732,11 +2732,10 @@ extension is irrelevant.
 
 In GNU C, you may use C++ style comments, which start with @samp{//} and
 continue until the end of the line.  Many other C implementations allow
-such comments, and they are likely to be in a future C standard.
-However, C++ style comments are not recognized if you specify
-@w{@option{-ansi}}, a @option{-std} option specifying a version of ISO C
-before C99, or @w{@option{-traditional}}, since they are incompatible
-with traditional constructs like @code{dividend//*comment*/divisor}.
+such comments, and they are included in the 1999 C standard.  However,
+C++ style comments are not recognized if you specify an @option{-std}
+option specifying a version of ISO C before C99, or @option{-ansi}
+(equivalent to @option{-std=c89}).
 
 @node Dollar Signs
 @section Dollar Signs in Identifier Names
@@ -4055,25 +4054,20 @@ be deleted or moved or simplified.
 @cindex alternate keywords
 @cindex keywords, alternate
 
-The option @option{-traditional} disables certain keywords;
 @option{-ansi} and the various @option{-std} options disable certain
-others.  This causes trouble when you want to use GNU C extensions, or
-ISO C features, in a general-purpose header file that should be usable
-by all programs, including ISO C programs and traditional ones.  The
-keywords @code{asm}, @code{typeof} and @code{inline} cannot be used
-since they won't work in a program compiled with @option{-ansi}
-(although @code{inline} can be used in a program compiled with
-@option{-std=c99}), while the keywords @code{const}, @code{volatile},
-@code{signed}, @code{typeof} and @code{inline} won't work in a program
-compiled with @option{-traditional}.  The ISO C99 keyword
+keywords.  This causes trouble when you want to use GNU C extensions, or
+a general-purpose header file that should be usable by all programs,
+including ISO C programs.  The keywords @code{asm}, @code{typeof} and
+@code{inline} are not available in programs compiled with
+@option{-ansi} or @option{-std} (although @code{inline} can be used in a
+program compiled with @option{-std=c99}).  The ISO C99 keyword
 @code{restrict} is only available when @option{-std=gnu99} (which will
 eventually be the default) or @option{-std=c99} (or the equivalent
 @option{-std=iso9899:1999}) is used.
 
 The way to solve these problems is to put @samp{__} at the beginning and
 end of each problematical keyword.  For example, use @code{__asm__}
-instead of @code{asm}, @code{__const__} instead of @code{const}, and
-@code{__inline__} instead of @code{inline}.
+instead of @code{asm}, and @code{__inline__} instead of @code{inline}.
 
 Other C compilers won't accept these alternative keywords; if you want to
 compile with another compiler, you can define the alternate keywords as
index 760c19520189ff4195ea2e848c457db2f9da571e..90df7de7361dc32a8d0fac59cef070b1955d3d4c 100644 (file)
@@ -1144,75 +1144,13 @@ options for strict ISO C conformance) implies @option{-trigraphs}.
 @cindex traditional C language
 @cindex C language, traditional
 @item -traditional
-@opindex traditional
-Attempt to support some aspects of traditional C compilers.
-Specifically:
-
-@itemize @bullet
-@item
-All @code{extern} declarations take effect globally even if they
-are written inside of a function definition.  This includes implicit
-declarations of functions.
-
-@item
-The newer keywords @code{typeof}, @code{inline}, @code{signed}, @code{const}
-and @code{volatile} are not recognized.  (You can still use the
-alternative keywords such as @code{__typeof__}, @code{__inline__}, and
-so on.)
-
-@item
-Comparisons between pointers and integers are always allowed.
-
-@item
-Integer types @code{unsigned short} and @code{unsigned char} promote
-to @code{unsigned int}.
-
-@item
-Out-of-range floating point literals are not an error.
-
-@item
-Certain constructs which ISO regards as a single invalid preprocessing
-number, such as @samp{0xe-0xd}, are treated as expressions instead.
-
-@item
-String ``constants'' are not necessarily constant; they are stored in
-writable space, and identical looking constants are allocated
-separately.  (This is the same as the effect of
-@option{-fwritable-strings}.)
-
-@cindex @code{longjmp} and automatic variables
-@item
-All automatic variables not declared @code{register} are preserved by
-@code{longjmp}.  Ordinarily, GNU C follows ISO C: automatic variables
-not declared @code{volatile} may be clobbered.
-
-@item
-@cindex @samp{\x}
-@cindex @samp{\a}
-@cindex escape sequences, traditional
-The character escape sequences @samp{\x} and @samp{\a} evaluate as the
-literal characters @samp{x} and @samp{a} respectively.  Without
-@w{@option{-traditional}}, @samp{\x} is a prefix for the hexadecimal
-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.
-
-You cannot use @option{-traditional} if you include any header files that
-rely on ISO C features.  Some vendors are starting to ship systems with
-ISO C header files and you cannot use @option{-traditional} on such
-systems to compile files that include any system headers.
-
-The @option{-traditional} option also enables @option{-traditional-cpp}.
-
-@item -traditional-cpp
+@itemx -traditional-cpp
 @opindex traditional-cpp
-Attempt to support some aspects of traditional C preprocessors.
-See the GNU CPP manual for details.
+@opindex traditional
+Formerly, these options caused GCC to attempt to emulate a pre-standard
+C compiler.  They are now only supported with the @option{-E} switch.
+The preprocessor continues to support a pre-standard mode.  See the GNU
+CPP manual for details.
 
 @item -fcond-mismatch
 @opindex fcond-mismatch
@@ -1260,32 +1198,15 @@ declaration does not use either @code{signed} or @code{unsigned}.  By
 default, such a bit-field is signed, because this is consistent: the
 basic integer types such as @code{int} are signed types.
 
-However, when @option{-traditional} is used, bit-fields are all unsigned
-no matter what.
-
 @item -fwritable-strings
 @opindex fwritable-strings
 Store string constants in the writable data segment and don't uniquize
 them.  This is for compatibility with old programs which assume they can
-write into string constants.  The option @option{-traditional} also has
-this effect.
+write into string constants.
 
 Writing into string constants is a very bad idea; ``constants'' should
 be constant.
 
-@item -fallow-single-precision
-@opindex fallow-single-precision
-Do not promote single precision math operations to double precision,
-even when compiling with @option{-traditional}.
-
-Traditional K&R C promotes all floating point operations to double
-precision, regardless of the sizes of the operands.   On the
-architecture for which you are compiling, single precision may be faster
-than double precision.   If you must use @option{-traditional}, but want
-to use single precision operations when the operands are single
-precision, use this option.   This option has no effect when compiling
-with ISO or GNU C conventions (the default).
-
 @item -fshort-wchar
 @opindex fshort-wchar
 Override the underlying type for @samp{wchar_t} to be @samp{short
index eead5c2f61617ff6170cbc7cde46f6a65d052781..4e9720c87e7e9f4df0568a1c3cbcf4a312e5282b 100644 (file)
@@ -89,13 +89,6 @@ Errors in the 1999 ISO C standard were corrected in a Technical
 Corrigendum published in 2001.  GCC does not support the uncorrected
 version.
 
-@opindex traditional
-GCC also has some limited support for traditional (pre-ISO) C with the
-@option{-traditional} option.  This support may be of use for compiling
-some very old programs that have not been updated to ISO C, but should
-not be used for new programs.  It will not work with some modern C
-libraries such as the GNU C library.
-
 By default, GCC provides some extensions to the C language that on
 rare occasions conflict with the C standard.  @xref{C
 Extensions,,Extensions to the C Language Family}.  Use of the
index edee7e3a09a0939bf867492d1bcf94eb2917ed05..0a9e842d4554caf4722ed0d5cf2e7eb03a8d52b2 100644 (file)
@@ -3560,11 +3560,6 @@ This section discusses the macros that control returning scalars as
 values---values that can fit in registers.
 
 @table @code
-@findex TRADITIONAL_RETURN_FLOAT
-@item TRADITIONAL_RETURN_FLOAT
-Define this macro if @option{-traditional} should not cause functions
-declared to return @code{float} to convert the value to @code{double}.
-
 @findex FUNCTION_VALUE
 @item FUNCTION_VALUE (@var{valtype}, @var{func})
 A C expression to create an RTX representing the place where a
index 09026fe57f0292875441347474fa4dec33904943..7cc7e8a53c9fd7a75959cd624c55ab2f0e7e799c 100644 (file)
@@ -443,8 +443,7 @@ Parse errors may occur compiling X11 on a Decstation running Ultrix 4.2
 because of problems in DEC's versions of the X11 header files
 @file{X11/Xlib.h} and @file{X11/Xutil.h}.  People recommend adding
 @option{-I/usr/include/mit} to use the MIT versions of the header files,
-using the @option{-traditional} switch to turn off ISO C, or fixing the
-header files by adding this:
+or fixing the header files by adding this:
 
 @example
 #ifdef __STDC__
@@ -484,9 +483,7 @@ MALLOC=gmalloc.o
 @opindex traditional
 
 There are several noteworthy incompatibilities between GNU C and K&R
-(non-ISO) versions of C@.  The @option{-traditional} option
-eliminates many of these incompatibilities, @emph{but not all}, by
-telling GCC to behave like a K&R C compiler.
+(non-ISO) versions of C@.
 
 @itemize @bullet
 @cindex string constants
@@ -516,7 +513,6 @@ The best solution to these problems is to change the program to use
 purposes instead of string constants.  But if this is not possible,
 you can use the @option{-fwritable-strings} flag, which directs GCC
 to handle string constants the same way most C compilers do.
-@option{-traditional} also has this effect, among others.
 
 @item
 @code{-2147483648} is positive.
@@ -536,9 +532,6 @@ string constants.  For example, the following macro in GCC
 @noindent
 will produce output @code{"a"} regardless of what the argument @var{a} is.
 
-The @option{-traditional} option directs GCC to handle such cases
-(among others) in the old-fashioned (non-ISO) fashion.
-
 @cindex @code{setjmp} incompatibilities
 @cindex @code{longjmp} incompatibilities
 @item
@@ -573,11 +566,6 @@ in it.
 If you use the @option{-W} option with the @option{-O} option, you will
 get a warning when GCC thinks such a problem might be possible.
 
-The @option{-traditional} option directs GCC to put variables in
-the stack by default, rather than in registers, in functions that
-call @code{setjmp}.  This results in the behavior found in
-traditional C compilers.
-
 @item
 Programs that use preprocessing directives in the middle of macro
 arguments do not work with GCC@.  For example, a program like this
@@ -591,9 +579,7 @@ foobar (
 @end group
 @end example
 
-ISO C does not permit such a construct.  It would make sense to support
-it when @option{-traditional} is used, but it is too much work to
-implement.
+ISO C does not permit such a construct.
 
 @item
 K&R compilers allow comments to cross over an inclusion boundary
@@ -611,9 +597,6 @@ have the same scope as any other declaration in the same place.
 In some other C compilers, a @code{extern} declaration affects all the
 rest of the file even if it happens within a block.
 
-The @option{-traditional} option directs GCC to treat all @code{extern}
-declarations as global, like traditional compilers.
-
 @item
 In traditional C, you can combine @code{long}, etc., with a typedef name,
 as shown here:
@@ -624,18 +607,15 @@ typedef long foo bar;
 @end example
 
 In ISO C, this is not allowed: @code{long} and other type modifiers
-require an explicit @code{int}.  Because this criterion is expressed
-by Bison grammar rules rather than C code, the @option{-traditional}
-flag cannot alter it.
+require an explicit @code{int}.
 
 @cindex typedef names as function parameters
 @item
-PCC allows typedef names to be used as function parameters.  The
-difficulty described immediately above applies here too.
+PCC allows typedef names to be used as function parameters.
 
 @item
-When in @option{-traditional} mode, GCC allows the following erroneous
-pair of declarations to appear together in a given scope:
+Traditional C allows the following erroneous pair of declarations to
+appear together in a given scope:
 
 @example
 typedef int foo;
@@ -643,19 +623,18 @@ typedef foo foo;
 @end example
 
 @item
-GCC treats all characters of identifiers as significant, even when in
-@option{-traditional} mode.  According to K&R-1 (2.2), ``No more than the
-first eight characters are significant, although more may be used.''.
-Also according to K&R-1 (2.2), ``An identifier is a sequence of letters
-and digits; the first character must be a letter.  The underscore _
-counts as a letter.'', but GCC also allows dollar signs in identifiers.
+GCC treats all characters of identifiers as significant.  According to
+K&R-1 (2.2), ``No more than the first eight characters are significant,
+although more may be used.''.  Also according to K&R-1 (2.2), ``An
+identifier is a sequence of letters and digits; the first character must
+be a letter.  The underscore _ counts as a letter.'', but GCC also
+allows dollar signs in identifiers.
 
 @cindex whitespace
 @item
 PCC allows whitespace in the middle of compound assignment operators
 such as @samp{+=}.  GCC, following the ISO standard, does not
-allow this.  The difficulty described immediately above applies here
-too.
+allow this.
 
 @cindex apostrophes
 @cindex '
@@ -673,8 +652,7 @@ You can't expect this to work.
 @end example
 
 The best solution to such a problem is to put the text into an actual
-C comment delimited by @samp{/*@dots{}*/}.  However,
-@option{-traditional} suppresses these error messages.
+C comment delimited by @samp{/*@dots{}*/}.
 
 @item
 Many user programs contain the declaration @samp{long time ();}.  In the
@@ -1296,12 +1274,11 @@ they write programs which have the same meaning in both C dialects.)
 
 @item
 @opindex ansi
-@opindex traditional
 @opindex std
 Undefining @code{__STDC__} when @option{-ansi} is not used.
 
-Currently, GCC defines @code{__STDC__} as long as you don't use
-@option{-traditional}.  This provides good results in practice.
+Currently, GCC defines @code{__STDC__} unconditionally.  This provides
+good results in practice.
 
 Programmers normally use conditionals on @code{__STDC__} to ask whether
 it is safe to use certain features of ISO C, such as function
index 6c089390b8f7d55d4404dc2e7da33bd0b7dfe5a9..315ac3a61fbcf0ca30bcdb5043733f6c83154e70 100644 (file)
@@ -3234,8 +3234,6 @@ limbo_die_node;
 /* Information concerning the compilation unit's programming
    language, and compiler version.  */
 
-extern int flag_traditional;
-
 /* Fixed size portion of the DWARF compilation unit header.  */
 #define DWARF_COMPILE_UNIT_HEADER_SIZE (2 * DWARF_OFFSET_SIZE + 3)
 
@@ -10756,8 +10754,6 @@ gen_compile_unit_die (filename)
     language = DW_LANG_Pascal83;
   else if (strcmp (language_string, "GNU Java") == 0)
     language = DW_LANG_Java;
-  else if (flag_traditional)
-    language = DW_LANG_C;
   else
     language = DW_LANG_C89;
 
index 76b5b75383b4c8f5a64136dbdf07fc75cd646360..ad715cda2dc9d062cfd2f2abc9e2f9deaf159da6 100644 (file)
@@ -631,8 +631,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
        && is_tagged_type (TREE_TYPE (decl))            \
        && decl == TYPE_STUB_DECL (TREE_TYPE (decl))))
 
-extern int flag_traditional;
-
 /* Maximum size (in bytes) of an artificially generated label. */
 
 #define MAX_ARTIFICIAL_LABEL_BYTES     30
@@ -4152,8 +4150,6 @@ output_compile_unit_die (arg)
     language_attribute (LANG_PASCAL83);
   else if (strcmp (language_string, "GNU Java") == 0)
     language_attribute (LANG_JAVA);
-  else if (flag_traditional)
-    language_attribute (LANG_C);
   else
     language_attribute (LANG_C89);
   low_pc_attribute (TEXT_BEGIN_LABEL);
index ab28d6f4f89c564282ab9c6281271603b91a09e5..3809a19b637eb2194535f0eead0a81e97e55a924 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-27  Zack Weinberg  <zack@codesourcery.com>
+
+       * com.c, lex.c, top.c: Delete traditional-mode-related code
+       copied from the C front end but not used, or used only to
+       permit the compiler to link.
+
 2002-02-13  Toon Moene  <toon@moene.indiv.nluug.nl>
 
        * news.texi: List Problem Reports fixed in 3.1.
index bdb2a4ac5e7b9a12d8e44e564e3d0d55cf5d3053..3c4a1d5d370d904e0a297d36c1c335e6a7eeef75 100644 (file)
@@ -16197,7 +16197,7 @@ typedef doublereal E_f; // real function with -R not specified //
 
 // (No such symbols should be defined in a strict ANSI C compiler.
    We can avoid trouble with f2c-translated code by using
-   gcc -ansi [-traditional].) //
+   gcc -ansi.) //
 
 
 
index d9f3bad51f03c7ceca0f78efd0f863cdc0bb34b3..b3e57ba2d74b6f240d164487c4133ba0e103ed6e 100644 (file)
@@ -246,8 +246,6 @@ ffelex_backslash_ (int c, ffewhereColumnNumber col)
      hollerith constants.  */
 
 #define wide_flag 0
-#define warn_traditional 0
-#define flag_traditional 0
 
   switch (state)
     {
@@ -268,18 +266,6 @@ ffelex_backslash_ (int c, ffewhereColumnNumber col)
       switch (c)
        {
        case 'x':
-         if (warn_traditional)
-           {
-             /* xgettext:no-c-format */
-             ffebad_start_msg_lex ("The meaning of `\\x' (at %0) varies with -traditional",
-                                   FFEBAD_severityWARNING);
-             ffelex_bad_here_ (0, line, column);
-             ffebad_finish ();
-           }
-
-         if (flag_traditional)
-           return c;
-
          code = 0;
          count = 0;
          nonnull = 0;
@@ -319,24 +305,9 @@ ffelex_backslash_ (int c, ffewhereColumnNumber col)
          return TARGET_BS;
 
        case 'a':
-         if (warn_traditional)
-           {
-             /* xgettext:no-c-format */
-             ffebad_start_msg_lex ("The meaning of `\\a' (at %0) varies with -traditional",
-                                   FFEBAD_severityWARNING);
-             ffelex_bad_here_ (0, line, column);
-             ffebad_finish ();
-           }
-
-         if (flag_traditional)
-           return c;
          return TARGET_BELL;
 
        case 'v':
-#if 0 /* Vertical tab is present in common usage compilers.  */
-         if (flag_traditional)
-           return c;
-#endif
          return TARGET_VT;
 
        case 'e':
@@ -589,12 +560,6 @@ ffelex_cfebackslash_ (int *use_d, int *d, FILE *finput)
   switch (c)
     {
     case 'x':
-      if (warn_traditional)
-       warning ("the meaning of `\\x' varies with -traditional");
-
-      if (flag_traditional)
-       return c;
-
       code = 0;
       count = 0;
       nonnull = 0;
@@ -672,18 +637,9 @@ ffelex_cfebackslash_ (int *use_d, int *d, FILE *finput)
       return TARGET_BS;
 
     case 'a':
-      if (warn_traditional)
-       warning ("the meaning of `\\a' varies with -traditional");
-
-      if (flag_traditional)
-       return c;
       return TARGET_BELL;
 
     case 'v':
-#if 0 /* Vertical tab is present in common usage compilers.  */
-      if (flag_traditional)
-       return c;
-#endif
       return TARGET_VT;
 
     case 'e':
index 774f29f2037d423efd10cdd9b155b4d362d64ab3..6a789e3ed01feec7f6c43bba0c87b3e65bd09673 100644 (file)
@@ -58,7 +58,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 /* Externals defined here. */
 
-int flag_traditional;          /* Shouldn't need this (C front end only)! */
 bool ffe_is_do_internal_checks_ = FALSE;
 bool ffe_is_90_ = FFETARGET_defaultIS_90;
 bool ffe_is_automatic_ = FFETARGET_defaultIS_AUTOMATIC;
index 267bfa3195746c08c16659e75917668283dae208..4001c0df4643359e163413b6401ff249eb64d8a2 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -691,7 +691,7 @@ static const char *cc1_options =
 "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
  %{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*} %{ansi}\
- %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
+ %{v:-version} %{pg:-p} %{p} %{f*}\
  %{Qn:-fno-ident} %{--help:--help}\
  %{--target-help:--target-help}\
  %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
@@ -822,18 +822,16 @@ static const struct compiler default_compilers[] =
   {".c", "@c", 0},
   {"@c",
    /* cc1 has an integrated ISO C preprocessor.  We should invoke the
-      external preprocessor if -save-temps or -traditional is given.  */
+      external preprocessor if -save-temps is given.  */
      "%{E|M|MM:%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)}\
       %{!E:%{!M:%{!MM:\
-         %{save-temps:%(trad_capable_cpp) -lang-c %{ansi:-std=c89}\
-               %(cpp_options) %b.i \n\
+          %{traditional|ftraditional:\
+%eGNU C no longer supports -traditional without -E}\
+         %{save-temps|traditional-cpp:%(trad_capable_cpp) \
+               -lang-c %{ansi:-std=c89} %(cpp_options) %b.i \n\
                    cc1 -fpreprocessed %b.i %(cc1_options)}\
-         %{!save-temps:\
-           %{traditional|ftraditional|traditional-cpp:\
-               tradcpp0 -lang-c %{ansi:-std=c89} %(cpp_options) %{!pipe:%g.i} |\n\
-                   cc1 -fpreprocessed %{!pipe:%g.i} %(cc1_options)}\
-           %{!traditional:%{!ftraditional:%{!traditional-cpp:\
-               cc1 -lang-c %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options)}}}}\
+         %{!save-temps:%{!traditional-cpp:\
+               cc1 -lang-c %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options)}}\
         %{!fsyntax-only:%(invoke_as)}}}}", 0},
   {"-",
    "%{!E:%e-E required when input is from standard input}\
index ffd0b6ba9617781a48732c2dc29d348555126510..4076a77b78df1273db52c420ea6f5d8ae4adeb0e 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-27  Zack Weinberg  <zack@codesourcery.com>
+
+       * builtins.c, decl.c: Delete traditional-mode-related code
+       copied from the C front end but not used, or used only to
+       permit the compiler to link.
+
 2002-02-22  Tom Tromey  <tromey@redhat.com>
 
        Fix for PR java/2369:
index 1ac37fb52f0bce5f41e97e97e2c1196ab82a606c..832e6435aa6f98b1a2887fb33e2cd895a868302d 100644 (file)
@@ -281,11 +281,8 @@ initialize_builtins ()
 
   /* Work around C-specific junk in builtin-types.def.  */
 #define intmax_type_node NULL_TREE
-#define traditional_ptr_type_node NULL_TREE
-#define traditional_cptr_type_node NULL_TREE
 #define c_size_type_node NULL_TREE
 #define const_string_type_node NULL_TREE
-#define traditional_len_type_node NULL_TREE
 #define va_list_ref_type_node NULL_TREE
 #define va_list_arg_type_node NULL_TREE
 #define flag_isoc99 0
index b76f46fb86fb576573e012965dc6d1ac144a47db..f9bbc9f672bc599044b1530c045fe4abfed8812b 100644 (file)
@@ -323,8 +323,6 @@ static tree named_labels;
 static tree shadowed_labels;
 #endif
 
-int flag_traditional;
-
 tree java_global_trees[JTI_MAX];
   
 /* Build (and pushdecl) a "promoted type" for all standard
index 2abf6337a59b9bfc22afbdc1b574d9d76d306d5c..c6e2eb8808cf9d433727d810ed998c11eef215c8 100644 (file)
@@ -27,15 +27,13 @@ Boston, MA 02111-1307, USA.  */
       external preprocessor if -save-temps or -traditional is given.  */
      "%{E|M|MM:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)}\
       %{!E:%{!M:%{!MM:\
-       %{save-temps:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89}\
+       %{traditional|ftraditional|traditional-cpp:\
+%eGNU Objective C no longer supports traditional compilation}\
+       %{save-temps:cpp0 -lang-objc %{ansi:-std=c89}\
          %(cpp_options) %b.mi \n\
            cc1obj -fpreprocessed %b.mi %(cc1_options) %{gen-decls}}\
        %{!save-temps:\
-         %{traditional|ftraditional|traditional-cpp:\
-           tradcpp0 -lang-objc %{ansi:-std=c89} %(cpp_options) %{!pipe:%g.mi} |\n\
-           cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}\
-         %{!traditional:%{!ftraditional:%{!traditional-cpp:\
-           cc1obj %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options) %{gen-decls}}}}}\
+           cc1obj %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options) %{gen-decls}}\
         %{!fsyntax-only:%(invoke_as)}}}}", 0},
   {".mi", "@objc-cpp-output", 0},
   {"@objc-cpp-output",
index 163b6182de3eb843103a2abcd2e59ae94d5950f4..73e7c80bf6afb4b2bf2262134a0577bb7ce69639 100644 (file)
@@ -1131,9 +1131,6 @@ synth_module_prologue ()
       DECL_INLINE (umsg_decl) = 1;
       DECL_ARTIFICIAL (umsg_decl) = 1;
 
-      if (flag_traditional && TAG_MSGSEND[0] != '_')
-       DECL_BUILT_IN_NONANSI (umsg_decl) = 1;
-
       make_decl_rtl (umsg_decl, NULL);
       pushdecl (umsg_decl);
     }
index 0577708bff495396c83c5b5f1e2dcb6b7f9c223f..55914f05f45e31ab987fa3bd0f387a2d9b26e7df 100644 (file)
@@ -605,7 +605,8 @@ typedef char _Bool;
        OMIT_EH_TABLE EASY_DIV_EXPR IMPLICIT_FIX_EXPR                      \
        LONGJMP_RESTORE_FROM_STACK MAX_INT_TYPE_SIZE ASM_IDENTIFY_GCC      \
        STDC_VALUE TRAMPOLINE_ALIGN ASM_IDENTIFY_GCC_AFTER_SOURCE          \
-       SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET DWARF_LINE_MIN_INSTR_LENGTH
+       SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET DWARF_LINE_MIN_INSTR_LENGTH   \
+       TRADITIONAL_RETURN_FLOAT
 
 #endif /* IN_GCC */
 
index ae4efb8fa76d139c848565564ac6400e5693358e..b2820d62bab7831095a733be23fa08084be30603 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-27  Zack Weinberg  <zack@codesourcery.com>
+
+       * gcc.c-torture/execute/920730-1t.c,
+       gcc.c-torture/execute/920730-1t.x, gcc.dg/ext-glob.c:
+       Delete test cases, only relevant to -traditional.
+
 2002-02-27  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * gcc.dg/cpp/undef1.c: Remove.
diff --git a/gcc/testsuite/gcc.c-torture/execute/920730-1t.c b/gcc/testsuite/gcc.c-torture/execute/920730-1t.c
deleted file mode 100644 (file)
index 7467f35..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/* This is just 920730-1.c compiled with -traditional.
-   See 920730-1t.x.  */
-
-/* It is necessary to undefine __GNUC__ in order to prevent glibc 2.2's
-   sys/cdefs.h from issuing an #error.  Do Not Ask.  */
-#undef __GNUC__
-
-#include "920730-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/920730-1t.x b/gcc/testsuite/gcc.c-torture/execute/920730-1t.x
deleted file mode 100644 (file)
index cf05b31..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-traditional"
-return 0
diff --git a/gcc/testsuite/gcc.dg/ext-glob.c b/gcc/testsuite/gcc.dg/ext-glob.c
deleted file mode 100644 (file)
index deb51f5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* 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;
-}
index 4964d2e2c06e1c65b8327dfc5abcd6eb368b14d0..9676dcde5a026c734c77509da44444dc60c0fbc9 100644 (file)
@@ -1182,8 +1182,6 @@ documented_lang_options[] =
 
   { "-ansi", 
     N_("Compile just for ISO C89") },
-  { "-fallow-single-precision",
-    N_("Do not promote floats to double if using -traditional") },
   { "-std= ", 
     N_("Determine language standard") },
 
@@ -1199,12 +1197,6 @@ documented_lang_options[] =
   { "-fno-signed-char", "" },
   { "-fno-unsigned-char", "" },
 
-  { "-ftraditional", "" },
-  { "-traditional", 
-    N_("Attempt to support traditional K&R style C") },
-  { "-fnotraditional", "" },
-  { "-fno-traditional", "" },
-
   { "-fasm", "" },
   { "-fno-asm", 
     N_("Do not recognize the 'asm' keyword") },
@@ -1332,7 +1324,7 @@ documented_lang_options[] =
     N_("Warn about non-prototyped function decls") },
   { "-Wno-strict-prototypes", "" },
   { "-Wtraditional", 
-    N_("Warn about constructs whose meaning change in ISO C") },
+    N_("Warn about constructs whose meanings change in ISO C") },
   { "-Wno-traditional", "" },
   { "-Wtrigraphs", 
     N_("Warn when trigraphs are encountered") },