[Top][All Lists]

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

Re[2]: [lmi] MinGW gcc-4.3, and .tar.lzma

From: Vadim Zeitlin
Subject: Re[2]: [lmi] MinGW gcc-4.3, and .tar.lzma
Date: Mon, 1 Sep 2008 21:49:29 +0200

On Mon, 01 Sep 2008 19:07:02 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2008-09-01 18:17Z, Vadim Zeitlin wrote:
GC> >
GC> > [-Wconversion] unfortunately results in a huge
GC> > number of warnings and it doesn't seem doable to fix all of them. It's a
GC> > pity as I did see plenty of bugs which could be uncovered by this warning
GC> In lmi?

 No, I was speaking in general, sorry for not making it clear.

GC> OTOH, IIRC, with '-Wno-parentheses':
GC>   a = b  + c  * d; // okay
GC>   a = b || c && d; // not okay
GC> which I dislike because I view '||' as an additive operator and
GC> '&&' as a multiplicative one. OTOH, I would tend to parenthesize
GC> bitwise operators. I agree with the motivation for a compiler
GC> diagnostic of this sort, but its author made implementation
GC> decisions that I would have made differently, so I'd rather turn
GC> this warning off than rewrite code that's better unchanged IMO.

 The problem is that there are many warnings like this which may indicate
real problems but can also be triggered superfluously. In the example of
this warning, I find the warnings about

        if ( condition )
                if ( another condition )
                        some code
                some more code

useful (the code doesn't behave as indentation implies it should) and the
ones about || and && less so. Still, parentheses don't hurt and, being an
adept of Perl I guess I have right to quote the prophet:

        When in doubt, parenthesize. At the very least it will let some
        poor schmuck bounce on the % key in vi. 

                                        Larry Wall in perlstyle(1)

 Anyhow, should I make a patch disabling these warnings in workhorse.make
and configure.ac?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]