On Tue, Feb 23, 2016 at 09:58:41AM -0500, Patrick Palka wrote: > finish_call_expr thinks that a call to a function which has been > obfuscated by force_paren_expr is a call to an unknown function. This > eventually leads us to not make use of the function's default arguments > when processing the argument list. So a function call like f() may > compile and yet (f)() may not, if f has defaulted arguments. > > This patch fixes this inconsistency by making finish_call_expr undo the > obfuscation performed by force_paren_expr. Thanks for the fix.
> new file mode 100644 > index 0000000..12462be > --- /dev/null > +++ b/gcc/testsuite/g++.dg/cpp1y/paren2.C > @@ -0,0 +1,25 @@ > +// PR c++/69736 > + I'd expect // { dg-do compile { target c++14 } } here. > +void fn1(bool = true) > +{ > + (fn1)(); > +} > + > +template <typename> > +void fn2() > +{ > + (fn1)(); > +} The test seems to fail here though because of testsuite/g++.dg/cpp1y/paren2.C:11:9: error: too few arguments to function Why's that? Marek