> On Feb 5, 2021, at 9:51 AM, Todd C. Miller = wrote: >=20 > On Fri, 05 Feb 2021 15:42:28 +0100, =3D?utf-8?Q?S=3DC3=3DA9bastien?=3D = Hinderer wrote: >=20 >> It seems AC_PROG_CC wrongly believes clang is gcc and that may cause = problems >> when clang is passed a warning which is only supposrted by gcc, as is >> the case e.g. for -Wno-stringop-truncation. >=20 > clang also defines __GNUC__ and the related defines, which is why > it is identified as gcc. >=20 >> Is there a recommended way to determine for sure from a configure = script >> whether the detected C compiler is clang or gcc? I would *discourage* trying to figure out if a C compiler is gcc or = clang. Instead, create separate detectors for whatever you=E2=80=99re 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 =E2=80=9Cdo this if GCC=E2=80=9D is generally wrong; = clang may have that interface & functionality when someone compiles the code. --- David A. Wheeler