Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wxor-used-as-pow-named-op.C

raw
1 /* Verify that -Wxor-used-as-pow only warns with ^ and not with
2 named "xor". */
3
4 int t2_16 = 2^16; /* { dg-warning "result of '2\\^16' is 18; did you mean '1 << 16' \\(65536\\)\\?" } */
5 int t2x16 = 2 xor 16;
6
7 int t10_6 = 10^6; /* { dg-warning "result of '10\\^6' is 12; did you mean '1e6'\\?" } */
8 int t10x6 = 10 xor 6;