1 /* { dg-do compile } */
2 /* { dg-options "-Wtautological-compare -fdiagnostics-show-caret" } */
9 if (foo
== foo
); /* { dg-warning "self-comparison always evaluates to true" } */
10 /* { dg-begin-multiline-output "" }
13 { dg-end-multiline-output "" { target c } } */
14 /* { dg-begin-multiline-output "" }
17 { dg-end-multiline-output "" { target c++ } } */
23 if (FOO
== FOO
); /* { dg-warning "self-comparison always evaluates to true" } */
24 /* { dg-begin-multiline-output "" }
27 { dg-end-multiline-output "" } */
33 if ((foo
& 16) == 10); /* { dg-warning "bitwise comparison always evaluates to false" } */
34 /* { dg-begin-multiline-output "" }
35 if ((foo & 16) == 10);
37 { dg-end-multiline-output "" { target c } } */
38 /* { dg-begin-multiline-output "" }
39 if ((foo & 16) == 10);
41 { dg-end-multiline-output "" { target c++ } } */