慕虎7371278
函数参数的计算顺序未指定,参见C99§6.5.2.2p10:函数指示符、实际参数中的实际参数和子表达式的计算顺序未指定,但在实际调用之前有一个序列点。C89中也有类似的措辞。此外,您正在修改pa多次没有调用未定义行为的序列点(逗号运算符引入序列点,但分隔函数参数的逗号不引入)。如果您打开编译器上的警告,它应该警告您:$ gcc -Wall -W -ansi -pedantic test.c -o test
test.c: In function ‘main’:test.c:9: warning: operation on ‘pa’ may be undefined
test.c:9: warning: operation on ‘pa’ may be undefined
test.c:13: warning: operation on ‘pa’ may be undefined
test.c:13: warning: operation on ‘pa’ may be undefined
test.c:17: warning: operation on ‘pa’ may be undefined
test.c:17: warning: operation on ‘pa’ may be undefined
test.c:20: warning: control reaches end of non-void function