public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kbuild@vger.kernel.org, Michal Marek <mmarek@suse.cz>,
	linux-arch@vger.kernel.org, inux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: Fwd: [PATCH] Turn off -Wmaybe-uninitialized when building with -Os
Date: Fri, 15 Mar 2013 18:12:46 +0000	[thread overview]
Message-ID: <20130315181246.GW4977@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201303151455.38917.arnd@arndb.de>

On Fri, Mar 15, 2013 at 02:55:38PM +0000, Arnd Bergmann wrote:
> I forgot to put the linux-kbuild list on Cc, that is probably the
> best place to discuss this patch.
> 
> ----------  Forwarded Message  ----------
> 
> Subject: [PATCH] Turn off -Wmaybe-uninitialized when building with -Os
> Date: Thursday 14 March 2013
> From: Arnd Bergmann <arnd@arndb.de>
> To: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
> 
> gcc-4.7 and higher add a lot of false positive warnings about
> potential uses of uninitialized warnings, but only when optimizing
> for size (-Os). This is the default when building allyesconfig,
> which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.
> 
> In order to avoid getting a lot of patches that initialize such
> variables and accidentally hide real errors along the way, let's
> just turn off this warning on the respective gcc versions
> when building with size optimizations. The -Wmaybe-uninitialized
> option was introduced in the same gcc version (4.7) that is now
> causing the false positives, so there is no effect on older compilers.
> 
> A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE,
> we might now see /fewer/ warnings about possibly uninitialized
> warnings than with -O2, but that is still much better than seeing
> warnings known to be bogus.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: stable@vger.kernel.org
> --
> I'd like to merge this for 3.9 and also for the stable kernels,
> if people agree this is a good idea.

I think I replied to your previous version recently asking whether
this affects real uninitialized variables too.

  reply	other threads:[~2013-03-15 18:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 14:55 Fwd: [PATCH] Turn off -Wmaybe-uninitialized when building with -Os Arnd Bergmann
2013-03-15 18:12 ` Russell King - ARM Linux [this message]
2013-03-15 19:43   ` Arnd Bergmann
2013-03-16  8:56     ` James Bottomley

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=20130315181246.GW4977@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=inux-kernel@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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