From 1110280c24c86b32273e0d5984d1a078931e2f07 Mon Sep 17 00:00:00 2001
From: Landon Curt Noll
When declaring local or global variables, you should declare the type:
int this_is_fine;
this_is_not; /* <-- Try to avoid implicit type declarations */
-We suggest that you compile your entry with a commonly available -c11 (formerly C1X) C compiler (ISO/IEC 9899:2011).
-Do not assume that optional c11 features are supported. If you -must use an optional c11 feature, use feature test macros so -that implementations without such optional c11 features will see -an entry that is both functional and interesting.
-We LIKE entries that have workarounds that allow someone with -nean older c99 (ISO/IEC 9899:1999) compiler to be able to compile -and enjoy your entry.
-We really LIKE “lint free” code. However lint is a toll of the past. -So try to ensure that your entry compiles warning free. If possible, -to compile compile your code using:
+| We suggest that you compile your entry with a commonly available
+gnu17 (ISO C 2017 with GNU extensions) C compiler.
We really LIKE code that has a minimum of warnings, especially under the
+more strict -Wall -Wextra -pedantic mode:
-Wall -Wextra -pedantic
For compilers, such as clang, that have the -Weverything option, try
to make your code compile warning free using:
Makefile.
warnings will be considered better, for certain values of better.
| Unless you clearly state otherwise in your remarks.md file AS WELL AS in
your “how to build” / Makefile we will compile using:
-O3 -std=c11
-Anyone care to submit an entry that makes gratuitous use of all -of the c11 reserved words in their intended C language contexts? -NOTE: As with the use of the word Belgium, the use of certain gratuitous -c11 reserved words may be completely banned in all parts of the Galaxy, -except in one small part (ISO/IEC 9899:2011) where they might not truly -understand the implications of such words.
- http://hitchhikers.wikia.com/wiki/Belgium
- http://www.bezem.de/pdf/ReservedWordsInC.pdf
-DO NOT assume that we will use gcc to compile your program. -We will first try to compile your program using Clang.
+ -O3 -std=gnu17
+| There is no real penalty for compiler warnings. Sometimes compiler warnings cannot be helped: especially in the case of obfuscated C. :-) So if you cannot easily get rid of a compiler warning, try not fret too much. Just add the needed “-Wno-somethings” to your Makefile. We suggest you add then to the CSILENCE= line, if you use some variant of the example Makefile from the IOCCC mkiocccentry repo.
| If you do add “-Wno-somethings” to your Makefile, consider also adding -Wno-unknown-warning-option just in case the warning you use is not available in the compilers we use test your submission.
| DO NOT assume that we will use gcc to compile your program.
+We will first try to compile your program using clang.
It is much better to not use any obscure compiler flags if you can help it. We want to discourage the use of obscure compiler flags that would make the program less portable.
diff --git a/next/guidelines.md b/next/guidelines.md index 15fe7e3be..adb6c0298 100644 --- a/next/guidelines.md +++ b/next/guidelines.md @@ -255,21 +255,11 @@ When declaring local or global variables, you should declare the type: this_is_not; /* <-- Try to avoid implicit type declarations */ ``` -We suggest that you compile your entry with a commonly available -c11 (formerly C1X) C compiler (ISO/IEC 9899:2011). +**`|`** We suggest that you compile your entry with a commonly available +gnu17 (ISO C 2017 with GNU extensions) C compiler. -Do not assume that optional c11 features are supported. If you -must use an optional c11 feature, use feature test macros so -that implementations without such optional c11 features will see -an entry that is both functional and interesting. - -We **LIKE** entries that have workarounds that allow someone with -nean older c99 (ISO/IEC 9899:1999) compiler to be able to compile -and enjoy your entry. - -We really **LIKE** "lint free" code. However lint is a toll of the past. -So try to ensure that your entry compiles warning free. If possible, -to compile compile your code using: +We really **LIKE** code that has a minimum of warnings, especially under the +more strict ` -Wall -Wextra -pedantic` mode: ``` -Wall -Wextra -pedantic @@ -302,23 +292,15 @@ warnings will be considered better, for certain values of better. your "how to build" / Makefile we will compile using: ``` - -O3 -std=c11 + -O3 -std=gnu17 ``` -Anyone care to submit an entry that makes gratuitous use of all -of the c11 reserved words in their intended C language contexts? -NOTE: As with the use of the word Belgium, the use of certain gratuitous -c11 reserved words may be completely banned in all parts of the Galaxy, -except in one small part (ISO/IEC 9899:2011) where they might not truly -understand the implications of such words. +**`|`** There is no real penalty for compiler warnings. Sometimes compiler warnings cannot be helped: especially in the case of obfuscated C. :-) So if you cannot easily get rid of a compiler warning, try not fret too much. Just add the needed "`-Wno-somethings`" to your Makefile. We suggest you add then to the `CSILENCE=` line, if you use some variant of the [example Makefile](https://github.com/ioccc-src/mkiocccentry/blob/master/Makefile.example) from the [IOCCC mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry). -``` - http://hitchhikers.wikia.com/wiki/Belgium - http://www.bezem.de/pdf/ReservedWordsInC.pdf -``` +**`|`** If you do add "`-Wno-somethings`" to your Makefile, consider also adding `-Wno-unknown-warning-option` just in case the warning you use is not available in the compilers we use test your submission. -**DO NOT** assume that we will use gcc to compile your program. -We will first try to compile your program using Clang. +**`|`** **DO NOT** assume that we will use **gcc** to compile your program. +We will first try to compile your program using **clang**. It is much better to not use any obscure compiler flags if you can help it. We want to discourage the use of obscure compiler