diff options
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index b4223aa5706..f193676c382 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see #include "c-family/c-common.h" #include "c-family/c-objc.h" #include "c-family/c-pragma.h" +#include "c-family/c-target.h" #include "diagnostic.h" #include "intl.h" #include "debug.h" @@ -7457,7 +7458,9 @@ grokfndecl (tree ctype, || (IDENTIFIER_LENGTH (declarator) > 10 && IDENTIFIER_POINTER (declarator)[0] == '_' && IDENTIFIER_POINTER (declarator)[1] == '_' - && strncmp (IDENTIFIER_POINTER (declarator)+2, "builtin_", 8) == 0)) + && strncmp (IDENTIFIER_POINTER (declarator)+2, "builtin_", 8) == 0) + || (targetcm.cxx_implicit_extern_c + && targetcm.cxx_implicit_extern_c(IDENTIFIER_POINTER (declarator)))) && current_lang_name == lang_name_cplusplus && ctype == NULL_TREE && DECL_FILE_SCOPE_P (decl)) |