Skip to content

Commit 3fc10c6

Browse files
Explicitely specify C and C++ standards to use
This does not change anything, it just makes the defaults explicit.
1 parent b032f74 commit 3fc10c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hardware/arduino/avr/platform.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ version=1.5.8
1414
# Default "compiler.path" is correct, change only if you want to overidde the initial value
1515
compiler.path={runtime.ide.path}/hardware/tools/avr/bin/
1616
compiler.c.cmd=avr-gcc
17-
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD
17+
compiler.c.flags=-c -g -Os -w -std=gnu99 -ffunction-sections -fdata-sections -MMD
1818
# -w flag added to avoid printing a wrong warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396
1919
# This is fixed in gcc 4.8.3 and will be removed as soon as we update the toolchain
2020
compiler.c.elf.flags=-w -Os -Wl,--gc-sections
2121
compiler.c.elf.cmd=avr-gcc
2222
compiler.S.flags=-c -g -x assembler-with-cpp
2323
compiler.cpp.cmd=avr-g++
24-
compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
24+
compiler.cpp.flags=-c -g -Os -w -std=gnu++98 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
2525
compiler.ar.cmd=avr-ar
2626
compiler.ar.flags=rcs
2727
compiler.objcopy.cmd=avr-objcopy

hardware/arduino/sam/platform.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ version=1.5.8
1212

1313
compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
1414
compiler.c.cmd=arm-none-eabi-gcc
15-
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD
15+
compiler.c.flags=-c -g -Os -w -std=gnu99 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD
1616
compiler.c.elf.cmd=arm-none-eabi-gcc
1717
compiler.c.elf.flags=-Os -Wl,--gc-sections
1818
compiler.S.flags=-c -g -x assembler-with-cpp
1919
compiler.cpp.cmd=arm-none-eabi-g++
20-
compiler.cpp.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD
20+
compiler.cpp.flags=-c -g -Os -w -std=gnu++98 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD
2121
compiler.ar.cmd=arm-none-eabi-ar
2222
compiler.ar.flags=rcs
2323
compiler.objcopy.cmd=arm-none-eabi-objcopy

0 commit comments

Comments
 (0)