Boost logo

Boost Users :

Subject: Re: [Boost-users] C++03 unique_ptr emulation
From: Sergey Skorokhodov (ucayalyfish_at_[hidden])
Date: 2009-03-08 04:42:11


Hi,

Howard Hinnant wrote:
> On Mar 6, 2009, at 9:30 AM, Sergey Skorokhodov wrote:
>
>> Hi,
>>
>> Howard Hinnant wrote:
>>> I've put up a new version of an C++03 emulated unique_ptr here:
>>
>> <skip>
>>
>> I tried to use this implementation with MSVC 7.1 sp1 and 9.0 sp1 and
>> encounter ICE in the following code:
>
> Sorry I don't have MSVC 7.1 to test against. Fwiw I dropped your code
> (copy/paste) into g++ 4.0 and it compiled, linked and ran without any
> memory leak or other memory related problems.
>

I've tried boost 1.38 with all compilers, available on my system:
msvc-7.1, msvc-9.0 and mingw gcc 4.3.3 (source up_tst.cpp). Here is outputs:

mingw gcc 4.3.3:

compiled successfully

msvc-7.1:
C:\tst>cl /EHsc /Zm2000 /Iboost_1_38_0 up_tst.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

up_tst.cpp
c:\tst\up_tst.cpp(62) : fatal error C1001: INTERNAL COMPILER ERROR
                 (compiler file
'f:\vs70builds\6030\vc\Compiler\Utc\src\P2\ehexcept.c', line 1348)
  Please choose the Technical Support command on the Visual C++
  Help menu, or open the Technical Support help file for more information

msvc-9.0:
C:\tst>cl /EHsc /Zm2000 /Iboost_1_38_0 up_tst.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01
for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

up_tst.cpp
c:\tst\up_tst.cpp(62) : fatal error C1001: An internal error has
occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\ehexcept.c', line 1454)
  To work around this problem, try simplifying or changing the program
near the locations listed above.
Please choose the Technical Support command on the Visual C++
  Help menu, or open the Technical Support help file for more information

So, it really seems to be msvc bug. :( Unfortunately, I don't feel to be
qualified enough to think of a workaround. :(

<skip>

-- 
Sergey Skorokhodov

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