public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/200] New: missing parens in define
@ 2004-06-02 23:03 miles at cray dot com
  2004-06-08 15:25 ` [Bug libc/200] " jakub at redhat dot com
  2004-08-10  2:02 ` drepper at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: miles at cray dot com @ 2004-06-02 23:03 UTC (permalink / raw)
  To: glibc-bugs

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.


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

end of thread, other threads:[~2004-08-10  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-02 23:03 [Bug libc/200] New: missing parens in define miles at cray dot com
2004-06-08 15:25 ` [Bug libc/200] " jakub at redhat dot com
2004-08-10  2:02 ` drepper at redhat dot com

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).