Re: [PATCH 2/3] ci: add build checking for side-effects in assert() calls
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 14, 2025, 01:20 UTC
- Message-ID
- <xmqqtt7wl85l.fsf@gitster.g>
- In-Reply-To
- <Z9OD8ihB-tiCdBmp@tapette.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 11 quoted lines
>> Is this something we can use in our project? I am just double >> checking. > > I believe it's valid in C99. Certainly some compiler might be bad at > optimizing, or a user may have compiled with -O0, but this is run in CI, > where we have known good compilers and can control the optimization > flags. I doubt GCC, Clang, or MSVC will have problems here, and since > this is not on by default, users using something less capable (the Tiny > C Compiler, maybe?) or a vendor compiler won't even see it. > > Was there some other case that you were concerned about?
Licensing, mostly, as clever things we see are not necessarily home grown. I know the patch came with DCO sign-off, but it does not hurt to double check.