This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC feature req: warn when bitops exceed type size (was: conntrack untracked match is broken)


2009/6/29 Richard Guenther <richard.guenther@gmail.com>:
> On Mon, Jun 29, 2009 at 3:10 PM, Jan Engelhardt<jengelh@medozas.de> wrote:
>> Hi gcc list,
>>
>>
>> I am forwarding below's bugreport here(*), to implicitly make aware
>> of a feature that I deem important to have in a future gcc.
>>
>
> -Wconversion should say
>
> t.c:4: warning: conversion to ‘unsigned char’ from ‘int’ may alter its value

From GCC 4.4.0 it says:

bug.c:6: warning: conversion to ‘uint8_t’ from ‘int’ may alter its value

More info abut new Wconversion: http://gcc.gnu.org/wiki/NewWconversion

Cheers,

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]