avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: Peter Jansen
Subject: Re: [avr-gcc-list] Broken strtoul() and ldiv()
Date: Mon, 11 Mar 2002 10:15:34 +1100

Klaus,

> > 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?
> 
> Yes, i reported this bug 2 month ago, but really nothing happens... :-(
> I thought that nobody else use this funtions in avr code.
> I wrote my own strtoi strtob (to int/byte) i really need no longs
> for my avrs.

I have seen this too, but have not had a need to fix it, do you have a
fix for avr-libc or gcc-3.0.4?


-- 
Peter Jansen
KlaxonIQA (formally Smart Container)
Level 1, NIC Building
Garden St
Eveleigh
NSW       1430
AUSTRALIA
Ph 02 9209 4017
avr-gcc-list at http://avr1.org



reply via email to

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