[Bug target/40722] [4.5 Regression] ia32intrin.h defines of _rotl, _rotr conflict with target stdlib.h decls

ktietz at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Aug 30 17:34:00 GMT 2009



------- Comment #3 from ktietz at gcc dot gnu dot org  2009-08-30 17:34 -------
(In reply to comment #2)
> (In reply to comment #1)
> > These were added by HJ.  Either we need to fixinclude stdlib.h or not define
> > these based on a configure test (I guess the former is more robust if
> > ia32intrin.h defines these only if they are not already defined).
> > 
> 
> fixinclude sounds a good idea, but I don't know how to do it. Or
> I can change ia32inintrin.h by not defining them for mingw.
> 

I would vote for guarding the lrotl, lrotr by checks, if they aren't defined
already.

There is an other issue about ia32intrin.h and mingw targets, but I assume,
that it is true for other i386 and x86_64 targets, too. There are the functions
__crc32b, __crc32w, and __crt32d, which are in general just available for a
target that has SSE4.1 enabled (-mcrc). But the inlines aren't guarded and so
the builtins __builtin_ia32_crc32qi (etc) don't have prototypes and so g++ will
throw errors.

The following sample shows the issue pretty well.
t.cc:
#include <x86intrin.h>
int main()
{
  return 0;
}


-- 

ktietz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40722



More information about the Gcc-bugs mailing list