summaryrefslogtreecommitdiffstats
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-23 18:34:45 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-23 18:34:45 +0000
commit4fe0fb1c69bc846582aab11b97d5dc821b7b9964 (patch)
tree968311c992d2f47134800cd82fe3d4713af460fd /gcc/cp/semantics.c
parenta402d52a3f514275438ae1a3fe86f63fc6c3f2e1 (diff)
downloadppe42-gcc-4fe0fb1c69bc846582aab11b97d5dc821b7b9964.tar.gz
ppe42-gcc-4fe0fb1c69bc846582aab11b97d5dc821b7b9964.zip
/c-family
2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default Wnarrowing for C++0x and C++98. * c.opt ([Wnarrowing]): Update. /cp 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * typeck2.c (check_narrowing): Adjust OPT_Wnarrowing diagnostics. (digest_init_r): Call check_narrowing irrespective of the C++ dialect. * decl.c (check_initializer): Likewise. * semantics.c (finish_compound_literal): Likewise. /testsuite 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * g++.dg/cpp0x/warn_cxx0x2.C: New. * g++.dg/cpp0x/warn_cxx0x3.C: Likewise. 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50810 * doc/invoke.texi ([-Wnarrowing], [-Wc++0x-compat]): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180343 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 42195be4a81..9fec33422b3 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2369,7 +2369,7 @@ finish_compound_literal (tree type, tree compound_literal,
&& check_array_initializer (NULL_TREE, type, compound_literal))
return error_mark_node;
compound_literal = reshape_init (type, compound_literal, complain);
- if (cxx_dialect >= cxx0x && SCALAR_TYPE_P (type)
+ if (SCALAR_TYPE_P (type)
&& !BRACE_ENCLOSED_INITIALIZER_P (compound_literal))
check_narrowing (type, compound_literal);
if (TREE_CODE (type) == ARRAY_TYPE
OpenPOWER on IntegriCloud