jamieschmeiser wrote:

@cyndyishida From https://clang.llvm.org/compatibility.html:
`Clang strives to both conform to current language standards (up to C11 and 
C++11) and also to implement many widely-used extensions available in other 
compilers, so that most correct code will "just work" when compiled with Clang. 
However, Clang is more strict than other popular compilers, and may reject 
incorrect code that other compilers allow.`
I suspect that when it comes to extentions, each is considered on a 
case-by-case basis but I think that, in general, Clang tries to maintain option 
compatibility with gcc/g++.  It aids in portability between compilers and 
platforms which may not support one or the other compiler.  Particular 
vendors/platforms, however, may, or may not, support various gnu extensions or 
have conflicting options in their particular versions of Clang or in their 
legacy compilers (eg, earlier non-Clang-based compilers).  I think that, in 
general, silently ignoring options that are not supported is a disservice to 
the user in that it misleads them into thinking that some functionality is 
there when it is not.  -F is a darwin specific option in g++ so unless a target 
platform chooses to also support this option, it should be flagged as an error. 
 I plan to introduce code in the future that will flag -F as an error on 
non-darwin targets for this reason.  It remains to be seen through the reviews 
whether the error becomes general for non-darwin targets or specific to 
particular target platforms.  I will add you as a reviewer when I post the PR, 
if you wish.

https://github.com/llvm/llvm-project/pull/141614
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to