4 ms·
Is it possible to enable a warning in C++ for these cases?
by mentos 4y ago
Is it possible to enable a warning in C++ for these cases?
- TonyTrapp 4y agoGiven that there is a multitude of C++ compilers: Depends on your compiler. But in general, most compilers have a warning for this sort of thing.
- inetknght 4y ago1. Not in GCC. 2. This would be caught by static analyzer See Compiler Explorer example here [0] [0]: https://gcc.godbolt.org/z/nK7MdEcMj https://gcc.godbolt.org/z/nK7MdEcMj