[cfe-dev] CSCommon.h fails to compile (Mac OS X 10.11)

Joshua Gerrard via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 26 06:01:58 PST 2015


Hello folks,

I'm working on a project that uses clang and it seems that I cannot compile
the CSCommon.h header inside the Apple SDKs. The error I get is:

enumerator value evaluates to -2147483648, which cannot be narrowed to type
uint32_t (aka unsingned int)

Around the source code:
typedef CF_OPTIONS(uint32_t, SecCSFlags) {
    kSecCSDefaultFlags = 0, /* no particular flags (default behavior) */

    kSecCSConsiderExpiration = 1 << 31, /* consider expired certificates
invalid */
    kSecCSEnforceRevocationChecks = 1 << 30, /* force revocation checks
regardless of preference settings */
    kSecCSNoNetworkAccess = 1 << 29,            /* do not use the network,
cancels "kSecCSEnforceRevocationChecks"  */
    kSecCSReportProgress = 1 << 28, /* make progress report call-backs when
configured */
    kSecCSCheckTrustedAnchors = 1 << 27, /* build certificate chain to
system trust anchors, not to any self-signed certificate */
};

clang revision 253884

Previously, we just hacked around this with:

#undef CF_OPTIONS
#define CF_OPTIONS(_type, _name) _type _name; enum

But alas some of our users are still reporting the error.

Has anyone encountered this before? Is there a specific LangOpt I need to
set?

Many thanks in advance.

--

Joshua Gerrard
JUCE Software Developer

*ROLI’s **award-winning*
<http://www.telegraph.co.uk/luxury/design/31520/the-seaboard-grand-piano-wins-designs-of-the-year-2014-award.html>*
Seaboard
GRAND, celebrated as the “**piano of the future*
<http://edition.cnn.com/2013/09/27/tech/innovation/hans-zimmer-seaboard-future-piano/>*”,
is now joined by the **Seaboard RISE*
<https://www.youtube.com/watch?v=fGr7VbDiRNw>*, “**every bit as slimline
and attractive as its bigger brother*
<http://www.soundonsound.com/news?NewsID=18726>*”. The press is hailing the
Seaboard RISE as “**innovative*
<http://www.wired.co.uk/news/archive/2015-09/10/seaboard-rise-digital-keyboard-launch-uk-price>*”,
“**expressive*
<http://createdigitalmusic.com/2015/09/new-roli-instrument-wants-make-expressive-control-mainstream/>*”,
“**accessible*
<http://createdigitalmusic.com/2015/09/new-roli-instrument-wants-make-expressive-control-mainstream/>*”,
and “**a keyboard controller that does to piano keys what 3D touch does to
the iPhone*
<http://www.slashgear.com/roli-seaboard-rise-is-like-3d-touch-for-musicians-11404216/>*”.
Now available for preorder at **www.roli.com* <http://www.roli.com/>*.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151126/a8eab545/attachment.html>


More information about the cfe-dev mailing list