-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
emit-hThis issue is related to generating .h files for C interopThis issue is related to generating .h files for C interopenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
I am converting a codebase from C++ to Zig. So far, I switched the entry point to Zig and recreate the C++ objects in Zig. The rest in the middle are still (extern "C") C++, i.e. we have a Zig sandwich here.
In order for the C++ code to use the Zig struct, there must be a header file and unfortunately it is also translated to Zig. Thus, this shared module is recognized both as originally declared and .cimport[…].struct_[…]
and the (stage 1) compiler yields the error: expected type […], found […]
. I made a minimal reproducer here hoping it'll help debugging.
I also noticed that stage 1 compiler has disabled C header emission (GH-6753), was this one of the reasons?
hhstore, Titousensei, 1l0, Renha, dkaste and 11 more
Metadata
Metadata
Assignees
Labels
emit-hThis issue is related to generating .h files for C interopThis issue is related to generating .h files for C interopenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.