[Bug target/61407] Build errors on latest OS X 10.10 Yosemite with Xcode 6 on GCC 4.8.3

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 4 08:40:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > Looks like the Mac OS X's headers are not C99/C++98 compatible at all:
> > 
> > /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/MacOSX.platform/
> > Developer/SDKs/MacOSX10.10.sdk/usr/include/Availability.h:174:44: error:
> > missing binary operator before token "("
> >  #if defined(__has_feature) &&
> > __has_feature(attribute_availability_with_message)
> >                                             ^
> 
> This error is correct because with the preprocessor && does not short
> cutting if the first operand is true.

If this is true, it sucks. Short-cutting simplifies writing such conditions.

But then the CPP manual is wrong:

https://gcc.gnu.org/onlinedocs/gcc-4.9.0/cpp/If.html#If

"Arithmetic operators for addition, subtraction, multiplication, division,
bitwise operations, shifts, comparisons, and logical operations (&& and ||).
The latter two obey the usual short-circuiting rules of standard C. "


More information about the Gcc-bugs mailing list