From 14d0c1f43616c12ab35c83ac8358ce3c09b468d1 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Mon, 7 Nov 2022 10:49:46 +0100 Subject: [PATCH 1/3] GCC 11/C++ 20 - Remove deprecated type_traits --- platform/cxxsupport/mstd_type_traits | 3 --- 1 file changed, 3 deletions(-) diff --git a/platform/cxxsupport/mstd_type_traits b/platform/cxxsupport/mstd_type_traits index 0513ba91f3e..240ffdf3f55 100644 --- a/platform/cxxsupport/mstd_type_traits +++ b/platform/cxxsupport/mstd_type_traits @@ -210,7 +210,6 @@ using std::is_trivial; using std::is_trivially_copyable; using std::is_standard_layout; using std::is_pod; -using std::is_literal_type; using std::is_empty; using std::is_polymorphic; using std::is_abstract; @@ -274,8 +273,6 @@ using std::decay; using std::decay_t; using std::common_type; using std::common_type_t; -using std::result_of; -using std::result_of_t; /* C++20 remove_cvref */ template From 2ddef5f10d3a813cadc78c0934f47ea504be8d1f Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Mon, 7 Nov 2022 10:50:41 +0100 Subject: [PATCH 2/3] GCC 11/C++ 20 - Remove redundant templating of methods --- .../include/ble/gatt/GattCharacteristic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h b/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h index 3d63d2730ca..96e17dfbf22 100644 --- a/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h +++ b/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h @@ -1915,7 +1915,7 @@ class ReadOnlyGattCharacteristic : public GattCharacteristic { * attribute value that equals sizeof(T). For a variable length alternative, * use GattCharacteristic directly. */ - ReadOnlyGattCharacteristic( + ReadOnlyGattCharacteristic( const UUID &uuid, T *valuePtr, uint8_t additionalProperties = BLE_GATT_CHAR_PROPERTIES_NONE, @@ -1958,7 +1958,7 @@ class WriteOnlyGattCharacteristic : public GattCharacteristic { * attribute value with maximum size equal to sizeof(T). For a fixed length * alternative, use GattCharacteristic directly. */ - WriteOnlyGattCharacteristic( + WriteOnlyGattCharacteristic( const UUID &uuid, T *valuePtr, uint8_t additionalProperties = BLE_GATT_CHAR_PROPERTIES_NONE, @@ -2000,7 +2000,7 @@ class ReadWriteGattCharacteristic : public GattCharacteristic { * attribute value with maximum size equal to sizeof(T). For a fixed length * alternative, use GattCharacteristic directly. */ - ReadWriteGattCharacteristic( + ReadWriteGattCharacteristic( const UUID &uuid, T *valuePtr, uint8_t additionalProperties = BLE_GATT_CHAR_PROPERTIES_NONE, @@ -2043,7 +2043,7 @@ class WriteOnlyArrayGattCharacteristic : public GattCharacteristic { * attribute value with maximum size equal to sizeof(T) * NUM_ELEMENTS. * For a fixed length alternative, use GattCharacteristic directly. */ - WriteOnlyArrayGattCharacteristic( + WriteOnlyArrayGattCharacteristic( const UUID &uuid, T valuePtr[NUM_ELEMENTS], uint8_t additionalProperties = BLE_GATT_CHAR_PROPERTIES_NONE, @@ -2087,7 +2087,7 @@ class ReadOnlyArrayGattCharacteristic : public GattCharacteristic { * attribute value that equals sizeof(T) * NUM_ELEMENTS. For a variable * length alternative, use GattCharacteristic directly. */ - ReadOnlyArrayGattCharacteristic( + ReadOnlyArrayGattCharacteristic( const UUID &uuid, T valuePtr[NUM_ELEMENTS], uint8_t additionalProperties = BLE_GATT_CHAR_PROPERTIES_NONE, @@ -2132,7 +2132,7 @@ class ReadWriteArrayGattCharacteristic : public GattCharacteristic { * attribute value with maximum size equal to sizeof(T) * NUM_ELEMENTS. * For a fixed length alternative, use GattCharacteristic directly. */ - ReadWriteArrayGattCharacteristic( + ReadWriteArrayGattCharacteristic( const UUID &uuid, T valuePtr[NUM_ELEMENTS], uint8_t additionalProperties = BLE_GATT_CHAR_PROPERTIES_NONE, From d321359133a46fbd3ca8ec9782b190b76d50936c Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Mon, 2 Jan 2023 12:50:54 +0100 Subject: [PATCH 3/3] Warning - pragma ignore invalid-noreturn for unit tests --- platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp b/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp index 4b046d7f41c..bbe49e79248 100644 --- a/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp +++ b/platform/tests/UNITTESTS/doubles/mbed_assert_stub.cpp @@ -20,6 +20,8 @@ #include #include +#pragma GCC diagnostic ignored "-Winvalid-noreturn" + bool mbed_assert_throw_errors = false; extern "C" void mbed_assert_internal(const char *expr, const char *file, int line)