Skip to Content.
Sympa Menu

freetds - Re: [freetds] warnings, again (was: Re: going 64!)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] warnings, again (was: Re: going 64!)
  • Date: Fri, 21 Dec 2007 17:05:54 +0100

>
> On Dec 18, 2:00pm, jklowden AT freetds.org ("James K. Lowden") wrote:
> -- Subject: Re: [freetds] warnings, again (was: Re: going 64!)
>
> | Christos Zoulas wrote:
> | > The gcc warnings are geared towards the majority of the programmer
> | > population. All I can say is that I've met quite a few
> programmers
> | > that did not know the precedence of && and ||.
> |
> | I'm sure you deal with more C coders than I do, and I don't
> doubt your
> | experience. It boils down to a kind of "reasonable man"
> argument: how
> | much knowledge of operator precedence is it reasonable to
> assume? Because
> | you surely wouldn't write:
> |
> | a = (b + c);
> | or a = (++b);
>
> No, I would not write that :-)
>
> | You prefer to defer to the compiler writers because they have more
> | information about what confuses people, and because their
> choices conform
> | to your experience. I think that's reasonable. On another
> project I
> | might do the same. I'm not always a crank.
>
> And also because they are forcing me to. By making this
> warning part of
> Wall, and by not allowing me to individually turn this
> warning off, they
> are forcing me to comply :-)
>
> | But when I find extra parentheses, I look more closely to
> see what's going
> | on. Is it:
> |
> | 1. Something unusual? (I hope so.)
> | 2. A bug?
> | 3. Expressing only what the compiler would do without them?
> |
> | I have to examine #1 and #2 carefully before I conclude #3.
> I can't be
> | the only one.
> |
> | I would prefer to remove #3 from the problem domain. I think that's
> | reasonable, too. Even if that means befuddling the less
> knowledgeable,
> | who need to learn (and will). After all, it was hard to
> write. It should
> | be hard to read, too.
>
> Yes, but that is you. There are others who when they don't see
> parentheses are scratching their heads wondering what the compiler
> is doing with the code. Granted, they should know better, but they
> don't. There is yet another category of people who are not bothered
> by the existence or the lack of parentheses. I fall into that
> category, with a slight preference to having the parentheses,
> perhaps because they have been forced down my throat for many years.
>
> | I have to conclude that reasonable people can disagree on
> this point, else
> | I'd have to conclude I'm being unreasonable.
> |
> | Fianlly, to both of you, and to others who've contributed
> what little
> | light this discussion has generated: thanks for reminding
> me FreeTDS is
> | compiled in many different environments and that its
> portability is an
> | asset to you. I think "builds anywhere, runs anywhere" is
> a worthy goal
> | for the project. Your participation furthers it.
>
> Thanks! My last comment is that I value the other gcc
> warnings too much
> to be losing (not compiling with warnings turned on) them for a few
> parentheses.
>
> christos

If someone wants my opinion warnings are usually useful and I removed a
lot of them. I usually remove all them making compiler happy. But this
case is something very particular... it's somethink like correcting 4+2x
with 4+(2*x) in a mathematical equation.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page