On Tue, Jan 27, 2009 at 9:33 AM, Paolo Bonzini <bonz...@gnu.org> wrote:
> James Dennett wrote:
>> On Mon, Jan 26, 2009 at 11:52 PM,  <zol...@bendor.com.au> wrote:
>>> I was debugging a function and by inserting the debug statement crashed
>>> the system. Some investigation revealed that gcc 4.3.2 arm-eabi (compiled
>>> from sources) with -O2 under some circumstances assumes that if a pointer
>>> is dereferenced, it can not be NULL therefore explicite tests against
>>> NULL can be later eliminated.
>>
>> That's an optimization permitted by the language standard, but
>> possibly unhelpful on your particular target.
>
> Not really, he's just using the sloppiness allowed by MMU-less targets,
> but he doesn't care about the value passed to Debug if tst == NULL.
>
> However, -fno-delete-null-pointer-checks will do.

Not for PTA though ;)

Richard.

Reply via email to