Hi,
gently pinging this...
On 10/05/19 16:29, Paolo Carlini wrote:
Hi,
a while ago Martin noticed that an unintended consequence of an old
tweak of mine - which avoided redundant error messages emitted from
cp_parser_init_declarator - is that, in some cases, we started
accepting ill-formed typeofs. Luckily, decltype isn't affected and
that points to the real issue: by the time that place in
cp_parser_init_declarator is reached, for a decltype version we
already emitted a correct error message. Thus I think the right way to
fix the problem is simply committing to tentative parse when, toward
the end of cp_parser_sizeof_operand we know that we must be looking at
a (possibly ill-formed) expression. Tested x86_64-linux.
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00501.html
Thanks, Paolo.
PS: To be honest, not knowing the exact rules, I would not consider this
issue a P2 - in particular considering that typeof is legacy and is
affected but all sorts of weird issues - but that's what it is ;)