This is the mail archive of the
mailing list for the GCC project.
Re: state of Apple's objc compiler vs gcc 3.1
- To: Aurelien <aurelien at fractals dot be>
- Subject: Re: state of Apple's objc compiler vs gcc 3.1
- From: Ziemowit Laski <zlaski at apple dot com>
- Date: Fri, 5 Oct 2001 11:56:47 -0700
- Cc: gcc at gcc dot gnu dot org
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:
> `ATTR_FORMAT_PRINTF_3_0' undeclared (first use in this function)
> `ATTR_FORMAT_SCANF_1_0' undeclared (first use in this function)
> `ATTR_FORMAT_SCANF_2_0' undeclared (first use in this function)
> `ATTR_FORMAT_STRFMON_3_4' undeclared (first use in this function)
> make: *** [c-common.o] Error 1
> make: *** [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.
email@example.com 2 Infinite Loop, MS 302-4SN
+1.408.974.6229 Fax .1344 Cupertino, CA 95014-2085