minor C++ PATCH to use DECL_IS_BUILTIN in duplicate_decls
diff mbox

Message ID 4C17D303.7000906@redhat.com
State New
Headers show

Commit Message

Jason Merrill June 15, 2010, 7:22 p.m. UTC
An earlier patch of mine changed duplicate_decls to use 
DECL_SOURCE_LOCATION to test for built-in declarations.  I later noticed 
that there's a DECL_IS_BUILTIN macro for this purpose.

Tested x86_64-pc-linux-gnu, applied to trunk.

diff mbox

commit ec21885ffe1b3288b2ae803fb50cf496dab76147
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Jun 10 10:52:51 2010 -0400

    	* decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test

diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 3108f9d..9541252 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1295,7 +1295,7 @@  duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
       /* Even if the types match, prefer the new declarations type for
 	 built-ins which have not been explicitly declared, for
 	 exception lists, etc...  */
-      else if (DECL_SOURCE_LOCATION (olddecl) == BUILTINS_LOCATION)
+      else if (DECL_IS_BUILTIN (olddecl))
 	  tree type = TREE_TYPE (newdecl);
 	  tree attribs = (*targetm.merge_type_attributes)