autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_PROG_CC: how to distinguish clang from gcc?


From: Sébastien Hinderer
Subject: Re: AC_PROG_CC: how to distinguish clang from gcc?
Date: Mon, 8 Feb 2021 08:41:15 +0100

Hello David and all,

David A. Wheeler (2021/02/05 11:40 -0500):
> I would *discourage* trying to figure out if a C compiler is gcc or clang.
> Instead, create separate detectors for whatever you’re looking for.
>
> The gcc & clang groups coordinate with each other; they try to provide the 
> same
> flags & API for the same functionality, and occasionally copy from each other.
> So trying to detect “do this if GCC” is generally wrong; clang may have that 
> interface & functionality
> when someone compiles the code.

That was a good advice. Thanks!

Sébastien.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]