Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}? [RSS Feed]

#1 Nov. 19, 2005 11:17:22

Russell S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?


Daniel O'Connor wrote:On Sat, 19 Nov 2005 19:20, Russell Shaw wrote:I'd rather use something like

#define _USE_FULL_ITOA
#include <stdlib.h>

... itoa(x, s, 13);That won't save any library space tho. If the reduced version is faster
and saves a lot of space, then it could be worthwhile having a compile-time
option.It will if it's implemented correctly, eg in stdlib.h

#ifdef _USE_FULL_ITOA
#define itoa _itoa_full
#else
#define itoa _itoa_small
#endifEven if functions are unused in a library that is linked, don't they still
end up in the final binary?


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Nov. 19, 2005 13:44:26

Russell S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?


Daniel O'Connor wrote:On Sat, 19 Nov 2005 21:04, Russell Shaw wrote:It will if it's implemented correctly, eg in stdlib.h

#ifdef _USE_FULL_ITOA
#define itoa _itoa_full
#else
#define itoa _itoa_small
#endifEven if functions are unused in a library that is linked, don't they still
end up in the final binary?No, they don't, otherwise you'd run out of flash space all the time :)I never noticed, because i always write my own minimal versions of things.http://lists.nongnu.org/archive/html/avr-gcc-list/2002-07/msg00063.htmlhttp://lists.nongnu.org/archive/html/avr-gcc-list/2002-07/msg00053.html_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

  • Root
  • » AVR-GCC
  • » [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}? [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support