Re: question regarding new warning

2014-03-28 Thread Manuel López-Ibáñez
On 27 March 2014 23:37, Daniel Gutson wrote: >> >> There are some known bugs in -Wconversion and nobody working on them, >> so if you are still interested in helping, I can give you some hints >> on where your help will be very welcome. > > Could you please go ahead and show me the failing cases?

Re: question regarding new warning

2014-03-27 Thread Daniel Gutson
On Thu, Mar 27, 2014 at 6:48 AM, Manuel López-Ibáñez wrote: > On 27/03/14 09:52, Florian Weimer wrote:> On 03/27/2014 08:44 AM, > Andrew Haley wrote: >> >>> On 03/26/2014 03:05 PM, Daniel Gutson wrote: >>> assigning a negative literal to an unsigned variable issues no warning:

Re: question regarding new warning

2014-03-27 Thread mveksler
Quoting Andrew Haley : On 03/27/2014 08:52 AM, Florian Weimer wrote: On 03/27/2014 08:44 AM, Andrew Haley wrote: On 03/26/2014 03:05 PM, Daniel Gutson wrote: assigning a negative literal to an unsigned variable issues no warning: unsigned int x; x =- 4; This is specially

Re: question regarding new warning

2014-03-27 Thread Andrew Haley
On 03/27/2014 08:52 AM, Florian Weimer wrote: > On 03/27/2014 08:44 AM, Andrew Haley wrote: > >> On 03/26/2014 03:05 PM, Daniel Gutson wrote: >> >>> assigning a negative literal to an unsigned variable issues no warning: >>> >>> >>> unsigned int x; >>> x =- 4; >>> >>> This is speciall

Re: question regarding new warning

2014-03-27 Thread Jonathan Wakely
On 27 March 2014 08:52, Florian Weimer wrote: > Yes, this warning needs to take whitespace into account. But then, I > suppose it would be fine. That's what I was thinking. I've never seen someone write x =- 4 intentionally. People who write x=-4 without any whitespace at all would just have to

Re: question regarding new warning

2014-03-27 Thread Manuel López-Ibáñez
On 27/03/14 09:52, Florian Weimer wrote:> On 03/27/2014 08:44 AM, Andrew Haley wrote: > >> On 03/26/2014 03:05 PM, Daniel Gutson wrote: >> >>> assigning a negative literal to an unsigned variable issues no warning: >>> >>> >>> unsigned int x; >>> x =- 4; >>> >>> This is specially impor

Re: question regarding new warning

2014-03-27 Thread Florian Weimer
On 03/27/2014 08:44 AM, Andrew Haley wrote: On 03/26/2014 03:05 PM, Daniel Gutson wrote: assigning a negative literal to an unsigned variable issues no warning: unsigned int x; x =- 4; This is specially important in typos when -= was intended instead of =- Would be acceptable

RE: question regarding new warning

2014-03-27 Thread Thomas Preud'homme
> From: Andrew Haley [mailto:a...@redhat.com] > > The trouble with warnings like this is that they trigger far too > frequently on good (i.e. correct, reasonable, just as the programmer > intended) code. They bring warnings into disrepute. They also cause > people to do extra work just to shut t

Re: question regarding new warning

2014-03-27 Thread Andrew Haley
On 03/27/2014 08:05 AM, Thomas Preud'homme wrote: >> From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf Of >> Andrew Haley >> >> Assigning a negative literal to an unsigned variable is well-defined >> standard C. Is it really appropriate to warn for correct code? > > There is lo

RE: question regarding new warning

2014-03-27 Thread Thomas Preud'homme
> From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf Of > Andrew Haley > > Assigning a negative literal to an unsigned variable is well-defined > standard C. Is it really appropriate to warn for correct code? There is lots of cases where gcc warn construct in correct code. Thin

Re: question regarding new warning

2014-03-27 Thread Andrew Haley
Hi, On 03/26/2014 03:05 PM, Daniel Gutson wrote: > assigning a negative literal to an unsigned variable issues no warning: > > >unsigned int x; >x =- 4; > > This is specially important in typos when -= was intended instead of =- > > Would be acceptable if I add a new warning to ha