Re: Incompatible behavior -O0, -O3, std::cout

2005-11-18 Thread Andreas Schwab
Andrew Pinski <[EMAIL PROTECTED]> writes: >> >> Hello Everyone >> >> I noticed some thing strange recently. This code (under g++ (GCC) 3.2.3 >> 20030502 (Red Hat Linux 3.2.3-53)), provides this output with -O0 flag: >> int main(int argc, char **argv) { >> std::cout << f1() << f2() << std::end

Re: Incompatible behavior -O0, -O3, std::cout

2005-11-18 Thread Pankaj Gupta
Thanks Andrew. That answers it. Pankaj On Fri, 18 Nov 2005, Andrew Pinski wrote: Hello Everyone I noticed some thing strange recently. This code (under g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53)), provides this output with -O0 flag: int main(int argc, char **argv) { std::cout << f1

Re: Incompatible behavior -O0, -O3, std::cout

2005-11-18 Thread Andrew Pinski
> > Hello Everyone > > I noticed some thing strange recently. This code (under g++ (GCC) 3.2.3 > 20030502 (Red Hat Linux 3.2.3-53)), provides this output with -O0 flag: > int main(int argc, char **argv) { > std::cout << f1() << f2() << std::endl; > } > > > I'm pretty sure that I am depending

Incompatible behavior -O0, -O3, std::cout

2005-11-18 Thread Pankaj Gupta
Hello Everyone I noticed some thing strange recently. This code (under g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53)), provides this output with -O0 flag: -f2() called -f1() called- 12 And with -O3 flag: -f1() called- -f2() called 12 Here's the code: #include #include int f1() { fp