Skip to content

Commit 063717d

Browse files
JonatanAntoniTomoYamanaka
authored andcommitted
Core(A): Changed macro __DEPRECATED to CMSIS_DEPRECATED. (Issue #287)
__DEPRECATED conflicts with a predefined macro in GCC C++ mode.
1 parent 2f06202 commit 063717d

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

cmsis/TARGET_CORTEX_A/cmsis_armcc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
#ifndef __NO_RETURN
5454
#define __NO_RETURN __declspec(noreturn)
5555
#endif
56-
#ifndef __DEPRECATED
57-
#define __DEPRECATED __attribute__((deprecated))
56+
#ifndef CMSIS_DEPRECATED
57+
#define CMSIS_DEPRECATED __attribute__((deprecated))
5858
#endif
5959
#ifndef __USED
6060
#define __USED __attribute__((used))

cmsis/TARGET_CORTEX_A/cmsis_armclang.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
#ifndef __NO_RETURN
5151
#define __NO_RETURN __attribute__((__noreturn__))
5252
#endif
53-
#ifndef __DEPRECATED
54-
#define __DEPRECATED __attribute__((deprecated))
53+
#ifndef CMSIS_DEPRECATED
54+
#define CMSIS_DEPRECATED __attribute__((deprecated))
5555
#endif
5656
#ifndef __USED
5757
#define __USED __attribute__((used))

cmsis/TARGET_CORTEX_A/cmsis_compiler.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
#ifndef __NO_RETURN
8080
#define __NO_RETURN __attribute__((noreturn))
8181
#endif
82-
#ifndef __DEPRECATED
83-
#define __DEPRECATED __attribute__((deprecated))
82+
#ifndef CMSIS_DEPRECATED
83+
#define CMSIS_DEPRECATED __attribute__((deprecated))
8484
#endif
8585
#ifndef __USED
8686
#define __USED __attribute__((used))
@@ -125,8 +125,8 @@
125125
#ifndef __NO_RETURN
126126
#define __NO_RETURN __attribute__((noreturn))
127127
#endif
128-
#ifndef __DEPRECATED
129-
#define __DEPRECATED __attribute__((deprecated))
128+
#ifndef CMSIS_DEPRECATED
129+
#define CMSIS_DEPRECATED __attribute__((deprecated))
130130
#endif
131131
#ifndef __USED
132132
#define __USED __attribute__((used))
@@ -172,9 +172,9 @@
172172
#warning No compiler specific solution for __USED. __USED is ignored.
173173
#define __USED
174174
#endif
175-
#ifndef __DEPRECATED
176-
#warning No compiler specific solution for __DEPRECATED. __DEPRECATED is ignored.
177-
#define __DEPRECATED
175+
#ifndef CMSIS_DEPRECATED
176+
#warning No compiler specific solution for CMSIS_DEPRECATED. CMSIS_DEPRECATED is ignored.
177+
#define CMSIS_DEPRECATED
178178
#endif
179179
#ifndef __WEAK
180180
#define __WEAK __weak

cmsis/TARGET_CORTEX_A/cmsis_gcc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
#ifndef __NO_RETURN
5656
#define __NO_RETURN __attribute__((__noreturn__))
5757
#endif
58-
#ifndef __DEPRECATED
59-
#define __DEPRECATED __attribute__((deprecated))
58+
#ifndef CMSIS_DEPRECATED
59+
#define CMSIS_DEPRECATED __attribute__((deprecated))
6060
#endif
6161
#ifndef __USED
6262
#define __USED __attribute__((used))

cmsis/TARGET_CORTEX_A/cmsis_iccarm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@
124124
#define __STATIC_FORCEINLINE __FORCEINLINE __STATIC_INLINE
125125
#endif
126126

127-
#ifndef __DEPRECATED
128-
#define __DEPRECATED __attribute__((deprecated))
127+
#ifndef CMSIS_DEPRECATED
128+
#define CMSIS_DEPRECATED __attribute__((deprecated))
129129
#endif
130130

131131
#ifndef __UNALIGNED_UINT16_READ

cmsis/TARGET_CORTEX_A/core_ca.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ __STATIC_FORCEINLINE void L1C_CleanInvalidateCache(uint32_t op) {
10101010
* \param [in] op 0 - invalidate, 1 - clean, otherwise - invalidate and clean
10111011
* \deprecated Use generic L1C_CleanInvalidateCache instead.
10121012
*/
1013-
__DEPRECATED
1013+
CMSIS_DEPRECATED
10141014
__STATIC_FORCEINLINE void __L1C_CleanInvalidateCache(uint32_t op) {
10151015
L1C_CleanInvalidateCache(op);
10161016
}

0 commit comments

Comments
 (0)