mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
* Mark C enums as semantic2done to prevent segfaults in final switch * Added corresponding test case
This commit is contained in:
parent
21cfefc9d1
commit
228f8dbcea
3 changed files with 35 additions and 1 deletions
|
@ -751,6 +751,8 @@ void cEnumSemantic(Scope* sc, EnumDeclaration ed)
|
|||
}
|
||||
|
||||
ed.memtype = commonType;
|
||||
ed.semanticRun = PASS.semanticdone;
|
||||
// Set semantic2done to mark C enums as fully processed
|
||||
// Prevents issues with final switch statements that reference C enums
|
||||
ed.semanticRun = PASS.semantic2done;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue