[comp.unix.wizards] fix to prevent compiler taking address of a register?

dave@lsuc.UUCP (04/06/87)

I'm running Edition VII Workbench (with source) on a Perkin-Elmer
3220 system. This is basically UNIX v7.

I just got bitten by what I consider a compiler bug. I changed
a number of "int" declarations to "register" in a program I was
making some changes to, not realizing that one of them had its
address used (i.e., "int status" ... "wait(&status)").

Now, I don't mind if the compiler gives me an error, and I don't
mind if it decides that "status" can't be a register after all
and puts it in memory. Either of these is consistent with K&R
pp. 81 and 193, which state that one cannot take the address of
a register.

What I didn't care for is the compiler accepting the code, then
having the program dump core at run-time. Does anyone have a fix
to the v7 compiler which would handle this, or can someone at least
point me at how to solve it? Thanks.

David Sherman
The Law Society of Upper Canada
Toronto
-- 
{ seismo!mnetor  cbosgd!utgpu  watmath  decvax!utcsri  ihnp4!utzoo } !lsuc!dave