NetBSD Problem Report #1221

From gnats  Wed Jul 12 22:46:34 1995
Received: from beauty.mcl.ucsb.edu (root@beauty.mcl.ucsb.edu [128.111.148.107]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id WAA15229 for <gnats-bugs@gnats.netbsd.org>; Wed, 12 Jul 1995 22:46:33 -0400
Message-Id: <199507130248.TAA13734@blurg.blurg.ucsb.edu>
Date: Wed, 12 Jul 1995 19:48:24 -0700
From: uhenric@mcl.ucsb.edu
Reply-To: uhenric@mcl.ucsb.edu
To: gnats-bugs@gnats.netbsd.org
Subject: Compiler warning from strtoq.c
X-Send-Pr-Version: 3.2

>Number:         1221
>Category:       lib
>Synopsis:       gcc2.7.0 warns of integer overflow in strtoq.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 12 22:50:01 +0000 1995
>Closed-Date:    Thu Jan 04 23:51:53 +0000 1996
>Last-Modified:  Thu Jan 04 23:52:28 +0000 1996
>Originator:     Henric Jungheim
>Release:        July 12th <NetBSD-current source date>
>Organization:

>Environment:

System: NetBSD blurg.blurg.ucsb.edu 1.0A NetBSD 1.0A (HENRIC) #26: Wed Jul 12 02:30:56 PDT 1995 henric@blurg.blurg.ucsb.edu:/usr/src/sys/arch/amiga/compile/HENRIC amiga
A4000/040 running gcc2.4.5 compiled kernel and gcc2.7.0 for the rest

>Description:

gcc2.7.0 give the following warning when compiling strtoq.c:
cc -O -DNLS -DYP -DLIBC_SCCS -DSYSLIBC_SCCS -I/usr/src/lib/libc/include -D__DBIN
TERFACE_PRIVATE -DPOSIX_MISTAKE -DFLOATING_POINT  -c -p /usr/src/lib/libc/stdlib
/strtoq.c -o strtoq.po
/usr/src/lib/libc/stdlib/strtoq.c: In function `strtoq':
/usr/src/lib/libc/stdlib/strtoq.c:108: warning: integer overflow in expression

The line in question reads:
cutoff = neg ? -(u_quad_t)QUAD_MIN : QUAD_MAX;


>How-To-Repeat:
>Fix:

Removing the minus sign might help... it has no effect anyway (except for
the warning message).
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Thu Jan 4 18:51:53 EST 1996 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.