[typeof] native support in intel and como

Can anybody familiar with these compilers explain what needs to be done in order to be able to use the "typeof" keyword with them? From looking on the web, I got the impression that they have to support it, but my attempts to setup the tests fail with "typeof" undefined (I tried __typeof__ before this). Thanks, Arkadiy

Arkadiy Vertleyb wrote:
Can anybody familiar with these compilers explain what needs to be done in order to be able to use the "typeof" keyword with them? From looking on the web, I got the impression that they have to support it, but my attempts to setup the tests fail with "typeof" undefined (I tried __typeof__ before this).
On Intel Linux 9.0 __typeof__ seems to always work - even for 'icpc -cxxlib-icc -strict-ansi -no-gnu-keywords'. So, if __linux__ is defined it should be okay. I have no idea if they added typeof to windows. I don't have access Comeau, but looking at: http://www.comeaucomputing.com/4.3.0/minor/linux/compat.html#gnucppcompat it seems that if __GNUG__ is defined then 'typeof' will work. Comeau online doesn't accept the --g++ switch so I couldn't test that. Daniel

"Arkadiy Vertleyb" wrote:
Can anybody familiar with these compilers explain what needs to be done in order to be able to use the "typeof" keyword with them? From looking on the web, I got the impression that they have to support it, but my attempts to setup the tests fail with "typeof" undefined (I tried __typeof__ before this).
http://support.intel.com/support/performancetools/c/windows/sb/cs-015086.htm mentions no support in Intel 8.0 for Windows. I coudn't find any reference it was added later. Linux ICC employs option -fno-gnu-keywords which disables native typeof. /Pavel
participants (3)
-
Arkadiy Vertleyb
-
Daniel James
-
Pavel Vozenilek