Boost logo

Boost Users :

From: Howard Gardner (hgardner_at_[hidden])
Date: 2006-04-21 17:28:35


Doug Gregor wrote:
> On Apr 21, 2006, at 8:26 AM, Howard Gardner wrote:
>
>> /*
>> This doesn't work. Is it supposed to?
>>
>> If "broken" returns a "ret< int >" or an "x", then it does seem to
>> work right.
>>
>> In case it's a known compiler issue, I'm using:
>>
>> Comeau C/C++ 4.3.3 (Aug 10 2003 15:39:53) for _MS_WINDOWS_x86_Beta8
>
> It works for me on GCC 4.0.1, except that I need to change <ostream>
> to <iostream> (GCC bug, I believe). What error are you getting?
>
> Doug

It ought to print:

42

It actually prints:

2292991

I can deliberately change what's on the stack, and it will print
a different value. It looks like an uninitialized variable bug.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net