> -----Original Message-----
> From: avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org
> [mailto:avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org] On
> Behalf Of Stu Bell
> Sent: Thursday, March 03, 2011 9:49 PM
> To: Alastair D'Silva; Stu Bell; avr-libc-dev@nongnu.org
> Subject: [avr-libc-dev] [bug #32650] Missing include in util/delay.h
> 
> Follow-up Comment #1, bug #32650 (project avr-libc):
> 
> The math library is not needed if you do not pass a variable to _delay_ms
> (or
> _delay_us) as the instructions to avr-libc warn you not to do.  Only
> constants
> can be supplied to the delay functions.
> 
> In fact, following your path will bring in the floating-point library
> unnecessarily and will cause the delay functions to generate far more
> delay
> that requested.

Remember, just including a header file (like math.h) does not mean that the 
library is automatically linked in.

The library is only linked in if the linker detects that it is needed. And even 
then it doesn't pull in the entire library, just the module that is needed.

_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to