Hacker News new | ask | show | jobs
by innocenat 1926 days ago
Pointer arithmetic would surely make all value mutable. Or even simple array access.
2 comments

Yes, but the compiler should know if there is any pointer arithmetic present in the code, and whether any such pointer arithmetic could, possibly, result in a pointer pointing to the const data.
If you point to writable memory (Not all programs reside in ram.)