From: Jason Merrill Date: Tue, 17 Nov 2015 18:16:29 +0000 (-0500) Subject: re PR bootstrap/68361 (Bootstrap failure with --enable-checking=release) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3212c3c8ff81e677cef51136e13966a4157648d1;p=gcc.git re PR bootstrap/68361 (Bootstrap failure with --enable-checking=release) PR bootstrap/68361 * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress -Wparentheses. From-SVN: r230470 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 05b92528995..e4103004286 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-11-17 Jason Merrill + + PR bootstrap/68361 + * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress + -Wparentheses. + 2015-11-16 Jason Merrill * constexpr.c (cxx_eval_builtin_function_call): Use cp_fully_fold diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 0231efc9527..ebca00497e1 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -644,7 +644,7 @@ cp_convert_and_check (tree type, tree expr, tsubst_flags_t complain) else { /* Avoid bogus -Wparentheses warnings. */ - TREE_NO_WARNING (folded) = true; + warning_sentinel w (warn_parentheses); folded_result = cp_convert (type, folded, tf_none); } folded_result = fold_simple (folded_result); diff --git a/gcc/testsuite/g++.dg/warn/Wparentheses-28.C b/gcc/testsuite/g++.dg/warn/Wparentheses-28.C new file mode 100644 index 00000000000..f6636cbc6b8 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wparentheses-28.C @@ -0,0 +1,14 @@ +// PR bootstrap/68361 +// { dg-options -Wparentheses } + +struct A +{ + int p: 2; +}; + +A a, b; + +int main() +{ + bool t = (a.p = b.p); +}