ArcsinX added a comment.

@kadircet Thanks for clarification. Now your position is clear for me.

But clang was designed as a drop-in replacement for GCC:

- https://clang.llvm.org/docs/LanguageExtensions.html#introduction
- https://clang.llvm.org/features.html#gcccompat

I do not have any proves that clang is 100% compatible with any GCC version, 
but also I can't find any evidence that the most compatible version of GCC is 
4.2.1

I really faced the problem with that default 4.2.1 on a project: strange errors 
in clangd and it was really hard to understand that the reason was `__GNUC__ == 
4`. `-fgnuc-version=<real GCC version here>` addition helped me to solve this. 
That's why I think that it can be added automatically (and `.clangd` can be 
used to override this with `4.2.1` (or any other) if user doesn't want this 
automatic GCC version detection =) )


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107304/new/

https://reviews.llvm.org/D107304

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to