avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] How to (efficeiently !!!) test a bit withinamulti-byt


From: Dave Hansen
Subject: Re: [avr-gcc-list] How to (efficeiently !!!) test a bit withinamulti-byte intege
Date: Fri, 04 Nov 2005 09:14:54 -0500

From: Vincent Trouilliez <address@hidden>

[...]

About the -Os flag, I noticed this morning that it managed MASSIVE code
size reduction ! SO far I had been using just -O (I guess that means no
particular optimisation ?), and the program is about 13KB in size. With
-Os, it's only 10KB !!!  Sadly, for some reason, when compiled with this
flag, my program misbehaves badly (I get massive corruption of the LCD
display) !! Too bad... :o(

I believe it was Gerry Weinburg who once wrote that "optimization is easy -- if you don't have to get the right answer."

I suspect, though, that some of your code might be relying on behavior that's not guaranteed (e.g., the value of an uninitialized variable) rather than a bug in the optimizer.

Regards,

  -=Dave






reply via email to

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