[PATCH] Fix undefined behaviour in lrint,llrint.

Howland Craig D (Craig) howland@LGSInnovations.com
Fri Jul 30 19:16:00 GMT 2010

As I had pointed out in the email thread concerning (possible) undefined
shift behavior in lround and llround
(http://sourceware.org/ml/newlib/2010/msg00437.html), lrint and llrint
both have the same potential issue.  Attached is a patch--based on
Dave's edits of lround--that fixes the problem.  The patch also corrects
a minor typo in the comments for the previous lround and llround edits.
Change log entry in the second attached file (since my mailer typically
mangles them when in the email body).

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lrint_patch.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20100730/0f307921/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog.lrint
Type: application/octet-stream
Size: 376 bytes
Desc: ChangeLog.lrint
URL: <http://sourceware.org/pipermail/newlib/attachments/20100730/0f307921/attachment.obj>

More information about the Newlib mailing list