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

* [Bug libc/200] missing parens in define
  2004-06-02 23:03 [Bug libc/200] New: missing parens in define miles at cray dot com
@ 2004-06-08 15:25 ` jakub at redhat dot com
  2004-08-10  2:02 ` drepper at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at redhat dot com @ 2004-06-08 15:25 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-06-08 15:25 -------
There are only 2 users of this macro and neither of them is doing something like
this.  Using () around the argument would be just a partial change anyway,
side-effects still cannot be used in the macro arguments.
gmp-impl.h is not an installed header.

-- 


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

* [Bug libc/200] missing parens in define
  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
  1 sibling, 0 replies; 3+ messages in thread
From: drepper at redhat dot com @ 2004-08-10  2:02 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2004-08-10 02:02 -------
As Jakub said, this is nothing which must be of concern to anybody outside glibc.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


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