Code::Blocks Forums

User forums => Help => Topic started by: Mo3bius on February 09, 2009, 12:24:34 am

Title: Compiler Optimizations disabled
Post by: Mo3bius 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
Title: Re: Compiler Optimizations disabled
Post by: Jenna 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