Re: [PATCH] c++: Move -Wdangling-reference to -Wextra

2024-08-02 Thread Patrick Palka
On Fri, 2 Aug 2024, Marek Polacek wrote: > On Thu, Aug 01, 2024 at 05:18:35PM -0400, Jason Merrill wrote: > > On 8/1/24 4:20 PM, Marek Polacek wrote: > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > > > -- >8 -- > > > Despite a number of mitigations (don't warn for std::

Re: [PATCH] c++: Move -Wdangling-reference to -Wextra

2024-08-02 Thread Marek Polacek
On Thu, Aug 01, 2024 at 05:18:35PM -0400, Jason Merrill wrote: > On 8/1/24 4:20 PM, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > Despite a number of mitigations (don't warn for std::span-like classes, > > lambdas, adding [[gnu::no_dangl

Re: [PATCH] c++: Move -Wdangling-reference to -Wextra

2024-08-01 Thread Jason Merrill
On 8/1/24 4:20 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Despite a number of mitigations (don't warn for std::span-like classes, lambdas, adding [[gnu::no_dangling]], etc.), the warning still seems to cause some grief. Let's move the warning

[PATCH] c++: Move -Wdangling-reference to -Wextra

2024-08-01 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Despite a number of mitigations (don't warn for std::span-like classes, lambdas, adding [[gnu::no_dangling]], etc.), the warning still seems to cause some grief. Let's move the warning to -Wextra, then. gcc/c-family/ChangeLog:

Re: [PATCH] c++: Move -Wdangling-reference to -Wextra [PR109642]

2023-05-02 Thread Jason Merrill via Gcc-patches
On 5/1/23 19:54, Marek Polacek wrote: Sadly, -Wdangling-reference generates false positives for std::span-like user classes, and it seems imprudent to attempt to improve the heuristic in GCC 13. Let's move the warning to -Wextra, that will hopefully reduce the number of false positives the users

[PATCH] c++: Move -Wdangling-reference to -Wextra [PR109642]

2023-05-01 Thread Marek Polacek via Gcc-patches
Sadly, -Wdangling-reference generates false positives for std::span-like user classes, and it seems imprudent to attempt to improve the heuristic in GCC 13. Let's move the warning to -Wextra, that will hopefully reduce the number of false positives the users have been seeing with 13. I'm leaving