mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-25 12:41:01 +08:00
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
This commit is contained in:
parent
2ad8d9105d
commit
c428869b6d
@ -1,3 +1,8 @@
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user