C optimizer

Rob Carriere rob at kaa.eng.ohio-state.edu
Fri Feb 17 16:47:57 AEST 1989


In article <2008 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
>From article <1398 at quanta.eng.ohio-state.edu>, by rob at kaa.eng.ohio-state.edu 
(Rob Carriere):
>> What seems to be missing is the idea that sleep *does* modify
>> something, namely time.  So formally speaking, your compiler should
>> consider sleep to have a side effect on a variable called __time.  If
>> you do that, there's no problem.
>Huh?? 
>% nm a.out | grep __time
>Know what I mean?

Perfectly.  Do you know what I mean?  Note the phrase ``formally
speqaking'' in the above and insert ``for example'' after ``called''.

>On a time-shared system (such as Unix), does every instruction have
>a side effect on a variable called __time?

Of course.  And on any non-time shared system as well.  The poster to
whom I was replying considered the passage of time a side effect.  If
that is the case, you'd bloody well better model it as part of the
system state.

>Gimme a break.  (Or at least a sleep(300).)

Breaks are free() this week :-)

SR



More information about the Comp.lang.c mailing list