Skip to content

Conversation

@deralmas
Copy link
Contributor

My previous fix triggered another issue: apparently at least GCC expects the _Pragma operator to be placed in its own statement (after a semicolon). The current macro simply dumped the expression and the _Pragma together, triggering an error. Putting a semicolon after Expr fixes the issue (actually double-checked after a git clean -fdx), although slightly changing the API (the semicolon after the wrapped macros is now optional).


I'm really sorry for missing this issue before filing the past PR. I had a local workaround still applied and some working object cached, for some reason.

If the semicolon after the macro is desired to be mandatory (I think it was), my only idea would be to add a do { /* ... */ } while(0) at the end of the patch or similar. I don't know if there are better solutions, unfortunately my macro game is not that strong.

My previous fix triggered another issue: apparently at least GCC expects
the `_Pragma` operator to be placed in its own statement (after a
semicolon). The current macro simply dumped the expression and the
_Pragma together, triggering an error. Putting a semicolon after `Expr`
fixes the issue (actually double-checked after a `git clean -fdx`),
although slightly changing the API (the semicolon after the wrapped
macros is now optional).
@wolfpld wolfpld merged commit a11c3d4 into wolfpld:master Nov 15, 2025
5 of 6 checks passed
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