From 129677c1cf80e2fe333d21dbcfec8ca4e0a39d4e Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 28 Mar 2013 10:00:05 +0000 Subject: call.c (joust): Don't call inform for a permerror returning false. 2013-03-28 Paolo Carlini * 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 --- gcc/cp/parser.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/cp/parser.c') diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 9ba0998..5e2a4e0 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -23363,12 +23363,12 @@ cp_parser_check_class_key (enum tag_types class_key, tree type) return; if ((TREE_CODE (type) == UNION_TYPE) != (class_key == union_type)) { - permerror (input_location, "%qs tag used in naming %q#T", - class_key == union_type ? "union" - : class_key == record_type ? "struct" : "class", - type); - inform (DECL_SOURCE_LOCATION (TYPE_NAME (type)), - "%q#T was previously declared here", type); + if (permerror (input_location, "%qs tag used in naming %q#T", + class_key == union_type ? "union" + : class_key == record_type ? "struct" : "class", + type)) + inform (DECL_SOURCE_LOCATION (TYPE_NAME (type)), + "%q#T was previously declared here", type); } } -- cgit v1.1