blob: 7b166351a4b5c2c814af5914baa0909c0aec75c1 [file] [log] [blame]
// PR c++/36069 Strange "warning: suggest parentheses around
// assignment used as truth value" with volatile/non volatile bools
// { dg-do compile }
// { dg-options "-Wparentheses" }
struct foo {
bool a;
volatile bool b,c;
foo() { a = b = c = false; } // { dg-bogus "parentheses" }
// { dg-warning "deprecated" "" { target c++2a } .-1 }
};
int main() {
bool a;
volatile bool b,c;
a = b = c = false; // { dg-bogus "parentheses" }
// { dg-warning "deprecated" "" { target c++2a } .-1 }
foo A;
}