From 9ff55b2aa46657e6573fed3928f555fa16eca983 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <barracuda@macos-powerpc.org>
Date: Sun, 29 Jun 2025 03:19:53 +0800
Subject: [PATCH] Use warning flags compatible with Apple gcc

---
 w2c2/CMakeLists.txt | 2 +-
 w2c2/Makefile       | 2 +-
 wasi/CMakeLists.txt | 2 +-
 wasi/Makefile       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git w2c2/CMakeLists.txt w2c2/CMakeLists.txt
index 5411423..f09bf60 100644
--- w2c2/CMakeLists.txt
+++ w2c2/CMakeLists.txt
@@ -43,7 +43,7 @@ foreach(TARGET w2c2 w2c2_test)
 
     target_compile_options(${TARGET} PUBLIC
         $<$<CXX_COMPILER_ID:MSVC>:/W4>
-        $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Werror=conversion -Wextra -Wpedantic -Wunused-result -Wno-long-long -Wno-unused-function>
+        $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Werror=conversion -Wextra -pedantic -Wno-long-long -Wno-unused-function>
     )
 
     if(DWARF_FOUND)
diff --git w2c2/Makefile w2c2/Makefile
index d65c148..4d002ab 100644
--- w2c2/Makefile
+++ w2c2/Makefile
@@ -11,7 +11,7 @@ ifndef UNAME
 	UNAME := $(shell uname -s)
 endif
 
-WARNS ?= -Wunused-result -Wall -Wpedantic -Werror=conversion -Wno-long-long -Wno-unused-function
+WARNS ?= -Wunused-result -Wall -pedantic -Werror=conversion -Wno-long-long -Wno-unused-function
 
 ifeq ($(BUILD),release)
 	CFLAGS += -O3
diff --git wasi/CMakeLists.txt wasi/CMakeLists.txt
index 4f31c26..7890514 100644
--- wasi/CMakeLists.txt
+++ wasi/CMakeLists.txt
@@ -45,7 +45,7 @@ add_executable(w2c2wasi_test ${TEST_SOURCES} ${SOURCES})
 foreach(TARGET w2c2wasi w2c2wasi_test)
     target_compile_options(${TARGET} PUBLIC
         $<$<CXX_COMPILER_ID:MSVC>:/W4>
-        $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Wunused-result -Wno-long-long -Wno-unused-function>
+        $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -pedantic -Wno-long-long -Wno-unused-function>
     )
 
     if(Threads_FOUND)
diff --git wasi/Makefile wasi/Makefile
index 179d5d8..8a16925 100644
--- wasi/Makefile
+++ wasi/Makefile
@@ -7,7 +7,7 @@ ifndef UNAME
 	UNAME := $(shell uname -s)
 endif
 
-WARNS ?= -Wunused-result -Wall -Wpedantic -Wno-long-long -Wno-unused-function
+WARNS ?= -Wunused-result -Wall -pedantic -Wno-long-long -Wno-unused-function
 
 ifeq ($(BUILD),release)
 	CFLAGS += -O3
