diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-30 23:50:40 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-30 23:50:40 +0000 |
commit | 2447005502283065f2232ce09edf1b3c808a1c7f (patch) | |
tree | b3ee120a2ecf25d00fba24415c8566f83135a110 /gcc/c-decl.c | |
parent | ac785357337a7e170d547963987890e6284185b0 (diff) | |
download | ppe42-gcc-2447005502283065f2232ce09edf1b3c808a1c7f.tar.gz ppe42-gcc-2447005502283065f2232ce09edf1b3c808a1c7f.zip |
Change attribute((option(...))) to attribute((target(...))); Do not allocate tree nodes on x86 for builtins until we generate code for the ISA; Delete hot/cold functions changing optimization; Make C++ support target specific functions; Add #pragma GCC {push_options,pop_options,reset_options} instead of #pragma GCC {target,optimize} {push,reset,pop}
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139812 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index ee04d9aa43b..5a60063c2bd 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2843,6 +2843,31 @@ c_builtin_function (tree decl) return decl; } + +tree +c_builtin_function_ext_scope (tree decl) +{ + tree type = TREE_TYPE (decl); + tree id = DECL_NAME (decl); + + const char *name = IDENTIFIER_POINTER (id); + C_DECL_BUILTIN_PROTOTYPE (decl) = (TYPE_ARG_TYPES (type) != 0); + + /* Should never be called on a symbol with a preexisting meaning. */ + gcc_assert (!I_SYMBOL_BINDING (id)); + + bind (id, decl, external_scope, /*invisible=*/false, /*nested=*/false); + + /* Builtins in the implementation namespace are made visible without + needing to be explicitly declared. See push_file_scope. */ + if (name[0] == '_' && (name[1] == '_' || ISUPPER (name[1]))) + { + TREE_CHAIN (decl) = visible_builtins; + visible_builtins = decl; + } + + return decl; +} /* Called when a declaration is seen that contains no names to declare. If its type is a reference to a structure, union or enum inherited |