Wed, 12 Nov 2025 20:26:10 +0100
fix broken compiler detection when warning level is high - fixes #686
| src/main/resources/make/toolchain.sh | file | annotate | diff | comparison | revisions | |
| test/make/toolchain.sh | file | annotate | diff | comparison | revisions |
--- a/src/main/resources/make/toolchain.sh Wed Nov 12 20:15:44 2025 +0100 +++ b/src/main/resources/make/toolchain.sh Wed Nov 12 20:26:10 2025 +0100 @@ -30,7 +30,7 @@ cat > "$TEMP_DIR/test.c" << __EOF__ /* test file */ #include <stdio.h> -int main(int argc, char **argv) { +int main(void) { #if defined(_MSC_VER) printf("toolchain:msc\n"); #elif defined(__clang__) @@ -44,7 +44,7 @@ #endif printf("wsize:%d\n", (int)sizeof(void*)*8); #ifdef __STDC_VERSION__ - printf("stdcversion:%d\n", __STDC_VERSION__); + printf("stdcversion:%ld\n", (long int)__STDC_VERSION__); #endif return 0; } @@ -61,7 +61,7 @@ cat > "$TEMP_DIR/test.cpp" << __EOF__ /* test file */ #include <iostream> -int main(int argc, char **argv) { +int main(void) { #if defined(_MSC_VER) std::cout << "toolchain:msc" << std::endl; #elif defined(__clang__)
--- a/test/make/toolchain.sh Wed Nov 12 20:15:44 2025 +0100 +++ b/test/make/toolchain.sh Wed Nov 12 20:26:10 2025 +0100 @@ -30,7 +30,7 @@ cat > "$TEMP_DIR/test.c" << __EOF__ /* test file */ #include <stdio.h> -int main(int argc, char **argv) { +int main(void) { #if defined(_MSC_VER) printf("toolchain:msc\n"); #elif defined(__clang__) @@ -44,7 +44,7 @@ #endif printf("wsize:%d\n", (int)sizeof(void*)*8); #ifdef __STDC_VERSION__ - printf("stdcversion:%d\n", __STDC_VERSION__); + printf("stdcversion:%ld\n", (long int)__STDC_VERSION__); #endif return 0; } @@ -61,7 +61,7 @@ cat > "$TEMP_DIR/test.cpp" << __EOF__ /* test file */ #include <iostream> -int main(int argc, char **argv) { +int main(void) { #if defined(_MSC_VER) std::cout << "toolchain:msc" << std::endl; #elif defined(__clang__)