Hi gentlemen.
Just in case you missed this post. This only affects Darwin, so it's
technically not just an Objective C problem. This problem came about
with Ian Sandoe's patch of rev@170260. The CPP builtin "__OBJC2__" is
only set for Darwin.
FYI, in this patch I followed the way we currently set __OBJC__ in
libcpp/init.c:
if (CPP_OPTION (pfile, objc))
_cpp_define_builtin (pfile, "__OBJC__ 1");
I hope this helps in reviewing the patch.
Thanks.
On 12/04/12 16:25, Aldy Hernandez wrote:
The problem here is that we are setting __OBJC2__ regardless of what
language we are compiling.
Tested by building a cross cc1/cc1obj for x86_64-unknown-darwin, and
doing the following:
reynosa:/build/trunk-darwin-objc/gcc$ echo "" | ./cc1obj -E -dM -
-quiet |grep OBJ
#define __OBJC__ 1
#define __OBJC2__ 1
reynosa:/build/trunk-darwin-objc/gcc$ echo "" | ./cc1 -E -dM - -quiet
|grep OBJ
It would be nice if someone with access to a Darwin build system could
test this further, but this at least fixes the PR.
OK for trunk?