lua-users home
lua-l archive

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


On Sep 26, 2012, at 11:34 AM, William Ahern <william@25thandClement.com> wrote:

> On Wed, Sep 26, 2012 at 10:50:20AM -0300, Luiz Henrique de Figueiredo wrote:
>>> So, compiling Lua 5.2.1 on OS X (x86_64) with LLVM compiler 4.1 produces
>>> these 2 warnings:
>> 
>> I get no warnings with the default gcc in my machine (10.7.4 with Xcode
>> command line tools for Lion, sure which version, probably the March 2012 one):
>> 
>> % gcc --version
>> i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
>> 
>> I get no warnings with CC=cc, which is:
>> 
>> % cc --version
>> Apple clang version 3.1 (tags/Apple/clang-318.0.54) (based on LLVM 3.1svn)
>> Target: x86_64-apple-darwin11.4.0
> 
> That's because clang and GCC are competing to add the most obnoxious
> diagnostics, and the newest version of clang is usually a step or two ahead.
> Just give it one or two releases, and GCC will fall into line.
> 
> Eventually they'll both just immediately exit with the diagnostic, "just use
> C++ already if you want to cast so much", and then everybody's heads will
> explode.
> 

Is a default warning about a loss of integer precision that out of line? At any rate, adding explicit casts to my local copy of Lua's source resolves the issue.

Preston