On 10/31/2015 12:50, David Grayson wrote: > As of a few days ago, clang supports the builtins we use in > intsafe.h. However, clang still defines __GNUC__ as 4 and I don't > know how long it's going to be like that. So this patch adds special > code to detect clang and detect if clang supports the builtins we > need, allowing the inline functions in intsafe.h to be used from > clang. > > I'm only checking __builtin_add_overflow and not > __builtin_mul_overflow or __builting_sub_overflow because all three > of those functions were added in one clang commit. > > I tested this patch with GCC 5 in Windows. I tested the new logic > from the patch (but not the intsafe.h itself) with GCC 5 in Linux, > and two different versions of clang in Linux, one that supports the > new builtins and one that does not. > > If someone could commit this, that would be great! Thanks! > > --David Grayson >
Looks good to me, if nobody objects, I will commit it soon.
0xD4EBC740.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
