call.c (joust): Don't call inform for a permerror returning false.
2013-03-28 Paolo Carlini <paolo.carlini@oracle.com> * call.c (joust): Don't call inform for a permerror returning false. * parser.c (cp_parser_check_class_key): Likewise. * pt.c (tsubst_copy_and_build): Likewise. From-SVN: r197190
This commit is contained in:
parent
a64b9c261d
commit
129677c1cf
|
@ -1,3 +1,9 @@
|
||||||
|
2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
* call.c (joust): Don't call inform for a permerror returning false.
|
||||||
|
* parser.c (cp_parser_check_class_key): Likewise.
|
||||||
|
* pt.c (tsubst_copy_and_build): Likewise.
|
||||||
|
|
||||||
2013-03-27 Jason Merrill <jason@redhat.com>
|
2013-03-27 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/56749
|
PR c++/56749
|
||||||
|
|
|
@ -8650,14 +8650,16 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn,
|
||||||
{
|
{
|
||||||
if (complain & tf_error)
|
if (complain & tf_error)
|
||||||
{
|
{
|
||||||
permerror (input_location,
|
if (permerror (input_location,
|
||||||
"default argument mismatch in "
|
"default argument mismatch in "
|
||||||
"overload resolution");
|
"overload resolution"))
|
||||||
|
{
|
||||||
inform (input_location,
|
inform (input_location,
|
||||||
" candidate 1: %q+#F", cand1->fn);
|
" candidate 1: %q+#F", cand1->fn);
|
||||||
inform (input_location,
|
inform (input_location,
|
||||||
" candidate 2: %q+#F", cand2->fn);
|
" candidate 2: %q+#F", cand2->fn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23363,10 +23363,10 @@ cp_parser_check_class_key (enum tag_types class_key, tree type)
|
||||||
return;
|
return;
|
||||||
if ((TREE_CODE (type) == UNION_TYPE) != (class_key == union_type))
|
if ((TREE_CODE (type) == UNION_TYPE) != (class_key == union_type))
|
||||||
{
|
{
|
||||||
permerror (input_location, "%qs tag used in naming %q#T",
|
if (permerror (input_location, "%qs tag used in naming %q#T",
|
||||||
class_key == union_type ? "union"
|
class_key == union_type ? "union"
|
||||||
: class_key == record_type ? "struct" : "class",
|
: class_key == record_type ? "struct" : "class",
|
||||||
type);
|
type))
|
||||||
inform (DECL_SOURCE_LOCATION (TYPE_NAME (type)),
|
inform (DECL_SOURCE_LOCATION (TYPE_NAME (type)),
|
||||||
"%q#T was previously declared here", type);
|
"%q#T was previously declared here", type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14019,11 +14019,12 @@ tsubst_copy_and_build (tree t,
|
||||||
fn = TREE_OPERAND (fn, 1);
|
fn = TREE_OPERAND (fn, 1);
|
||||||
if (is_overloaded_fn (fn))
|
if (is_overloaded_fn (fn))
|
||||||
fn = get_first_fn (fn);
|
fn = get_first_fn (fn);
|
||||||
permerror (EXPR_LOC_OR_HERE (t),
|
if (permerror (EXPR_LOC_OR_HERE (t),
|
||||||
"%qD was not declared in this scope, "
|
"%qD was not declared in this scope, "
|
||||||
"and no declarations were found by "
|
"and no declarations were found by "
|
||||||
"argument-dependent lookup at the point "
|
"argument-dependent lookup at the point "
|
||||||
"of instantiation", function);
|
"of instantiation", function))
|
||||||
|
{
|
||||||
if (!DECL_P (fn))
|
if (!DECL_P (fn))
|
||||||
/* Can't say anything more. */;
|
/* Can't say anything more. */;
|
||||||
else if (DECL_CLASS_SCOPE_P (fn))
|
else if (DECL_CLASS_SCOPE_P (fn))
|
||||||
|
@ -14043,6 +14044,7 @@ tsubst_copy_and_build (tree t,
|
||||||
else
|
else
|
||||||
inform (0, "%q+D declared here, later in the "
|
inform (0, "%q+D declared here, later in the "
|
||||||
"translation unit", fn);
|
"translation unit", fn);
|
||||||
|
}
|
||||||
function = unq;
|
function = unq;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue