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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Joerg Wunsch <joerg_wunsch>
Submitted:  Fri 09 Feb 2007 10:35:33 AM UTC
   
 
Category:  Header Severity:  2 - Minor
Priority:  7 - High Item Group:  Header files
Status:  Fixed Assigned to:  joerg_wunsch
Percent Complete:  0% Open/Closed:  Closed
Release:  None Fixed Release:  None

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>
Group administrator
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>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-13 joerg_wunsch StatusNone Fixed
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2007-05-06 arcanum Priority9 - Immediate 7 - High
    2007-03-25 arcanum Priority5 - Normal 9 - Immediate

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code