Bruno Haible <[EMAIL PROTECTED]> writes:

> To turn off this warning one needs to pass -Wno-missing-field-initializers.

OK, but I'm afraid the ship has already sailed with gcc -W on
Coreutils.  Coreutils has several other places where gcc -W issues
bogus warnings (typically about signed vs unsigned comparisons), and
we're not inclined to change those either.  People who want to use gcc
-W have to figure out how to ignore these bogus warnings, and adding a
few more bogus warnings to the list shouldn't hurt all that much.

I think gcc -W ought to get fixed to match typical programming style,
not the reverse.  Until this gets done we might as well not worry
_too_ much about what gcc -W says.  "The compiler should be your
servant, not your master."

That being said, I can see where others might differ, so I installed
only the coreutils part of the change (leaving gnulib alone), with the
following corrected ChangeLog entry.

2006-10-10  Paul Eggert  <[EMAIL PROTECTED]>

        * src/ls.c (quote_name): Use initializer rather than memset to
        initialize an object to zero.  This is easier to read and is less
        likely to introduce an runtime error due to a mixup.  It causes
        gcc -W to issue a warning, but you can work around this by
        appending -Wno-missing-field-initializers.
        * src/pathchk.c (portable_chars_only): Likewise.
        * src/shred.c (main): Likewise.
        * src/stty.c (main): Likewise.
        * src/tr.c (card_of_complement): Likewise.
        * src/wc.c (wc): Likewise.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to