Re: [PATCH] c++: Improve the MVP -Wparentheses diagnostic.

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 5:14 PM, Marek Polacek wrote: I noticed that declarator->parenthesized is, for this warning, only set to the opening paren. But we can easily make it a range and generate a nicer diagnostic. Moreover, we can then offer a fix-it hint. TL;DR: This patch changes mvp3.C:8:7: warning:

[PATCH] c++: Improve the MVP -Wparentheses diagnostic.

2020-10-28 Thread Marek Polacek via Gcc-patches
I noticed that declarator->parenthesized is, for this warning, only set to the opening paren. But we can easily make it a range and generate a nicer diagnostic. Moreover, we can then offer a fix-it hint. TL;DR: This patch changes mvp3.C:8:7: warning: unnecessary parentheses in declaration of ‘i