[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Broken strtoul() and ldiv()

From: Geoffrey Wossum
Subject: [avr-gcc-list] Broken strtoul() and ldiv()
Date: Fri, 8 Mar 2002 13:58:26 -0600 (CST)


All recent (and probably old versions, too) of avr-libc have broken
strtoul.  I always get 0xffffffff out.  The problem appears to be that
ldiv() is broken.  If I change the conditionals in strtoul() around so
that it uses '/' and '%' instead of ldiv(), it works.  This leads me to
believe that ldiv() is broken.

Checking the ldiv() source file, it just jumps to __divmodsi4 in libgcc.
Perhaps either this isn't the right thing to do, or __divmodsi4 is broken.

BTW, I'm using the BSD version of strtoul(), not the GNU.  The GNU one
problem doesn't work either because it uses ldiv() as well.

Anyone else observe this problem or know what's going on?

Geoffrey Wossum
Project AKO - http://ako.sf.net

avr-gcc-list at http://avr1.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]