← Back to index
|
Original Bugzilla link
Bug 22429 – importC: designator-list not supported yet
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-10-19T13:22:28Z
Last change time
2022-09-15T09:55:59Z
Keywords
ImportC, rejects-valid
Assigned to
No Owner
Creator
Dennis
Comments
Comment #0
by dkorpel — 2021-10-19T13:22:28Z
``` int a[2] = { [0] = 1, [1] = 2, }; ``` ``` parser.c(2): Error: C designator-list not supported yet ``` Needed for compiling tree-sitter parsers, for example:
https://github.com/tree-sitter/tree-sitter-json/blob/master/src/parser.c
Comment #1
by dave287091 — 2021-12-07T07:26:11Z
Same error occurs for the struct version as well: typedef struct S { int x; } S; int main(){ S s = {.x = 3}; // Error C designator-list not supported yet }