On 3/3/2011 10:04 PM, Weddington, Eric wrote:

-----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.
I suppose. Has this changed in the latest version of the _delay_* routines? I don't recall needing this before.

Stu Bell

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

Reply via email to