freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

Bug 282306: Update spelling of "non-zero" to "nonzero" for C23 compliance

Open kfv opened this issue 1 year ago • 7 comments

C23 (ISO/IEC 9899:2024) standard specifies the spelling "nonzero" instead of "non-zero." This PR updates all occurrences of "non-zero" in the codebase (excluding man pages originating outside of FreeBSD itself) to align with the standard.

PR: 282306

kfv avatar Dec 17 '24 22:12 kfv

Done.

kfv avatar Dec 18 '24 00:12 kfv

Sorry for my oversight, it should have Reported by: kargl in the commit log too.

concussious avatar Dec 30 '24 10:12 concussious

Done.

kfv avatar Dec 30 '24 10:12 kfv

@concussious you have commit access, right? Or do you need somebody else to commit this?

asomers avatar Feb 03 '25 01:02 asomers

Im pretty sure most of these are an incorrect application of this spelling.

Specifically, returns nonzero is right, but non-zero number is also right because non modifies more than one word.

bsdimp avatar Feb 03 '25 01:02 bsdimp

@asomers If my mentors @sergio-carlavilla and/or @mhorne consent, then yes I can. However, I don't understand if @bsdimp is saying that we could but maybe shouldn't do this.

concussious avatar Feb 03 '25 02:02 concussious

I'm saying that the style I've seen is that non-zero is hyphenated only when it modifies a noun, but not when used as a noun or on it's own. That means about some significant number of the changes are wrong by that style.

However, other places I see other advice. So I'd punt the question to doceng@ to make a ruling on which style to use.

C23 uses nonzero consistently. POSIX.1-2024 uses both non-zero and nonzero.

bsdimp avatar Feb 07 '25 19:02 bsdimp