At 11 Mar 2024 14:37:17 -0400, "Amitai Schleier" <schmonz%schmonz.com@localhost> wrote: Subject: macOS clang has enabled -Werror=implicit-int > > This thread is about a problem that I believe exists in both. Yay! I do see the same and similar problems with Xcode 15. Indeed the current Clang Diagnostics Reference says about -Wimplcit-int: "Some of the diagnostics controlled by this flag are enabled by default." https://clang.llvm.org/docs/DiagnosticsReference.html#id423 (that's for Clang-19.0, but seems to apply to 16.0 as well) > It's not just Apple's clang that turns > these kinds of warnings into > errors. Upstream clang 16 does too: I've actually had to add -Wno-sign-conversion for Clang-16.0.6 on FreeBSD-14 where some of FreeBSD's own header files cause errors! I think the safer thing to do is to use "--std=c90" (or even c89, or gnu90, etc. in the relevant circumstances) by default, since that's what most legacy code has been written to. That _should_ cover all compilers! -- Greg A. Woods <gwoods%acm.org@localhost> Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost> Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgpvniQ5qvb4H.pgp
Description: OpenPGP Digital Signature