From: Steve Papacharalambous <stevep-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-discuss
<devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>,
Edmar Wienskoski <edmar-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: Re: [PATCH] Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3.
Date: Tue, 30 Sep 2008 09:03:50 +0100 [thread overview]
Message-ID: <1222761830.4353.38.camel@localhost.localdomain> (raw)
In-Reply-To: <20080930023934.GB8939-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
On Tue, 2008-09-30 at 12:39 +1000, David Gibson wrote:
> On Mon, Sep 29, 2008 at 08:51:02PM -0500, Jon Loeliger wrote:
> > > On Mon, Sep 29, 2008 at 04:13:27PM -0500, Jon Loeliger wrote:
> > > > >
> > >
> > > Uh.. Jon.. did you see my reply to this. I'm not at all convinced
> > > this patches a real problem. I suspect it's just replacing a problem
> > > that gcc could detect with a similar one that gcc can't (and for which
> > > we already had a test to deal with, anyway).
> >
> > I saw your reply, and you are welcome to read up
> > on the fist fight over in GCC land too.
> >
> > In the meantime, it fixes a real problem that we
> > have at Freescale.
>
> Ok.. and can you explain this real problem?
>
> If this is just to work around a silly gcc warning that appears in
> some circumstances and not others, that's fine, but the commit message
> should say so.
>
Hi David,
The error that is generated when using gcc-4.3.2 20080819 is:
[snip]
/opt/freescale/usr/local/gcc-4.3.8-eglibc-2.8.8/powerpc-linux-gnu/bin/powerpc-linux-gnu-gcc -include config/autoconf.h -m32 -Wa,-me500 -nostdinc -I /opt/freescale/usr/local/gcc-4.3.8-eglibc-2.8.8/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.3.2/include -I /opt/freescale/usr/local/gcc-4.3.8-eglibc-2.8.8/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.3.2/include-fixed -Iinclude -Ibin/include -I../dtc/libfdt -I../libos/include -g -std=gnu99 -include include/libos-client.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -msoft-float -pipe -ffixed-r2 -mmultiple -mno-altivec -funit-at-a-time -mno-string -fomit-frame-pointer -Werror -include include/libfdt_env.h -c -o bin/libfdt/fdt.o ../dtc/libfdt/fdt.c
cc1: warnings being treated as errors
../dtc/libfdt/fdt.c: In function 'fdt_next_tag':
../dtc/libfdt/fdt.c:82: error: assuming signed overflow does not occur
when assuming that (X + c) < X is always false
../dtc/libfdt/fdt.c:82: error: assuming signed overflow does not occur
when assuming that (X + c) < X is always false
../dtc/libfdt/fdt.c:82: error: assuming signed overflow does not occur
when assuming that (X + c) < X is always false
[/snip]
which does not occur with earlier versions of gcc. For example the same
command builds without errors with gcc-4.2.3.
A good starting point for the discussion on this subject is:
http://gcc.gnu.org/ml/gcc/2008-04/msg00618.html
I suspect that you're right and this error doesn't occur in all
circumstances, so perhaps the commit message should be changed,
Best regards,
Steve
next prev parent reply other threads:[~2008-09-30 8:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 16:02 [PATCH] Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3 Jon Loeliger
2008-09-26 1:29 ` David Gibson
2008-09-29 21:13 ` Jon Loeliger
[not found] ` <E1KkQ3b-0000uT-6H-CYoMK+44s/E@public.gmane.org>
2008-09-30 1:15 ` David Gibson
[not found] ` <20080930011525.GB6189-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-09-30 1:51 ` Jon Loeliger
[not found] ` <E1KkUOE-0001OX-EF-CYoMK+44s/E@public.gmane.org>
2008-09-30 2:39 ` David Gibson
[not found] ` <20080930023934.GB8939-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-09-30 8:03 ` Steve Papacharalambous [this message]
2008-09-30 16:28 ` Scott Wood
[not found] ` <48E253A2.1090702-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2008-10-01 1:19 ` David Gibson
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=1222761830.4353.38.camel@localhost.localdomain \
--to=stevep-kzfg59tc24xl57midrcfdg@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=edmar-KZfg59tc24xl57MIdRCFDg@public.gmane.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.