diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-01-13 22:05:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-01-13 22:05:06 -0800 |
commit | 44ebf376177a4e7f06e0cb4a6cb660b9f232d4eb (patch) | |
tree | 491b7c76de6176cb48c59b54f45322a2c4e15cde | |
parent | 653b17d6797d94d52f908a639d2f3743bebf4510 (diff) | |
download | halt3-44ebf376177a4e7f06e0cb4a6cb660b9f232d4eb.tar.gz halt3-44ebf376177a4e7f06e0cb4a6cb660b9f232d4eb.tar.bz2 halt3-44ebf376177a4e7f06e0cb4a6cb660b9f232d4eb.zip |
Tightening the compilation.halt3-1.1
- Provide prototypes for the deciders, so they are diagnosed if incorrect.
- Add some compiler language and diagnostic options.
-rwxr-xr-x | genprog.sh | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -28,6 +28,8 @@ set -e # stop on any errors MYDIR=$(dirname "$0") +CFLAGS="-Wall -W -ansi -Wno-unused -Wstrict-prototypes -Wmissing-prototypes" + . "$MYDIR"/lib.sh if [ $# != 2 ] ; then @@ -61,6 +63,9 @@ cat > ${PROGRAM_BASENAME}.c <<! #include <stdlib.h> #include "ternary.h" +ternary halting_decider(const char *, const char *); +int error_decider(const char *, const char *, const char *); + #define HD_HASH "$HD_HASH" #define ED_HASH "$ED_HASH" #define PG_BASE "$PROGRAM_BASENAME" @@ -115,7 +120,7 @@ int main(int argc, char **argv) ! printf "compiling %s to %s\n" $PROGRAM_BASENAME.c $PROGRAM_BASENAME -gcc $PROGRAM_BASENAME.c -o $PROGRAM_BASENAME +gcc $CFLAGS $PROGRAM_BASENAME.c -o $PROGRAM_BASENAME printf "\n" |