Skip to content

Commit 9e480a8

Browse files
committed
[ext] Add more operator new/delete overloads missing on AVRs
1 parent 9c04575 commit 9e480a8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ jobs:
262262
if: always()
263263
run: |
264264
(cd test && make compile-arduino-uno)
265-
(cd test && make compile-arduino-nano_A compile-arduino-nano_C compile-arduino-nano_D compile-arduino-nano_E compile-arduino-nano_G)
265+
(cd test && make compile-arduino-nano_A compile-arduino-nano_B compile-arduino-nano_C compile-arduino-nano_D compile-arduino-nano_E compile-arduino-nano_F compile-arduino-nano_G)
266266
- name: Compile AVR Unittests ATmega
267267
if: always()
268268
run: |
269-
(cd test && make compile-mega-2560-pro_A compile-mega-2560-pro_B)
269+
(cd test && make compile-mega-2560-pro_A compile-mega-2560-pro_B compile-mega-2560-pro_C)
270270
- name: Quick compile HAL for AVR Devices
271271
if: always()
272272
run: |

ext/gcc/new_delete.cpp.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ void* operator new (std::size_t size, const std::nothrow_t&) noexcept { return
8888
modm_weak
8989
void* operator new[](std::size_t size, const std::nothrow_t&) noexcept { return malloc(size); }
9090

91+
modm_weak
92+
void* operator new (std::size_t size, std::align_val_t) { return new_assert<false>(size); }
93+
modm_weak
94+
void* operator new[](std::size_t size, std::align_val_t) { return new_assert<false>(size); }
95+
9196
%% if with_memory_traits
9297
modm_weak
9398
void* operator new (std::size_t size, modm::MemoryTraits traits) { return new_assert<true>(size, traits); }
@@ -126,3 +131,8 @@ modm_weak
126131
void operator delete (void* ptr, const std::nothrow_t&) noexcept { operator_delete(ptr); }
127132
modm_weak
128133
void operator delete[](void* ptr, const std::nothrow_t&) noexcept { operator_delete(ptr); }
134+
135+
modm_weak
136+
void operator delete (void* ptr, std::size_t, std::align_val_t) noexcept { operator_delete(ptr); }
137+
modm_weak
138+
void operator delete[](void* ptr, std::size_t, std::align_val_t) noexcept { operator_delete(ptr); }

0 commit comments

Comments
 (0)