Re: telling GCC that a pointer cannot be NULL

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

 



On 10 May 2011 13:51, Marc Glisse <marc.glisse@xxxxxxxx> wrote:
> On Tue, 10 May 2011, Igor Bukanov wrote:
>
>> is it possible to tell GCC that a pointer cannot be NULL at a
>> particular point so the compiler can optimize the control flaw better
>> and avoid redundant NULL checks on the fast paths?
>
> I seem to remember that dereferencing the pointer had that effect.

Yes, this is indeed the case in the cases I checked. So I would need
to refactor much less code, thanks!


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux