This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [pph] Use REAL_IDENTIFIER_TYPE_VALUE instead of TREE_TYPE for IDENTIFIER_NODE (issue4965046)
- From: Diego Novillo <dnovillo at google dot com>
- To: Gabriel Charette <gchare at google dot com>
- Cc: reply at codereview dot appspotmail dot com, crowl at google dot com, jason at redhat dot com, stevenb dot gcc at gmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 Aug 2011 18:17:44 -0400
- Subject: Re: [pph] Use REAL_IDENTIFIER_TYPE_VALUE instead of TREE_TYPE for IDENTIFIER_NODE (issue4965046)
- References: <20110825221412.A62941C1EDC@gchare.mtv.corp.google.com>
On Thu, Aug 25, 2011 at 18:14, Gabriel Charette <gchare@google.com> wrote:
> This was the last thing remaining on my cleanup list.
>
> As suggested by Steven and Jason in issue4550121, we should use REAL_IDENTIFIER_TYPE_VALUE for IDENTIFIER_NODEs instead of TREE_TYPE (although the former resolves to the later in its macro definition, this is more robust to potential later changes to TREE_TYPE in trunk).
> This patch does that change.
>
> As mentionned by Steven in the same issue, we were accessing some fields directly instead of correctly using their corresponding accessor macros.
> This patch makes use of the correct accessor macros for pph_read/write_tree_body.
Nice! Thanks for this cleanup.
> 2011-08-25 ÂGabriel Charette Â<gchare@google.com>
>
> Â Â Â Â* pph-streamer-in.c (pph_read_tree_body): Use accessor macros for
> Â Â Â Âall fields. Use REAL_IDENTIFIER_TYPE_VALUE instead of TREE_TYPE
> Â Â Â Âfor the IDENTIFIER_NODE case.
> Â Â Â Â* pph-streamer-out.c (pph_write_tree_body): Likewise.
OK.
Diego.