-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorzig ccZig as a drop-in C compiler featureZig as a drop-in C compiler feature
Description
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Create a test file:
%{
CUT_OUT_BEGIN
#include <fontconfig/fontconfig.h>
CUT_OUT_END
%}
Run: zig cc -E -P -c test.h
observe:
test.h:1:1: error: expected identifier or '('
1 | %{
| ^
1 error generated.
Expected Behavior
It should execute without error, examples that succeed clang -E -P -c test.h, cpp -E -P -c test.h, gcc -E -P -c test.h
It seems related to using the -c flag, since zig cc works when using zig cc -E -P test.h
This is how meson's cc.preprocess command generates calls and is used in the fontconfig project so resolving this would allow compiling fontconfig with zig cc.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorzig ccZig as a drop-in C compiler featureZig as a drop-in C compiler feature