Since C++ compilers can (usually) detect violations of const
ness, are there any tools that will identify missed opportunities for declaring something as const
?
gcc has -Wsuggest-attribute=[pure|const|noreturn|format], but I believe these are limited to functions and function pointers.
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With