diff --git a/faq.html b/faq.html index 21aa95beb..ba58f2204 100644 --- a/faq.html +++ b/faq.html @@ -892,10 +892,15 @@ this is not clear!

If your submission has more than one use, or if you have interesting ways to invoke your program, perhaps using other commonly installed tools (or tools -included in your submission), it can be helpful to include a try.sh script.

-

A template try.sh can be used as a -starting point, or you can look at some of the others in the website, to get -some ideas.

+included in your submission), it can be helpful to include a try.sh script:

+ +

The template try.sh script can be used as a starting point, or you can look at +some of the others in the website, to get some ideas.

It is not detrimental to your chances of winning if you do not include one as not all submissions can make use of them. Nevertheless, it is helpful to include ways to use your program, and if you have creative ways this can be a bonus. It @@ -1086,10 +1091,11 @@ discussion.

There are unfortunately some warnings that cannot be disabled; they are always enabled whatever warning options you have enabled. Also, there is a warning that is enabled whenever you act on char *s, saying it is unsafe buffer usage, even -when it’s not (this might be enabled by -Weverything but it might not be; for -more details on why we use -Weverything in Clang see the FAQ on -“-Weverything”), and it is not detrimental to your submission -if you disable this. This warning happens to be -Wno-unsafe-buffer-usage.

+when it’s not. This might be enabled by -Weverything but it might not be; for +more details on why we use -Weverything in Clang see the +FAQ on “-Weverything”.

+

It is not detrimental to your submission if you disable this, which you can do +by specifying -Wno-unsafe-buffer-usage.

So in short, no you should not worry about these as they are sometimes inevitable in obfuscated code and even non-obfuscated code.

If you can work past this it might be good but this is not something that @@ -3066,7 +3072,7 @@ extension .md.

"winner.alt.c" or "prog.alt.c"; this is also what the file_path will be. The entry_text will typically (not always but almost always) be "alternate source code".

Many entries have a script (or scripts) for the Try section in their index.html file. -Usually this is called try.sh for the entry and try.alt.sh for the alternate +Usually this is called try.sh for the winning entry and try.alt.sh for the alternate source code (if there is an alternate version). Some, however, have another file name. The entry_text for the try scripts will be script to try entry or something along those lines.

@@ -3086,7 +3092,7 @@ repo contains information about how to find and compile the mkiocccentry toolkit, which includes the IOCCC version of the jparse(1) tool, located under the mkiocccentry directory as jparse/jparse.

-

Additionally you may install the jparse(1) tool from the jparse +

Additionally you may install the jparse(1) tool from the mkiocccentry repo:

    git clone https://github.com/ioccc-src/mkiocccentry.git
     cd mkiocccentry && make clobber all" 1>&2
@@ -3102,7 +3108,9 @@ verbosity with the -v option. For instance:

the tool.

NOTE: the jparse subdirectory is a clone of the official jparse repo but we recommend you compile and -install via the mkiocccentry repo because it has the dependencies built in.

+install via the mkiocccentry repo because it has the dependencies built in, +and because the mkiocccentry copy is that which is used by the current IOCCC, +as the two can be different at times.

Jump to: top



diff --git a/faq.md b/faq.md index f6c9e2e50..430feb455 100644 --- a/faq.md +++ b/faq.md @@ -578,11 +578,16 @@ Jump to: [top](#) If your submission has more than one use, or if you have interesting ways to invoke your program, perhaps using other commonly installed tools (or tools -included in your submission), it can be helpful to include a `try.sh` script. +included in your submission), it can be helpful to include a `try.sh` script: -A [template try.sh](next/try.sh) can be used as a -starting point, or you can look at some of the others in the website, to get -some ideas. +- [view example try.sh](%%REPO_URL%%/next/try.sh) +- [download example try.sh](next/try.sh) +- [view example try.alt.sh](%%REPO_URL%%/next/try.alt.sh) +- [download example try.alt.sh](next/try.alt.sh) + + +The template `try.sh` script can be used as a starting point, or you can look at +some of the others in the website, to get some ideas. It is not detrimental to your chances of winning if you do not include one as not all submissions can make use of them. Nevertheless, it is helpful to include @@ -844,10 +849,12 @@ Jump to: [top](#) There are unfortunately some warnings that cannot be disabled; they are always enabled whatever warning options you have enabled. Also, there is a warning that is enabled whenever you act on `char *`s, saying it is unsafe buffer usage, even -when it's not (this might be enabled by `-Weverything` but it might not be; for -more details on why we use `-Weverything` in Clang see the FAQ on -"[`-Weverything`](#weverything)"), and it is not detrimental to your submission -if you disable this. This warning happens to be `-Wno-unsafe-buffer-usage`. +when it's not. This might be enabled by `-Weverything` but it might not be; for +more details on why we use `-Weverything` in Clang see the +FAQ on "[-Weverything](#weverything)". + +It is not detrimental to your submission if you disable this, which you can do +by specifying `-Wno-unsafe-buffer-usage`. So in short, no you should not worry about these as they are sometimes inevitable in obfuscated code and even non-obfuscated code. @@ -3280,7 +3287,7 @@ The `entry_text` will typically (not always but almost always) be `"alternate source code"`. Many entries have a script (or scripts) for the `Try` section in their index.html file. -Usually this is called `try.sh` for the entry and `try.alt.sh` for the alternate +Usually this is called `try.sh` for the winning entry and `try.alt.sh` for the alternate source code (if there is an alternate version). Some, however, have another file name. The `entry_text` for the `try` scripts will be `script to try entry` or something along those lines. @@ -3306,8 +3313,8 @@ contains information about how to find and compile the mkiocccentry toolkit, which includes the IOCCC version of the `jparse(1)` tool, located under the `mkiocccentry` directory as `jparse/jparse`. -Additionally you may install the `jparse(1)` tool from the [jparse -repo](https://github.com/xexyl/jparse): +Additionally you may install the `jparse(1)` tool from the [mkiocccentry +repo](https://github.com/ioccc-src/mkiocccentry): ``` git clone https://github.com/ioccc-src/mkiocccentry.git @@ -3337,7 +3344,9 @@ the tool. **NOTE**: the `jparse` subdirectory is a clone of the official [jparse repo](https://github.com/xexyl/jparse/issues) but we recommend you compile and -install via the `mkiocccentry` repo because it has the dependencies built in. +install via the `mkiocccentry` repo because it has the dependencies built in, +and because the `mkiocccentry` copy is that which is used by the current IOCCC, +as the two can be different at times. Jump to: [top](#) diff --git a/next/guidelines.html b/next/guidelines.html index ae0e0a7d6..fba87d9a7 100644 --- a/next/guidelines.html +++ b/next/guidelines.html @@ -465,7 +465,7 @@ writing by contacting the judges.

-These IOCCC guidelines are version 28.25 2024-12-04. +These IOCCC guidelines are version 28.25 2024-12-05.

IMPORTANT: Be SURE to read the IOCCC rules.

Jump to: top

@@ -535,8 +535,10 @@ The Rule 2b size has increased from 2053 bytes.

-The new default way to compile submissions: -std=gnu17 -O3 -g3 -Wall -Wextra -pedantic. See below for more details about the example Makefile -for more help. +The new default way to compile submissions: -std=gnu17 -O3 -g3 -Wall -Wextra -pedantic. +You are encouraged to use the example Makefile here, rather than the +mkiocccentry repo. For details and help, see below in the Makefile +section.

Submissions are in the form of a single xz compressed tarball. @@ -551,11 +553,6 @@ repo. to account for the new mkiocccentry repo tools.

-You are encouraged to use this -Makefile.example, -rather than the one at the mkiocccentry repo. -

-

The IOCCC submission URL, when the IOCCC is open, is submit.ioccc.org.

@@ -787,27 +784,40 @@ jparse, for more details.

-The original jparse code, co-developed by Landon and Cody Boone Ferguson in +The original jparse code, co-developed by +Landon Curt Noll and +Cody Boone Ferguson in 2022, comes from the jparse repo but the mkiocccentry tools use a clone of this repo at a specific release. Thus the mkiocccentry will at times be behind the jparse repo!

-

You do NOT need to install jparse! The mkiocccentry tools link in the -static library from the mkiocccentry clone! This also goes for the +You do NOT need to install jparse from the jparse +repo! The mkiocccentry tools link in the +static library from the mkiocccentry clone. This also goes for the dbg and -dyn_array libraries. In other words, -mkiocccentry contains everything you need.

+dyn_array libraries that the tools use. +

+

+In other words, mkiocccentry contains everything you need, and even if you +do install the libraries from their respective repos, it/they will not be +used when compiling the mkiocccentry tools. +

Jump to: top

iocccsize

mkiocccentry(1) will use code from iocccsize(1) which detects a number of issues that you may ignore, if you wish, as described above. -As we already discussed how to invoke this we will not include it here again. +As we already discussed how to invoke mkiocccentry, we will not include it +here again.

-This tool was originally part of a winning entry by Anthony C Howe, but with -some modifications over time, as things have changed. +In other words, you no longer need to run iocccsize manually. +

+

+The iocccsize tool was originally part of a winning entry by Anthony C +Howe, but with some modifications over time, as +things have changed.

Jump to: top

chkentry

@@ -824,12 +834,18 @@ See the FAQ on “reporting mkiocccentry bugs”.

-Assuming that chkentry(1) validates both .auth.json and +Assuming that chkentry(1) successfully validates both .auth.json and .info.json then the tarball will be formed and then txzchk(1) will be -executed. In this case, there should be no problems as mkiocccentry(1) should +executed. In this case, there should be no problems, as mkiocccentry(1) should NOT form a tarball if there are any issues.

+If mkiocccentry(1) is used and chkentry(1) fails to validate either of the +files, then unless it is a system specific problem, it is likely a bug in +mkiocccentry(1), chkentry(1) or possibly jparse, though these are quite +unlikely. +

+

Please see the FAQ on “validating .auth.json and/or .info.json files for more details on this tool and how you can use it to validate your @@ -918,7 +934,7 @@ FAQ on “report mkiocccentry bugs As you can see, the use of mkiocccentry(1) is HIGHLY RECOMMENDED.

-

Problems/bugs in tools

+

Problems and/or bugs in tools

Although the tools have been tested quite a bit, and although it is quite @@ -936,42 +952,88 @@ bug; it is a judgement call; if it’s a bug it’ll be addressed and if it’s that’s OK too!

+

Makefiles

+

-

We recommend that you use the example -Makefile, -renamed as Makefile of course, as the starting point for your submission’s -required Makefile. Feel free to modify the Makefile to suit your obfuscated -needs.

+We recommend AND encourage you to use the example Makefile here, +rather than the mkiocccentry repo’s Makefile.example, renamed as Makefile +of course, as the starting point for your submission’s required Makefile: +

+

-The rest of this section will assume that you are using some variant of the -example Makefile, -renamed as Makefile of course. +Feel free to modify the Makefile to suit your obfuscated +needs. +

+

+The rest of this section and its subsections will assume that you are using some +variant of the example Makefile, again renamed as Makefile.

We suggest that you compile your submission with a commonly available -std=gnu17 (ISO C 2017 with GNU extensions) C compiler.

+
+

Default compiler flags

+

Unless you clearly state otherwise in your remarks.md file AND put in your -submission’s Makefile, we will compile using -std=gnu17 -O3 -g3. +submission’s Makefile, we will compile using -std=gnu17 -O3 -g3!

-It is OK to require your submission to not be compiled +It is OK if you need to require your submission to not be compiled using the default -std=gnu17 -O3 -g3 settings. Simply explain why your submission should not be compiled using -std=gnu17 -O3 -g3 in -your remarks.md file and adjust your Makefile accordingly. +your remarks.md file and adjust your Makefile accordingly.

+An example reason is that the optimiser is known to break some programs, but +there are certainly other possible valid reasons. Again, just update the +Makefile and explain it in your remarks.md. +

+
+

Default compiler

+
+

IMPORTANT NOTE: The use of -std=gnu17 does NOT imply the use of the gcc compiler! We often start by compiling using the clang C compiler instead.

+PLEASE NOTE: in macOS, the compiler gcc found at /usr/bin/gcc is +in truth the clang compiler, as /usr/bin/gcc --version will show! +

+
+
+

C standard

+
+
+

You may change the standard under which your submission is compiled by modifying the CSTD Makefile variable. For example, to use c17 instead:

    CSTD= -std=c17
+
+

Default optimisation level

+
+

+You may change the level of optimization and compiler debug level +that your submission is compiled with, by modifying the OPT Makefile variable. +For example, to compile without optimization and with debug symbols: +

+
    OPT= -O0 -g3
+
+

Compiler warnings

+

For compilers, such as clang, that have the -Weverything option, while you may wish to try it, you should read our @@ -982,11 +1044,11 @@ cited there. This goes even if your version does not trigger a warning as some other version might!

-You may change the level of optimization and compiler debug level -that your submission is compiled with, by modifying the OPT Makefile variable. -For example, to compile without optimization and debug symbols: +On the other hand, if ${CC} has “clang” in the name, the example Makefile will +automatically enable -Weverything, so you might have to use -Wno-foo +options, as detailed below.

-
    OPT= -O0 -g3
+

Disabling warnings

There is no real penalty for compiler warnings. Sometimes compiler warnings cannot be helped: especially in the case of @@ -999,7 +1061,7 @@ more strict -Wall -Wextra -pedantic mode:

    CWARN= -Wall -Wextra -pedantic

-The two previous guidelines may be thought by some as being somewhat +The two previous guidelines might be thought by some as being somewhat contradictory. Isn’t life, and isn’t trying to satisfy “contradictory customer requirements” all too often like that? :-) Try to minimize warnings if you can. @@ -1019,13 +1081,18 @@ obfuscated code and even in some non-obfuscated code, and you should not worry about this, though it might be worth pointing out (see below for an example).

-Additionally: some compilers like to warn about certain use of char *s which -is not only dubious itself, but it obviously can’t (always) be avoided, so you +Some compilers like to warn about certain use of char *s which +might not only be dubious itself, but it obviously can’t (always) be avoided, so you should not worry about this either; this is the warning --Wno-unsafe-buffer-usage. See also the +-Wunsafe-buffer-usage and the way to disable it is -Wno-unsafe-buffer-usage. See also the FAQ on “forced warnings” and the -FAQ on “-Weverything”. +FAQ on “-Weverything”. +

+

+If you do have to disable warnings due to -Weverything automatically being +included, you might wish to state this fact. :-) +And even without -Weverything there can be warnings, as noted above.

If your submission issues lots of warnings but is otherwise @@ -1036,10 +1103,6 @@ produce a compiler error and refuse to compile your code: unles reason that is what you intend to happen in which case document that too in your remarks.md file. :-)

-

-PLEASE NOTE: in macOS, the compiler gcc found at /usr/bin/gcc is -in truth the clang compiler, as /usr/bin/gcc --version will show! -

All other things being equal, a program that must turn off fewer warnings will be considered better, for certain values of better.

@@ -1059,16 +1122,25 @@ Some compilers have reported this as an error, however, and if you have such a compiler you might want to not add it, or at least note in your remarks.md the OS, OS version and compiler that this shows up.

+
+

Defining macros in the Makefile

+

If you need to define something on the compile line, use the CDEFINE Makefile variable. For example:

    CDEFINE= -Dfoo -Dbar=baz
+
+

Include files in the Makefile

+

-If you need to include a file on the command line, use -the CINCLUDE Makefile variable. For example: +If you need to include a file (as in #include) on the command line, use the +CINCLUDE Makefile variable. For example:

    CINCLUDE= -include stdio.h
+
+

Magic in the Makefile

+

If you need to add other “magic” flags to your compile line, use the COTHER Makefile variable. For example: @@ -1089,16 +1161,32 @@ Again, please note that in macOS, /usr/bin/gcc is actually cl

We LIKE submissions that use an edited variant of the -example Makefile, +example Makefile, as described in the Makefile section, renamed as Makefile of course. This makes it easier for the IOCCC Judges to test your submission. And if your submissions wins, it makes it easier to integrate it into the Official IOCCC winner website.

We LIKE submissions that use an edited version of the -try.sh example script (and if you have alternate code, -the same applies with the try.alt.sh -example script). Of course, it is quite possible that only one invocation is +try.sh example script (and if you have alternate code, +the same applies with the try.alt.sh script): +

+ +

+Of course, it is quite possible that only one invocation is possible, so it is not necessarily detrimental to your submission if you do not include one, though we do like interesting and creative uses of submissions. See also the @@ -1341,9 +1429,9 @@ they do not work as documented.

is NOT the smallest C source file that when compiled and run, dumps core:

    main;

-Unless you specify -fwritable-strings (see COTHER in the example -Makefile) -do not assume this sort of code will work: +Unless you specify -fwritable-strings (see COTHER in the example +Makefile, described in the Makefile section), do not assume this +sort of code will work:

    char *T = "So many primes, so little time!";
     ...
@@ -1564,9 +1652,9 @@ CPU, we might just try your submission on that emulator as well :-)
 

If your submission MUST run only on a 64-bit or 32-bit architecture, then you MUST specify the -arch on your command line -(see ARCH in the example -Makefile). Do not assume a processor word size without -specifying -arch. For example: +(see ARCH in the example +Makefile, described in Makefile section). Do not assume a +processor word size without specifying -arch. For example:

    ARCH= -m64

diff --git a/next/guidelines.md b/next/guidelines.md index 2c6add942..5078c1d0b 100644 --- a/next/guidelines.md +++ b/next/guidelines.md @@ -52,7 +52,7 @@ Jump to: [top](#)

-These [IOCCC guidelines](guidelines.html) are version **28.25 2024-12-04**. +These [IOCCC guidelines](guidelines.html) are version **28.25 2024-12-05**.

**IMPORTANT**: Be **SURE** to read the [IOCCC rules](rules.html). @@ -140,8 +140,10 @@ bytes.

The new default way to compile submissions: `-std=gnu17 -O3 -g3 --Wall -Wextra -pedantic`. See below for more details about the example Makefile -for more help. +-Wall -Wextra -pedantic`. +You **are encouraged** to use the example Makefile here, rather than the +`mkiocccentry` repo. For details and help, see below in the [Makefile +section](#makefile).

@@ -159,12 +161,6 @@ repo](https://github.com/ioccc-src/mkiocccentry). to account for the new [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry) tools.

-

-You **are encouraged** to use [this -Makefile.example](Makefile.example), -rather than the one at the `mkiocccentry` repo. -

-

The IOCCC submission URL, [when the IOCCC is open](../status.html#open), is [submit.ioccc.org](https://submit.ioccc.org/). @@ -450,18 +446,27 @@ details.

-The original `jparse` code, co-developed by Landon and Cody Boone Ferguson in +The original `jparse` code, co-developed by +[Landon Curt Noll](http://www.isthe.com/chongo/index.html) and +[Cody Boone Ferguson](../authors.html#Cody_Boone_Ferguson) in 2022, comes from the [jparse repo](https://github.com/xexyl/jparse) **but the mkiocccentry tools use a _clone_** of this repo **at a _specific_ release**. Thus the `mkiocccentry` will at times be behind the `jparse` repo!

-You do **NOT** need to install `jparse`! The `mkiocccentry` tools link in the -static library from the `mkiocccentry` clone! This also goes for the +You do **NOT need to install** `jparse` from the [jparse +repo](https://github.com/xexyl/jparse)! The `mkiocccentry` tools link in the +static library from the `mkiocccentry` clone. This also goes for the [dbg](https://github.com/lcn2/dbg) and -[dyn_array](https://github.com/lcn2/dyn_array) libraries. In other words, -`mkiocccentry` contains **everything** you need. +[dyn_array](https://github.com/lcn2/dyn_array) libraries that the tools use. +

+ +

+In other words, `mkiocccentry` **contains everything** you need, and _even if you +do install_ the libraries from their respective repos, it/they will **not be +used** when compiling the `mkiocccentry` tools. +

Jump to: [top](#) @@ -472,12 +477,18 @@ Jump to: [top](#)

`mkiocccentry(1)` will use code from `iocccsize(1)` which detects a number of issues that you may ignore, if you wish, as described above. -As we already discussed how to invoke this we will not include it here again. +As we already discussed how to invoke `mkiocccentry`, we will not include it +here again.

-This tool was originally part of a winning entry by Anthony C Howe, but with -some modifications over time, as things have changed. +In other words, you no longer need to run `iocccsize` manually. +

+ +

+The `iocccsize` tool was originally part of a winning entry by [Anthony C +Howe](../authors.html#Anthony_C_Howe), but with some modifications over time, as +things have changed.

Jump to: [top](#) @@ -500,12 +511,19 @@ FAQ on "[reporting mkiocccentry bugs](../faq.html#mkiocccentry_bugs)".

-Assuming that `chkentry(1)` validates both `.auth.json` and +Assuming that `chkentry(1)` successfully validates both `.auth.json` and `.info.json` then the tarball will be formed and then `txzchk(1)` will be -executed. In this case, there should be no problems as `mkiocccentry(1)` should +executed. In this case, there should be no problems, as `mkiocccentry(1)` should **NOT** form a tarball if there are any issues.

+

+If `mkiocccentry(1)` is used and `chkentry(1)` fails to validate either of the +files, then unless it is a system specific problem, it is likely a bug in +`mkiocccentry(1)`, `chkentry(1)` or possibly `jparse`, though these are quite +unlikely. +

+

Please see the FAQ on "[validating .auth.json and/or .info.json files](../faq.html#chkentry) @@ -620,7 +638,7 @@ As you can see, the use of `mkiocccentry(1)` is **HIGHLY RECOMMENDED**.

-# Problems/bugs in tools +# Problems and/or bugs in tools

@@ -642,20 +660,30 @@ that's OK too!

+
# Makefiles
+

-We **recommend** that you use the [example -Makefile](Makefile.example), -renamed as `Makefile` of course, as the starting point for your submission's -required `Makefile`. Feel free to modify the `Makefile` to suit your obfuscated -needs. +We **recommend** AND **encourage** you to use the example Makefile **here**, +rather than the `mkiocccentry` repo's `Makefile.example`, renamed as `Makefile` +of course, as the starting point for your submission's required `Makefile`: +

+ +-

[view example +Makefile](%%REPO_URL%%/next/Makefile.example)

+-

download example Makefile

-The rest of this section will assume that you are using some variant of the -[example Makefile](Makefile.example), -renamed as `Makefile` of course. +Feel free to modify the `Makefile` to suit your obfuscated +needs. +

+ +

+The rest of this section and its subsections will assume that you are using some +variant of the example `Makefile`, again renamed as `Makefile`.

@@ -663,23 +691,49 @@ We suggest that you compile your submission with a commonly available `-std=gnu17` (ISO C 2017 with GNU extensions) C compiler.

+
+## Default compiler flags +
+

Unless you **clearly state** otherwise in your `remarks.md` file **AND** put in your -submission's `Makefile`, we **will** compile using `-std=gnu17 -O3 -g3`. +submission's `Makefile`, we **will** compile using `-std=gnu17 -O3 -g3`!

-It is **OK** to require your submission to not be compiled +It **is OK** if you need to require your submission to **not be** compiled using the default `-std=gnu17 -O3 -g3` settings. Simply **explain why** your submission should not be compiled using `-std=gnu17 -O3 -g3` in -your `remarks.md` file and adjust your `Makefile` accordingly. +your `remarks.md` file **and** adjust your `Makefile` accordingly.

+

+An example reason is that the optimiser is known to break some programs, but +there are certainly other possible valid reasons. Again, just update the +`Makefile` and explain it in your `remarks.md`. +

+ +
+## Default compiler +
+

**IMPORTANT NOTE**: The use of `-std=gnu17` does **NOT** imply the use of the `gcc` compiler! We often start by compiling using the **clang** C compiler instead.

+

+**PLEASE NOTE**: in macOS, the compiler `gcc` found at `/usr/bin/gcc` is +in truth the `clang` compiler, as `/usr/bin/gcc --version` will show! +

+ + +
+
+## C standard +
+
+

You may change the standard under which your submission is compiled by modifying the `CSTD` Makefile variable. For example, to use `c17` instead: @@ -690,6 +744,24 @@ by modifying the `CSTD` Makefile variable. For example, to use `c17` instead: CSTD= -std=c17 ``` +

+## Default optimisation level +
+ +

+You may change the level of optimization and compiler debug level +that your submission is compiled with, by modifying the `OPT` Makefile variable. +For example, to compile without optimization and with debug symbols: +

+ +``` + OPT= -O0 -g3 +``` + +
+## Compiler warnings +
+

For compilers, such as `clang`, that have the `-Weverything` option, while you may wish to try it, you should read our @@ -701,14 +773,14 @@ other version might!

-You may change the level of optimization and compiler debug level -that your submission is compiled with, by modifying the `OPT` Makefile variable. -For example, to compile without optimization and debug symbols: +On the other hand, if `${CC}` has "`clang`" in the name, the example `Makefile` will +automatically enable `-Weverything`, so you might have to use `-Wno-foo` +options, as detailed below.

-``` - OPT= -O0 -g3 -``` +
+## Disabling warnings +

There is no real penalty for compiler warnings. Sometimes @@ -727,7 +799,7 @@ more strict ` -Wall -Wextra -pedantic` mode: ```

-The two previous guidelines may be thought by some as being somewhat +The two previous guidelines might be thought by some as being somewhat contradictory. Isn't life, and isn't trying to satisfy "contradictory customer requirements" all too often like that? :-) Try to minimize warnings if you can. @@ -750,13 +822,20 @@ about this, though it might be worth pointing out (see below for an example).

-Additionally: some compilers like to warn about certain use of `char *`s which -is not only dubious itself, but it obviously can't (always) be avoided, so you +Some compilers like to warn about certain use of `char *`s which +might not only be dubious itself, but it obviously can't (always) be avoided, so you should not worry about this either; this is the warning -`-Wno-unsafe-buffer-usage`. See also the +`-Wunsafe-buffer-usage` and the way to disable it is `-Wno-unsafe-buffer-usage`. See also the FAQ on "[forced warnings](../faq.html#forced_warnings)" and the -FAQ on "[`-Weverything`](../faq.html#weverything)". +FAQ on "[-Weverything](../faq.html#weverything)". +

+ + +

+If you do have to disable warnings due to `-Weverything` automatically being +included, you might wish to state this fact. :-) +And even without `-Weverything` there can be warnings, as noted above.

@@ -769,11 +848,6 @@ reason that is what you intend to happen in which case document that too in your `remarks.md` file. :-)

-

-**PLEASE NOTE**: in macOS, the compiler `gcc` found at `/usr/bin/gcc` is -in truth the `clang` compiler, as `/usr/bin/gcc --version` will show! -

- All other things being equal, a program that must turn off fewer warnings will be considered better, for certain values of better. @@ -813,6 +887,10 @@ such a compiler you might want to not add it, or at least note in your `remarks.md` the OS, OS version and compiler that this shows up.

+
+## Defining macros in the Makefile +
+

If you need to define something on the compile line, use the `CDEFINE` Makefile variable. For example: @@ -822,9 +900,13 @@ the `CDEFINE` Makefile variable. For example: CDEFINE= -Dfoo -Dbar=baz ``` +

+## Include files in the Makefile +
+

-If you need to include a file on the command line, use -the `CINCLUDE` Makefile variable. For example: +If you need to include a file (as in `#include`) on the command line, use the +`CINCLUDE` Makefile variable. For example:

``` @@ -832,6 +914,10 @@ the `CINCLUDE` Makefile variable. For example: ``` +
+## Magic in the Makefile +
+

If you need to add other "**magic**" flags to your compile line, use the `COTHER` Makefile variable. For example: @@ -860,7 +946,7 @@ Jump to: [top](#)

We **LIKE** submissions that use an edited variant of the -[example Makefile](Makefile.example), +example Makefile, as described in the [Makefile section](#makefile), renamed as `Makefile` of course. This makes it easier for the [IOCCC Judges](../judges.html) to test your submission. And if your submissions wins, it makes it easier to integrate it into the [Official IOCCC winner website](https://www.ioccc.org/index.html). @@ -868,9 +954,17 @@ the [Official IOCCC winner website](https://www.ioccc.org/index.html).

We **LIKE** submissions that use an edited version of the -[try.sh](try.sh) example script (and if you have alternate code, -the same applies with the [try.alt.sh](try.alt.sh) -example script). Of course, it is quite possible that only one invocation is +`try.sh` example script (and if you have alternate code, +the same applies with the `try.alt.sh` script): +

+ +-

[view example try.sh](%%REPO_URL%%/next/try.sh)

+-

download example try.sh

+-

[view example try.alt.sh](%%REPO_URL%%/next/try.alt.sh)

+-

download example try.alt.sh

+ +

+Of course, it is quite possible that only one invocation is possible, so it is not necessarily detrimental to your submission if you do not include one, though we do like interesting and creative uses of submissions. See also the @@ -1161,9 +1255,9 @@ is NOT the smallest C source file that when compiled and run, dumps core: ```

-Unless you specify `-fwritable-strings` (see `COTHER` in the [example -Makefile](Makefile.example)) -do not assume this sort of code will work: +Unless you specify `-fwritable-strings` (see `COTHER` in the example +Makefile, described in the [Makefile section](#makefile)), do not assume this +sort of code will work:

``` @@ -1426,9 +1520,9 @@ CPU, we might just try your submission on that emulator as well :-)

If your submission **MUST** run only on a 64-bit or 32-bit architecture, then you **MUST** specify the `-arch` on your command line -(see `ARCH` in the [example -Makefile](Makefile.example)). Do not assume a processor word size without -specifying `-arch`. For example: +(see `ARCH` in the example +Makefile, described in [Makefile section](#makefile)). Do not assume a +processor word size without specifying `-arch`. For example:

``` diff --git a/next/rules.html b/next/rules.html index 43740a14b..dfd585182 100644 --- a/next/rules.html +++ b/next/rules.html @@ -466,7 +466,7 @@ writing by contacting the judges.

Jump to: top

-These IOCCC rules are version 28.12 2024-12-04. +These IOCCC rules are version 28.12 2024-12-05.

IMPORTANT: Be sure to read the IOCCC guidelines.

Jump to: top

@@ -905,7 +905,7 @@ those requirements.

The Makefile MUST be a non-empty file in GNU Makefile form. See the -Makefile.example, +Makefile section in the guidelines, the FAQ on “submission Makefile” and the @@ -1092,8 +1092,9 @@ make(1) compatibility the IOCCC supports for more details.

You are ENCOURAGED to use -Makefile.example, -renamed as Makefile of course, for help in constructing your Makefile. +Makefile example, renamed as Makefile of course, for help in constructing your +Makefile. See the Makefile section in the +guidelines for more details.

The target of the Makefile must be called prog. The original C source file must be called prog.c.

diff --git a/next/rules.md b/next/rules.md index faaad4147..d2acd5c39 100644 --- a/next/rules.md +++ b/next/rules.md @@ -57,7 +57,7 @@ Jump to: [top](#) Jump to: [top](#)

-These [IOCCC rules](rules.html) are version **28.12 2024-12-04**. +These [IOCCC rules](rules.html) are version **28.12 2024-12-05**.

**IMPORTANT**: Be sure to read the [IOCCC guidelines](guidelines.html). @@ -607,7 +607,7 @@ those requirements.

The `Makefile` **MUST** be a **non**-empty file in **[GNU Makefile](https://www.gnu.org/software/make/manual/make.html)** form. See the -[Makefile.example](Makefile.example), +[Makefile section in the guidelines](guidelines.html#makefile), the FAQ on "[submission Makefile](../faq.html#submission_makefiles)" and the @@ -812,8 +812,9 @@ supports](../faq.html#make_compatibility) for more details.

You are **ENCOURAGED** to use -[Makefile.example](Makefile.example), -renamed as `Makefile` of course, for help in constructing your `Makefile`. +Makefile example, renamed as `Makefile` of course, for help in constructing your +`Makefile`. See the [Makefile section](guidelines.html#makefile) in the +guidelines for more details.

The target of the Makefile must be called `prog`. The original