On Tue, May 24, 2011 at 22:42, Lawrence Crowl <cr...@google.com> wrote:

>   For TEMPLATE_DECL, also stream DECL_MEMBER_TEMPLATE_P.

We don't really need to handle this.  DECL_MEMBER_TEMPLATE_P is using
DECL_LANG_FLAG_1.  All the lang_flag fields are already handled in
pph_stream_unpack_value_fields (and its counterpart).  Besides, this
patch is writing DECL_MEMBER_TEMPLATE_P but it is not reading it back,
this will cause stream synchronization problems

> The code edits do NOT conform with the gcc style.  This is deliberate
> so that diff reports sensible differences.  I will make a separate
> patch to fix the style.

*gasp* I am horrified! ;)

> +    case USING_DECL:
> +    case VAR_DECL:
>        {
> +      /* FIXME pph: Should we merge DECL_INITIAL into lang_specific? */

Hm?


> +    case TEMPLATE_DECL:
>     {
> +      pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
> +      pph_stream_write_lang_specific (stream, expr, ref_p);
>       pph_output_tree_or_ref_1 (stream, DECL_TEMPLATE_RESULT (expr), ref_p, 
> 3);
>       pph_output_tree_or_ref_1 (stream, DECL_TEMPLATE_PARMS (expr), ref_p, 3);
>       pph_output_tree_or_ref_1 (stream, DECL_CONTEXT (expr), ref_p, 3);
> +      pph_output_uchar (stream, DECL_MEMBER_TEMPLATE_P (expr));

There does not seem to be a read operation for DECL_MEMBER_TEMPLATE_P.


Diego.

Reply via email to