Re: Getting error about 'long long is an extension' from OSByteOrder.h
Re: Getting error about 'long long is an extension' from OSByteOrder.h
- Subject: Re: Getting error about 'long long is an extension' from OSByteOrder.h
- From: Sean McBride <email@hidden>
- Date: Tue, 12 Jun 2012 13:26:37 -0400
- Organization: Rogue Research Inc.
On Tue, 12 Jun 2012 09:42:03 -0700, Jens Alfke said:
>After upgrading from Xcode 4.3.2 to 4.3.3, I'm getting a strange compile
>error in some C++ code that used to work fine. The message is " 'long
>long' is an extension when C99 mode is not enabled" and it looks like
>it's triggered by the system header OSByteOrder.h, specifically the use
>of a constant "0xff00000000000000ULL".
>
>The C++ Language Dialect is set to Compiler Default.
>
>(Yes, I have pedantic warnings on, and -Werror. I need those to match
>the way this code is compiled on other platforms, to try to ensure I
>don't add anything in Xcode that will trigger a warning/error elsewhere.
>As I said, this used to work fine.)
>
>My guess is that there was a Clang change in Xcode 4.3.3 that makes -
>pedantic so sensitive that it objects to the OS's own headers?
Your theory sounds exactly right. 'long long' was only added in C++11:
<http://en.wikipedia.org/wiki/C++11#Type_long_long_int>
clang's C++11 support has presumably been undergoing many changes of late...
You asked it to be pedantic, and it sure is! :)
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden