Re: How to avoid "the address of 'foo' will never be NULL" warning inside macros?

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

 



On 9 June 2011 09:15, Steffen Dettmer wrote:
>
> - implementing the macro as function would probably help but may
>  cause overhead and may have additional effects

http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Inline.html

> - implementing the macro as function for gcc of gcc-4.6.0 only
>  seems to be ugly and needlessly conditional
>
> - disabling the warning would (I guess) also affect when checking
>  addresses without using macros

Not if you do it locally in the macro only, using _Pragma
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html



[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