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::endl; >> } >> >> >> I'm pretty sure that I am depending on an undefined behavior here, but >> maybe you guys would want to have a deeper look at this. > > > Yes are you dependening on undefined behavior.
Actually, it is unspecified behavior. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."