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: [pph] Stream TREE_TYPE for identifier node (issue4550121)


On Wed, Jun 8, 2011 at 03:38, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Tue, Jun 7, 2011 at 11:50 PM, Diego Novillo <dnovillo@google.com> wrote:
>> On Tue, Jun 7, 2011 at 14:12, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>>> On Tue, Jun 7, 2011 at 8:44 PM, Gabriel Charette <gchare@google.com> wrote:
>>>> We need to stream TREE_TYPE for identifier node.
>>>
>>> That seems unlikely, as identifiers do not have a type. There is some
>>> TREE_TYPE abuse in cp-tree.h, perhaps you should find out what you're
>>> streaming.
>>
>> It's used by the C++ parser, so it needs to be streamed in pph.
>
> Yes, but you should not stream TREE_TYPE but use the accessor macro
> that uses TREE_TYPE. Otherwise, if someone gets around to making
> IDENTIFIER nodes non-typed trees (and update cp-tree.h accordingly)
> the streaming will break.

It does, actually:

cp/rtti.c:
bool
emit_tinfo_decl (tree decl)
{
  tree type = TREE_TYPE (DECL_NAME (decl));


Diego.


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