AaronBallman wrote: > > but that leads to the question of: why is including musl's limits.h a > > problem? > > If we build `glibc` on `Alpine` with clang, we will meet the problem like > > ``` > ./include/bits/xopen_lim.h:84:10: warning: "NL_NMAX" redefined > 84 | # define NL_NMAX INT_MAX > ``` > > It's due to that > > ``` > glibc/include/limits.h includes > /usr/lib/llvm19/lib/clang/19/include/limits.h includes > /usr/include/limits.h > ```
Yes and no. It's due to the redefinitions, for sure. But that diagnostic is suppressed in system headers: https://godbolt.org/z/Mb7Kh975f, so I think we need to understand why there's a `limits.h` being included as though it were not a system header, because that's a bug. https://github.com/llvm/llvm-project/pull/120526 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits