Skip to content

Commit db42dca

Browse files
author
Arto Kinnunen
committed
Squashed 'features/frameworks/nanostack-libservice/' changes from 9a61e73787..c6cae6992a
c6cae6992a Merge pull request ARMmbed#90 from ARMmbed/sync_with_mbedos bc57095abb Netsocket/lwIP Stack: Remove support for ARM Compiler 5 git-subtree-dir: features/frameworks/nanostack-libservice git-subtree-split: c6cae6992a12f62f19cf7875f889304d5c1ded6d
1 parent db389d4 commit db42dca

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

mbed-client-libservice/common_functions.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros(uint8_t value)
509509

510510
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8(uint8_t value)
511511
{
512-
#ifdef __CC_ARM
513-
return value ? __clz((unsigned int) value << 24) : 8;
514-
#elif defined __GNUC__
512+
#if defined __GNUC__
515513
return value ? __builtin_clz((unsigned int) value << 24) : 8;
516514
#else
517515
uint_fast8_t cnt = 0;
@@ -536,9 +534,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8(uint8_t value)
536534

537535
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_16(uint16_t value)
538536
{
539-
#ifdef __CC_ARM
540-
return value ? __clz((unsigned int) value << 16) : 16;
541-
#elif defined __GNUC__
537+
#if defined __GNUC__
542538
return value ? __builtin_clz((unsigned int) value << 16) : 16;
543539
#else
544540
uint_fast8_t cnt = 0;
@@ -567,9 +563,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_16(uint16_t value)
567563

568564
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_32(uint32_t value)
569565
{
570-
#ifdef __CC_ARM
571-
return __clz(value);
572-
#elif defined __GNUC__
566+
#if defined __GNUC__
573567
return value ? __builtin_clz(value) : 32;
574568
#else
575569
uint_fast8_t cnt = 0;

mbed-client-libservice/ns_types.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ typedef int_fast32_t int_fast24_t;
106106
#define NS_NORETURN _Noreturn
107107
#elif defined __GNUC__
108108
#define NS_NORETURN __attribute__((__noreturn__))
109-
#elif defined __CC_ARM
110-
#define NS_NORETURN __declspec(noreturn)
111109
#elif defined __IAR_SYSTEMS_ICC__
112110
#define NS_NORETURN __noreturn
113111
#else
@@ -117,7 +115,7 @@ typedef int_fast32_t int_fast24_t;
117115

118116
/* C11's "alignas" macro, emulated for integer expressions if necessary */
119117
#ifndef __alignas_is_defined
120-
#if defined __CC_ARM || defined __TASKING__
118+
#if defined __TASKING__
121119
#define alignas(n) __align(n)
122120
#define __alignas_is_defined 1
123121
#elif (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L) || (defined __cplusplus && __cplusplus >= 201103L)
@@ -149,7 +147,7 @@ typedef int_fast32_t int_fast24_t;
149147
* static int foo(void) MAYBE_UNUSED;
150148
* ~~~
151149
*/
152-
#if defined __CC_ARM || defined __GNUC__
150+
#if defined __GNUC__
153151
#define MAYBE_UNUSED __attribute__((unused))
154152
#else
155153
#define MAYBE_UNUSED
@@ -219,7 +217,7 @@ typedef int_fast32_t int_fast24_t;
219217
#else /* C */
220218
# if __STDC_VERSION__ >= 201112L
221219
# define NS_STATIC_ASSERT(test, str) _Static_assert(test, str);
222-
# elif defined __GNUC__ && NS_GCC_VERSION >= 40600 && !defined __CC_ARM
220+
# elif defined __GNUC__ && NS_GCC_VERSION >= 40600
223221
# ifdef _Static_assert
224222
/*
225223
* Some versions of glibc cdefs.h (which comes in via <stdint.h> above)
@@ -255,7 +253,7 @@ typedef int_fast32_t int_fast24_t;
255253

256254
/** \brief Pragma to suppress warnings about always true/false comparisons
257255
*/
258-
#if defined __GNUC__ && NS_GCC_VERSION >= 40600 && !defined __CC_ARM
256+
#if defined __GNUC__ && NS_GCC_VERSION >= 40600
259257
#define NS_FUNNY_COMPARE_OK _Pragma("GCC diagnostic push") \
260258
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
261259
#define NS_FUNNY_COMPARE_RESTORE _Pragma("GCC diagnostic pop")
@@ -272,11 +270,7 @@ typedef int_fast32_t int_fast24_t;
272270
* components should ensure this is not included by only using it in
273271
* a ifdef blocks providing dummy definitions.
274272
*/
275-
#ifdef __CC_ARM
276-
// statement is unreachable(111), controlling expression is constant(236), expression has no effect(174),
277-
// function was declared but never referenced(177), variable was set but never used(550)
278-
#define NS_DUMMY_DEFINITIONS_OK _Pragma("diag_suppress=111,236,174,177,550")
279-
#elif defined __IAR_SYSTEMS_ICC__
273+
#if defined __IAR_SYSTEMS_ICC__
280274
// controlling expression is constant
281275
#define NS_DUMMY_DEFINITIONS_OK _Pragma("diag_suppress=Pe236")
282276
#else

0 commit comments

Comments
 (0)