ziglang/translate-c
17
128
Fork
You've already forked translate-c
37

Unable to translate NetBSD headers #323

Closed
opened 2026年04月17日 13:41:42 +02:00 by ypsvlq · 2 comments

(Zig 0.16.0)

$ echo '#include <stdlib.h>' >test.c
$ zig translate-c -target x86_64-netbsd test.c -lc
error: translation failure
lib/libc/include/generic-netbsd/sys/endian.h:74:1: error: unknown type name 'pragma'
__END_DECLS
^
lib/libc/include/generic-netbsd/sys/cdefs.h:432:22: note: expanded from here
#define __END_DECLS __END_PUBLIC_DECLS
 ^
lib/libc/include/generic-netbsd/sys/cdefs.h:413:45: note: expanded from here
# define __END_PUBLIC_DECLS __END_EXTERN_C _Pragma("GCC visibility pop")
 ^
<scratch space>:5:2: note: expanded from here
#pragma GCC visibility pop
[...]
(Zig 0.16.0) ``` $ echo '#include <stdlib.h>' >test.c $ zig translate-c -target x86_64-netbsd test.c -lc error: translation failure lib/libc/include/generic-netbsd/sys/endian.h:74:1: error: unknown type name 'pragma' __END_DECLS ^ lib/libc/include/generic-netbsd/sys/cdefs.h:432:22: note: expanded from here #define __END_DECLS __END_PUBLIC_DECLS ^ lib/libc/include/generic-netbsd/sys/cdefs.h:413:45: note: expanded from here # define __END_PUBLIC_DECLS __END_EXTERN_C _Pragma("GCC visibility pop") ^ <scratch space>:5:2: note: expanded from here #pragma GCC visibility pop [...] ```
Member
Copy link
https://github.com/Vexu/arocc/issues/998
Author
Copy link

fixed upstream

fixed upstream
Sign in to join this conversation.
No Branch/Tag specified
main
update
build-runner-process
zig-0.16.x
1.0.0
Labels
Clear labels
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/translate-c#323
Reference in a new issue
ziglang/translate-c
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?