Originally posted by coder
View Post
Warnings are often an indication that something might be wrong, not that something is wrong. For common cases, there are therefore idioms that can be used to get what you want from the tools. "int i = i;" , or self-initialisation, tells the compiler that the variable should be treated as initialised for static checking, but does not generate any code. At other times, you might use "__builtin_unreachable()" to tell the compiler a code path cannot be reached, improving optimisation and error checking.
Here's a far more basic example involving the dismal realities of static analysis. I'm still experiencing numerous issues with this one, even on GCC v9.
https://stackoverflow.com/questions/...-in-this-funct
Comment