diff --git a/2004/burley/Makefile b/2004/burley/Makefile index fe20f609b..79bc12f3f 100644 --- a/2004/burley/Makefile +++ b/2004/burley/Makefile @@ -66,7 +66,8 @@ CINCLUDE= -include stdio.h -include setjmp.h -include string.h -include time.h - # Optimization # -OPT= +# We DISABLE the optimiser because having it enabled BREAKS the program. +OPT= -O0 # Default flags for ANSI C compilation # @@ -131,8 +132,10 @@ all: data ${TARGET} clean clobber install love haste waste maker easter_egg \ sandwich supernova deep_magic magic charon pluto +# NOTE: We FORCE the use of -O0 even if someone overrides it because this entry +# will not work with it enabled. ${PROG}: ${PROG}.c - ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} + ${CC} ${CFLAGS} -O0 $< -o $@ ${LDFLAGS} # alternative executable # diff --git a/2004/burley/README.md b/2004/burley/README.md index 8f4e2259e..98c460975 100644 --- a/2004/burley/README.md +++ b/2004/burley/README.md @@ -4,6 +4,9 @@ make ``` +NOTE: We FORCE the use of -O0 even if someone overrides it because this entry +will not work with it enabled. + ## To use: diff --git a/thanks-for-help.md b/thanks-for-help.md index 1403e137b..b9dd4193f 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -2665,16 +2665,16 @@ For clang the problem was that `main()` had one arg, a `char *` and this is not allowed in any version of clang. In some versions it is allowed if the arg is an `int` but never if it's anything else. To get it to work took numerous changes. -First the inclusion of `setjmp.h` was necessary. Without this `longjmp()` -implicitly returned int which was used for the purpose of binary expression but +First the inclusion of `setjmp.h` was necessary. Without this `longjmp(3)` +implicitly returned `int` which was used for the purpose of binary expression but this no longer worked. But by including `setjmp.h` it naturally made the binary expressions invalid (as -it returns void which no longer is allowed in binary expressions) so the comma +it returns `void` which is not allowed in binary expressions) so the comma operator with `0` (`,0`) had to be used (`,1` was tried first but this did not work right). -`longjmp()` was being called with one arg which was an element +`longjmp(3)` was being called with one arg which was an element of an `int[4][1000]` which had to be changed to a `jmp_buf p[4]` (this due to the prototype being included).