Patchwork C++ PATCH for c++/37276 (lookup/builtin5.C) on aix

login
register
mail settings
Submitter Jason Merrill
Date Nov. 14, 2012, 8:13 p.m.
Message ID <50A3FB62.7020301@redhat.com>
Download mbox | patch
Permalink /patch/199008/
State New
Headers show

Comments

Jason Merrill - Nov. 14, 2012, 8:13 p.m.
This patch fixes the bug in a cross-compiler.  I don't remember why I 
put in that #ifdef in the first place, but it seems incorrect.  The 
other uses of NO_IMPLICIT_EXTERN_C are about allowing () in outdated C 
headers, which is unrelated.

Patch

commit b34937b905aa25542da7d6ee3d71db2a1413ddbf
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Nov 14 15:10:25 2012 -0500

    	PR c++/37276
    	* decl.c (decls_match): Remove #ifdef around earlier fix.

diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 115c567..045e99b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1017,13 +1017,11 @@  decls_match (tree newdecl, tree olddecl)
 		&& DECL_EXTERN_C_P (olddecl)))
 	return 0;
 
-#ifdef NO_IMPLICIT_EXTERN_C
       /* A new declaration doesn't match a built-in one unless it
 	 is also extern "C".  */
       if (DECL_IS_BUILTIN (olddecl)
 	  && DECL_EXTERN_C_P (olddecl) && !DECL_EXTERN_C_P (newdecl))
 	return 0;
-#endif
 
       if (TREE_CODE (f1) != TREE_CODE (f2))
 	return 0;