This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: #import, #pragma once to be removed in 3.4
Zack Weinberg wrote:
Joe Buck <jbuck@synopsys.com> writes:
Accordingly: #import and #pragma once will be removed from FSF GCC in
3.4. I will shortly send a patch to gcc-patches to implement that.
This seems reasonable. Since we should always deprecate a feature before
removing it, if we do this, then gcc 3.3 should issue a deprecation
warning for these features.
GCC has issued deprecation warnings for these features since before I
started working on cpplib.
It's a perfect example of why it doesn't necessarily work just to
decide you want to make a change, and instead of persuading the users,
to try to browbeat them by making the compiler more annoying. Since
the warning can be disabled via -Wno-import, that flag has become a
staple of ObjC programming - just Google for it to see how common it's
become. The deprecation has had no effect on the largest ObjC user
base, NeXTSTEP and OS X programmers, because the deprecation is turned
off by default in NeXT's and Apple's modified versions of GCC.
It is possible to get users to switch to using #include instead of
#import, but it's going to take reasoned argument, not attempted
deletion of code.
Stan