C compiler weirdness?
David R. Blythe
drb at eecg.toronto.edu
Mon Apr 8 16:35:46 AEST 1991
I recently dug up a copy of the hoc calculator described in kernighan & pike
only to discover that the C compiler does not increment pc until after the
function call returns in the following statment:
(*(*pc++))();
whereas the rest of the program is assuming it is done before the function is
actually called. Is the compiler interpretation supposed to be implementation
dependent? I would suspect not, but then I can't believe no one else has
run into this before (On the other hand K&P is pre-ANSI). Sorry, if this has
been hashed out before. And for those keeping score this is IRIX 3.3.1
david blythe
ontario centre for large scale computation
drb at clsc.utoronto.ca
More information about the Comp.sys.sgi
mailing list