gcc 4.3 header tr1/unordered_map gives "error: invalid alignment value specified by attribute"

Reference Number : DPD200041913

Version : 11.1, 12.0

Product : Intel® Compiler Professional Edition 11.1, Intel® C++ Composer XE 2011

Operating System : Linux*

Problem Description : Code like the following:

#include <tr1/unordered_map>

When used in a compilation mode with gcc 4.3 or above will give the following error when compiled with the Intel compiler:

[shell:nogutter:nocontrols]$ icpc -Wall -c test.cpp /usr/include/c++/4.3.2/tr1/type_traits(240): error: invalid alignment value specified by attribute struct __attribute__((__aligned__((_Align)))) { } __align; ^ compilation aborted for test.cpp (code 2) [/shell:nogutter:nocontrols]
Resolution Status : This code now compiles with version 12.1 of the compiler, available in Intel® C++ Composer XE 2011 update 6 and above.  If you can't update compilers, you can use the following workaround.  Replace the #include above with the following code:

#define __aligned__   ignored
#include <tr1/type_traits>
#undef __aligned__

[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]
Einzelheiten zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.