(no title)
NotPaidToPost | 6 years ago
Many build environments are set to treat all warnings as errors.
The point is that 2^32 is a perfectly compliant C expression that is neither misleading nor ambiguous, and that also won't create any variable overflow. It uses ^ exactly as intended. Why should the compiler complain? Why should I get a warning/error when following the spec to the letter?
lifthrasiir|6 years ago
[1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
[2] https://clang.llvm.org/docs/DiagnosticsReference.html
barrkel|6 years ago
OskarS|6 years ago
stestagg|6 years ago
A new type of misleading and error-prone statement has been found, so it seems entirely reasonable that this is added to that list.
This seems to be the entire intent of compiler warnings (these days anyway)
sayusasugi|6 years ago
pjc50|6 years ago
viraptor|6 years ago