|
From: | Mike Young |
Subject: | Re: [avr-gcc-list] Help, Compiler ignores some part of the function! |
Date: | Fri, 2 Dec 2005 17:40:29 -0600 |
I would think the lst file is in error rather than the
compiled result. (How else can we continue on with any sanity?) It's not unusual
for the compiler to inline static functions, but that likely isn't the situation
here.
Maybe try rewriting the condition as an extern (as opposed to
static) function: If nothing else, it will clean up the error value
calc.
if (IsInRange(errVal, lowVal,
HiVal))
{ ... }
else
{ ...}
Turning off optimization won't give you meaningful information
about optimized assembler.
Try adding a debug print statement in the true and false
sections. (Flash a light, bleep a bleeper, write to the usart, ...)
|
[Prev in Thread] | Current Thread | [Next in Thread] |