[Insight-users] Wrapping warnings on .NET
Miller, James V (Research)
millerjv at crd . ge . com
Fri, 25 Jul 2003 12:17:26 -0400
Removing those lines (and few around line 251) seem to have removed the
warnings.
I have an anonymous checkout of CableSwig. Does someone else want to check
this in?
> -----Original Message-----
> From: Bill Hoffman [mailto:bill . hoffman at kitware . com]
> Sent: Friday, July 25, 2003 11:13 AM
> To: Charl P. Botha; Miller, James V " "(Research)
> Cc: Insight-users (E-mail)
> Subject: Re: [Insight-users] Wrapping warnings on .NET
>
>
> I think the problem is here:
> #ifdef __cplusplus
> extern "C" {
> #endif
> static PyObject *_wrap_itkVectorD3_GetNorm(PyObject *self,
> PyObject *args) {
> ...
> #ifdef __cplusplus
> }
> #endif
>
>
> I am not sure why swig is doing this.
> Looks like a change in
> CableSwig/SWIG/Source/Modules1.1/python.cxx should
> be able to remove the extern "C" code.
>
> --- around line 233 ----
> Printf(f_wrappers,"#ifdef __cplusplus\n");
> Printf(f_wrappers,"extern \"C\" {\n");
> Printf(f_wrappers,"#endif\n");
>
>
> Can you think of why this would have to be extern "C" ??
> Can you try the change Jim, and see if it works?
>
> -Bill
>
> At 10:57 AM 7/25/2003, Bill Hoffman wrote:
> >Well, it is saying that the function is extern "C".
> >I don't think C functions are allowed to throw exceptions are they?
> >
> >-Bill
> >
> >
> >At 09:36 AM 7/25/2003, Charl P. Botha wrote:
> >>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/
> >>_______________________________________________
> >>Insight-users mailing list
> >>Insight-users at itk . org
> >>http://www . itk . org/mailman/listinfo/insight-users
> >
> >
> >
> >_______________________________________________
> >Insight-users mailing list
> >Insight-users at itk . org
> >http://www . itk . org/mailman/listinfo/insight-users
>
>
>