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

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

[avr-libc-dev] [bug #30363] _delay_xx() functions in <util/delay.h> are


From: Bill Perry
Subject: [avr-libc-dev] [bug #30363] _delay_xx() functions in <util/delay.h> are broken
Date: Fri, 16 Jul 2010 19:07:18 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.19) Gecko/2010040116 Ubuntu/9.04 (jaunty) Firefox/3.0.19

Follow-up Comment #1, bug #30363 (project avr-libc):

As a followup comment

The define define value for __HAS_DELAY_CYCLES
in the new <util/delah.h> seems backwards.

While it may be ok to set it value to 1 by default in
builtins.h this does not seem appropriate in <util/delay.h>

For backward compability with the older compilers,
<util/delay.h> should not assume the presence of the built in
delay cycles functions.

To be fully backward compatible with the older compilers
the <util/delay.h> needs to define it like this:

#ifndef __HAS_DELAY_CYCLES
#define __HAS_DELAY_CYCLES 0
#endif 

The definition in builtins.h should be different by setting
__HAS_DELAY_CYCLES to 1 as that is the file that defines the compilers builtin
functions, in the absence of the compiler doing itself (like the MIPS version
of GCC does)

--- bill
 

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?30363>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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