Re: [PATCH 1/2] c++: -Wdangling-reference and empty class [PR115361]

2024-09-17 Thread Marek Polacek
On Tue, Sep 17, 2024 at 05:16:47PM -0400, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu. Marek, any concerns? LGTM, thanks. The ChangeLog may not pass the hook because it's missing some entries. > -- 8< -- > > We can't have a dangling reference to an empty class unless it's > specifically

[PATCH 1/2] c++: -Wdangling-reference and empty class [PR115361]

2024-09-17 Thread Jason Merrill
Tested x86_64-pc-linux-gnu. Marek, any concerns? -- 8< -- We can't have a dangling reference to an empty class unless it's specifically to that class or one of its bases. This was giving a false positive on the _ExtractKey pattern in libstdc++ hashtable.h. This also adjusts the order of argume