mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 10:57:35 +03:00
ImportC: Gracefully terminate when encountering C initializer lists
Instead of ICE'ing; e.g., for dmd-testsuite's runnable/cstuff2.c. See #3825.
This commit is contained in:
parent
50fb6c8638
commit
067fbafd59
1 changed files with 4 additions and 0 deletions
|
@ -1084,6 +1084,10 @@ LLConstant *DtoConstInitializer(const Loc &loc, Type *type, Initializer *init) {
|
|||
Logger::println("const void initializer");
|
||||
LLType *ty = DtoMemType(type);
|
||||
_init = LLConstant::getNullValue(ty);
|
||||
} else if (CInitializer *ci = init->isCInitializer()) {
|
||||
// TODO: ImportC
|
||||
error(loc, "LDC doesn't support C initializer lists yet");
|
||||
fatal();
|
||||
} else {
|
||||
// StructInitializer is no longer suposed to make it to the glue layer
|
||||
// in DMD 2.064.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue