gnustep-dev
[Top][All Lists]
Advanced

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

RFC: FSF GCC, #import (and #pragma once)


From: David Ayers
Subject: RFC: FSF GCC, #import (and #pragma once)
Date: Thu, 06 Mar 2003 11:35:43 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210

Hello again...
hello Nicola,

(if I can't bark up the gdb tree, I'll try gcc ;-) ) no seriously...

I'm meaning to post this to the gcc list and just wanted to give people here (esp. Nicola) a chance to comment orvoice any reservations of it being counter productive.

Thanks,
Dave

-------- Original Message --------

Hello,

Please excuse me for not replying to the original thread, as I'm not on the list, just lurking through the archives.

I must admit that I'm not sure I understand the recent discussion about the semantic subtleties of the #import directive. If I have understood the past development correctly, the FSF GCC Team (I'm not sure which whether this was a general consensus or a SC decision) had already identified #import as problematic and discouraged it's usage through deprecation with the intent for removal. Reality has it, that there is a large amount of active (mostly ObjC) projects that rely on this directive, with the semantics of whatever the existing implementations actually implement. These are largely projects that are expecting the semantics currently implemented by Apple's GCC fork, whatever they may be.

If Geoffery Keating is working on syncing the implementation of Apple's fork with the FSF GCC, then isn't what ever he implements "perfect" by definition? Not because it catches all edge cases that anyone may think of and that some might interpret differently than others, but because the FSF GCC and Apple's fork will implement the *same* semantics, what ever they may be.

(I must admit though that I have no idea how many projects rely on #pragma once and expect certain edge conditions that might differ from the pending implementation.)

I think the bottom line isn't to improve a feature that has been identified as potentially broken by design, but it is much more in the interest of the FSF to provide a compiler that is *compatible* with Apple's fork on this issue, so that all those lines of code currently written for Apple's fork can become free software by being compiled with FSF GCC and GNUstep with as little modification as possible.

Note that I'm neither promoting nor discouraging the use of #import. And if the FSF deems it broken by design, then let the manual state that, and discourage the usage. Add warnings all you like (I'm sure Apple's fork will suppress them, and it would be nice if FSF GCC could also suppress them as it would only annoy porters.) but please don't make it unnecessarily harder for all those Cocoa projects to be ported to GNUstep.

Removing #import or having radically different semantics than Apple's fork is a small annoyance for Apple as they merely have to maintain a patch for their fork, but it could very likely be a show-stopper for large ports to GNUstep.

Thank you for you attention,
David Ayers

PS: Oh, and the issue about allowing it only for ObjC and not for C++... Keep in mind that Apple's GCC supports ObjC++ (i.e. mixed languages in source files) and I believe that there was effort pending to include this feature in FSF GCC once the preprocessor issue was resolved.






reply via email to

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