Issue 99804
Summary [clang] document default for `__GNUC__` macros
Labels clang
Assignees
Reporter h-vetinari
    While the [documentation](https://clang.llvm.org/docs/UsersManual.html#cmdoption-fgnuc-version) notes how to override GNU compatibility macros using `-fgnuc-version=`, it doesn't note that it's set by default (it is), nor what value it is set to.

It takes a far bit of [digging](https://github.com/llvm/llvm-project/issues/42162#issuecomment-2241520557) in the code to actually figure out that it's still at 
```
__GNUC__=4
__GNUC_MINOR__=2
__GNUC_PATCHLEVEL__=1
```
which is ancient (cf. #42162). The consequence of this is that benign-looking code based on these macros will implicitly fall back to workarounds that shouldn't actually be necessary, and end up pessimizing clang-compiled code. Example: https://github.com/scipy/scipy/issues/20479
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to