[llvm] r229980 - Disallow implicit conversions from None to integer types
Justin Bogner
mail at justinbogner.com
Fri Feb 20 08:13:20 PST 2015
David Blaikie <dblaikie at gmail.com> writes:
> On Feb 20, 2015 4:26 AM, "Andrea Di Biagio" <andrea.dibiagio at gmail.com> wrote:
>>
>> Hi Justin,
>>
>> Just for your info. After this change I get tons of new warnings
>> because of ‘llvm::None’ defined but not used [-Wunused-variable].
>>
>> Example:
>>
>> In file included from llvm/include/llvm/ADT/ArrayRef.h:13:0,
>> llvm/include/llvm/ADT/APInt.h:19,
>> llvm/include/llvm/ADT/APFloat.h:20,
>> llvm/lib/Support/APFloat.cpp:15:
>> llvm/include/llvm/ADT/None.h:23:17: warning: ‘llvm::None’ defined but
>> not used [-Wunused-variable]
>> static NoneType None;
>> ^
>
> Attribute unused? (Used?) I never remember which.
>
> We should check the constexpr rules/option perhaps.
Yeah, I'll look into the implications of that idea.
>>
>> I am using gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1).
Does switching this from just static to static const help? I don't have
gcc 4.8 to try this.
More information about the llvm-commits
mailing list