Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
innocenat
5y ago
0 comments
Save
Share
Pointer arithmetic would surely make all value mutable. Or even simple array access.
0 comments
2 comments · 2 top-level
top
newest
oldest
teddyh
5y ago
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.
makapuf
5y ago
If you point to writable memory (Not all programs reside in ram.)
j
/
k
navigate · click thread line to collapse