This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: state of Apple's objc compiler vs gcc 3.1

On Friday, October 5, 2001, at 03:08 , Aurelien wrote:

> I'd really appreciate to have the differences between 10.1's objc 
> compiler and gcc 3.1 objc compiler pointed out:

Clearly, the biggest difference now is the runtime (GNU vs. NeXT).  
Perhaps Apple and the community will come up with
some way to eliminate this redundancy, unless there are irreconcilable 
differences between the two runtimes.  But this
is not my area of expertise (or authority), so I'll let others chime in 
on it. :)

> 1) when I try to compile my project under PB, I get a bunch of parse 
> errors of the type "parse error before '*'", indicating that I am 
> declaring a new variable in the body of a method (not at the start of 
> it, which is mandatory for standard C);

My guess is that the 3.1 ObjC makes use of the relaxed C99 rules for 
declaring variables.  The 2.95.x compilers don't have this.
> 2) does 10.1 allow forward references to protocols ? (always the same 
> question ;-)

Yes -- this long-standing bug has finally been fixed.  (We've also 
placed the fix in the 3.1 FSF tree).

> I also tried to compile the cvs version of gcc on my 10.1 OSX, and here 
> is the end of the output, following 'make bootstrap'. I have run 
> '/Users/candide/checkout/gcc/configure --prefix=/usr/local/gcc 
> --enable-languages=c,c++,objc' before:
> /Users/candide/checkout/gcc/gcc/builtin-attrs.def:149: 
> `ATTR_FORMAT_PRINTF_3_0' undeclared (first use in this function)
> /Users/candide/checkout/gcc/gcc/builtin-attrs.def:150: 
> `ATTR_FORMAT_SCANF_1_0' undeclared (first use in this function)
> /Users/candide/checkout/gcc/gcc/builtin-attrs.def:151: 
> `ATTR_FORMAT_SCANF_2_0' undeclared (first use in this function)
> /Users/candide/checkout/gcc/gcc/builtin-attrs.def:164: 
> `ATTR_FORMAT_STRFMON_3_4' undeclared (first use in this function)
> make[2]: *** [c-common.o] Error 1
> make[1]: *** [stage1_build] Error 2
> make: *** [bootstrap] Error 2

Hm... I've never seen *these* particular messages.  One suggestion that 
I have is to disable Apple's precompiled header mechanism
when you're doing the bootstrap

	make bootstrap CC="cc -no-cpp-precomp"

Ziemowit Laski                   Apple Computer, Inc.                 2 Infinite Loop, MS 302-4SN
+1.408.974.6229  Fax .1344       Cupertino, CA  95014-2085

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]