diff --git a/Makefile b/Makefile index 7433d24..f6c333c 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ TESTS=$(wildcard tests/*c) $(wildcard tests/**/*.c) OUTDIR=bin CMP=gcc OPT_ARGS=-O2 -flto -WARN_ARGS=-Wall -Wno-discarded-qualifiers +WARN_ARGS=-Wall -Wno-discarded-qualifiers -std=c17 -all: clear_c clear_bin build_test build_test_dbg build_lib build_dll +all: clear_c clear_bin build_test build_lib clear_c: clear @@ -17,7 +17,7 @@ clear_bin: mkdir $(OUTDIR) clang: CMP=clang -clang: WARN_ARGS=-Wall -Wno-ignored-qualifiers -Wno-incompatible-pointer-types-discards-qualifiers +clang: WARN_ARGS=-Wall -Wno-ignored-qualifiers -Wno-incompatible-pointer-types-discards-qualifiers -std=c17 clang: all ###################################### diff --git a/base/std.h b/base/std.h index a2415d2..4607014 100644 --- a/base/std.h +++ b/base/std.h @@ -31,6 +31,9 @@ extern "C" { #else #define CALL #endif + #ifndef typeof + #define typeof __typeof__ + #endif #else #pragma GCC error "unknown compiler" #endif