bugAVR C Runtime Library - Bugs: bug #19009, Make <util/delay.h> issue a...

 
 

bug #19009: Make <util/delay.h> issue a warning when optimizations are turned off

Submitted by:  Joerg Wunsch <joerg_wunsch>
Submitted on:  Fri 09 Feb 2007 10:35:33 AM UTC  
 
Category: HeaderSeverity: 2 - Minor
Priority: 7 - HighItem Group: Header files
Status: FixedPercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 09 Feb 2007 10:42:22 AM UTC, comment #1:

It might be worth considering whether throwing possible
unfounded warnings (about F_CPU and/or missing optimization)
to those people could be avoided who are not interested in the
_delay_us() and _delay_ms() functions at all but only in
_delay_loop_1() and _delay_loop_2(). These two functions have
no special requirements (like optimization).

One option for this is to completely disable _delay_ms() and
delay_us() (including their checks for F_CPU and __OPTIMIZE_)
based on the user predefining a macro, say _NO_DELAY_US_DELAY_MS
or such before including <util/delay.h>.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Fri 09 Feb 2007 10:35:33 AM UTC, original submission:

Many users attempt to use the inline functions from <util/delay.h>
but forget to enable optimizations in the compiler, leading to
bloated floating-point calculations being performed in the
target AVR rather than the compiler.

Have that header file issue a warning in that case, based on
GCC's _OPTIMIZE_ macro.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by arcanum (Updated the item)
  • -unavailable- added by joerg_wunsch (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 May 2007 09:26:24 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Sun 06 May 2007 03:53:35 PM UTCarcanumPriority9 - Immediate=>7 - High
    Sun 25 Mar 2007 01:01:09 AM UTCarcanumPriority5 - Normal=>9 - Immediate

    Back to the top


    Powered by Savane 3.1-cleanup1