diff options
author | Michael Meissner <gnu@the-meissners.org> | 2008-08-30 23:50:40 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2008-08-30 23:50:40 +0000 |
commit | 5779e7133d84c5873249bb643d9852f314022f0b (patch) | |
tree | b3ee120a2ecf25d00fba24415c8566f83135a110 /gcc/c-decl.c | |
parent | 0257eee5bd4700647061f61b13a2f89b2a4b4f28 (diff) | |
download | gcc-5779e7133d84c5873249bb643d9852f314022f0b.zip gcc-5779e7133d84c5873249bb643d9852f314022f0b.tar.gz gcc-5779e7133d84c5873249bb643d9852f314022f0b.tar.bz2 |
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}
From-SVN: r139812
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 ee04d9a..5a60063 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 |