Marin D wrote:

> > Try using `gcc -S' to compile to assembler, both with and without
> > optimisation, then compare the results.
> > 
> 
> Ok. I did it. I have *no* assembly knowledge so pleaz pardon my ignorance.
> As u may see the only difference is that the O1 optimized code addresses
> the 1st local variable pResTemp with -16(%ebp) instead of -4(%ebx). 
> 
> Why? 

No idea. The layout of local variables isn't specified, so there could
be any number of factors which the compiler takes into account when
determining the layout.

There isn't anything here to provide any clues as to what's going
wrong. Does it work if you assign the result of PQgetvalue to a
temporary variable, i.e.

        s = PQgetvalue(pResTemp,0,1);
        sscanf(s,"%ld", &lTotalInc);

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to