- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a piece of code that successfully compiled by Xcode native complete in c++14 mode. The attempt to compile it with icc with -std=c++14 give the following error:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/CSCommon.h(203): error: enumeration value is outside the range of its underlying type ("unsigned int")
kSecCSConsiderExpiration = 1 << 31, /* consider expired certificates invalid */
Is it normal? 1<< 31 is 0x80000000 and it a prefect unsigned int value.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you mean to type 1U << 31 ?
It's unusual but not unheard of for icc to exhibit more thorough checking than clang or gcc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have show you line from the Apple framework header, so I don`t know what the means there. What the way of solving this problem? I can`t correct standard headers... In any way 1 << 31 is inside int and unsigned int, why does icc get error here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI Mikhail,
Can you attach a test reproducer (preferably a preprocessed file compiled with -P option that generates the .i file) so I can investigate the issue?
Thanks,
Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kittur Ganesh,
As you requested .cpp and .i files is in attachment. One remark: I try to use icc version 16.0.1 20151020, because 16.0.2 20160204 could not compile std::function<> template at all. In update2 there is no problem with the enum itself.
Maybe you know when to expect update 3 of icc version 16?
Mikhail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mikhail,
I couldn't reproduce the issue with your attachment. Also, the cpp file only has the include line and main function which is empty. Unless I can reproduce the issue I can't file with the developers :-(
Good to know you don't have any issue with update 2 on the enum itself. Well, the update 3 should be released as well soon but I don't have the correct schedule with me. I'll keep you updated as soon as the release is out?
Thanks,
Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mikhail,
Yes, I could reproduce the issue and have filed with the developers. I'll let you know as soon as the release with the fix is out. Appreciate your patience till then.
Regards,
Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BTW, the workaround is to not use C++11 for now until the release with the fix is out, appreciate much.
Kittur

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