[Insight-users] Wrapping warnings on .NET

Charl P. Botha c . p . botha at ewi . tudelft . nl
25 Jul 2003 15:36:54 +0200


On Fri, 2003-07-25 at 15:17, Miller, James V (Research) wrote:
> I think the recent changes to CableSwig.cxx are causing an enormous
> number of warnings on Visual Studio .NET (not 2003).  The warnings are
> of the type
>  
> 
> wrap_vnl_vectorPython.cxx(1301) : warning C4297:
> '_wrap_vnl_vector_uchar_data_block__SWIG_1' : function assumed not to
> throw an exception but does

Urgh!  That because of the catch(...){throw;} clause at the very end. 
This rethrows the exception if it wasn't handled and is automatically
added by the existing swig code.

Technically, this shouldn't be a warning... if there is no throw()
specifier for a method/function, it is allowed to throw any exceptions,
at least as far as my ISO C++ 1998 specification says.

Do you have any other ideas?  Is the compiler just broken?  In that
case, I guess the best thing to do is just to deactivate that warning.

> The function is extern "C" and /EHc was specified
> 
> wrap_vnl_vectorPython.cxx(1294) : warning C4101: '_e' : unreferenced
> local variable

This  I don't get... the _e is ALWAYS used by the subsequent
SWIG_exception(SWIG_RuntimeError, _e.what());  Could you perhaps post
the few lines of code before and after your line 1294? 

Thanks,
Charl

-- 
charl p. botha http://cpbotha . net/ http://visualisation . tudelft . nl/