bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] [PATCH 0/1] Notes for wordsplit


From: Paul Eggert
Subject: Re: [Bug-tar] [PATCH 0/1] Notes for wordsplit
Date: Thu, 21 Feb 2013 09:49:22 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 02/21/13 01:53, Joerg Schilling wrote:

> -     gcc warns for so called "uninitilized varaiables" and other compilers
>       rightfully for the same code complain about useless code after you 
>       added the "initialization" gcc asked for.

We avoid this problem Coreutils, Tar, etc. by putting these useless
initializations in "#ifdef lint" code.  In practice, it's rarely
needed (GNU Tar does this in only one place).  Normally, "lint" isn't
defined, but if you compile with --enable-gcc-warnings it is enabled.

> -     gcc does not understand the "%r" printf() format

That's fine and is what we want, as we want to write portable code and
can't rely on %r.

> -     gcc-4.x (as configured on some linux systems) warns about ignored
>       function return values

Yes, that's truly annoying.  We fix that in Coreutils by using
Gnulib's ignore-value module.  It doesn't come up often, though, thank
goodness.  GNU Tar doesn't need ignore-value at all.

> -     gcc-4.x started to include other more lint like checking but ignores
>       lint special comments such as "/*LINTED*/", "/*ARGSUSED*/", ... 
>       (see "man lint"). This makes it impossible to make it quiet in border
>       cases.

In Coreutils and Tar we don't use the old lint directives; we use the
corresponding GCC directives instead.  They aren't needed very often,
and work well when they are needed.



reply via email to

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