Skip to content

Commit e798ff3

Browse files
matthijskooijmancmaglie
authored andcommitted
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.
1 parent 72a5ef3 commit e798ff3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ compiler.warning_flags.all=-Wall -Wextra
2020
# Default "compiler.path" is correct, change only if you want to overidde the initial value
2121
compiler.path={runtime.tools.avr-gcc.path}/bin/
2222
compiler.c.cmd=avr-gcc
23-
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu89 -ffunction-sections -fdata-sections -MMD
23+
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD
2424
# -w flag added to avoid printing a wrong warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396
2525
# This is fixed in gcc 4.8.3 and will be removed as soon as we update the toolchain
2626
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections

0 commit comments

Comments
 (0)