Further fixes to 1998/fanf for clang

Some versions of clang need -Wno-int-conversion.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-11 06:07:01 -08:00
1 parent 157cdcebad
commit b7eacf4849
2 files changed
+7 -3

No files matched your search

+2 -1
View File
@@ -38,7 +38,8 @@ include ../../var.mk
# Common C compiler warnings to silence # Common C compiler warnings to silence
# #
CSILENCE= -Wno-pointer-bool-conversion -Wno-unused-parameter -Wno-main -Wno-implicit-function-declaration CSILENCE= -Wno-pointer-bool-conversion -Wno-unused-parameter -Wno-main -Wno-implicit-function-declaration \
-Wno-int-conversion
# Common C compiler warning flags # Common C compiler warning flags
# #
+5 -2
View File
@@ -2134,8 +2134,11 @@ Cody also added a second arg to `main()` out of an abundance of caution as some
versions of clang whine about the number of args to `main()`. These versions versions of clang whine about the number of args to `main()`. These versions
claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
possible though that this will change so it is fixed in case this happens. As it possible though that this will change so it is fixed in case this happens. As it
is mostly just through the C pre-processor Cody added a new macro to do is mostly just through the C pre-processor Cody added a new macro to make the
translate to the rest of `main()`'s args. code look like the original with just an extra arg.
In some versions of clang `-Wno-int-conversion` had to be added to the
`CSILENCE` variable of the Makefile.
Cody also added the [try.sh](/1998/fanf/try.sh) script to show the output of some Cody also added the [try.sh](/1998/fanf/try.sh) script to show the output of some
of the expressions that we selected. of the expressions that we selected.