diff options
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index ff6d5ee..57ab129 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2268,7 +2268,13 @@ diagnose_name_conflict (tree decl, tree bval) && (TREE_CODE (decl) != TYPE_DECL || DECL_ARTIFICIAL (decl) == DECL_ARTIFICIAL (bval)) && CP_DECL_CONTEXT (decl) == CP_DECL_CONTEXT (bval)) - error ("redeclaration of %q#D", decl); + { + if (concept_definition_p (decl)) + error ("redeclaration of %q#D with different template parameters", + decl); + else + error ("redeclaration of %q#D", decl); + } else error ("%q#D conflicts with a previous declaration", decl); @@ -2334,6 +2340,9 @@ matching_fn_p (tree one, tree two) return false; } + if (!equivalently_constrained (one, two)) + return false; + return true; } |