December 12, 2004 extern (C) member function causes internal compiler error | ||||
---|---|---|---|---|
| ||||
This code cause the following internal compiler error on DMD .106 on linux (Fedora Core 2) with gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7) class Foo { extern (C) static void staticCFunc() { Foo.func(); } void func() {} } [baron@athe trunk]$ dmd -c test2.d -I/usr/local/include/D/phobos Internal error: e2ir.c 814 Now obviously calling func() without an object is wrong, but I don't think it should cause a compiler error. :) If in staticFunc() you supply the call to func() with an object, it compiles well and good. Also, if the static function is external to the class, the compiler correctly reports a compile error and exits cleanly. Chris Newton |
December 12, 2004 Re: extern (C) member function causes internal compiler error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Newton | this has been fixed since dmd-0.107, the current version is dmd-0.109 Thomas "Chris Newton" <redshodan@yahoo.com> schrieb im Newsbeitrag news:pan.2004.12.12.11.25.40.211547@yahoo.com... > This code cause the following internal compiler error on DMD .106 on linux > (Fedora Core 2) with gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7) > > class Foo > { > extern (C) static void staticCFunc() > { > Foo.func(); > } > > void func() {} > } > > > [baron@athe trunk]$ dmd -c test2.d -I/usr/local/include/D/phobos Internal error: e2ir.c 814 |
Copyright © 1999-2021 by the D Language Foundation