smart compilers
D Gary Grady
dgary at ecsvax.UUCP
Tue Jan 8 05:28:12 AEST 1985
<>
Mark Crispin <MRC at SU-SCORE.ARPA> writes:
> I may be mistaken, but I believe according to the standards it is
> not only "poor style" to change a constant which was passed to a subroutine,
> it is also undefined what the behavior of the system after that should be.
...
> You really have no
> hope for catching this at compile-time; the earliest you can do it is when
> linking the modules together.
What's so hard about the calling program always moving the constant to
a work area and passing the address of that? As I said before, that's
equivalent to just considering a constant a special case of an
expression.
--
D Gary Grady
Duke University Computation Center, Durham, NC 27706
(919) 684-4146
USENET: {decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary
More information about the Comp.unix.wizards
mailing list