tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: definition of NULL correct?

On Tue, Aug 11, 2009 at 05:58:40PM -0400, Arnaud Lacombe wrote:
> Though, the issue of the precedence of the cast stays open.

Both the cast and sizeof are monadic operators so one would
assume the precedence is right to left.
So in 'sizeof (void *)0' the cast is applied first.

See table 2-1 on page 53 of K&R II.
So ths looks like a gcc bug!


David Laight:

Home | Main Index | Thread Index | Old Index