...
| Wiki Markup |
|---|
It is also a recommended practice not to cast away a {{const}} qualification (\[[EXP05-A. Do not cast away a const qualification]\] not to cast away a {{const}} qualification), as this makes it possibleeasier to modify a {{const}}\-qualified value without warning. |
...
If cpp, cp, and c are declared as automatic (stack) variables, this example compiles without warning on Microsoft Visual C++ .NET (2003) and on MS Visual Studio 2005 1. In both cases, the resulting program changes the value of c. Version 3.2.2 of the gcc compiler generates a warning but compiles. The resulting program changes the value of c.
...
| Wiki Markup |
|---|
\[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]\] Section 6.7.3, "Type qualifiers," and Section 6.5.16.1, "Simple assignment" |
Footnotes
1. According to C99 Section 5.1.1.3:
...