1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

exceptions: optionally enforce c++ standards (#6333)

* exceptions: 3 choices: legacy, std::new never returns 0, or exceptions enabled
* arduino_new (doc, example, array)
This commit is contained in:
david gauchard
2019-08-29 00:21:10 +02:00
committed by GitHub
parent 0a031ce957
commit 85f1ea7c78
6 changed files with 420 additions and 65 deletions

View File

@ -883,8 +883,11 @@ macros = {
]),
'exception_menu': collections.OrderedDict([
( '.menu.exception.disabled', 'Disabled' ),
( '.menu.exception.disabled.build.exception_flags', '-fno-exceptions' ),
( '.menu.exception.legacy', 'Legacy (new can return nullptr)' ),
( '.menu.exception.legacy.build.exception_flags', '-fno-exceptions' ),
( '.menu.exception.legacy.build.stdcpp_lib', '-lstdc++' ),
( '.menu.exception.disabled', 'Disabled (new can abort)' ),
( '.menu.exception.disabled.build.exception_flags', '-fno-exceptions -DNEW_OOM_ABORT' ),
( '.menu.exception.disabled.build.stdcpp_lib', '-lstdc++' ),
( '.menu.exception.enabled', 'Enabled' ),
( '.menu.exception.enabled.build.exception_flags', '-fexceptions' ),