News for hackers. Stuff that matters.
Re:NetBSD 11.0 by ranger_danger on Saturday August 01, 2026 @09:43PM (#49140261)
Why would the C code no longer compile if it conforms to the spec?
Re:NetBSD 11.0 by wasting_time on Sunday August 02, 2026 @12:01AM (#49140974)
You sort of answered your own question.

Another reason is compiling with -Werror and hitting new warnings.

Also, the version of the spec changes with almost every major release.

Re:NetBSD 11.0 by seabrookmx on Saturday August 01, 2026 @11:45PM (#49140889)
"The spec" is loose in places and is full of undefined behavior which can change from compiler to compiler. Very low level code tends to hit these types of issues much more than application code would. But these types of issues are even common in large userspace codebases.
Re:NetBSD 11.0 by ranger_danger on Sunday August 02, 2026 @12:16PM (#49145864)
To me, undefined behavior is by default not conformant, so that wouldn't count for the purposes of my question.
Re:NetBSD 11.0 by stonogo on Saturday August 01, 2026 @11:46PM (#49140899)
There is more than one C specification, and with each new release of GCC several things that used to emit warnings are newly treated as errors.
Re:NetBSD 11.0 by ranger_danger on Sunday August 02, 2026 @12:15PM (#49145851)
but if the correct standard is specified as an option, shouldn't that prevent conformant applications from failing to compile in newer versions?
Re:NetBSD 11.0 by stonogo on Sunday August 02, 2026 @09:11PM (#49150106)
Sure, that's one approach. Testing those changes takes time when you're working on a whole operating system and a ports tree. More time than cutting a new gcc release, as it turns out.
Re:NetBSD 11.0 by hulitu on Monday August 03, 2026 @12:42AM (#49151291)
> shouldn't that prevent

it should. It doesn't.

Re:NetBSD 11.0 by hulitu on Monday August 03, 2026 @12:41AM (#49151286)
Because, for some reason, someone at gcc decided that some warnings shall be treated as errors. Good luck finding out which those are and which flags you need as a countermeasure. Of course it has documentation. Of course it is useless.