From 937f6ef1451c19076caa9add827a3921f6aead06 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 14 Sep 2012 14:43:05 +0000 Subject: [PATCH] decl.c (make_typename_type): Only error out if tf_error is set in complain. 2012-09-14 Paolo Carlini * decl.c (make_typename_type): Only error out if tf_error is set in complain. From-SVN: r191303 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 21256df..630c74a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-14 Paolo Carlini + + * decl.c (make_typename_type): Only error out if tf_error is set + in complain. + 2012-09-13 Paolo Carlini Manuel López-Ibáñez diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 06e9ae7..6b5b986 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3235,13 +3235,15 @@ make_typename_type (tree context, tree name, enum tag_types tag_type, name = TREE_OPERAND (fullname, 0) = DECL_NAME (name); else if (TREE_CODE (name) == OVERLOAD) { - error ("%qD is not a type", name); + if (complain & tf_error) + error ("%qD is not a type", name); return error_mark_node; } } if (TREE_CODE (name) == TEMPLATE_DECL) { - error ("%qD used without template parameters", name); + if (complain & tf_error) + error ("%qD used without template parameters", name); return error_mark_node; } gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE); -- 2.7.4