__builtin_types_compatible_p and 'char *' vs. 'char []'
Kevin P. Fleming
kpfleming@digium.com
Fri Nov 7 03:06:00 GMT 2008
Matthew Woehlke wrote:
> What about this (untested WAG):
> typeof(*(&a)) __x = a;
> - or -
> typeof(&(a[0])) __x = a; // a must be pointer or array
I've changed to using a static inline function that accepts two 'const
char *' arguments and returns a 'char *' (casting internally to avoid
the compiler warning), which took care of the issue.
--
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)
More information about the Gcc-help
mailing list