All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Pekka Enberg" <penberg@cs.helsinki.fi>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Paul Mackerras" <paulus@samba.org>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Arnaldo Carvalho de Melo" <acme@redhat.com>
Cc: Paul Mundt <lethal@linux-sh.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf tools: Kill off -Wcast-align
Date: Mon, 26 Oct 2009 12:21:11 +0100	[thread overview]
Message-ID: <20091026112111.GA24010@elte.hu> (raw)
In-Reply-To: <84144f020910260308r106574e3vdd72e8697571bdc2@mail.gmail.com>


* Pekka Enberg <penberg@cs.helsinki.fi> wrote:

> * Paul Mundt <lethal@linux-sh.org> wrote:
> >> > The present use of -Wcast-align causes the build to blow up on SH due to
> >> > generating a "cast increases required alignment of target type" error on
> >> > each invocation of list_for_each_entry().
> >> >
> >> > It seems that this was previously reported and killed off in the ia64
> >> > support patch, but nothing seems to have happened with that. Presumably
> >> > the same problem still remains there, too.
> >> >
> >> > Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> 
> On Mon, Oct 26, 2009 at 07:25:20AM +0100, Ingo Molnar wrote:
> >> Is this a GCC bug producing false positive warnings? The GCC manpage
> >> says:
> >>
> >>        -Wcast-align
> >>            Warn whenever a pointer is cast such that the required alignment of the
> >>            target is increased.  For example, warn if a "char *" is cast to an
> >>            "int *" on machines where integers can only be accessed at two- or
> >>            four-byte boundaries.
> >>
> >> Which looks moderately useful - if it works.
> 
> On Mon, Oct 26, 2009 at 11:47 AM, Paul Mundt <lethal@linux-sh.org> wrote:
>
> > Well, both ia64 and sh have hit this in the current compilers, and 
> > it doesn't seem to pose any code generation issues. In the areas 
> > where it is generated it seems to relate to 64-bit data types in the 
> > data structures, which in itself doesn't seem inherently 
> > problematic.
> >
> > I'll submit a bug report to the GCC folks, but for the time being 
> > given that multiple architectures are hitting this and it doesn't 
> > seem to be causing any issues, it would be better to have this flag 
> > dropped.
> 
> Can we disable the flag for affected architectures but keep it enabled 
> for x86?

For now i've applied Paul's fix - x86 doesnt have such type restrictions 
and i dont remember this warning having flagged some real data structure 
alignment bug anywhere.

	Ingo

  reply	other threads:[~2009-10-26 11:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26  5:40 [PATCH] perf tools: Kill off -Wcast-align Paul Mundt
2009-10-26  6:25 ` Ingo Molnar
2009-10-26  9:47   ` Paul Mundt
2009-10-26 10:08     ` Pekka Enberg
2009-10-26 11:21       ` Ingo Molnar [this message]
2009-10-26 22:40     ` David Miller
2009-10-27 13:50       ` Ingo Molnar
2009-10-28  0:59         ` David Miller
2009-10-26 11:38 ` [tip:perf/urgent] perf tools: Remove -Wcast-align tip-bot for Paul Mundt

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=20091026112111.GA24010@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=penberg@cs.helsinki.fi \
    /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.