r241478 - [Sema] Warn when shifting a negative value.
Davide Italiano
davide at freebsd.org
Mon Jul 6 17:46:06 PDT 2015
On Mon, Jul 6, 2015 at 4:47 PM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> Looks like this broke bootstrap:
>
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/18993/steps/bootstrap%20clang/logs/stdio
>
Hopefully fixed.
>
> On 6 July 2015 at 14:02, Davide Italiano <davide at freebsd.org> wrote:
>> Author: davide
>> Date: Mon Jul 6 13:02:09 2015
>> New Revision: 241478
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=241478&view=rev
>> Log:
>> [Sema] Warn when shifting a negative value.
>>
>> Example:
>> % ./clang -Wshift-negative-value emit.c
>> emit.c:3:14: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
>> int a = -1 << 3;
>> ~~ ^
>> 1 warning generated.
More information about the cfe-commits
mailing list