public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Harald van Dijk" <truedfx@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: FYI:  Rules for distro-friendly packages
Date: Sun, 27 Jun 2010 14:23:11 +0200	[thread overview]
Message-ID: <20100627122258.GA8754@boostbox> (raw)
In-Reply-To: <i07e9t$356$1@dough.gmane.org>

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@arcor.de>  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.



  reply	other threads:[~2010-06-27 12:22 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 20:17 [gentoo-dev] FYI: Rules for distro-friendly packages Enrico Weigelt
2010-06-25 20:28 ` Alistair Bush
2010-06-26 18:56   ` Enrico Weigelt
2010-06-25 21:00 ` Krzysztof Pawlik
2010-06-26 18:51   ` Enrico Weigelt
2010-06-26 19:21     ` Krzysztof Pawlik
2010-06-26 19:46       ` Enrico Weigelt
2010-06-26 19:59         ` Ciaran McCreesh
2010-06-26 20:08           ` Krzysztof Pawlik
2010-06-26 20:10             ` Enrico Weigelt
2010-06-26 20:09           ` Enrico Weigelt
2010-06-26 20:18             ` Ciaran McCreesh
2010-06-27 10:34               ` Enrico Weigelt
2010-06-27 10:45                 ` Ciaran McCreesh
2010-06-27 11:08                   ` Enrico Weigelt
2010-06-27 11:15                     ` Ciaran McCreesh
2010-06-27 18:33                     ` Brian Harring
2010-06-27 18:48                       ` Patrick Lauer
2010-08-17 17:04                       ` Enrico Weigelt
2010-08-18  4:15                         ` Jacob Godserv
2010-08-18 19:10                           ` Enrico Weigelt
2010-06-26 20:33           ` Nirbheek Chauhan
2010-06-27 10:35             ` Enrico Weigelt
2010-06-27 20:46               ` Nirbheek Chauhan
2010-06-27  5:48         ` Hans de Graaff
2010-06-25 22:24 ` Petteri Räty
2010-06-26 19:39   ` Enrico Weigelt
2010-06-26 19:50     ` Ciaran McCreesh
2010-06-26 19:57       ` Enrico Weigelt
2010-06-26 20:12         ` Ciaran McCreesh
2010-06-27  5:52           ` [gentoo-dev] " Nikos Chantziaras
2010-06-27 10:47             ` Enrico Weigelt
2010-06-27 11:56               ` Nikos Chantziaras
2010-06-27 12:23                 ` Harald van Dijk [this message]
2010-06-27 12:25                   ` Enrico Weigelt
2010-06-27 12:35                     ` Ciaran McCreesh
2010-06-27 14:46                   ` Nikos Chantziaras
2010-06-27 17:14                     ` Harald van Dijk
2010-06-27 17:48                       ` Nikos Chantziaras
2010-06-27 18:10                         ` dev-random
2010-06-27 18:27                           ` Nikos Chantziaras
2010-06-27  6:09         ` [gentoo-dev] " Sergei Trofimovich
2010-06-27 10:52           ` Enrico Weigelt
2010-06-27 11:28             ` Richard Freeman
2010-06-26 19:57     ` [gentoo-dev] " Nikos Chantziaras
2010-06-27  8:14     ` [gentoo-dev] " Rémi Cardona
2010-06-27 11:02       ` Enrico Weigelt
2010-06-27 12:13         ` Patrick Lauer
2010-06-27 12:22           ` Enrico Weigelt
2010-06-27 12:33             ` Ciaran McCreesh
2010-06-27 16:54               ` Rémi Cardona
2010-06-28 10:26               ` Enrico Weigelt
     [not found] ` <201006252338.51889.alan.mckinnon@gmail.com>
2010-08-17 21:05   ` [gentoo-dev] Re: [gentoo-user] " Enrico Weigelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100627122258.GA8754@boostbox \
    --to=truedfx@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox