diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2014-07-07 19:43:51 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-07-16 13:06:10 +0200 |
commit | e798ff32b7297127eaa8b4fac2d45ebbe9cc21d4 (patch) | |
tree | c595991828308b97e5ce44fbb6f477c89330a84f | |
parent | 72a5ef3c7834bd3ebf0fcccdb272a334645ba3a7 (diff) |
Enable C11 support
This uses the gnu11 standard, which is C11 with GNU extensions.
Previously, gnu89 was being used, which is pretty ancient by now. C99
brings some important improvements, some of which were already available
and used even without this option. C11 is more recent and brings more
minor improvements. Most notable feature is the static_assert statement,
allowing checking invariants at compiletime using the full C
expressions.
-rw-r--r-- | platform.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform.txt b/platform.txt index f2a27f7..641b0b9 100644 --- a/platform.txt +++ b/platform.txt @@ -20,7 +20,7 @@ compiler.warning_flags.all=-Wall -Wextra # Default "compiler.path" is correct, change only if you want to overidde the initial value compiler.path={runtime.tools.avr-gcc.path}/bin/ compiler.c.cmd=avr-gcc -compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu89 -ffunction-sections -fdata-sections -MMD +compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD # -w flag added to avoid printing a wrong warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396 # This is fixed in gcc 4.8.3 and will be removed as soon as we update the toolchain compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections |