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: Joerg Schilling
Subject: Re: [Bug-tar] [PATCH 0/1] Notes for wordsplit
Date: Thu, 21 Feb 2013 10:53:28 +0100
User-agent: nail 11.22 3/20/05

Eric Blake <address@hidden> wrote:

> On 02/20/2013 11:30 AM, Sergey Poznyakoff wrote:
> > Hi Paul,
> > 
> >> Developers are assumed to have up-to-date systems where -Werror is
> >> appropriate.
> > 
> > Frankly, I cannot imagine a situation where treaing a warning as an
> > error can be appropriate.  That's why I consider it unfortunate.
>
> If code compiles warning-free, then enabling -Werror prevents
> regressions that would add a new warning.  Getting code warning-free,
> and deciding what set of warnings to be warning-free on, is a harder
> task, but using -Werror DOES make sense for projects that are already
> clean for a given set of warnings.

The problem with gcc is that due to problems in the way gcc decides when to 
warn, it is hard to make portable core warning free with respect to gcc.

There are even several diferent reasons for this:

-       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.

-       gcc does not understand the "%r" printf() format and as %r usually
        results in more than one parameter, this causes even more than one
        gcc warning per printf() call.

-       gcc-4.x (as configured on some linux systems) warns about ignored
        function return values but is not C cmpliant as it does not stop
        to warn when using the official way to tell the compiler that
        the return value is intentionally ignored (via 
        "(void) function(parms)") in such cases.

-       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.

Jörg

-- 
 EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
       address@hidden                (uni)  
       address@hidden (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily



reply via email to

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