Ticket #105 (NULL checks)
Mark Glines
mark at glines.org
Wed Dec 31 17:22:01 UTC 2008
kjstol wrote:
>
>
> On Wed, Dec 31, 2008 at 5:03 PM, Mark Glines <mark at glines.org
> <mailto:mark at glines.org>> wrote:
>
> Andy Dougherty wrote:
> > One trap: If the gcc attribute_nonnull is still used for these same
> > functions, gcc can optimize away the NULL checks, rendering them
> useless.
> > I'd recommend also getting rid of the attribute_nonnull gcc
> checking. I
> > have posted about this at length in previous RT tickets, if you
> need more
> > background.
>
> Ok, I've gone and read through RT #49316 and RT #50684. It sounds an
> awful lot like attribute_nonnull is an optimization, not a constraint as
> I had originally thought. Therefore it's working against us, not
> with us.
>
> I'm pretty sure assert() is a C library function.
>
>
> I think it's a C #define'd macro, not a function, which is not expanded
> if you set the right debug #define
> (don't know details by heart).
Hmm, you're right. gcc will short-circuit those too, so we'd better get
rid of attribute_nonnull (for now).
Mark
More information about the parrot-dev
mailing list