Hi David, For .mm files, this change doesn't work when NSObjCRuntime.h is not imported directly. For example, using #import <Foundation/Foundation.h> won't result in __STDC_LIMIT_MACROS being defined. I have to explicitly #import <Foundation/NSObjCRuntime.h> before Foundation.h.
I'm not sure what the correct solution is, but removing the __cplusplus check works and seems harmless. What I don't understand is that the same .mm file using NSIntegerMax was compiling just fine a month ago with Clang 3.0, and now it seems to require __STDC_LIMIT_MACROS although I'm still using Clang 3.0. May it used to be defined elsewhere in Base? Or could this be related in some way to the comment below from Clang stdint.h? "Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to the 00253 * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn])." From http://clang.llvm.org/doxygen/stdint_8h-source.html This contradicts the check "#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)" used for the same parts in /usr/include/stdint.h on my Linux install. Cheers, Quentin. Le 6 avr. 2012 à 14:01, David Chisnall a écrit : > Author: theraven > Date: Fri Apr 6 14:01:34 2012 > New Revision: 35030 > > URL: http://svn.gna.org/viewcvs/gnustep?rev=35030&view=rev > Log: > Ensure that the limits declarations that we use are actually exposed when > compiling ObjC++. > > > Modified: > libs/base/trunk/Headers/Foundation/NSObjCRuntime.h > > > _______________________________________________ > Gnustep-cvs mailing list > [email protected] > https://mail.gna.org/listinfo/gnustep-cvs _______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
