This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FSF GCC, #import and #pragma once
- From: Nicola Pero <nicola at brainstorm dot co dot uk>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: Geoffrey Keating <geoffk at apple dot com>, <gcc at gcc dot gnu dot org>, Stan Shebs <shebs at apple dot com>, Zack Weinberg <zack at codesourcery dot com>
- Date: Mon, 21 Jul 2003 10:04:39 +0100 (BST)
- Subject: Re: FSF GCC, #import and #pragma once
> > Well, I claim (and no-one can yet prove me wrong) that #import doesn't
> > really add much complexity, especially if you have to support #pragma
> > once anyway; that my rewrite can remove cpp_simplify_pathname if you
> > want it to; and in short that my rewrite will be so wonderful that
> > you'll agree with everything that I propose.
>
> Geoff, you wrote this back on 4th March. Is this going to be proposed
> before the end of July? If not, I intend to proceed with the #import
> restriction I suggested, and likely my own cleanup of cppfiles.c lookup
> logic.
FYI, after Zack announced #import would be dropped from future releases of
GCC, I turned on the GCC warnings against #import on gnustep-make on March
4th, so in the last nearly 6 months every GNUstep user/developer has been
verbosely warned whenever he was using #import.
Much/most GNUstep software should have been updated to use #include -
whoever (GNUstep-wise) didn't update his software has been willingly
ignoring huge warnings that he had to update it by converting #import to
#include (and whoever didn't update his software outside GNUstep has been
willingly disabled warnings by using -Wno-import, so he's equally guilty
of ignoring warnings).
Given all this (succesfull) effort to have code converted to use #include,
I'd recommend sticking to the announced plan - after surviving the pain
(unpopularly warning all users that something they've been using for years
is seriously deprecated) I don't see why we should be missing the benefit
(simplifying considerably the Objective-C language and it's implementation
as a simple extension to C).
If you still want to drop #import (which at this point, as I said, knowing
all the pros and cons, I'd warmly agree with doing), I suggest taking at
least yet another intermediate step - give our users another year or so
before #import really disappears - making a major release (3.4) where the
warning against #import becomes an actual compilation error, but where it
can still be turned off by -Wno-import. Then in the following major
release (3.5 I suppose) you could completely drop #import from FSF GCC,
and we could finally close this thorny issue. :-)