Commit c428869b by Paolo Carlini Committed by Paolo Carlini

semantics.c (finish_compound_literal): Don't call check_narrowing if !(complain…

semantics.c (finish_compound_literal): Don't call check_narrowing if !(complain & tf_warning_or_error).

2011-12-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* semantics.c (finish_compound_literal): Don't call check_narrowing
	if !(complain & tf_warning_or_error).

From-SVN: r182462
parent 2ad8d910
2011-12-18 Paolo Carlini <paolo.carlini@oracle.com>
* semantics.c (finish_compound_literal): Don't call check_narrowing
if !(complain & tf_warning_or_error).
2011-12-17 Jason Merrill <jason@redhat.com>
PR c++/51588
......
......@@ -2370,7 +2370,8 @@ finish_compound_literal (tree type, tree compound_literal,
return error_mark_node;
compound_literal = reshape_init (type, compound_literal, complain);
if (SCALAR_TYPE_P (type)
&& !BRACE_ENCLOSED_INITIALIZER_P (compound_literal))
&& !BRACE_ENCLOSED_INITIALIZER_P (compound_literal)
&& (complain & tf_warning_or_error))
check_narrowing (type, compound_literal);
if (TREE_CODE (type) == ARRAY_TYPE
&& TYPE_DOMAIN (type) == NULL_TREE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment