gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error compiling GUI - string constants


From: Fred Kiefer
Subject: Re: error compiling GUI - string constants
Date: Wed, 26 Jul 2017 23:45:50 +0200

Declaring duplicated strings should work with all current compilers as they try 
to optimise away duplicated constants. Somebody should check this on different 
compilers but for now it should be good enough.

Fred

> Am 26.07.2017 um 14:13 schrieb Riccardo Mottola <address@hidden>:
> 
> Hi,
> 
> Daniel Ferreira (theiostream) wrote:
>> Also, the reason it just does not assign the same const string to the 
>> different constants is because the two consts should be the same pointer, 
>> and doing it explicitly seemed like a good way to make that intent clear and 
>> guarantee that would happen.
> 
> I will commit the "fix" to unbreak build instead of "reverting" so your 
> additions get preserved, however I do like and understand the idea of using 
> and ensuring the samge string with the same poinger gets used.
> 
> I thus ask compiler experts whats wrong of or if this is a quirk with 
> NSStrings in GCC ? Or somethig known that clang is smarter to accept 
> resolving the assignments to the same pointer?
> 
> Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]