This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Altivec context-sensitive keywords
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje at watson dot ibm dot com>, janis187 <janis187 at us dot ibm dot com>
- Date: Mon, 30 Jun 2008 12:03:30 +1000
- Subject: Re: PATCH: Altivec context-sensitive keywords
- References: <1214478254.17407.15.camel@helios> <m3myl8ovb9.fsf@fleche.redhat.com>
Hi Tom
Thanks for the review. I've addressed the easy parts ;-)
> Ben> + /* Keywords without two leading underscores are context-sensitive,
> Ben> + and hence implemented as conditional macros, controlled by the
> Ben> + rs6000_macro_to_expand() function above. */
>
> s/above/below/
Fixed.
> Ben> + static bool vector_keywords_init = false;
> Ben> + if (!vector_keywords_init)
> Ben> + {
> Ben> + init_vector_keywords (pfile);
> Ben> + vector_keywords_init = true;
> Ben> + }
>
> I think this must be unnecessary... init_vector_keywords is called
> elsewhere, and IIUC, rs6000_macro_to_expand can only be called for
> conditional macros -- and if we have not called init_vector_keywords
> already, then there won't be any of these.
You're right; fixed.
> Ben> +/* Look ahead in the input stream. */
> Ben> +const cpp_token *
> Ben> +_cpp_peek_token (cpp_reader *pfile, int index)
>
> Remove the leading "_".
Fixed.
> It would be good to have test cases for combinations of vector and the
> other conditional macros at EOF and in other weird places (#pragma or
> _Pragma comes to mind). I've fixed a number of crashes and whatnot
> related to buffer manipulation at these boundaries...
I've added tests for #pragma and _Pragma. Sure enough, there are
problems around EOF -- I will fix those.
Cheers, Ben