[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: import vs include Re: Porting autogsdoc to OSX
From: |
Nicola Pero |
Subject: |
Re: import vs include Re: Porting autogsdoc to OSX |
Date: |
Wed, 27 Feb 2002 11:51:58 +0000 (GMT) |
> > To the specific problem: gstep-base may or may not use #import
> > internally, but gs-autodoc should use #import because otherwise it's
> > not OpenStep conform and therefore not portable. OpenStep requires
> > #import and doesn't require safe-guarded headers.
This is just not so.
The OpenStep specification makes *no* statement to whether #include or
#import should be used.
If you count the original NeXTstep ObjC book as part of the specification,
then the book says that #import is preferred in the NeXTstep code
examples, not that it's compulsory.
I don't consider that a particular authoritative nor brilliant suggestion
anyway.
#import is by no means required as part of Objective-C, I consider it a
GCC extension to C, which is only turned on when you use Objective-C - and
that because GCC C hackers don't want it on C/C++ since they consider it
badly defined, and it's used in Objective-C because legacy code is using
it and so it can't be easily removed.
I don't think we should be that much religious about the past as to go on
using totally deprecated extensions to GCC just because at a certain point
in the past at NeXTstep they were using those extensions before they were
deprecated.
Particularly if we are writing *new* code. I can understand legacy code
from the past - but why writing new code using GCC C extensions which are
deprecated without hope and which nobody else in the world is using ?
I have this impression that people are using #import without even knowing
that it is seriously deprecated. This is probably gnustep-make's fault
which is automatically adding -Wno-import to the gcc command line, and
Apple's fault which is modifying GCC before they ship it turning the
warning off by default.
Perhaps we should add a configuration flag to gnustep-make.
./configure --enable-Wno-import
will turn on automatically adding -Wno-import to the command line (turning
off the #import warnings). Otherwise, by default it won't be added, and
everyone will know - when they use #import - that their GCC seriously
doesn't agree with that.
- Re: Porting autogsdoc to OSX, (continued)
- Re: Porting autogsdoc to OSX, Marcus Müller, 2002/02/26
- Re: Porting autogsdoc to OSX, Marcus Müller, 2002/02/26
- Re: Porting autogsdoc to OSX, Marcus Müller, 2002/02/26
- Re: Porting autogsdoc to OSX, Nicola Pero, 2002/02/26
- import vs include Re: Porting autogsdoc to OSX, Helge Hess, 2002/02/26
- Re: import vs include Re: Porting autogsdoc to OSX, Marcus Müller, 2002/02/26
- Re: import vs include Re: Porting autogsdoc to OSX,
Nicola Pero <=
- Re: import vs include Re: Porting autogsdoc to OSX, Helge Hess, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Nicola Pero, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Richard Frith-Macdonald, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Pete French, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Marcus Müller, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Nicola Pero, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Helge Hess, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Pascal Bourguignon, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Nicola Pero, 2002/02/27
- Re: import vs include Re: Porting autogsdoc to OSX, Marcus Müller, 2002/02/27