-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
backend-cThe C backend (CBE) outputs C source code.The C backend (CBE) outputs C source code.enhancementSolving 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.
Milestone
Description
Zig Version
0.12.0-dev.1637+673a1efa2
Steps to Reproduce and Observed Behavior
export const _foo linksection("foo") = "";
export fn bar() linksection("baz") u32 {
return 0;
}
zig build-obj source.zig -ofmt=c
Produce
// ...
zig_linksection("foo", uint8_t const (*const _foo)[1], read) = &__anon_1365;
uint32_t bar(void) {
/* file:2:5 */
return UINT32_C(0);
}
Expected Behavior
Something like
// ...
zig_linksection("foo", uint8_t const (*const _foo)[1], read) = &__anon_1365;
zig_linksection("baz", uint32_t) bar(void) {
/* file:2:5 */
return UINT32_C(0);
}
Metadata
Metadata
Assignees
Labels
backend-cThe C backend (CBE) outputs C source code.The C backend (CBE) outputs C source code.enhancementSolving 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.