https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114484
--- Comment #4 from vincenzo Innocente <vincenzo.innocente at cern dot ch> --- in C++ one is supposed to #include <cstdlib> not <stdlib.h> I do not think that there is an explicit version of C++ headers for the intrinsics that avoids the conflicts between C and C++.