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

Fix compile error using asm #1965

Closed
wants to merge 1 commit into from
Closed

Fix compile error using asm #1965

wants to merge 1 commit into from

Conversation

Pro
Copy link
Contributor

@Pro Pro commented May 16, 2018

In function 'xPortGetCoreID':
error: expected ')' before ':' token
:"=r"(id));

It is recommended to use __asm__ instead of asm

See:
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords

In function 'xPortGetCoreID':
error: expected ')' before ':' token
         :"=r"(id));
@CLAassistant
Copy link

CLAassistant commented May 16, 2018

CLA assistant check
All committers have signed the CLA.

@igrr
Copy link
Member

igrr commented May 22, 2018

Hi @Pro, can you please describe the case in which you get this error? Are you passing any custom CFLAGS when compiling the source files?

@Pro
Copy link
Contributor Author

Pro commented May 22, 2018

I do not know which flag exactly caused the compile error, but I'm using the open62541 library in combination with the ESP32 and it has very strict compile flags.

Is there a specific reason why you would like to use asm instead of __asm__? (Please note the description in the linked documentation)

@projectgus
Copy link
Contributor

I'm guessing @Pro is either compiling some source files in their project with either -ansi or std=c99 or similar, and this file is including FreeRTOS headers.

I don't think there is a downside to us using __asm__ in public headers. Have forwarded this to our internal review queue, if a downside comes up then I'll update this PR.

@projectgus projectgus added the Status: Pending blocked by some other factor label Jun 4, 2018
igrr pushed a commit that referenced this pull request Jun 5, 2018
In function 'xPortGetCoreID':
error: expected ')' before ':' token
         :"=r"(id));

Merges #1965
@projectgus
Copy link
Contributor

Cherry-picked in 1853334, thanks!

@projectgus projectgus closed this Jun 6, 2018
@igrr igrr removed the Status: Pending blocked by some other factor label Aug 9, 2018
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.

4 participants