summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-02 08:51:26 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-02 08:51:26 +0000
commit6b1f07974e6932dce746374190eead08c5d2b150 (patch)
tree73f1212f31e4b2a93c0fa0839a43d146982aef43 /gcc/cp
parent90aafff6f2df522d3e8309990cac3cba246f20ed (diff)
downloadgcc-6b1f07974e6932dce746374190eead08c5d2b150.tar.gz
PR c++/40942 - Failure of template specialization partial ordering
gcc/cp/ * pt.c (more_specialized_fn): Don't apply decay conversion to types of function parameters. gcc/testsuite/ * g++.old-deja/g++.pt/spec40.C: Adjust to take the resolution of DR 214 in account. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/pt.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9b410a75fd4..04ba37d25e7 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -17132,46 +17132,6 @@ more_specialized_fn (tree pat1, tree pat2, int len)
quals2 = cp_type_quals (arg2);
}
- if ((quals1 < 0) != (quals2 < 0))
- {
- /* Only of the args is a reference, see if we should apply
- array/function pointer decay to it. This is not part of
- DR214, but is, IMHO, consistent with the deduction rules
- for the function call itself, and with our earlier
- implementation of the underspecified partial ordering
- rules. (nathan). */
- if (quals1 >= 0)
- {
- switch (TREE_CODE (arg1))
- {
- case ARRAY_TYPE:
- arg1 = TREE_TYPE (arg1);
- /* FALLTHROUGH. */
- case FUNCTION_TYPE:
- arg1 = build_pointer_type (arg1);
- break;
-
- default:
- break;
- }
- }
- else
- {
- switch (TREE_CODE (arg2))
- {
- case ARRAY_TYPE:
- arg2 = TREE_TYPE (arg2);
- /* FALLTHROUGH. */
- case FUNCTION_TYPE:
- arg2 = build_pointer_type (arg2);
- break;
-
- default:
- break;
- }
- }
- }
-
arg1 = TYPE_MAIN_VARIANT (arg1);
arg2 = TYPE_MAIN_VARIANT (arg2);