gnustep-dev
[Top][All Lists]
Advanced

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

Re: Incompatible compiler option fexec-charset


From: David Chisnall
Subject: Re: Incompatible compiler option fexec-charset
Date: Wed, 7 Dec 2011 17:01:38 +0000

On 7 Dec 2011, at 16:52, Wolfgang Lux wrote:

>>> In that case I don't understand why you want to add -finput-charset=UTF-8 
>>> to the compiler options. This flag changes the interpretation of the 
>>> *source* file.
>> 
>> That's only used while compiling the base library ... because the base 
>> library source is guaranteed to be UTF-8 (as David pointed out, that's the 
>> *sane* way to do things), and we therefore don't want people building the 
>> base library with an environment which would cause string literals in the 
>> source to be interpreted as any other characterset.  At present this is 
>> unnecessary (as we actually only use ascii literals), but it makes the code 
>> future-proof.
> 
> Okay, that makes sense to me (as I said, I'm sometimes a bit dumb :-)

So what we really want to test is what happens when we compile a source file 
containing a UTF-8 string literal?  In this case testing if strlen("Étoil€") == 
9 should tell you that it's doing the right thing.  Clang does this out of the 
box, as does GCC 4.2.1.

As far as I can tell, no extra options are required for either of the compilers 
that we officially support.

Which brings me back to my original question: what do we gain from this test's 
existence in configure, other than forcing people to add an extra option and 
making cross compilation even harder?

David

-- Send from my Jacquard Loom


reply via email to

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