Talk:Enforced immutability

From Rosetta Code
Revision as of 15:07, 25 June 2011 by rosettacode>Ledrug (→‎C const: a joke: more const, pfff)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

C const: a joke

The C const is such a joke. <lang C>void some_func(const int const * const a) {

   ((int*)a)[0]++;

}</lang>Not even a compiler warning! So much for "immutable".