[cxx-abi-dev] Mangling of string literals versus variadic templates

John Spicer jhs at edg.com
Wed Dec 18 12:10:03 UTC 2013


On Dec 17, 2013, at 10:55 PM, Gabriel Dos Reis <gdr at integrable-solutions.net> wrote:

> On Tue, Dec 17, 2013 at 7:38 PM, David Vandevoorde <daveed at edg.com> wrote:
>> On Dec 17, 2013, at 2:57 PM, John McCall <rjmccall at apple.com> wrote:
>> 
>>> On Dec 17, 2013, at 11:12 AM, David Vandevoorde <daveed at edg.com> wrote:
>>>> On Dec 16, 2013, at 8:33 PM, John McCall <rjmccall at apple.com> wrote:
>>>>> On Dec 16, 2013, at 5:10 PM, Richard Smith <richardsmith at google.com> wrote:
>>>>>> Consider:
>>>>> 
>>>>> Remind me why it’s impossible to go back to the committee and repeatedly weaken any remaining guarantees about string literal addresses until none of this is important?
>>>> 
>>>> I don't know if it's impossible or not, but I suspect it would be controversial.  (I, at least, would be opposed.)
>>> 
>>> Really?  You feel that having really strong guarantees about the address of a string literal is the right thing to do?  Like, it’s worth significantly increasing build times, code size, and launch times over?
>> 
>> Yes.  I think it's worth a lot to make adding "inline" to a function definition have minimal impact on its semantics.
> 
> Amen.

As has been pointed out (here by me, and on the WG21 reflector by Richard Smith), string literals are not guaranteed to have the same address in multiple calls each time they are evaluated in non-inline contexts, so eliminating the guarantee would actually make inline functions more like other functions.

John.

> 
> -- Gaby
> _______________________________________________
> cxx-abi-dev mailing list
> cxx-abi-dev at codesourcery.com
> http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev



More information about the cxx-abi-dev mailing list