This is the mail archive of the
mailing list for the GCC project.
Re: A simple question on expression
On Fri, Aug 31, 2001 at 05:00:33PM +0800, Jie Zhang wrote:
> your "obvious" explanation is not satisfiable.
> why a = 0?0:a++; not be expanded to if (0) a=0; else a=a++; /* 2 */
It IS expanded, however, since the expression is undefined, nobody
will guarantee that it will be equal in different code parts..
moreover, you'll discover that
would result in a == 6 ..
[Or, it may differ for your architecture/compiler/anything else]
"It is easier to fight for principles than to live up to them."
-- Alfred Adler