#874 Extra scoping on destructor


%inline %{
class MCConvergenceList

example.i:8: Warning(504): Function ~MCConvergenceList must have a return type.

Constructors and methods in SWIG allow this extra unnecessary scoping and the same fix needs applying to destructors.


  • William Fulton

    William Fulton - 2007-11-22

    Logged In: YES
    Originator: YES

    I know it is not ISO C++, but this extra scoping is a common programming error which unfortunately many compilers accept. I also think I know I can fix it so unless anyone strongly objects to me fixing it, I will probably implement a fix soon.

  • Olly Betts

    Olly Betts - 2007-12-02

    Logged In: YES
    Originator: NO

    I don't particularly care if this is accepted or rejected - I just remembered that this had been reported before, so dug up the previous report in case it was relevant.

    If this is currently accepted for ctors and normal methods, but not destructors, it would be better to be consistent about it.

  • William Fulton

    William Fulton - 2007-12-03
    • status: open --> closed-wont-fix
  • William Fulton

    William Fulton - 2007-12-03

    Logged In: YES
    Originator: YES

    I'm also don't really care if this is fixed or not. It also proved too difficult to fix in the short time I spent on it. Unexpectedly for me, and unfortunately, it requires modification of the parser which is not my strong point. As the syntax is not ISO C++ and is non-trivial for me to fix, I'm closing the bug. Patches will be accepted if anyone else finds a fix.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks