A simple question on expression

Jie Zhang jzhang916@sina.com
Fri Aug 31 02:04:00 GMT 2001


Thank you for your reply!

But your "obvious" explanation is not satisfiable.

If the following statement

a = (a<4)?0:a++;

can be expanded to

if (a<4)
	a=0;
else
	a=a++; /* 2 */


why
a = 0?0:a++;
not be expanded to

if (0)
	a=0;
else
	a=a++; /* 2 */


ps. I have read the K&R yet.



More information about the Gcc mailing list