Skip to content

Support building mbed_critical.c with C++ compiler #3305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2016

Conversation

micromint
Copy link
Contributor

Description

Some developers prefer using a C++ compiler with C sources due to stricter syntax checking and other benefits. Currently mbed_critical.c is the only C source file in the mbed base library that does not build properly with a C++ compiler due to use of UINT32_MAX on an assertion. This change declares __STDC_LIMIT_MACROS on mbed_critical.c before the include of critical.h so the standard C limit macros are defined in stdint.h.

Status

READY

Related PRs

Discussed in #3276 and proposal by @0xc0170 selected for this PR
__STDC_LIMIT_MACROS declaration previously added in #1920 and removed in #2054

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 21, 2016

@c1728p9 @geky please review

@micromint thanks for this

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 21, 2016

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1144

All builds and test passed!

@adbridge
Copy link
Contributor

uvisor and pr-head are both showing success even though not updated here. Thus this looks good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants