PATCH: Altivec context-sensitive keywords
Ben Elliston
bje@au1.ibm.com
Mon Jun 30 05:35:00 GMT 2008
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
More information about the Gcc-patches
mailing list