netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org, michael@ellerman.id.au
Cc: Andy Gay <andy@andynet.net>, Thomas Klein <tklein@de.ibm.com>,
	Jan-Bernd Themann <themann@de.ibm.com>,
	netdev@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Thomas Klein <osstklei@de.ibm.com>,
	Christoph Raisch <raisch@de.ibm.com>,
	Marcus Eder <meder@de.ibm.com>,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [2.6.19 PATCH 4/7] ehea: ethtool interface
Date: Sat, 19 Aug 2006 15:47:11 +0200	[thread overview]
Message-ID: <200608191547.12161.arnd@arndb.de> (raw)
In-Reply-To: <1155976887.1388.17.camel@localhost.localdomain>

On Saturday 19 August 2006 10:41, Michael Ellerman wrote:
> A lot of these have started appearing recently, which I think is due to
> GCC becoming more vocal. Unfortunately many of them are false positives
> caused by GCC not seeming to grok that this is ok:
> 
> void foo(int *x) { *x = 1; }
> ...
> int x;
> foo(&x);
> return x;
> 

It's more subtle than this, gcc only gets it wrong when multiple
things come together, the most common one seems to be:

- it tries to inline foo()
- foo has a path where it initializes *x and another one where it
  doesn't
- x is accessed after foo() returns, but only when foo indeed has
  initialized it.

The problem is that gcc now is more aggressive about inlining
functions. It used to assume that all functions initialize their
pointer arguments, now it does some more checking, but not enough,
so there are lots of false positives. Every gcc-4.x release seems
to fix some of these cases, but a few others remain.

	Arnd <><

  reply	other threads:[~2006-08-19 13:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 11:33 [2.6.19 PATCH 4/7] ehea: ethtool interface Jan-Bernd Themann
2006-08-18 14:05 ` Alexey Dobriyan
2006-08-18 15:41   ` Thomas Klein
2006-08-18 17:45     ` Stephen Hemminger
2006-08-21  9:53       ` Thomas Klein
2006-08-19  6:18     ` Michael Ellerman
2006-08-19  6:48       ` Andy Gay
2006-08-19  8:41         ` Michael Ellerman
2006-08-19 13:47           ` Arnd Bergmann [this message]
2006-08-19 14:40         ` Jeff Garzik
2006-08-21 10:53   ` Thomas Klein
  -- strict thread matches above, loose matches on Subject: below --
2006-08-22 12:54 Jan-Bernd Themann
2006-08-23  8:57 Jan-Bernd Themann
2006-09-04 10:40 Jan-Bernd Themann
2006-09-06 13:33 Jan-Bernd Themann

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=200608191547.12161.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=adobriyan@gmail.com \
    --cc=andy@andynet.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=meder@de.ibm.com \
    --cc=michael@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=osstklei@de.ibm.com \
    --cc=raisch@de.ibm.com \
    --cc=themann@de.ibm.com \
    --cc=tklein@de.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).