- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://bugzilla.gnome.org/show_bug.cgi?id=769104
An example missing builtin: __builtin_uadd_overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to reproduce the issue and have escalated to the engineer.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Could you provide us a sample code snippet to reproduce this issue?
Thanks,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to reproduce the issue and have escalated to the engineer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should be fixed (assuming __GNUC__ >= 5), but if you need something portable in the meantime see https://github.com/nemequ/safe-math (it assumes those builtins are available if __GNUC__ >= 5, but it would be trivial to add an exception for ICC, or you could just define SAFE_FORCE_PORTABLE before including the header).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Evan, nice to see you here! I posted your solution and this forum into gnome issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that ICC does have intrinsics that are much older than GCC's and Clang's. They are the same as MSVC's: _addcarry_u32 and _addcarry_u64 (see https://software.intel.com/en-us/node/523867), as I noted in the bug report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
THIAGO M. (Intel) wrote:
Note that ICC does have intrinsics that are much older than GCC's and Clang's. They are the same as MSVC's: _addcarry_u32 and _addcarry_u64 (see https://software.intel.com/en-us/node/523867), as I noted in the bug report.
That's useful (and I'll add those to my safe math header as soon as I have time), but I think the point is that if ICC is going to masquerade as a version of GCC it should support all the builtins, attributes, etc., that that version of GCC supports. If that's not possible, it should stick to masquerading as an older version of GCC (clang 3.8 masquerades as GCC 4.2.1), but add support for clang's __has_{attribute,warning,feature,builtin} macros for more advanced functionality.
Also, note that GCC's intrinsics support addition, subtraction, and multiplication, whereas ICC (AFAICT) only supports addition.
Finally, GCC has type-generic versions (__builtin_{add,sub,mul}_overflow).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Still missing in the new icc 17.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks fixed in icc 17.0.1.
Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page