tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

g++ -pedantic on 6.0.1/amd64 fails to include xmmintrin.h



Hi,

To make a long story short, the following definitions of posix_memalign() seem
to conflict in pedantic g++ mode, on a stock NetBSD-6.0.1/amd64:

In /usr/include/gcc-4.5/mm_malloc.h:
  extern "C" int posix_memalign (void **, size_t, size_t) throw ();
In /usr/include/stdlib.h:
  int      posix_memalign(void **, size_t, size_t);

Not sure who to blame here :) Should I open a PR for this, or is this more a
gcc issue?

Here is how to reproduce the problem:
fluffy64-netbsd6[~] > cat mm_malloc.c 
#include <xmmintrin.h>

int
main()
{
  return 0;
}
fluffy64-netbsd6[~] > g++ -pedantic ~/mm_malloc.c
In file included from /usr/include/gcc-4.5/xmmintrin.h:39:0,
                 from /home/mallet/mm_malloc.c:1:
/usr/include/gcc-4.5/mm_malloc.h:34:64: error: declaration of 'int 
posix_memalign(void**, size_t, size_t) throw ()' throws different exceptions
/usr/include/stdlib.h:237:6: error: from previous declaration 'int 
posix_memalign(void**, size_t, size_t)'


Home | Main Index | Thread Index | Old Index