Skip to content
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

Align Mbed CLI 2 to Mbed CLI 1 on C/C++ language standard #15492

Closed
wants to merge 1 commit into from

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented Feb 27, 2024

Summary of changes

Mbed CLI 2 doesn't specify C/C++ language standard -std=gnu11 and -std=gnu++14. This PR tries to align Mbed CLI 2 to Mbed CLI 1 on C/C++ language standard, so that it can fix the error on Arm Compiler 6.21:

Error: ISO C++17 does not allow 'register' storage class specifier

Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Mbed CLI 2 doesn't specify C/C++ language standard "-std=gnu11" and "-std=gnu++14".
This commit align Mbed CLI 2 to Mbed CLI 1 on C/C++ language standard,
so that it can fix the error on Arm Compiler 6.21:
Error: ISO C++17 does not allow 'register' storage class specifier
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 12, 2024

I need to check, dont recall why we did not add gnu, if it was overlooked.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 14, 2024

Looking at the issue , it has been discussed #12232 and there are lot of other referenced issues.

I dont feel confident adding std standard as it is, I would rather focus on where is this coming from:
Error: ISO C++17 does not allow 'register' storage class specifier - that should be fixed in the codebase.

@ccli8
Copy link
Contributor Author

ccli8 commented Mar 14, 2024

The issue Error: ISO C++17 does not allow 'register' storage class specifier can reproduce following:

  1. Change armclang to newer version e.g. 6.21
  2. Change mbed-os to 6.17.0
  3. In mbed-os-example-blinky, compile with Mbed CLI 2:
mbed-tools compile -m K64F -t ARM

@0xc0170
Copy link
Contributor

0xc0170 commented May 27, 2024

The issue Error: ISO C++17 does not allow 'register' storage class specifier can reproduce following:

  1. Change armclang to newer version e.g. 6.21
  2. Change mbed-os to 6.17.0
  3. In mbed-os-example-blinky, compile with Mbed CLI 2:
mbed-tools compile -m K64F -t ARM

I wanted to see what component is having an issue. I would guess it's cmsis as I saw a report some time ago related to this register.

I would rather fix the component.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 8, 2024

Let's leave this in mbed tools as it is (application can choose what it requires rather than enforcing this in the tooling). I'll close this.

If there is an issue with register and std, we should fix but differently.

@0xc0170 0xc0170 closed this Jun 8, 2024
@mergify mergify bot removed the needs: review label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants