Re: [PATCH] c++: Fix ICE-on-invalid with -Wvexing-parse [PR97881]

2020-11-21 Thread Marek Polacek via Gcc-patches
On Fri, Nov 20, 2020 at 05:23:56PM -0500, Jason Merrill wrote: > On 11/17/20 2:32 PM, Marek Polacek wrote: > > --- /dev/null > > +++ b/gcc/testsuite/g++.dg/warn/Wvexing-parse9.C > > @@ -0,0 +1,8 @@ > > +// PR c++/97881 > > +// { dg-do compile } > > + > > +void > > +cb () > > +{ > > + volatile

Re: [PATCH] c++: Fix ICE-on-invalid with -Wvexing-parse [PR97881]

2020-11-20 Thread Jason Merrill via Gcc-patches
On 11/17/20 2:32 PM, Marek Polacek wrote: This invalid (?) code broke my assumption that if decl_specifiers->type is null, there must be any type-specifiers. Turn the assert into an if to fix this crash. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog:

[PATCH] c++: Fix ICE-on-invalid with -Wvexing-parse [PR97881]

2020-11-17 Thread Marek Polacek via Gcc-patches
This invalid (?) code broke my assumption that if decl_specifiers->type is null, there must be any type-specifiers. Turn the assert into an if to fix this crash. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog: PR c++/97881 * parser.c