Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Harald van Dijk <truedfx@g.o>
Subject: Re: Re: FYI: Rules for distro-friendly packages
Date: Sun, 27 Jun 2010 14:23:11 +0200
On Sun, Jun 27, 2010 at 02:56:33PM +0300, Nikos Chantziaras wrote:
> On 06/27/2010 01:47 PM, Enrico Weigelt wrote:
> > * Nikos Chantziaras<realnc@...>  schrieb:
> >
> >> Did it actually occur to anyone that warnings are not errors?  You can
> >> have them for correct code.  A warning means you might want to look at
> >> the code to check whether there's some real error there.  It doesn't
> >> mean the code is broken.
> >
> > In my personal experience, most times a warning comes it, the
> > code *is* broken (but *might* work in most situations).
> 
> That's the key to it: most times.  Granted, without -Wall (or any other 
> options that tweaks the default warning level) we can be very sure that 
> the warning is the result of a mistake by the developer.  But with 
> -Wall, many warnings are totally not interesting ("unused parameter") 
> and some even try to outsmart the programmer even though he/she knows 
> better ("taking address of variable declared register").  In that last 
> example, fixing it would even be wrong when you consider the optimizer 
> and the fuzzy meaning of "register" which the compiler is totally free 
> to ignore.

The compiler is not totally free to ignore the register keyword. Both
the C and the C++ standards require that the compiler complain when
taking the address of a register variable. Other compilers will issue a
hard error for it. Fixing the code to not declare the variable as
register would be the correct thing to do.

Make sure you *understand* warnings, and then you can decide whether to
fix the code, if there is anything to fix, or to ignore.


Replies:
Re: FYI: Rules for distro-friendly packages
-- Nikos Chantziaras
Re: Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
References:
FYI: Rules for distro-friendly packages
-- Enrico Weigelt
Re: FYI: Rules for distro-friendly packages
-- Petteri Räty
Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
Re: FYI: Rules for distro-friendly packages
-- Ciaran McCreesh
Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
Re: FYI: Rules for distro-friendly packages
-- Ciaran McCreesh
Re: FYI: Rules for distro-friendly packages
-- Nikos Chantziaras
Re: Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
Re: FYI: Rules for distro-friendly packages
-- Nikos Chantziaras
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: FYI: Rules for distro-friendly packages
Next by thread:
Re: Re: FYI: Rules for distro-friendly packages
Previous by date:
Re: FYI: Rules for distro-friendly packages
Next by date:
Re: Re: FYI: Rules for distro-friendly packages


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.