__APPLE_CC__ macro

Can someone explain the usefulness of APPLE_CC? The documentation claims [the] macro is set to an integer that represents the version number of the compiler.

But one version of Apple clang defines:

#define APPLE_CC 6000

#define apple_build_version 6020053

#define clang_version “6.1.0 (clang-602.0.53)”

And another newer version of Apple clang defines:

#define APPLE_CC 6000

#define apple_build_version 7000053

#define clang_version “7.0.0 (clang-700.0.53.3)”

So how does APPLE_CC represent the “version” of the compiler? Is it stuck at 6000 now forever?

Questions about Apple products should be asked on an Apple forum. Sorry, this isn’t the right place to ask.

–paulr

Well APPLE_CC is also hard-coded to 6000 in the open-source clang compiler. So it seems appropriate to ask what the point of this macro is here.

Author: bwilson
New Revision: 188700

URL: http://llvm.org/viewvc/llvm-project?rev=188700&view=rev
Log:
Bump the value of the __APPLE_CC__ predefined macro up to 6000.

The previous value was set to match some ancient version of Apple's GCC.
The value should be higher than anything used by Apple's GCC, but we don't
intend for this value to be updated in the future. We have other macros to
identify compiler versions. <rdar://problem/14749599>