discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #import vs #include


From: Lars Sonchocky-Helldorf
Subject: Re: #import vs #include
Date: Tue, 30 Dec 2003 16:36:57 +0100


Am Dienstag, 30.12.03 um 13:26 Uhr schrieb Artem Baguinski:

On Tue, Dec 30, 2003 at 12:34:37PM +0100, Dennis Leeuw wrote:
Artem Baguinski wrote:
quoting http://gnustep.made-it.com/GSPT/xml/Tutorial_en.html :

 In Cocoa, #import is used instead of #include to prevent duplicated
 declarations. But GNU GCC doesn't support #import as good as Apple's
 GCC, and GNUstep use #include.

is that statment correct? what's wrong with GNU GCC's #import support?
and BTW doesn't G in GCC stand for GNU?


Yep the G stands for GNU and the problem with #import is that it is/was depricated (from gcc). But I don't know what the current/future state of
gcc will be. If the #import will be valid or that we still need to use
#include and ifdefs.

well, "deprecated" != "not supported as good", i suggest that sentence
in the tutorial will be modified,  may be with link to

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF- 8&q=%23import+deprecated+gcc&btnG=Google+Search

This is history. From http://gcc.gnu.org/gcc-3.4/changes.html :


C/Objective-C/C++

...

File handling in the preprocessor has been rewritten. GCC no longer gets confused by symlinks and hardlinks, and now has a correct implementation of #import and #pragma once. These two directives have therefore been un-deprecated.


thanks to Neil Booth:

http://gcc.gnu.org/ml/gcc/2003-07/msg02083.html


;-)



--
gr{oe|ee}t{en|ings}
artm

greetings, Lars







reply via email to

[Prev in Thread] Current Thread [Next in Thread]