#import, #pragma once to be removed in 3.4
Matt Austern
austern@apple.com
Thu Feb 6 21:41:00 GMT 2003
On Thursday, February 6, 2003, at 12:49 PM, Zack Weinberg wrote:
>
> So we had a discussion of the problems that PCH poses for #import,
> which expanded to a discussion of the problems of #import and
> #pragma once generally, which then pretty much wound down without any
> middle ground being found between 'there must be some way to fix it'
> and 'no, sorry, there isn't'. I think that an executive decision is
> required at this point, which falls to me as cpplib maintainer.
>
> 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.
I think we'd really better distinguish between C, C++, and Objective C.
For C and C++, you're probably right. #import is just one mechanism
among many, there are alternatives, and there's no reason to encourage
people to write nonportable code by using a GNU extension.
Objective C is a different matter entirely. #import is the documented
mechanism for header inclusion in Objective C. To the extent that there
is a standard for Objective C, #import is part of it. We shouldn't just
change that language definition.
--Matt
More information about the Gcc
mailing list