Hello Paul, I checked the values of macros you have asked: __GNUC__, __SUNPRO_C, __STDC__, __xlC_ver__ are all undefined. The rest ones are defined and the values are same for 32- and 64-bit compilation:
__IBM__TYPEOF__=1 __IBMC__=600 __xlC__=1536 Compiler version is much older than yours: cc_r -qversion C for AIX version 6.0.0.0 xlc -qversion C for AIX version 6.0.0.0 So, __IBM__TYPEOF__ macro is defined and the resulting complex macro from ftconfig.h is resolved to #define FT_TYPEOF( type ) (__typeof__ (type)), but __typeof__ itself does not work as I wrote in the original message. I suppose that if you use xlc 6.0.0.0 you should reproduce the problem as well. -- Best Regards, Alexander. 2016-10-31 16:03 GMT+01:00 Paul Eggert <egg...@cs.ucla.edu>: > 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? > >