Re: [PATCH] c++: fix -Wdangling-reference false positive [PR115987]

2024-08-01 Thread Jason Merrill
On 8/1/24 4:19 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This fixes another false positive. When a function is taking a temporary of scalar type that couldn't be bound to the return type of the function, don't warn, such a program would be il

[PATCH] c++: fix -Wdangling-reference false positive [PR115987]

2024-08-01 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This fixes another false positive. When a function is taking a temporary of scalar type that couldn't be bound to the return type of the function, don't warn, such a program would be ill-formed. Thanks to Jonathan for reportin