BindBC / bindbc-sdl

Static & dynamic D bindings to SDL and the SDL_* libraries, compatible with BetterC, @nogc, and nothrow.
Boost Software License 1.0
88 stars 23 forks source link

Modified for compilation compatibility with GNU GDC compiler #61

Closed aperfilev closed 7 months ago

aperfilev commented 7 months ago

This change does not modify logic, but rather avoid using few entries of single class imports like:

import sdl.video: SDL_Window

while generous import works fine

import sdl.video

Sample GDC compiler output:

source/sdl/haptic.d:13:8: internal compiler error: in make_import, at d/imports.cc:48
   13 | import sdl.joystick: SDL_Joystick;
      |        ^
0x72e5eb62814f __libc_start_call_main
    ../sysdeps/nptl/libc_start_call_main.h:58
0x72e5eb628208 __libc_start_main_impl
    ../csu/libc-start.c:360
ichordev commented 7 months ago

Wow, that's odd. Is this a known bug in GDC, or is it an undocumented missing feature?

aperfilev commented 7 months ago

I've found a existing bug with similar behavior: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113125

It pretty fresh, I keep will monitoring this issue and add more details with our case.