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] PR c++/69139


On 2016-02-08 19:14, Patrick Palka wrote:
On Mon, 8 Feb 2016, Jason Merrill wrote:
On 02/08/2016 11:43 AM, Patrick Palka wrote:
BTW, last month I posted a patch for this PR that handles all kinds of
specifiers as well __attribute__ specifiers.
Patch is at: https://gcc.gnu.org/ml/gcc-patches/2016-01/msg02004.html
-- it makes the parser arbitrarily look ahead (while skipping over
pairs of parens) until it finds a DEREF, a COMMA, a CLOSE_PAREN or an
EQ.  If it first finds a DEREF then have_trailing_return_fn_decl is
set. Dunno if it's better to have this kind of "dumb" lookahead, or
to be more explicit about one expects to consume like your followup
patch does.

Hmm, I think I prefer your approach [snip]

Me too. I was worried that the cases handled in the explicit solution might get longer, more complex and repeat large amounts of other parser code. Providing this approach gives us no false positives I would say it's superior.


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