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] matching tokens: C++ parts (v3)


On Tue, Aug 8, 2017 at 5:01 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> On Mon, 2017-08-07 at 14:25 -0400, Jason Merrill wrote:
>
> Thanks for looking at this.
>
>> On 08/01/2017 04:21 PM, David Malcolm wrote:
>> > @@ -27632,6 +27769,9 @@ cp_parser_sizeof_operand (cp_parser*
>> > parser, enum rid keyword)
>> >      {
>> >        tree type = NULL_TREE;
>> >
>> > +      matching_parens parens;
>> > +      parens.peek_open (parser);
>>
>> I was puzzled by this until I found that
>> cp_parser_compound_literal_p
>> consumes the open paren.  Let's remove that in favor of calling
>> consume_open here, so we don't need peek_open anymore.
>
> Done.
>
>> About passing parser in or not, I'm happy with the current approach;
>> adding things to the stack isn't free in a highly recursive program
>> like GCC.
>
> Thanks; I'll keep "parser" out of the new classes then.
>
> Here's an updated "v3" patch.
>
> Successfully bootstrapped&regrtested on x86_64-pc-linux-gnu in conjunction
> with the other patches (1 and 2 of the v2 kit).
>
> OK for trunk, assuming the other patches are approved? (patch 2 in the kit,
> for the C frontend, still needs approval).

OK.

Jason


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