Re: [pushed] c++: Push parms when late parsing default args

2020-12-03 Thread Rainer Orth
Hi Jason, > In this testcase we weren't catching the error in A::f because the parameter > 'I' wasn't in scope, so the default argument for 'b' found the global > typedef I. Fixed by pushing the parms before parsing. This is a bit > complicated because pushdecl clears DECL_CHAIN; do_push_parm_de

[pushed] c++: Push parms when late parsing default args

2020-12-02 Thread Jason Merrill via Gcc-patches
In this testcase we weren't catching the error in A::f because the parameter 'I' wasn't in scope, so the default argument for 'b' found the global typedef I. Fixed by pushing the parms before parsing. This is a bit complicated because pushdecl clears DECL_CHAIN; do_push_parm_decls deals with this