* 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
+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.
{
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
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");
/* 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.
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);
TREE_UNSIGNED in
INTEGER_TYPE, ENUMERAL_TYPE, FIELD_DECL
- DECL_BUILT_IN_NONANSI in
- FUNCTION_DECL
SAVE_EXPR_NOPLACEHOLDER in
SAVE_EXPR
#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) \
/* 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. */