aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2012-04-02 08:51:26 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2012-04-02 10:51:26 +0200
commitcdc30df3e2f9badd1f2fd8efe14c6546cd8efe07 (patch)
tree73f1212f31e4b2a93c0fa0839a43d146982aef43 /gcc/cp/pt.c
parentdb435dce3639caf3d530b5f228b588b99645c8d3 (diff)
downloadgcc-cdc30df3e2f9badd1f2fd8efe14c6546cd8efe07.zip
gcc-cdc30df3e2f9badd1f2fd8efe14c6546cd8efe07.tar.gz
gcc-cdc30df3e2f9badd1f2fd8efe14c6546cd8efe07.tar.bz2
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. From-SVN: r186067
Diffstat (limited to 'gcc/cp/pt.c')
-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 9b410a7..04ba37d 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);