This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target-specific Front-Ends? (Was: front end changes for
- From: Devang Patel <dpatel at apple dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Devang Patel <dpatel at apple dot com>, Joe Buck <jbuck at synopsys dot COM>, Ziemowit Laski <zlaski at apple dot com>, "Joseph S. Myers" <jsm28 at cam dot ac dot uk>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 27 Nov 2001 17:41:15 -0800
- Subject: Re: Target-specific Front-Ends? (Was: front end changes for
On Tuesday, November 27, 2001, at 03:26 PM, Mark Mitchell wrote:
>
>
> --On Tuesday, November 27, 2001 02:53:26 PM -0800 Joe Buck
> <jbuck@synopsys.COM> wrote:
>
>> Mark writes:
>>> Concretely, the Altivec specification allows "vector" to be either a
>>> macro, or a context-sensitive keyword. The latter is a much better
>>> choice, and it is the one we should adopt in GCC. It will be far
>>> less intrusive.
>>
>> Allowing "vector" to be a macro would be completely unacceptable,
>> because
>> people will mix C and C++ code.
>
> The Altivec specification says that __vector is a keyword. It says that
> vector can be either a macro or a context-sensitive keyword. If it
> is a macro you are explicitly allowed to #undef it.
>
> So, you can use __vector in C or C++, with any Altivec compiler. If
> you're using (Altivec) vector in C++ code, you're not writing
> portable code, even across Altivec implementations.
I think, main reason to make vector context-sensitive keyword was --
allow it
to coexist with C++ stl vector.
If context-sensitive keyword is highly undesirable then bettor solution
is to
only support __vector and drop vector macro. And force user to
adapt __vector keyword. If user complains, we can always point him/her to
this thread :-)
I would also resist the temptation to support vector macro only for C.
Devang