diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-04-14 03:13:07 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-04-14 03:13:07 +0000 |
commit | 7f685e177ee99a15953f2ffa4292823c8a9b88da (patch) | |
tree | 3b5aae81043167976f8a6e9e31f1cc5aa74edcc3 /gcc/c-decl.c | |
parent | 1331d16fd4b57c5927cec03b5a320bc59366a628 (diff) | |
download | gcc-7f685e177ee99a15953f2ffa4292823c8a9b88da.zip gcc-7f685e177ee99a15953f2ffa4292823c8a9b88da.tar.gz gcc-7f685e177ee99a15953f2ffa4292823c8a9b88da.tar.bz2 |
tree.h (DECL_BUILT_IN_NONANSI): Remove.
* 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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 3fc1808..be6ff79 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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"); |