diff --git a/CODING_CONVENTIONS.md b/CODING_CONVENTIONS.md index 24e6c05953..f39db60f6e 100644 --- a/CODING_CONVENTIONS.md +++ b/CODING_CONVENTIONS.md @@ -2,7 +2,7 @@ ## General -* Code shall be [C99](http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf) +* Code shall be [C11](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf) compliant. * Avoid dynamic memory allocation (malloc/free, new, etc.)! It will break real-time guarantees, increase code complexity, and make it more likely to use diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 98de7a2fea..9c08c7d8b9 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -23,7 +23,7 @@ export GPROF ?= gprof CFLAGS += -Wall -Wextra -pedantic $(CFLAGS_DBG) CFLAGS_DBG ?= -g3 -# default std set to gnu99 of not overwritten by user +# default std set to gnu11 if not overwritten by user ifeq (,$(filter -std=%, $(CFLAGS))) CFLAGS += -std=gnu11 endif diff --git a/makefiles/cflags.inc.mk b/makefiles/cflags.inc.mk index 0fb5fcc512..d68ea018d0 100644 --- a/makefiles/cflags.inc.mk +++ b/makefiles/cflags.inc.mk @@ -1,8 +1,8 @@ # Test if the input language was specified externally. -# Otherwise test if the compiler unterstands the "-std=c99" flag, and use it if so. +# Otherwise test if the compiler unterstands the "-std=c11" flag, and use it if so. ifeq ($(filter -std=%,$(CFLAGS)),) - ifeq ($(shell $(CC) -std=c99 -E - 2>/dev/null >/dev/null /dev/null >/dev/null