This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/200] New: missing parens in define
- From: "miles at cray dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 2 Jun 2004 23:03:17 -0000
- Subject: [Bug libc/200] New: missing parens in define
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
In stdlib/gmp-impl.h, there is a #define of the form:
#define ABS(x) (x >= 0 ? x : -x)
It should be
#define ABS(x) ((x) >= 0 ? (x) : -(x))
Otherwise, ABS(n+1) will given an incorrect answer for most negative numbers.
--
Summary: missing parens in define
Product: glibc
Version: 2.3.2
Status: NEW
Severity: minor
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: miles at cray dot com
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=200
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.