]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree.h (DECL_BUILT_IN_NONANSI): Remove.
authorRoger Sayle <roger@eyesopen.com>
Mon, 14 Apr 2003 03:13:07 +0000 (03:13 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 14 Apr 2003 03:13:07 +0000 (03:13 +0000)
* tree.h (DECL_BUILT_IN_NONANSI): Remove.
* c-common.c (builtin_function_2): Don't set DECL_BUILT_IN_NONANSI.
* c-decl.c (duplicate_decls): Use invariant DECL_BUILT_IN_NONANSI
implies DECL_BUILT_IN to simplify logic.
* print-tree.c (print_node): Don't dump DECL_BUILT_IN_NONANSI.

From-SVN: r65561

gcc/ChangeLog
gcc/c-common.c
gcc/c-decl.c
gcc/print-tree.c
gcc/tree.h

index 6f2dae16d870f447b0465efef2e173574bc0e07c..98d6c34ceb63484259c087436cefcdb5cbe9cab5 100644 (file)
@@ -1,3 +1,11 @@
+2003-04-13  Roger Sayle  <roger@eyesopen.com>
+
+       * tree.h (DECL_BUILT_IN_NONANSI): Remove.
+       * c-common.c (builtin_function_2): Don't set DECL_BUILT_IN_NONANSI.
+       * c-decl.c (duplicate_decls): Use invariant DECL_BUILT_IN_NONANSI
+       implies DECL_BUILT_IN to simplify logic.
+       * print-tree.c (print_node): Don't dump DECL_BUILT_IN_NONANSI.
+
 2003-04-13  Roger Sayle  <roger@eyesopen.com>
 
        * builtin-types.def (BT_FN_STRING_CONST_STRING): New builtin type.
index a2cad23392772ad1b8b9382c6949c8a13b8c1477..5d51579ff5d0861b3bc0f59c1b1200964000b08b 100644 (file)
@@ -3691,20 +3691,15 @@ builtin_function_2 (builtin_name, name, builtin_type, type, function_code,
 {
   tree bdecl = NULL_TREE;
   tree decl = NULL_TREE;
+
   if (builtin_name != 0)
-    {
-      bdecl = builtin_function (builtin_name, builtin_type, function_code,
-                               class, library_name_p ? name : NULL,
-                               attrs);
-    }
+    bdecl = builtin_function (builtin_name, builtin_type, function_code,
+                             class, library_name_p ? name : NULL, attrs);
+
   if (name != 0 && !flag_no_builtin && !builtin_function_disabled_p (name)
       && !(nonansi_p && flag_no_nonansi_builtin))
-    {
-      decl = builtin_function (name, type, function_code, class, NULL,
-                              attrs);
-      if (nonansi_p)
-       DECL_BUILT_IN_NONANSI (decl) = 1;
-    }
+    decl = builtin_function (name, type, function_code, class, NULL, attrs);
+
   return (bdecl != 0 ? bdecl : decl);
 }
 \f
index 3fc1808fe67d8a18a610cfe767d1b4b761cd47f7..be6ff79059d539fb799877205c5cfc82d389dcc7 100644 (file)
@@ -860,30 +860,16 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
   if (TREE_CODE (olddecl) != TREE_CODE (newdecl))
     {
       if (TREE_CODE (olddecl) == FUNCTION_DECL
-         && (DECL_BUILT_IN (olddecl)
-             || DECL_BUILT_IN_NONANSI (olddecl)))
+         && DECL_BUILT_IN (olddecl))
        {
          /* If you declare a built-in or predefined function name as static,
             the old definition is overridden,
             but optionally warn this was a bad choice of name.  */
          if (!TREE_PUBLIC (newdecl))
            {
-             if (!warn_shadow)
-               ;
-             else if (DECL_BUILT_IN (olddecl))
+             if (warn_shadow)
                warning_with_decl (newdecl, "shadowing built-in function `%s'");
-             else
-               warning_with_decl (newdecl, "shadowing library function `%s'");
            }
-         /* Likewise, if the built-in is not ansi, then programs can
-            override it even globally without an error.  */
-         else if (! DECL_BUILT_IN (olddecl))
-           warning_with_decl (newdecl,
-                              "library function `%s' declared as non-function");
-
-         else if (DECL_BUILT_IN_NONANSI (olddecl))
-           warning_with_decl (newdecl,
-                              "built-in function `%s' declared as non-function");
          else
            warning_with_decl (newdecl,
                               "built-in function `%s' declared as non-function");
index cd180719d6773bce565eedd20e0b9168ef688980..bb1230d24b43e34b96417dbc310ff5ace2daf638 100644 (file)
@@ -1,6 +1,6 @@
 /* Prints out tree in human readable form - GNU C-compiler
    Copyright (C) 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002 Free Software Foundation, Inc.
+   2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -336,8 +336,6 @@ print_node (file, prefix, node, indent)
        fputs (" inline", file);
       if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node))
        fputs (" built-in", file);
-      if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN_NONANSI (node))
-       fputs (" built-in-nonansi", file);
       if (TREE_CODE (node) == FUNCTION_DECL && DECL_NO_STATIC_CHAIN (node))
        fputs (" no-static-chain", file);
 
index 70d746394d79afdce0a90875b839851da565b09e..c72e3d022c611f72b3e8dec4c014ef38a264e4c2 100644 (file)
@@ -236,8 +236,6 @@ struct tree_common GTY(())
 
        TREE_UNSIGNED in
            INTEGER_TYPE, ENUMERAL_TYPE, FIELD_DECL
-       DECL_BUILT_IN_NONANSI in
-           FUNCTION_DECL
        SAVE_EXPR_NOPLACEHOLDER in
           SAVE_EXPR
 
@@ -635,8 +633,7 @@ extern void tree_operand_check_failed PARAMS ((int, enum tree_code,
 #define TREE_CONSTANT(NODE) ((NODE)->common.constant_flag)
 
 /* In INTEGER_TYPE or ENUMERAL_TYPE nodes, means an unsigned type.
-   In FIELD_DECL nodes, means an unsigned bit field.
-   The same bit is used in functions as DECL_BUILT_IN_NONANSI.  */
+   In FIELD_DECL nodes, means an unsigned bit field.  */
 #define TREE_UNSIGNED(NODE) ((NODE)->common.unsigned_flag)
 
 #define TYPE_TRAP_SIGNED(NODE) \
@@ -1687,12 +1684,6 @@ struct tree_type GTY(())
 /* List of FUNCTION_DECLs inlined into this function's body.  */
 #define DECL_INLINED_FNS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inlined_fns)
 
-/* Nonzero in a FUNCTION_DECL means this is a built-in function
-   that is not specified by ansi C and that users are supposed to be allowed
-   to redefine for any purpose whatever.  */
-#define DECL_BUILT_IN_NONANSI(NODE) \
-  (FUNCTION_DECL_CHECK (NODE)->common.unsigned_flag)
-
 /* Nonzero in a FUNCTION_DECL means this function should be treated
    as if it were a malloc, meaning it returns a pointer that is
    not an alias.  */