-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Description
sccache hides preprocessor warnings. In the following snippet a two line c file is compiled with and without sccache using clang (Apple LLVM version 8.0.0 (clang-800.0.42.1)) and the current HEAD of sccache. As you can see the warning from the #warning directive is not on stdout/stderr. The second run with sccache shows that the behaviour is the same with or without a hit. I did the same test with a double #define - same result.
~/tmp cat test.c
#warning foo
int bar() {}
~/tmp clang -c -o test.o test.c
test.c:1:2: warning: foo [-W#warnings]
#warning foo
^
test.c:2:12: warning: control reaches end of non-void function [-Wreturn-type]
int bar() {}
^
2 warnings generated.
~/tmp sccache clang -c -o test.o test.c
test.c:2:12: warning: control reaches end of non-void function [-Wreturn-type]
int bar() {}
^
1 warning generated.
~/tmp sccache clang -c -o test.o test.c
test.c:2:12: warning: control reaches end of non-void function [-Wreturn-type]
int bar() {}
^
1 warning generated.
A possible solution could be to concat stderr from the preprocessor run with stdou/stderr from the compilation step. I'm not 100% sure whether this would give the exact same output as compiling the original file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels