Re: [PATCH] C++ warning on vexing parse

2017-10-05 Thread Nathan Sidwell
On 10/04/2017 10:44 AM, Jason Merrill wrote: Hmm, I don't think we want to diagnose these; if a parameter-list follows the parenthesized declarator, it isn't ambiguous. True. I went with that approach 3 and 4 seem like false positives. The problematic cases are all ones where the

Re: [PATCH] C++ warning on vexing parse

2017-10-05 Thread Nathan Sidwell
On 10/04/2017 08:17 PM, Eric Gallager wrote: On Tue, Oct 3, 2017 at 1:08 PM, Nathan Sidwell wrote: [non-c++ people on CC, there's a reason ...] This patch adds a new warning, concerning unnecessary parentheses on a declaration. For instance: prettyprinter (pp); Could

Re: [PATCH] C++ warning on vexing parse

2017-10-04 Thread Eric Gallager
On Tue, Oct 3, 2017 at 1:08 PM, Nathan Sidwell wrote: > [non-c++ people on CC, there's a reason ...] > > This patch adds a new warning, concerning unnecessary parentheses on a > declaration. For instance: >prettyprinter (pp); > That's a declaration of a pp variable of type

Re: [PATCH] C++ warning on vexing parse

2017-10-04 Thread Jakub Jelinek
On Wed, Oct 04, 2017 at 10:44:11AM -0400, Jason Merrill wrote: > > 3) A couple of places do: > >T (name // line break to avoid wrap > > [LONGEXPR][OTHERLONGEXPR]); > > > > The parens aid the editor's formatter. The patch removes the parens, but I > > can see there may be disagreement.

Re: [PATCH] C++ warning on vexing parse

2017-10-04 Thread Jason Merrill
On Tue, Oct 3, 2017 at 1:08 PM, Nathan Sidwell wrote: > [non-c++ people on CC, there's a reason ...] > > This patch adds a new warning, concerning unnecessary parentheses on a > declaration. For instance: >prettyprinter (pp); > That's a declaration of a pp variable of type

[PATCH] C++ warning on vexing parse

2017-10-03 Thread Nathan Sidwell
[non-c++ people on CC, there's a reason ...] This patch adds a new warning, concerning unnecessary parentheses on a declaration. For instance: prettyprinter (pp); That's a declaration of a pp variable of type prettyprinter -- not a call of a prettyprinter function. The reason is that in