public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63510] New: Wrong line number in Wstrict-overflow message
@ 2014-10-11  7:12 ibuclaw at ubuntu dot com
  2014-10-11 14:34 ` [Bug middle-end/63510] " manu at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: ibuclaw at ubuntu dot com @ 2014-10-11  7:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63510

            Bug ID: 63510
           Summary: Wrong line number in Wstrict-overflow message
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ibuclaw at ubuntu dot com

Tested on gcc (GCC) 5.0.0 20140901 (experimental)


Building GDB fails with the following error - both of which show the wrong
line.

../../gdb/i387-tdep.c: In function ‘i387_supply_fsave’:
../../gdb/i387-tdep.c:447:1: error: assuming signed overflow does not occur
when assuming that (X + c) >= X is always true [-Werror=strict-overflow]
 i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
 ^
../../gdb/i387-tdep.c: In function ‘i387_collect_fsave’:
../../gdb/i387-tdep.c:502:1: error: assuming signed overflow does not occur
when assuming that (X + c) >= X is always true [-Werror=strict-overflow]
 i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
 ^


Reduced to the following code, which shows both the correct and wrong line.

gcc -O2 -Wall -Wextra -c i387-tdep.c
---
int st0_regnum;

void i387_supply_fsave ()
{
  int i;
  for (i = st0_regnum; i < st0_regnum + 16;)
    {
    }
}
---
i387-tdep.c: In function ‘i387_supply_fsave’:
i387-tdep.c:9:1: warning: assuming signed overflow does not occur when assuming
that (X + c) >= X is always true [-Wstrict-overflow]
 }
 ^
i387-tdep.c:6:3: warning: assuming signed overflow does not occur when assuming
that (X + c) >= X is always true [-Wstrict-overflow]
   for (i = st0_regnum; i < st0_regnum + 16;)
   ^
>From gcc-bugs-return-463822-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Oct 11 07:13:47 2014
Return-Path: <gcc-bugs-return-463822-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18928 invoked by alias); 11 Oct 2014 07:13:47 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18905 invoked by uid 48); 11 Oct 2014 07:13:44 -0000
From: "ibuclaw at ubuntu dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/63510] Wrong line number in Wstrict-overflow message
Date: Sat, 11 Oct 2014 07:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ibuclaw at ubuntu dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63510-4-2Tgyhh5vXn@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63510-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63510-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg00843.txt.bz2
Content-length: 238

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc510

--- Comment #1 from Iain Buclaw <ibuclaw at ubuntu dot com> ---
> Reduced to the following code, which shows both the correct and wrong line.

But perhaps the wrong column information.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-10 23:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-11  7:12 [Bug c/63510] New: Wrong line number in Wstrict-overflow message ibuclaw at ubuntu dot com
2014-10-11 14:34 ` [Bug middle-end/63510] " manu at gcc dot gnu.org
2015-01-07 15:00 ` gang.chen.5i5j at gmail dot com
2015-01-09 21:42 ` gang.chen.5i5j at gmail dot com
2015-08-04 14:01 ` ibuclaw at ubuntu dot com
2015-08-04 16:45 ` manu at gcc dot gnu.org
2015-08-05 14:49 ` xili_gchen_5257 at hotmail dot com
2015-08-25 22:39 ` gang.chen.5i5j at gmail dot com
2015-08-29  0:17 ` gang.chen.5i5j at gmail dot com
2015-08-29 13:00 ` gang.chen.5i5j at gmail dot com
2015-09-04  3:33 ` gang.chen.5i5j at gmail dot com
2015-10-24 16:33 ` gang.chen.5i5j at gmail dot com
2024-04-10 23:16 ` pinskia at gcc dot gnu.org

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 read-only IMAP folder(s) and NNTP newsgroup(s).