Author Topic: Compiler Optimizations disabled  (Read 11960 times)

Mo3bius

  • Guest
Compiler Optimizations disabled
« on: February 09, 2009, 12:24:34 am »
Hi,
I'm trying to use C::B for a AVR-Board. Until now I managed to set the right path to the avr-gcc file.

After that I tried to build a simple programm and it worked. But if I add this line : "#include <util/delay.h>" I get the Build message:

# warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"

The Programm seems to work, but why do I get this warning?

Mfg Mo3bius

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler Optimizations disabled
« Reply #1 on: February 09, 2009, 12:37:40 am »
This warning should go away, if you use any optimization level higher than "-O0".

The warning is from "util/delay.h" :
Quote
#ifndef __OPTIMIZE__
# warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
#endif