vendredi 30 octobre 2015

Is

I added <algorthm> to a standard header file that's included with most files in my project. On a Core2 Duo machine with std=c++11, testing produces the following compile error:

g++ -DNDEBUG -g2 -O2 -std=c++11 -fPIC -march=native -pipe -fsanitize=address -c cpu.cpp
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.9/include/x86intrin.h:43:0,
                 from /usr/include/x86_64-linux-gnu/c++/4.9/bits/opt_random.h:33,
                 from /usr/include/c++/4.9/random:50,
                 from /usr/include/c++/4.9/bits/stl_algo.h:66,
                 from /usr/include/c++/4.9/algorithm:62,
                 from stdcpp.h:13,
                 from cpu.cpp:13:
/usr/lib/gcc/x86_64-linux-gnu/4.9/include/wmmintrin.h: In function ‘__m128i _mm_aesdec_si128(__m128i, __m128i)’:
/usr/lib/gcc/x86_64-linux-gnu/4.9/include/wmmintrin.h:44:1: error: redefinition of ‘__m128i _mm_aesdec_si128(__m128i, __m128i)’
 _mm_aesdec_si128 (__m128i __X, __m128i __Y)
 ^
In file included from cpu.cpp:12:0:
cpu.h:83:1: note: ‘__m128i _mm_aesdec_si128(__m128i, __m128i)’ previously defined here
 _mm_aesdec_si128 (__m128i a, __m128i b)
 ^

I'm trying to determine how I should proceed.

Is <algorithm> supposed to include AES intrinsics?

Aucun commentaire:

Enregistrer un commentaire