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: Joerg Wunsch
Subject: [avr-libc-dev] [bug #30363] _delay_xx() functions in <util/delay.h> are broken
Date: Mon, 19 Jul 2010 05:27:35 +0000
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.10) Gecko/20100713 Firefox/3.5.10

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

> But should <util/delah.h> be using autonconfig information directly
> to determine if __built_avr_delay_cycles() is available?

That's the way it is designed right now.

> Why not require it to be told this information at compile time (by
> <avr/builtins.h> ) and in the absence of being told whether these
> functions are built in, assume that they are not?

User won't use it then, ever.  Who do you think would ever define that
macro then?  The user in his Makefile?  Nope, users assume things are
working out of the box.  It's already hard enough to teach them they
have to configure -mmcu=XXX and -DF_CPU=XXX in their Makefiles
(because this information can _only_ be supplied by the user), I don't
trust them they would start investigate whether their compiler
implements a certain feature, and then set a macro based on that.

> Why can't <util/delay.h> include <avr/builtins.h> directly?

What would be gained by this, except of adding the overhead for
opening one more file?  Both simply use the same auto-configured
macro.

> The ideal fix for something like this is to fix GCC itself to create
> defines for all built in functions.

I whished that, too, although I also think it's going to be a
pollution of the macro name space.  Anyway, moot point, these macros
aren't there, and we've already got a hard time convincing the AVR-GCC
maintainers that we really want __builtin_avr_delay_cycles().  If we
extend that to first discussing that each builtin also ships with an
accompanying macro (which would then extend beyond the AVR-specific
feature set, thus require a generic GCC policy decision), we meet
again here in 3...5 years.  I didn't want to wait that long, sorry.

Anyway, if you've got the energy to push such a policy change through
the GCC folks, I'll promise you avr-libc will be the first to use it
then.


    _______________________________________________________

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]