[llvm-dev] Why does clang -E - of a header file may have different exit status?

Peng Yu via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 29 22:04:33 PDT 2021


> I mean, looks like clang exits non-zero when trying to preprocess your
> bfd.h? Does clang print any errors?

There are no error messages.

$ clang -E - <<< '#include <bfd.h>' > /dev/null
$ echo "$?"
0

> Maybe try reducing down the
> contents of bfd.h to see what's critical about the contents of that
> file that causes the non-zero exit?

Could you try to install binutils-dev on a debian lineage linux? bfd.h
is from that package. The thing that does not make sense is that gcc
is consistent but clang is not.

-- 
Regards,
Peng


More information about the llvm-dev mailing list