[cxx-abi-dev] need mangling for string literals and lifetime-extended temporaries used in static constexpr member initializers and for string literals in constexpr functions
John McCall
rjmccall at apple.com
Fri May 24 21:31:41 UTC 2013
On May 24, 2013, at 1:10 PM, Jason Merrill <jason at redhat.com> wrote:
> On 05/24/2013 03:57 PM, John McCall wrote:
>> The requirement I'm complaining about is that arguably your
>> example is guaranteed to work even if get_sptr() is implemented
>> thusly:
>>
>> inline const char *get_sptr() { return "foo"; }
>>
>> Because it's a string literal in an extern inline function and so it's
>> the same object.
>
> Yes, and the ABI already specifies mangling for such a string literal:
>
> <local-name> := Z <function encoding> E s [<discriminator>]
Ah, so we do, thanks.
John.
More information about the cxx-abi-dev
mailing list