On Mon, Mar 04, 2024 at 11:00:18AM +, Jonathan Wakely wrote:
> On 01/03/24 15:38 -0500, Jason Merrill wrote:
> > On 3/1/24 14:24, Marek Polacek wrote:
> > > +@smallexample
> > > +template
> > > +[[gnu::no_dangling(std::is_reference_v)]] int foo (T& t) @{
> >
> > I think this function should
On 01/03/24 15:38 -0500, Jason Merrill wrote:
On 3/1/24 14:24, Marek Polacek wrote:
+@smallexample
+template
+[[gnu::no_dangling(std::is_reference_v)]] int foo (T& t) @{
I think this function should return a reference.
The condition in the attribute can only ever be true if you call this
On 3/1/24 16:23, Patrick Palka wrote:
Sorry for not asking this sooner, but does it matter whether we attach
the attribute to the function type rather than the function declaration?
I noticed e.g. nodiscard gets attached to the decl.
And we document it as a function attribute despite attaching
On Fri, 1 Mar 2024, Jason Merrill wrote:
> On 3/1/24 14:24, Marek Polacek wrote:
> > On Fri, Mar 01, 2024 at 01:19:40PM -0500, Jason Merrill wrote:
> > > On 3/1/24 12:39, Marek Polacek wrote:
> > > >@option{-Wdangling-reference} also warns about code like
> > > >@smallexample
> > > > @@
On 3/1/24 14:24, Marek Polacek wrote:
On Fri, Mar 01, 2024 at 01:19:40PM -0500, Jason Merrill wrote:
On 3/1/24 12:39, Marek Polacek wrote:
@option{-Wdangling-reference} also warns about code like
@smallexample
@@ -3932,6 +3935,10 @@ struct Span @{
as @code{std::span}-like; that is,