Exceptions don't work in FreeBSD port of gdc

Dmitry Marakasov amdmi3 at amdmi3.ru
Sat Jun 21 04:36:56 PDT 2008


Exceptions don't work in FreeBSD port of gdc, throw leads straight to abort():

% gdc --version
gdc (GCC) 4.1.3 20071105 (prerelease   (gdc 0.24, using dmd 1.020))
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% cat test.d 
import std.stdio;

void main() {
        try  {
                throw new Exception("test");
        } catch (Exception e) {
        }
}
% gdc test.d 
% ./a.out 
[1]    98829 abort      ./a.out

I'm not very familiar with D and gdc, so I don't have an idea what may be the cause. There's nothing related to exceptions in the port as well. So how do I enable them?
Please feel free to ask for any additional info.


More information about the D.gnu mailing list