From patchwork Wed Nov 14 20:13:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: C++ PATCH for c++/37276 (lookup/builtin5.C) on aix Date: Wed, 14 Nov 2012 10:13:22 -0000 From: Jason Merrill X-Patchwork-Id: 199008 Message-Id: <50A3FB62.7020301@redhat.com> To: David Edelsohn Cc: gcc-patches List 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. commit b34937b905aa25542da7d6ee3d71db2a1413ddbf Author: Jason Merrill 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;