Skip to content

Remove semicolons from macro expansions - #1428

Merged
lukaszstolarczuk merged 1 commit into
oneapi-src:mainfrom
ldrumm:semicolons-in-macros
Jul 9, 2025
Merged

Remove semicolons from macro expansions#1428
lukaszstolarczuk merged 1 commit into
oneapi-src:mainfrom
ldrumm:semicolons-in-macros

Conversation

@ldrumm

@ldrumm ldrumm commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

This is almost never what's wanted since the user of the macro will naturally add the semicolon:

src/pool/pool_disjoint.c:55:69: warning:
ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
static const struct ctl_argument CTL_ARG(name) = CTL_ARG_STRING(255);

@ldrumm
ldrumm requested a review from a team as a code owner July 9, 2025 13:37
This is almost never what's wanted since the user of the macro will
naturally add the semicolon:

> src/pool/pool_disjoint.c:55:69: warning:
>  ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
>  static const struct ctl_argument CTL_ARG(name) = CTL_ARG_STRING(255);
@ldrumm
ldrumm force-pushed the semicolons-in-macros branch from fd83260 to b4c42bc Compare July 9, 2025 13:49
@bratpiorka
bratpiorka requested review from KFilipek and lplewa July 9, 2025 13:52
@lukaszstolarczuk
lukaszstolarczuk merged commit e71e8a1 into oneapi-src:main Jul 9, 2025
148 of 150 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.

3 participants