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


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.

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.

Jason


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