March 03, 2023 [Issue 23757] New: ImportC: fail to import malloc | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23757 Issue ID: 23757 Summary: ImportC: fail to import malloc Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: ryuukk.dev@gmail.com DMD32 D Compiler v2.102.1 The following code: ``` import json; unittest { json_settings settings; settings.settings = json_enable_comments; char[256] error = 0; string a = "{ \"a\": 1 }"; json_value * value = json_parse_ex(&settings, a.ptr, a.length, error.ptr); } ``` Using c code: https://github.com/json-parser/json-parser Using developer command line prompt ``dmd -unittest -main -betterC -m64 -run package.d`` I get the following error: ``` C:\dev\kdom\better_d\rt\json>dmd -unittest -main -betterC -m64 -run package.d C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(58): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(58): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(65): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(65): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(94): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(94): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(100): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(100): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(118): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(118): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(125): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(125): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(132): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(132): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(140): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(140): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(153): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(153): Error: no type for declarator before `)` C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(160): Error: extended-decl-modifier expected C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(160): Error: no type for declarator before `)` ``` -- |
Copyright © 1999-2021 by the D Language Foundation