PR bootstrap/68361
* cvt.c (cp_convert_and_check): Use warning_sentinel to suppress
-Wparentheses.
From-SVN: r230470
+2015-11-17 Jason Merrill <jason@redhat.com>
+
+ PR bootstrap/68361
+ * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress
+ -Wparentheses.
+
2015-11-16 Jason Merrill <jason@redhat.com>
* constexpr.c (cxx_eval_builtin_function_call): Use cp_fully_fold
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);
--- /dev/null
+// PR bootstrap/68361
+// { dg-options -Wparentheses }
+
+struct A
+{
+ int p: 2;
+};
+
+A a, b;
+
+int main()
+{
+ bool t = (a.p = b.p);
+}