All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] gcc4 warnings, variable used uninitialized
Date: Tue, 21 Feb 2006 12:42:16 +0000	[thread overview]
Message-ID: <200602211342.16434.arnd@arndb.de> (raw)
In-Reply-To: <1140524267.2600.9.camel@omega.sp.or.at>

On Tuesday 21 February 2006 13:17, Stephan Peijnik wrote:
> Does anyone know exactly how gcc4 decides whether a variable is
> undefined or not and how that should be handled kernel-wise?

It has been found that gcc-4.0 gets it wrong. Most of the
places where gcc-4.0 wrongly complains and gcc-3.4 does not
have been fixed in gcc-4.1.

> I've come across a few snippets where for example a temporary
> u32 is declared and then a pointer to that variable is given
> to pci_read_config_dword. When that variable is used afterwards gcc4
> complains about it being not initialized (Using gcc-4.0.2 and kernel
> 2.6.16-rc4 as of yesterday).
> 
> Should 'bugs' like those be fixed? I've found like a gazillion of
> them in the AGP drivers and other parts of the kernel.
> I'm thinking about that as it seems to be the best point to get
> myself started and I would appreciate comments on that topic.

A small number of these bugs are valid and should be fixed, but
it is not trivial to determine in some cases. What you say about
this happening with pci_read_config_dword sounds like it is a gcc
bug and not a bug in the kernel sources, so it should not be fixed
in the kernel.

Can you be more specific with the example and/or reproduce
it with gcc-4.1?

	Arnd <><
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

  reply	other threads:[~2006-02-21 12:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 12:17 [KJ] gcc4 warnings, variable used uninitialized Stephan Peijnik
2006-02-21 12:42 ` Arnd Bergmann [this message]
2006-02-21 20:12 ` Stephan Peijnik
2006-02-21 20:20 ` Dave Jones
2006-02-21 23:51 ` Håkon Løvdal
2006-02-22  0:19 ` Bernd Petrovitsch
2006-02-22  3:51 ` Dave Jones

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=200602211342.16434.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.