The ChipList, by Adrian Offerman; The Processor Portal

new
Processor Selector

Platform:
Segment:
View: show / edit

bookmark bookmark site
bookmark permalink
Wed 4 Jan 2012, 9:00

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


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:

$ 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)

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 ...
Filed under: Intel® C++ Compiler for Linux* Knowledge Base
Also published by:

ChipList news channel Last Months News


ChipList developers news channel Last Months Developers News


Page viewed 410 times since Wed 4 Jan 2012, 19:40.