Skip to content

Commit ab483c2

Browse files
authored
Merge pull request #12654 from kbarm/feature-remove-cc-arm-macro
Removed all references to __CC_ARM
2 parents 197e1d2 + 4465295 commit ab483c2

File tree

18 files changed

+32
-232
lines changed

18 files changed

+32
-232
lines changed

features/FEATURE_BLE/ble/Gap.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,12 +2636,9 @@ class LegacyGap :
26362636

26372637
/* -------- deprecated template implementation -------- */
26382638

2639-
#if defined(__GNUC__) && !defined(__CC_ARM)
2639+
#if defined(__GNUC__)
26402640
#pragma GCC diagnostic push
26412641
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2642-
#elif defined(__CC_ARM)
2643-
#pragma push
2644-
#pragma diag_suppress 1361
26452642
#endif
26462643

26472644
#if BLE_ROLE_OBSERVER
@@ -2687,10 +2684,8 @@ void LegacyGap<Impl>::onRadioNotification(T *tptr, void (T::*mptr)(bool))
26872684
radioNotificationCallback.attach(tptr, mptr);
26882685
}
26892686

2690-
#if defined(__GNUC__) && !defined(__CC_ARM)
2687+
#if defined(__GNUC__)
26912688
#pragma GCC diagnostic pop
2692-
#elif defined(__CC_ARM)
2693-
#pragma pop
26942689
#endif
26952690

26962691
} // interface

features/FEATURE_BLE/ble/pal/Deprecated.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,20 @@
1919
/**
2020
* Declare the beginning of a code block that uses a deprecated API
2121
*/
22-
#if defined(__GNUC__) && !defined(__CC_ARM)
22+
#if defined(__GNUC__)
2323
#define BLE_DEPRECATED_API_USE_BEGIN() \
2424
_Pragma("GCC diagnostic push") \
2525
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
26-
#elif defined(__CC_ARM)
27-
#define BLE_DEPRECATED_API_USE_BEGIN() \
28-
_Pragma("push") \
29-
_Pragma("diag_suppress 1361")
3026
#else
3127
#define BLE_DEPRECATED_API_USE_BEGIN()
3228
#endif
3329

3430
/**
3531
* Declare the end of a code block that uses a deprecated API
3632
*/
37-
#if defined(__GNUC__) && !defined(__CC_ARM)
33+
#if defined(__GNUC__)
3834
#define BLE_DEPRECATED_API_USE_END() \
3935
_Pragma("GCC diagnostic pop")
40-
#elif defined(__CC_ARM)
41-
#define BLE_DEPRECATED_API_USE_END() \
42-
_Pragma("pop")
4336
#else
4437
#define BLE_DEPRECATED_API_USE_END()
4538
#endif

features/FEATURE_BLE/source/LegacyGap.tpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,9 @@ ble_error_t LegacyGap<Impl>::initRadioNotification(void) {
267267

268268
/* -------- deprecated template implementation -------- */
269269

270-
#if defined(__GNUC__) && !defined(__CC_ARM)
270+
#if defined(__GNUC__)
271271
#pragma GCC diagnostic push
272272
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
273-
#elif defined(__CC_ARM)
274-
#pragma push
275-
#pragma diag_suppress 1361
276273
#endif
277274

278275
template<class Impl>
@@ -850,10 +847,8 @@ void LegacyGap<Impl>::processAdvertisementReport(
850847
onAdvertisementReport.call(&params);
851848
}
852849

853-
#if defined(__GNUC__) && !defined(__CC_ARM)
850+
#if defined(__GNUC__)
854851
#pragma GCC diagnostic pop
855-
#elif defined(__CC_ARM)
856-
#pragma pop
857852
#endif
858853

859854
#if BLE_ROLE_BROADCASTER

features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/util/print.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
**************************************************************************************************/
3636

3737
/*! \brief Print function attributes. */
38-
#if defined(__GNUC__) || defined(__CC_ARM)
38+
#if defined(__GNUC__)
3939
#define PRINT_ATTRIBUTE(a, b) __attribute__((format(printf, a, b)))
4040
#else
4141
#define PRINT_ATTRIBUTE(a, b)

features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/wsf_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extern "C" {
5959
#if (((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) && \
6060
(!defined(__ICC8051__) || (__ICC8051__ == 0))) || \
6161
(defined(__clang__) || defined(_MSC_VER)) || \
62-
defined(__CC_ARM) || defined(__IAR_SYSTEMS_ICC__) || defined(__ARMCC_VERSION))
62+
defined(__IAR_SYSTEMS_ICC__) || defined(__ARMCC_VERSION))
6363
#include <stdint.h>
6464
#else
6565
/*! \brief Signed 8-bit value. */

features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void uECC_set_rng_ll(uECC_RNG_Function rng_function) {
168168
g_rng_function = rng_function;
169169
}
170170

171-
#if !defined(__CC_ARM) && !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */
171+
#if !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */
172172
#if (uECC_ASM && (uECC_PLATFORM == uECC_arm || uECC_PLATFORM == uECC_arm_thumb || \
173173
uECC_PLATFORM == uECC_arm_thumb2))
174174
#include "asm_arm.inc"

features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ uECC_asm_fast - Use GCC inline assembly optimized for maximum speed. */
2929
#define uECC_asm_small 1
3030
#define uECC_asm_fast 2
3131
#ifndef uECC_ASM
32-
#if !defined(__CC_ARM) && !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */
32+
#if !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */
3333
#define uECC_ASM uECC_asm_fast
3434
#else // DG: ARMCC 5, unlike GCC, IAR and CLANG, doesn't support GNU-style inline assembly
3535
#define uECC_ASM uECC_asm_none

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/common/ble_conn_state.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@
3939
#include "app_error.h"
4040

4141

42-
#if defined(__CC_ARM)
43-
#pragma push
44-
#pragma anon_unions
45-
#elif defined(__ICCARM__)
42+
#if defined(__ICCARM__)
4643
#pragma language=extended
4744
#elif defined(__GNUC__)
4845
/* anonymous unions are enabled by default */
@@ -80,9 +77,7 @@ typedef struct
8077
} ble_conn_state_t;
8178

8279

83-
#if defined(__CC_ARM)
84-
#pragma pop
85-
#elif defined(__ICCARM__)
80+
#if defined(__ICCARM__)
8681
/* leave anonymous unions enabled */
8782
#elif defined(__GNUC__)
8883
/* anonymous unions are enabled by default */
@@ -411,4 +406,3 @@ sdk_mapped_flags_t ble_conn_state_user_flag_collection(ble_conn_state_user_flag_
411406
return 0;
412407
}
413408
}
414-

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/device_manager/device_manager_peripheral.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@
3535
#include "ble_hci.h"
3636
#include "app_error.h"
3737

38-
#if defined ( __CC_ARM )
39-
#ifndef __ALIGN
40-
#define __ALIGN(x) __align(x) /**< Forced aligment keyword for ARM Compiler */
41-
#endif
42-
#elif defined ( __ICCARM__ )
38+
#if defined ( __ICCARM__ )
4339
#ifndef __ALIGN
4440
#define __ALIGN(x) /**< Forced aligment keyword for IAR Compiler */
4541
#endif

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/compiler_abstraction.h

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,7 @@
3434

3535
/*lint ++flb "Enter library region" */
3636

37-
#if defined ( __CC_ARM )
38-
39-
#ifndef __ASM
40-
#define __ASM __asm
41-
#endif
42-
43-
#ifndef __INLINE
44-
#define __INLINE __inline
45-
#endif
46-
47-
#ifndef __WEAK
48-
#define __WEAK __weak
49-
#endif
50-
51-
#ifndef __ALIGN
52-
#define __ALIGN(n) __align(n)
53-
#endif
54-
55-
#define GET_SP() __current_sp()
56-
57-
#elif defined ( __ICCARM__ )
58-
37+
#if defined ( __ICCARM__ )
5938
#ifndef __ASM
6039
#define __ASM __asm
6140
#endif

0 commit comments

Comments
 (0)