aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-03-16 22:34:20 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-03-16 22:34:20 -0400
commitd09b76f1533e68693677cd41527761e8cfafe49f (patch)
tree9eb0113404c195f46d86728e03dd64de9c5ca6dc /gcc
parent011ce3f3c2d1a534b2671ed6d5204fec9120fff7 (diff)
downloadgcc-d09b76f1533e68693677cd41527761e8cfafe49f.zip
gcc-d09b76f1533e68693677cd41527761e8cfafe49f.tar.gz
gcc-d09b76f1533e68693677cd41527761e8cfafe49f.tar.bz2
parser.c (lookup_literal_operator): Correct parm/arg naming mixup.
* parser.c (lookup_literal_operator): Correct parm/arg naming mixup. From-SVN: r196725
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/parser.c25
2 files changed, 15 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fa17a08..14bab43 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2013-03-16 Jason Merrill <jason@redhat.com>
+ * parser.c (lookup_literal_operator): Correct parm/arg naming
+ mixup.
+
PR c++/56238
* pt.c (fold_non_dependent_expr_sfinae): Check
instantiation_dependent_expression_p.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index ff4faa3..12926e3 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -3559,21 +3559,20 @@ lookup_literal_operator (tree name, vec<tree, va_gc> *args)
unsigned int ix;
bool found = true;
tree fn = OVL_CURRENT (fns);
- tree argtypes = NULL_TREE;
- argtypes = TYPE_ARG_TYPES (TREE_TYPE (fn));
- if (argtypes != NULL_TREE)
+ tree parmtypes = TYPE_ARG_TYPES (TREE_TYPE (fn));
+ if (parmtypes != NULL_TREE)
{
- for (ix = 0; ix < vec_safe_length (args) && argtypes != NULL_TREE;
- ++ix, argtypes = TREE_CHAIN (argtypes))
+ for (ix = 0; ix < vec_safe_length (args) && parmtypes != NULL_TREE;
+ ++ix, parmtypes = TREE_CHAIN (parmtypes))
{
- tree targ = TREE_VALUE (argtypes);
- tree tparm = TREE_TYPE ((*args)[ix]);
- bool ptr = TREE_CODE (targ) == POINTER_TYPE;
- bool arr = TREE_CODE (tparm) == ARRAY_TYPE;
- if ((ptr || arr || !same_type_p (targ, tparm))
+ tree tparm = TREE_VALUE (parmtypes);
+ tree targ = TREE_TYPE ((*args)[ix]);
+ bool ptr = TREE_CODE (tparm) == POINTER_TYPE;
+ bool arr = TREE_CODE (targ) == ARRAY_TYPE;
+ if ((ptr || arr || !same_type_p (tparm, targ))
&& (!ptr || !arr
- || !same_type_p (TREE_TYPE (targ),
- TREE_TYPE (tparm))))
+ || !same_type_p (TREE_TYPE (tparm),
+ TREE_TYPE (targ))))
found = false;
}
if (found
@@ -3582,7 +3581,7 @@ lookup_literal_operator (tree name, vec<tree, va_gc> *args)
depending on how exactly should user-defined literals
work in presence of default arguments on the literal
operator parameters. */
- && argtypes == void_list_node)
+ && parmtypes == void_list_node)
return fn;
}
}