From 3915ca0f710c82c32b8f1865a82bf0b12ade3d2a Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Thu, 25 Jul 2024 05:51:57 -0700 Subject: [PATCH] Have cosmocc define -Wno-implicit-int GCC 13+ changed its policies to be very aggressive about breaking builds that have anything resembling K&R C. I very strongly disagree with these decisions. Users who think their compiler should should also be a linter are perfectly welcome to opt-in to -Wimplicit-int. --- tool/cosmocc/bin/cosmocc | 2 +- tool/cosmocc/bin/cosmocross | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/cosmocc/bin/cosmocc b/tool/cosmocc/bin/cosmocc index f21db61b4..5f3ee7152 100755 --- a/tool/cosmocc/bin/cosmocc +++ b/tool/cosmocc/bin/cosmocc @@ -237,7 +237,7 @@ fi PLATFORM="-D__COSMOPOLITAN__ -D__COSMOCC__ -D__FATCOSMOCC__" PREDEF="-include libc/integral/normalize.inc" -CPPFLAGS="-fno-pie -nostdinc -isystem $BIN/../include" +CPPFLAGS="-fno-pie -nostdinc -isystem $BIN/../include -Wno-implicit-int" CFLAGS="-fportcosmo -fno-dwarf2-cfi-asm -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-semantic-interposition" LDFLAGS="-static -nostdlib -no-pie -fuse-ld=bfd -Wl,-z,noexecstack -Wl,-z,norelro -Wl,--gc-sections" PRECIOUS="-fno-omit-frame-pointer" diff --git a/tool/cosmocc/bin/cosmocross b/tool/cosmocc/bin/cosmocross index cca599cca..8c3ff5bc8 100755 --- a/tool/cosmocc/bin/cosmocross +++ b/tool/cosmocc/bin/cosmocross @@ -48,7 +48,7 @@ ORIGINAL="$0 $*" PLATFORM="-D__COSMOPOLITAN__ -D__COSMOCC__" PREDEF="-include libc/integral/normalize.inc" CFLAGS="-fportcosmo -fno-dwarf2-cfi-asm -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-semantic-interposition" -CPPFLAGS="-fno-pie -nostdinc -isystem $BIN/../include" +CPPFLAGS="-fno-pie -nostdinc -isystem $BIN/../include -Wno-implicit-int" LDFLAGS="-static -no-pie -nostdlib -fuse-ld=bfd -Wl,-z,noexecstack" APEFLAGS="-Wl,--gc-sections" PRECIOUS="-fno-omit-frame-pointer"