You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2007/03/01 18:26:47 UTC

Re: svn commit: r513406 - /incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp

faridz@apache.org wrote:
> Author: faridz
> Date: Thu Mar  1 09:01:07 2007
> New Revision: 513406
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=513406
> Log:
> 2007-03-01  Farid Zaripov <Fa...@kyiv.vdiweb.com>
> 
> 	* 18.limits.traps.cpp (test_trap): New function to avoid MSVC error C2712:
> 	Cannot use __try in functions that require object unwinding;
> 	(test_traps) Used test_trap() function.

Strange. I'm pretty sure the code used to compile with MSVC
(otherwise why would it contain MSVC-specific hackery?) Maybe
it compiled with 7.0 and got broken by 7.1. Good to know we
can still count on Microsoft to break compatibility, even
between minor compiler versions.

Here's the MSDN info on the error:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/C2712.asp


[...]
> +template <class numT>
>  numT test_traps (numT, int lineno, bool)
>  {
>      static const char* const tname = rw_any_t (numT ()).type_name ();
> @@ -138,6 +152,7 @@
>              // Windows SEH hackery
>              trapped = true;
>          }
> +//        test_trap (one, zero, result, trapped);

You didn't really mean to comment this out, did you?

Martin