-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[BUG] C90 compatibility broken since release 10.4.4 #358
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
Labels
bug
Something isn't working
Comments
Would the following solve your problem: EventGroup_t * pxEventBits = xEventGroup;
const List_t * pxTasksWaitingForBits;
configASSERT( xEventGroup );
pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits ); |
Compiles! Thanks. |
aggarg
added a commit
to aggarg/FreeRTOS-Kernel
that referenced
this issue
Jun 22, 2021
This issue was reported here: FreeRTOS#358 Signed-off-by: Gaurav Aggarwal <[email protected]>
aggarg
added a commit
that referenced
this issue
Jun 23, 2021
This issue was reported here: #358 Signed-off-by: Gaurav Aggarwal <[email protected]>
I merged the fix. Thank you for reporting the issue. |
laroche
pushed a commit
to laroche/FreeRTOS-Kernel
that referenced
this issue
Apr 18, 2024
…TOS#358) Because the const qualifier was removed in PR FreeRTOS#356, coreMQTT also needs to be updated to remove it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The Kernel fails to compile with C90 due to block scope on the vEventGroupDelete() function of file event_groups.c.
Target
Host
To Reproduce
Expected behavior
Succesful compilation
Screenshots

Additional context
Looks like issues in the past may have introduced this bug: #293
Analysis & Temporary Resolution
The contract broken with the C90 standard is that variables must be declared at the top of a context block. If you're testing with GCC you may need to use the
-pedantic
flag to be strictly compliant. From my understanding thus far FreeRTOS still supports the C90 standard (of minus a custom stdint.h) so using the pedantic flag for your tests would be more correct.I like to live at head, so I will just do a quick hack by placing the function in its own block context, thus the assertion can be done at the top. Here's a diff:

Again, thanks for the great kernel!
The text was updated successfully, but these errors were encountered: