🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41984

Objective-C compilers

#41984
From: Reveraer
Date: Tue, 23 Jan 1996 00:00
57 lines
2543 bytes
We are looking for an alternative for the Stepstone Objective-C compiler.
We are investigating the advantages and disadvantages of:
- Stepstone Objective-C
- GNU gcc Objective-C
- NEXTSTEP Objective-C
- SUN Objective-C++

We tried to compile Stepstone Objective-C sources with gcc 2.7.2 on Solaris 2.3.
The first results of a performance comparison are:
- Compile time              : gcc is about 30% faster
- Execution time            : gcc is about 10% faster
- Executable size (stripped): gcc executable is about 20% smaller

About 700 of the 1400 sources can be compiled without errors. The errors have
to do with the fact that Stepstone Objective-C generates a "factory object" for
each class file with the same name as the Class name. I believe gcc does not.

Example:
> /user/everaerts/patches/incompatability/test> cat fout.m
> #import "XXClass.h"
> 
> @implementation XXClass : Object
> @end
> 
> static id receiveEndOfBatch(id replyClass)
> {
>     return replyClass;
> }
> 
> int main(int argc, char** argv)
> {
>    id  message;
>
>    message = receiveEndOfBatch(XXClass);
>    exit(0);
> }
> 
> /user/everaerts/patches/incompatability/test> objcc -c fout.m
> Objective-C Version 4.3.2a
> Copyright 1988-1993 The Stepstone Corporation.  All rights reserved.
> /user/everaerts/patches/incompatability/test> gcc -DGCC -Wno-import -c fout.m
> fout.m: In function `main':
> fout.m:15: parse error before `XXClass'

So Stepstone Objective-C knows about the "factory object" and generates an
"extern id XXClass;" in this example.
GCC does not understand this construction and generates a parse error.

I have the following questions:
- has someone recommendations of which Objective-C compiler is the best?
- has someone experience with porting from StepStone to an alternative compiler?
- has someone a solution for the parse error with gcc?

Rick Everaerts,
Software Developer, Philips Medical Systems
Email:rick.everaerts@ms.philips.nl
Phone:+31 40 27 62047 Fax:+31 40 27 63393
Technical Details
Message-ID: <9601231341.AA25722@er3.ms.philips.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1bbe81f17e7de8c2,start
X-Google-Attributes: gid11318c,public
From: Reveraer@electron.ms.philips.nl
Subject: Objective-C compilers
Date: 1996/01/23
Message-ID: <9601231341.AA25722@er3.ms.philips.nl>
X-Deja-AN: 136624836
x-mail2news-path: ns.philips.nl!unknown192.26.173.32!muxgw1.ms.philips.nl!er3.ms.philips.nl
x-nntp-posting-host: er3.ms.philips.nl
x-sun-charset: US-ASCII
content-length: 1988
newsgroups: gnu.gcc.help