summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-09 19:28:37 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-09 19:28:37 +0000
commit835648fec898c65ca3aedfc550802ea954c67fde (patch)
tree50747cd0ece1e1409da319bdd1c34bb4d5db7516 /gcc/cp
parent11c8949c38b7deaa6ed7b70143599cfd9dd4798e (diff)
downloadgcc-835648fec898c65ca3aedfc550802ea954c67fde.tar.gz
/cp
2014-06-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/22556 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes. /testsuite 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/22556 * g++.dg/other/redecl3.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211385 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/name-lookup.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 38a348cb997..6b2068868b5 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/22556
+ * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
+
2014-06-07 Jan Hubicka <hubicka@ucw.cz>
* method.c (use_thunk): Use set_decl_section_name.
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 2baeeb76d18..90f51083915 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -974,7 +974,8 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
&& (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl))
/* If different sort of thing, we already gave an error. */
&& TREE_CODE (decl) == TREE_CODE (x)
- && !same_type_p (TREE_TYPE (x), TREE_TYPE (decl)))
+ && !comptypes (TREE_TYPE (x), TREE_TYPE (decl),
+ COMPARE_REDECLARATION))
{
if (permerror (input_location, "type mismatch with previous "
"external decl of %q#D", x))