[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: __typeof__ does not work as expected with XLC compiler on AIX 5.2
From: |
Paul Eggert |
Subject: |
Re: __typeof__ does not work as expected with XLC compiler on AIX 5.2 |
Date: |
Mon, 31 Oct 2016 08:03:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
On 10/28/2016 08:13 AM, TestRealTime . wrote:
long Func(int x) { return x; }
int main()
{
int y, z = 1;
y = (__typeof__(Func((__typeof__(z))z)))0;
return 0;
}
I don't observe any problem when compiling with this xlc:
$ xlc -qversion
IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72)
Version: 12.01.0000.0000
gnulib/lib/intprops.h says __typeof__ should work with xlc if the
__IBM__TYPEOF__ macro is defined. Is that macro defined for you? If not,
then why is FT_TYPEOF misfiring for you? And if so, what are the values
of the following macros? You can use the compiler's -E option to
determine this.
__IBMC__
__xlC__
__xlC_ver__
Also, what does your compiler's manual (for your compiler's version) say
about this?