Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/pr36069.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/36069 Strange "warning: suggest parentheses around |
2 // assignment used as truth value" with volatile/non volatile bools | |
3 // { dg-do compile } | |
4 // { dg-options "-Wparentheses" } | |
5 struct foo { | |
6 bool a; | |
7 volatile bool b,c; | |
8 foo() { a = b = c = false; } // { dg-bogus "parentheses" } | |
145 | 9 // { dg-warning "deprecated" "" { target c++2a } .-1 } |
111 | 10 }; |
11 | |
12 int main() { | |
13 bool a; | |
14 volatile bool b,c; | |
15 a = b = c = false; // { dg-bogus "parentheses" } | |
145 | 16 // { dg-warning "deprecated" "" { target c++2a } .-1 } |
111 | 17 foo A; |
18 } |