This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: #import, #pragma once yadda yadda mumble grumble
Devang Patel wrote:-
> Your patch changes semantics for following example.
>
> #include "a.h"
> #import "a.h"
> #include "a.h"
>
> And a.h does not have include guards.
>
> FSF GCC 3.4 before and after your patch behaves differently.
>
> *If* we consider Darwin compilers as reference in this case then
> following
> compiler versions include content of a.h only once in this example.
> - Darwin GCC 2.95 + Apple preprocessor
> - Darwin GCC 2.95 + GNU preprocessor
> - Darwin GCC 3.1 + Apple preprocessor
> - Darwin GCC 3.1 + GNU preprocessor
> - Darwin GCC 3.3
Does this matter to Apple? If so, I'm willing to change it, it
only makes #import more expensive, encouraging people to use
header guards 8-)
Neil.