tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd-11 gcc bug



On Sat, May 23, 2026 at 07:11:18PM -0400, Mouse wrote:
> I'd say this should be filed as a bug with the gcc people; if they
> can't/won't fix it, NetBSD should roll back to a previous gcc and/or
> drop gcc as the system compiler, as then it'd be clearly unsuitable.

It is not about gcc or clang, it is about the C standard, which is
created by an open comittee and you are welcome to send defect reports
and/or ask for clarifictaions. (Doing so is a slightly obfuscated process
but it actually works and you do get answers.)

The compiler using all strength the standard gives it is just a logical
consequence of the user asking it to optimize. As Manuel showed earlier
in this thread lowering optimization levels for this file does avoid
the issue.

But fixing the code to avoid "undefined behaviour" is the proper solution
and fits NetBSD's clean code mission well. This sometimes hits at unexpected
places, but on the other side we have got better warnings and tools that
helped us elliminate lots of ancient bugs.

Martin


Home | Main Index | Thread Index | Old Index