Although late to the party, a compiler could put variables defined as const in a read-only memory segment/block, so that if an attempt was made to write to the address, via some pointer tomfoolery, the write to the memory would trigger an exception at runtime.
-- Jamey