aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-07-01 23:07:19 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2002-07-01 23:07:19 +0000
commit6a2dd09a650e117e1590752c2f0bba82bdb43b20 (patch)
tree07ad9c28c137e09be00ed739a192154beed604d3 /gcc/c-decl.c
parenteebd288ac720138a113ebc3c7d5f41651701472d (diff)
downloadgcc-6a2dd09a650e117e1590752c2f0bba82bdb43b20.zip
gcc-6a2dd09a650e117e1590752c2f0bba82bdb43b20.tar.gz
gcc-6a2dd09a650e117e1590752c2f0bba82bdb43b20.tar.bz2
tree.h: Modify builtin_function interface to take an extra argument ATTRS...
* tree.h: Modify builtin_function interface to take an extra argument ATTRS, which is a tree representing an attribute list. * c-decl.c (builtin_function): Accept additional parameter. * objc/objc-act.c (builtin_function): Likewise. * f/com.c (builtin_function): Likewise. * java/decl.c (builtin_function): Likewise. * ada/utils.c (builtin_function): Likewise. * cp/decl.c (builtin_function): Likewise. (builtin_function_1): Likewise. * c-common.c (c_common_nodes_and_builtins): Pass an additional NULL_TREE argument to builtin_function. (builtin_function_2): Likewise. * cp/call.c (build_java_interface_fn_ref): Likewise. * objc/objc-act.c (synth_module_prologue): Likewise. * java/decl.c (java_init_decl_processing): Likewise. * f/com.c (ffe_com_init_0): Likewise. * config/alpha/alpha.c (alpha_init_builtins): Pass an additional NULL_TREE argument builtin_function. * config/arm/arm.c (def_builtin): Likewise. * config/c4x/c4x.c (c4x_init_builtins): Likewise. * config/i386/i386.c (def_builtin): Likewise. * config/ia64/ia64.c (def_builtin): Likewise. * config/rs6000/rs6000.c (def_builtin): Likewise. From-SVN: r55161
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 23134e3..a32b783 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2961,15 +2961,17 @@ c_make_fname_decl (id, type_dep)
See tree.h for its possible values.
If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME,
- the name to be called if we can't opencode the function. */
+ the name to be called if we can't opencode the function. If
+ ATTRS is nonzero, use that for the function's attribute list. */
tree
-builtin_function (name, type, function_code, class, library_name)
+builtin_function (name, type, function_code, class, library_name, attrs)
const char *name;
tree type;
int function_code;
enum built_in_class class;
const char *library_name;
+ tree attrs;
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
@@ -2991,7 +2993,10 @@ builtin_function (name, type, function_code, class, library_name)
C_DECL_ANTICIPATED (decl) = 1;
/* Possibly apply some default attributes to this built-in function. */
- decl_attributes (&decl, NULL_TREE, 0);
+ if (attrs)
+ decl_attributes (&decl, attrs, ATTR_FLAG_BUILT_IN);
+ else
+ decl_attributes (&decl, NULL_TREE, 0);
return decl;
}