BSD C compiler bug

Doug Gwyn gwyn at brl-smoke.ARPA
Wed Mar 23 04:49:39 AEST 1988


In article <10754 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>Constant expressions have *everything* to do with it!

Ok, I see now.  The relevant factor is that integer-to-pointer
conversion does not occur automatically for assignment, except
in the case that the RHS is a null pointer constant, and as
you correctly observer, (0,0) is not a valid null pointer constant,
because the comma operator is not allowed in constant expressions
(except within the operand of sizeof).  I'm not sure why that
constraint was imposed; it doesn't seem necessary.



More information about the Comp.lang.c mailing list