|
Boost : |
Subject: Re: [boost] [1.48.0] Beta 1 release candidates available
From: Ahmed Charles (ahmedcharles_at_[hidden])
Date: 2011-10-27 12:41:31
On Thu, Oct 27, 2011 at 3:52 AM, Artyom Beilis <artyomtnk_at_[hidden]> wrote:
>>
>
>> There are some build errors on MAC-OS clang in libraries Locale and Math.
>>
>> clang-darwin.compile.c++
>> bin.v2/libs/locale/build/clang-darwin-3.0x/release/threading-multi/posix/codecvt.o
>> libs/locale/src/posix/codecvt.cpp:137:30: error: non-constant-expression cannot
>> be narrowed from type 'unsigned char' to 'char' in initializer
>> list
>> Â Â Â Â Â Â char inseq[3] = {seq0 , begin[1], 0};
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ^~~~
>> libs/locale/src/posix/codecvt.cpp:137:30: note: override this message by
>> inserting an explicit cast
>> Â Â Â Â Â Â char inseq[3] = {seq0 , begin[1], 0};
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ^~~~
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â stat)c_cast<char>(
>> 1 error generated.
>>
>
> I don't see this problem with clang-2.8.
>
> Why clang-3 does not allow code like (I don't have clang-3 to check)?
>
> Â int main()
> Â {
> Â Â Â Â unsigned char uc = 10;
> Â Â Â char c[2] = { uc , 1 };
> Â }
>
> Is this really error, why the compiler does not cast?
>
>> ...
>> The same error appears several times then
>>
>
> Is this the same error all over?
>
> Can you send me the list of such locations or a patch so I'll
> be able to commit it to trunk and ask permissions to merge to release
> branch.
>
> Artyom
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
It's because of initializer lists, are you compiling in c++11 mode?
-- Ahmed Charles
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk