arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
I am getting a warning when compiling CMSIS Core and CMSIS RTOS:
In file included from cmsis//5.4.0/CMSIS/RTOS/RTX/SRC/rt_CMSIS.c:54:0:
cmsis//5.4.0/CMSIS/RTOS/RTX/INC/cmsis_os.h:75:0: error: "__NO_RETURN" redefined [-Werror]
#define __NO_RETURN __attribute__((noreturn))
In file included from cmsis//5.4.0/CMSIS/Core/Include/cmsis_compiler.h:48:0,
from cmsis//5.4.0/CMSIS/Core/Include/core_cm4.h:162,
from cmsis//5.4.0/CMSIS/RTOS/RTX/SRC/rt_CMSIS.c:29:
cmsis//5.4.0/CMSIS/Core/Include/cmsis_gcc.h:53:0: note: this is the location of the previous definition
#define __NO_RETURN __attribute__((__noreturn__))
The issue is that rt_CMSIS.c is redefining __NO_RETURN multiple times:
I am using this gcc for a Cortex M4
I am getting a warning when compiling CMSIS Core and CMSIS RTOS:
The issue is that rt_CMSIS.c is redefining
__NO_RETURN
multiple times:https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/RTOS/RTX/SRC/rt_CMSIS.c#L29 https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/Core/Include/core_cm4.h#L162 https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/Core/Include/cmsis_compiler.h#L54 https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/Core/Include/cmsis_gcc.h#L53 (which is guarded by a
#ifndef
)But that file also gets a definition of
__NO_RETURN
from:https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/RTOS/RTX/SRC/rt_CMSIS.c#L54 https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/RTOS/RTX/INC/cmsis_os.h#L75
and
https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/RTOS/RTX/SRC/rt_CMSIS.c#L138
Can these last two definitions also be guarded by an
ifndef
?