is 'app' reserved?

Yan Seiner yan@seiner.com
Thu Aug 23 17:12:00 GMT 2007


I've run across a really bizarre problem.

I am cross-compiling using gcc 3.4.4.

I've run into a really bizarre situation:

given: step = 1, _P_finc = 0.01, fs->value = ""

    float app, t, u, diff;

    if (fc->_P_fix < 0) {
            t = strtof(fs->value,(char **)NULL);
            u = t + (((float)step) * fc->_P_finc);
        printf("%f %f %f %d %f\n",t,u,fc->_P_finc,step,step * fc->_P_finc);
        }

produces the expected result, with t being 0.01.

    float app, t, u, diff;

    if (fc->_P_fix < 0) {
            t = strtof(fs->value,(char **)NULL);
            app = t + (((float)step) * fc->_P_finc);
        printf("%f %f %f %d %f\n",app,u,fc->_P_finc,step,step * 
fc->_P_finc);
        }

results in app being 0.  I've tweaked all sorts of things, but it seems 
that app is never assigned a value...

WTF?

--Yan

-- 
  o__
  ,>/'_          o__
  (_)\(_)        ,>/'_          o__
Yan Seiner      (_)\(_)         ,>/'_   o__     o__
Certified Personal Trainer     (_)\(_)  ,>/'_   ,>/'_
Licensed Professional Engineer         (_)\(_) (_)\(_)

Linux stuff has made big progress over the competition. When things sit and don't start right away, we have a watch, and those poor guys have to settle for an hourglass.



More information about the Gcc-help mailing list