This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Altivec context-sensitive keywords


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]