Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

TR1 and Intel XE and GCC 4.4 error

regis_vincent
Beginner
701 Views
I ran into this compilation error using XE either version 2011.0.084 or 2011.1.107 both in 32 and 64 bits specifically on Ubuntu 10.04 (most likely due to gcc 4.4):
/usr/include/c++/4.4.3/tr1_impl/type_traits(226): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(227): error: expected a ")" struct is_function<_Res(_ArgTypes...)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(227): error: a template argument list is not allowed in a declaration of a primary template struct is_function<_Res(_ArgTypes...)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(229): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(230): error: expected a ")" struct is_function<_Res(_ArgTypes......)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(230): error: a template argument list is not allowed in a declaration of a primary template struct is_function<_Res(_ArgTypes......)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(232): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(233): error: expected a ")" struct is_function<_Res(_ArgTypes...) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(233): error: expected a ">" struct is_function<_Res(_ArgTypes...) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(235): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(236): error: expected a ")" struct is_function<_Res(_ArgTypes......) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(236): error: expected a ">" struct is_function<_Res(_ArgTypes......) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(238): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(239): error: expected a ")" struct is_function<_Res(_ArgTypes...) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(239): error: expected a ">" struct is_function<_Res(_ArgTypes...) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(241): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(242): error: expected a ")" struct is_function<_Res(_ArgTypes......) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(242): error: expected a ">" struct is_function<_Res(_ArgTypes......) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(244): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(245): error: expected a ")" struct is_function<_Res(_ArgTypes...) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(245): error: expected a ">" struct is_function<_Res(_ArgTypes...) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(247): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(248): error: expected a ")" struct is_function<_Res(_ArgTypes......) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(248): error: expected a ">" struct is_function<_Res(_ArgTypes......) const volatile> ^/usr/include/c++/4.4.3/tr1/type_traits(241): error: invalid alignment value specified by attribute struct __attribute__((__aligned__((_Align)))) { } __align; ^/usr/include/c++/4.4.3/tr1_impl/type_traits(226): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(227): error: expected a ")" struct is_function<_Res(_ArgTypes...)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(227): error: a template argument list is not allowed in a declaration of a primary template struct is_function<_Res(_ArgTypes...)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(229): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(230): error: expected a ")" struct is_function<_Res(_ArgTypes......)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(230): error: a template argument list is not allowed in a declaration of a primary template struct is_function<_Res(_ArgTypes......)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(232): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(233): error: expected a ")" struct is_function<_Res(_ArgTypes...) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(233): error: expected a ">" struct is_function<_Res(_ArgTypes...) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(235): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(236): error: expected a ")" struct is_function<_Res(_ArgTypes......) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(236): error: expected a ">" struct is_function<_Res(_ArgTypes......) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(238): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(239): error: expected a ")" struct is_function<_Res(_ArgTypes...) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(239): error: expected a ">" struct is_function<_Res(_ArgTypes...) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(241): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(242): error: expected a ")" struct is_function<_Res(_ArgTypes......) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(242): error: expected a ">" struct is_function<_Res(_ArgTypes......) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(244): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(245): error: expected a ")" struct is_function<_Res(_ArgTypes...) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(245): error: expected a ">" struct is_function<_Res(_ArgTypes...) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(247): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(248): error: expected a ")" struct is_function<_Res(_ArgTypes......) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(248): error: expected a ">" struct is_function<_Res(_ArgTypes......) const volatile> ^/usr/include/c++/4.4.3/tr1/type_traits(241): error: invalid alignment value specified by attribute struct __attribute__((__aligned__((_Align)))) { } __align; ^/usr/include/c++/4.4.3/tr1_impl/type_traits(226): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(227): error: expected a ")" struct is_function<_Res(_ArgTypes...)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(227): error: a template argument list is not allowed in a declaration of a primary template struct is_function<_Res(_ArgTypes...)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(229): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(230): error: expected a ")" struct is_function<_Res(_ArgTypes......)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(230): error: a template argument list is not allowed in a declaration of a primary template struct is_function<_Res(_ArgTypes......)> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(232): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(233): error: expected a ")" struct is_function<_Res(_ArgTypes...) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(233): error: expected a ">" struct is_function<_Res(_ArgTypes...) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(235): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(236): error: expected a ")" struct is_function<_Res(_ArgTypes......) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(236): error: expected a ">" struct is_function<_Res(_ArgTypes......) const> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(238): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(239): error: expected a ")" struct is_function<_Res(_ArgTypes...) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(239): error: expected a ">" struct is_function<_Res(_ArgTypes...) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(241): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(242): error: expected a ")" struct is_function<_Res(_ArgTypes......) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(242): error: expected a ">" struct is_function<_Res(_ArgTypes......) volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(244): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(245): error: expected a ")" struct is_function<_Res(_ArgTypes...) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(245): error: expected a ">" struct is_function<_Res(_ArgTypes...) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(247): error: expected an identifier template ^/usr/include/c++/4.4.3/tr1_impl/type_traits(248): error: expected a ")" struct is_function<_Res(_ArgTypes......) const volatile> ^/usr/include/c++/4.4.3/tr1_impl/type_traits(248): error: expected a ">" struct is_function<_Res(_ArgTypes......) const volatile> ^/usr/include/c++/4.4.3/tr1/type_traits(241): error: invalid alignment value specified by attribute struct __attribute__((__aligned__((_Align)))) { } __align;
Any help would be appreciated. Our code compiles fine on gcc. It also compiles fine on Mac OS using gcc or intel. But Linux 10.04 is broken.
0 Kudos
5 Replies
Brandon_H_Intel
Employee
701 Views
Hi Regis,

We've posted an article about this at http://software.intel.com/en-us/articles/some-gcc-headers-will-not-compile-due-to-use-of-c0x-variadic-templates/. It's a compatiblity issue that we understand and are working to address, but a short-term solution is proving challenging. I've linked this post to the internal report where we are tracking this, and when any update occurs, I will update this thread.
0 Kudos
bsteintrc
Beginner
701 Views
Was there ever a workaround to this (possibly patching type_traits)? I've just run into this issue as well, but cannot upgrade to 12.1 (update 6) as the link suggests, because I'm having separate issues, related to boost, as desribed here:
http://software.intel.com/en-us/forums/showthread.php?t=85958

Thanks.
0 Kudos
Judith_W_Intel
Employee
701 Views

Please read the related link for my latest post. You should upgrade to 12.1 since variadic templates are implemented in that release.
0 Kudos
bsteintrc
Beginner
701 Views
Judith,

Which link are you referring to? The one in Brandon's post (which I can't find any mention of you, and only suggests upgrading to 12.1, not an alternative workaround), or the one in my post, about the issue with boost (where I've already responded to your post, which didn't in any way help my problem)?

Either way, as mentioned I'm currently unable to upgrade to 12.1, because of my issues with Boost, as described in my previous post. Hence why I am looking for some other solution. Ideally something along the lines of the one found in http://software.intel.com/en-us/forums/showthread.php?t=74691&p=2&o=d&s=lr
which we've already had to implement. We typically run benchmarks of our code with several compilers to prevent regressions, so being able to continue to use 12.0 is desired.
0 Kudos
bsteintrc
Beginner
701 Views
My question about this was resolved in the other thread, and so is no longer relevant.
0 Kudos
Reply