...
If cpp, cp, and c are declared as automatic (stack) variables, this example compiles without warning on all versions of Microsoft Visual C++ .NET (2003) and on MS Visual Studio 2005Studio when compiled in C mode (/TC). In both cases, the resulting program changes the value of c. MS Visual Studio 2008 generates an error message. Version 3.2.2 of the GCC compiler generates a warning but compiles. The resulting program changes the value of c.
If cpp, cp, and c are declared with static storage duration, this program terminates abnormally for both MS Microsoft Visual Studio and GCC 3.2.2.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Bibliography
| [ISO/IEC 9899:2011] | Section 6.7.3, "Type Qualifiers" |