Skip to content

Commit ddf4d87

Browse files
matthijskooijmancmaglie
authored andcommitted
Enable C++11 support
This uses the gnu++11 standard, which is C++11 with GNU extensions. C++11 should be full compatible with the previously used C++98 standards, so all pre-existing sketches should continue to work.
1 parent 770a695 commit ddf4d87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hardware/arduino/avr/platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections
2727
compiler.c.elf.cmd=avr-gcc
2828
compiler.S.flags=-c -g -x assembler-with-cpp
2929
compiler.cpp.cmd=avr-g++
30-
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++98 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
30+
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
3131
compiler.ar.cmd=avr-ar
3232
compiler.ar.flags=rcs
3333
compiler.objcopy.cmd=avr-objcopy

hardware/arduino/sam/platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ compiler.c.elf.flags=-Os -Wl,--gc-sections
2525
compiler.S.cmd=arm-none-eabi-gcc
2626
compiler.S.flags=-c -g -x assembler-with-cpp -mthumb
2727
compiler.cpp.cmd=arm-none-eabi-g++
28-
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++98 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD
28+
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD
2929
compiler.ar.cmd=arm-none-eabi-ar
3030
compiler.ar.flags=rcs
3131
compiler.objcopy.cmd=arm-none-eabi-objcopy

0 commit comments

Comments
 (0)