diff options
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 1336f49ea5e..d1c53171176 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -586,18 +586,8 @@ special_function_p (const_tree fndecl, int flags) { tree name_decl = DECL_NAME (fndecl); - if (fndecl && name_decl - && IDENTIFIER_LENGTH (name_decl) <= 11 - /* Exclude functions not at the file scope, or not `extern', - since they are not the magic functions we would otherwise - think they are. - FIXME: this should be handled with attributes, not with this - hacky imitation of DECL_ASSEMBLER_NAME. It's (also) wrong - because you can declare fork() inside a function if you - wish. */ - && (DECL_CONTEXT (fndecl) == NULL_TREE - || TREE_CODE (DECL_CONTEXT (fndecl)) == TRANSLATION_UNIT_DECL) - && TREE_PUBLIC (fndecl)) + if (maybe_special_function_p (fndecl) + && IDENTIFIER_LENGTH (name_decl) <= 11) { const char *name = IDENTIFIER_POINTER (name_decl); const char *tname = name; |