[PATCH v2 0/6] Enable warnings about use of comma operator
Morten Brørup
mb at smartsharesystems.com
Fri Aug 15 08:40:58 CEST 2025
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Thursday, 14 August 2025 23.29
>
> This series was motivated by recent thread on netdev
> about build with -Wcomma in clang. This warning catches code
> that uses comma where a semi-colon is a better choice.
Overall, I agree that using semicolon is better for consistency is most places, but using commas in some loops - e.g. "for (dst=,src=; condition; dst+=, src+=)" - might be more readable than the alternative.
Stephen, I'm interested in the discussion about this, can you please post a link to the thread on the netdev mailing list?
More information about the dev
mailing list