Closed
Description
Description
- Type: Question
- Related issue: Fix inclusion (board.c and critical.c) #1920
- Priority: Minor
Question
Should __STDC_LIMIT_MACROS be reinstated in critical.h?
When using a C++ compiler __STDC_LIMIT_MACROS should be declared to use datatype limit macros from stdint.h, such as the UINT32_MAX used in platform/mbed_critical.c. This declaration was added to hal/common/critical.c in #1920, but was removed when the mbed code was reorganized and declarations in critical.c moved to platform/critical.h. Should it be reinstated?
mbed_critical.c appears to be the only C source file in the mbed base library that does not build properly with a C++ compiler, e.g. using --cpp in ARMCC.
#define __STDC_LIMIT_MACROS
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
Metadata
Metadata
Assignees
Labels
No labels