-
Notifications
You must be signed in to change notification settings - Fork 179
Allowing --std=c++11 with GCC ARM tools. #333
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
Comments
@theotherjimmy Your PR here would allow any arbitrary flags to be used, correct? ARMmbed/mbed-os#2431 |
I personally would be very excited to adopt C++11. However, IAR does not support C++11 and is stuck at C++03 (here). We simply can't adopt C++11 in mbed and related ecosystem without losing support for IAR. However, applications are a different story. If an application writer intends for the application to only be used on specific toolchains, adopting C++11 in that application would be acceptable. Unfortunately, that would mean the application is not longer compatible with the rest of the mbed ecosystem or it would come with the false promise of support for IAR. For this reason, we unfortunately can't encourage C++11. I do think we should allow it through @theotherjimmy's patch for the functionality, because in @theotherjimmy's patch it is clear you are working out of the mbed ecosystem. |
I'd be willing to assume the risk of it not working with IAR, at least at the application level. |
Unfortunately there is currently no route to enabling C++11 short of modifying the tools (this line, if you were wondering). @theotherjimmy has been working on exposing compiler flags in a less hacky manner: |
mbed OS will not adopt C++11 as a default in the foreseeable future. When you export a makefile or into another IDE you're free to modify the build flags however you'd like (no compatibility guarantees). We're currently supporting C99 and C++03. |
Looks like this is no longer true. From geky's linked source:
Can this issue be revisited? See also: https://www.iar.com/support/resources/articles/exploring-c11-and-c14/
Is mbed committed to supporting old versions of IAR? If so, how old? Zooming out a bit... as an mbed OS user, I don't really care if mbed OS is built with C++11 enabled. (Can't think of a reason yet, anyway.) In some cases, I just want to be able to build my application with C++11. Thus I think if there were better support for using mbed OS as a library, this could be a non-issue. |
Why dont you make a local, custom, build profile and pass this to the tools? https://os.mbed.com/docs/v5.6/tools/build-profiles.html |
Because I'm not building with |
@bmcdonnell-ionx |
I'm currently using NXP MCUXpresso, but will hopefully move to Visual Studio Code at some point. IDE editor features are handy, and debugging is the big win. I'm not opposed to being able to |
@bmcdonnell-ionx That's not the way I would normally use "locked-in" :). I think MCUXpresso may ignore the |
Is there any chance there could be an option to allow
--std=c++11
while compiling with the GCC_ARM tools?The text was updated successfully, but these errors were encountered: