When I run this program:
------------------------------------------------------------ #include<stdio.h>
int H(int X, int Y) { return X*Y; } int main() { int A,B,C; A=B=C=100000; A+=H(B,C); printf("\nA = %d\n",A);
return 0; } ------------------------------------------------------------
I always get: 1410165408, irrespective of whether I use O0 or O2.
I am using:
------------------------------------------------------------
bash-2.05b$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
bash-2.05b$
------------------------------------------------------------
So, I am not able to reproduce the original complaint itself....
Sriharsha.
-- ***************************** * Sriharsha Vedurmudi * Software Engineer * * Redpine Signals Inc. * Gate #395, Plot 87,88 * Sagar Society, Road #2, * Banjara Hills, * Hyderabad - 500 034 * www.redpinesignals.com * * +91-40-23559911 (Office) * +91-9849133133 (Mobile) *****************************