Re: __builtin_types_compatible_p and 'char *' vs. 'char []'

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

 



Matthew Woehlke wrote:

> Ah, yes, inline better than macro :-). I'd note that, from your example
> usage, it sounds like your return should also be const.

No, we have to return non-const, because many uses of this
macro/function are putting the result in a non-const variable. Returning
non-const is safe even if the lvalue accepting the result is const, but
the reverse generates a warning.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)

[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