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

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

 



Kevin P. Fleming wrote:
There is one workaround that I've found, which is to call the macro like
this:

	char str1[20], *str2;

	....
	str2 = S_OR(&str1, "");

This makes the 'promotion' to 'char *' explicit, and resolves the issue.

...but isn't the code wrong? typeof(&str1) =~ char**, not char*?

What about this (untested WAG):
typeof(*(&a)) __x = a;
- or -
typeof(&(a[0])) __x = a; // a must be pointer or array

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
In the beginning, there were not enough colors. -- Guy Keren


[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