Re: [PATCH] c++: implement [[gnu::non_owning]] [PR110358]

2024-01-26 Thread Jason Merrill
On 1/25/24 20:37, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Since -Wdangling-reference has false positives that can't be prevented, we should offer an easy way to suppress the warning. Currently, that is only possible by using a #pragma, either

Re: [PATCH] c++: implement [[gnu::non_owning]] [PR110358]

2024-01-25 Thread Marek Polacek
On Thu, Jan 25, 2024 at 08:37:36PM -0500, Marek Polacek wrote: > +/* Handle a "non_owning" attribute; arguments as in > + struct attribute_spec.handler. */ > + > +tree > +handle_non_owning_attribute (tree *node, tree name, tree args, int, > + bool *no_add_attrs) I

[PATCH] c++: implement [[gnu::non_owning]] [PR110358]

2024-01-25 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Since -Wdangling-reference has false positives that can't be prevented, we should offer an easy way to suppress the warning. Currently, that is only possible by using a #pragma, either around the enclosing class or around the