avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Definition of putchar/getchar causes code growth


From: Dave N6NZ
Subject: Re: [avr-libc-dev] Definition of putchar/getchar causes code growth
Date: Fri, 04 Jul 2008 09:37:05 -0700
User-agent: Thunderbird 1.5 (X11/20051201)

Bernard Fouché wrote:
IMHO the 'stock' distribution of avr-gcc/avr-libc should be tuned to give results as good (hence small) as possible with -Os since most of the traffic in the mailing lists seems code size oriented, so I have a point of view similar to Wouter.

I'm with you on this one, and agree with your argument. -Os is the "common watering hole", so the libraries should bias that way also.


Or have link options like '-lprintf_min' for features that would be compiled in different ways to meet the user goals.

This one make me squinty-eyed. In a former life I managed a group responsible for product validation of a commercial C/C++ compiler, so from that experience certain concepts wake me up from the deepest nap.

Every compilation switch multiplies the size of the test space. Now of course there are times when it makes sense to add compilation switches -- like floating point support in printf -- but there needs to be a Really Good Reason. I don't see that putc() rises to the level of Really Good Reason. I think there needs to be a clear and dramatic payoff in either code size or performance to justify a switch, or evidence that users are commonly replacing certain functions with their own versions in order to justify the added testing complexity.

IMHO: reliable, small, tunable, in that order.

-dave




reply via email to

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