Skip to content

Commit 8a72709

Browse files
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 3fc10c6 commit 8a72709

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
@@ -21,7 +21,7 @@ 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 -std=gnu++98 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
24+
compiler.cpp.flags=-c -g -Os -w -std=gnu++11 -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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ 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 -std=gnu++98 -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++11 -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)