[PATCH] c++, libstdc++, v3: Implement C++26 P3726R2 - Adjustments to Union Lifetime Rules [PR125845]
Jason Merrill
jason@redhat.com
Wed Sep 9 14:00:48 GMT 2026
On 9/9/26 6:08 AM, Jakub Jelinek wrote:
> On Wed, Sep 09, 2026 at 12:06:14PM +0200, Tomasz Kaminski wrote:
>>> + __builtin_start_lifetime (&b.b);
>>> + __builtin_start_lifetime (&b.b[1]);
>>> + __builtin_start_lifetime (&b.b[1].b);
>>> + __builtin_start_lifetime (&b.b[1].b[0][1]); // { dg-error
>>> "'__builtin_is_within_lifetime' with containing object not within lifetime"
>>> }
>>>
>> Should the error say, __builtin_start_lifetime with containing object not
>> withing lifetime?
>
> Sure, I can pass const char *name too.
Well, that particular error is already in cxx_eval_start_lifetime, just
need to correct the string. But passing down the name does seem useful
for the errors that stay in is_within_lifetime.
Jason
More information about the Libstdc++
mailing list