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

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

[avr-libc-dev] [bug #32650] Missing include in util/delay.h


From: Alastair D'Silva
Subject: [avr-libc-dev] [bug #32650] Missing include in util/delay.h
Date: Fri, 04 Mar 2011 23:42:47 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

Follow-up Comment #3, bug #32650 (project avr-libc):

Please note that this error occurs when the header is included,  regardless of
whether a constant or a variable is passed (in my case, it was actually a
constant), even to the extent that if no calls are made to the delay
functions, and the header is included, it fails.

The attached trivial testcase will produce the following error using GCC
4.5.2:

make all 
Building file: ../Testcase.cpp
Invoking: AVR C++ Compiler
avr-g++ -I"A:eclipsemhvlib" -Wall -Os -fpack-struct -fshort-enums
-ffunction-sections -fdata-sections -funsigned-char -funsigned-bitfields
-fno-exceptions -mmcu=atmega1280 -DF_CPU=16000000UL -MMD -MP -MF"Testcase.d"
-MT"Testcase.d" -c -o"Testcase.o" "../Testcase.cpp"
In file included from ../Testcase.cpp:3:0:
c:mhvavrtoolsbin../lib/gcc/avr/4.5.2/../../../../avr/include/util/delay.h: In
function 'void _delay_ms(double)':
c:mhvavrtoolsbin../lib/gcc/avr/4.5.2/../../../../avr/include/util/delay.h:149:42:
error: 'fabs' was not declared in this scope
c:mhvavrtoolsbin../lib/gcc/avr/4.5.2/../../../../avr/include/util/delay.h:149:43:
error: 'ceil' was not declared in this scope
c:mhvavrtoolsbin../lib/gcc/avr/4.5.2/../../../../avr/include/util/delay.h: In
function 'void _delay_us(double)':
c:mhvavrtoolsbin../lib/gcc/avr/4.5.2/../../../../avr/include/util/delay.h:226:42:
error: 'fabs' was not declared in this scope
c:mhvavrtoolsbin../lib/gcc/avr/4.5.2/../../../../avr/include/util/delay.h:226:43:
error: 'ceil' was not declared in this scope
make: *** [Testcase.o] Error 1

(file #22840)
    _______________________________________________________

Additional Item Attachment:

File name: Testcase.cpp                   Size:0 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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