Make 2006/sykes2 main() have two args
This is out of an abundance of caution as some of the versions of clang report that main() can only have 0, 2 or 3 args to main(), not 4 or anything else. The version (clang version 17.0.4) I have encountered this with actually allows 1 arg but since clang is so picky I decided to make a second unused arg (a char **) in case the devs decide to ruin even more fun programs. There are other entries that also use one arg to main() and I will try locating those too, first with the entries I have not reviewed yet and then later on (time constraints notwithstanding) the ones I have already reviewed. Makefile updated with new -Wno- options for clang with linux.
This commit is contained in:
1 parent
6c1c6dc5a4
commit
e9ffd327d6
3 files changed
+9
-4
No files matched your search
@@ -40,7 +40,8 @@ include ../../var.mk
|
||||
#
|
||||
CSILENCE= -Wno-bitwise-op-parentheses -Wno-char-subscripts -Wno-error \
|
||||
-Wno-implicit-function-declaration -Wno-implicit-int -Wno-main \
|
||||
-Wno-pedantic -Wno-deprecated-non-prototype
|
||||
-Wno-pedantic -Wno-deprecated-non-prototype -Wno-unused-parameter \
|
||||
-Wno-parentheses
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
|
||||
@@ -1 +1 @@
|
||||
main(_){_^448&&main(-~_);putchar(--_%64?32|-~7[__TIME__-_/8%8][">'txiZ^(~z?"-48]>>";;;====~$::199"[_*2&8|_/64]/(_&2?1:8)%8&1:10);}
|
||||
main(_,v)char**v;{_^448&&main(-~_,v);putchar(--_%64?32|-~7[__TIME__-_/8%8][">'txiZ^(~z?"-48]>>";;;====~$::199"[_*2&8|_/64]/(_&2?1:8)%8&1:10);}
|
||||
+6
-2
@@ -3030,8 +3030,12 @@ it to the repo as well.
|
||||
|
||||
## [2006/sykes2](2006/sykes2/sykes2.c) ([README.md](2006/sykes2/README.md]))
|
||||
|
||||
Cody added the [try.sh](2006/sykes2/try.sh) script for easier use of the entry
|
||||
to show the clock update in real time.
|
||||
Cody, out of an abundance of caution for `clang`'s defects, made `main()` have
|
||||
to args instead of 1 as some versions report that `main()` must have 0, 2 or 3
|
||||
args, even though at least one of those versions allows 1 arg only.
|
||||
|
||||
Cody also added the [try.sh](2006/sykes2/try.sh) script for easier use of the
|
||||
entry to show the clock update in real time.
|
||||
|
||||
|
||||
## [2006/toledo2](2006/toledo2/toledo2.c) ([README.md](2006/toledo2/README.md]))
|
||||
|
||||
Reference in new issue
Block a user