[TUHS] v7 K&R C
paul.winalski at gmail.com
Fri May 15 03:13:33 AEST 2020
On 5/13/20, Rich Morin <rdm at cfcl.com> wrote:
> A Fortran implementation I used years ago kept constants in a "literal
> pool". So, if you called a subroutine, passing in a constant, there was a
> possibility that the constant might be modified upon the routine's return.
> I don't recall this ever causing a problem in practice, but the possibility
> was amusing...
Any modern compiler worth its salt does literal pooling. Fortunately
modern operating systems have the concept of read-only address space.
These days attempts to modify literal pool constants will give you a
memory access violation at the point where the illegal modification
More information about the TUHS