[Bug target/40722] [4.5/4.6 Regression] ia32intrin.h defines of _rotl, _rotr conflict with target stdlib.h decls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40722 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #18 from Jakub Jelinek 2011-02-03 09:07:12 UTC --- (In reply to comment #8) > (In reply to comment #7) > > An updated patch is at > > > > http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00937.html > > > > Patch is fine. It is absolutely necessary to support gcc's intrinsic headers > for mingw. The fixinclude approach is one way to solve it and I am fine by it. > For mingw-w64 we used the #pragma push/pop_macro feature to make sure we > declare function without getting problems by this define in ia32intrin.h. > > Kai Why can't you just _CRTIMP unsigned int __cdecl __MINGW_NOTHROW (_rotl)(unsigned int, int) __MINGW_ATTRIB_CONST; ? _rotl etc. from ia32intrin.h is a function-like macro, so the above prevents the expansion. Is this still a problem on *mingw and *mingw64? I mean, if x86intrin.h can't be included, it sounds like a serious problem for those that use this arch, and it is open for more than a year. I guess H.J.'s patch is just too dangerous, it assumes that _rotl is the first declaration and _lrotr is the last one, I guess much better would be to ifdef out each declaration separately, then there wouldn't be issues with unmatched #if/#endif.
[Bug target/40722] [4.5/4.6 Regression] ia32intrin.h defines of _rotl, _rotr conflict with target stdlib.h decls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40722 --- Comment #19 from Jakub Jelinek 2011-02-03 10:05:58 UTC --- Created attachment 23233 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23233 gcc46-pr40722.patch Modified H.J.'s patch which just adds ()s around _rotl/_rotr/_lrotl/_lrotr names in their prototypes, all I've tested is the sed command on mingw.org and mingw64 stdlib.h and eyeballed the differences. Can anyone please test this both with mingw64 and mingw.org stdlib.h? Thanks.
[Bug target/40722] [4.5/4.6 Regression] ia32intrin.h defines of _rotl, _rotr conflict with target stdlib.h decls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40722 Kai Tietz changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID --- Comment #20 from Kai Tietz 2011-02-03 12:29:18 UTC --- So, as more as I think about it, come to the point that this fix-include for stdlib.h isn't something good. The correct solution here is that mingw.org fixes their stdlib.h header by () (as suggested by this fix-include sed command, which by the way works as expected without clobbering ifdef/else blocks). The issue I see here is, that the local include directory (LOCAL_INCLUDE_DIR) comes before fix-include in include order. So for a native configuration, this won't solve anything as it won't be used at all. So IMHO, this problem should be closed as invalid.
[Bug target/40722] [4.5/4.6 Regression] ia32intrin.h defines of _rotl, _rotr conflict with target stdlib.h decls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40722 Richard Guenther changed: What|Removed |Added Target Milestone|4.5.2 |4.5.3 --- Comment #17 from Richard Guenther 2010-12-16 13:03:28 UTC --- GCC 4.5.2 is being released, adjusting target milestone.
[Bug target/40722] [4.5/4.6 Regression] ia32intrin.h defines of _rotl, _rotr conflict with target stdlib.h decls
--- Comment #16 from rguenth at gcc dot gnu dot org 2010-07-31 09:29 --- GCC 4.5.1 is being released, adjusting target milestone. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|4.5.1 |4.5.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40722