auto-increment bug in Ultrix(4.1) C (DS3100)

Ethan Merritt merritt at milton.u.washington.edu
Tue Apr 16 10:36:42 AEST 1991


In article <1991Apr15.161123.16353 at watcgl.waterloo.edu>  idallen at watcgl.waterloo.edu (Ian! D. Allen [CGL]) writes (quoting others):

>  [ discussion of why failing to increment pc in the expression below before
>    completing function call is "not a bug" ]
>  So what can we conclude?  Only that the increment has to have taken effect
>  by the end of the expression.  Hence within the function call
>  
>                  (*(*pc++))()
>  
>  the value of pc is implementation-defined.  Congratulations, Ian!, you
>  can pick up your prize at....
>  
	All right, I'm willing to play the straight man here.  What is
the ANSI-provided definition of "expression"?  As I see it the lexical element
(*pc++) is already an expression, and the original complaint is perfectly
valid.  To make the point clearer, what would your ruling be on a statement
of the form:
		extern (void *)xxx;
		...
		(*(xxx = *pc++))();

What do you conclude about the value of xxx during the execution of the
function invoked?
						Ethan A Merritt
--------------------------------------------------------------------
Dept of Biological Structure                H510 Health Sciences
University of Washington SM-20              (206)543-8865
Seattle, WA 98195                           merritt at u.washington.edu
--------------------------------------------------------------------



More information about the Comp.unix.ultrix mailing list