Re: netbsd-11 gcc bug
Martin Husemann <[email protected]> Sun, 24 May 2026 10:44:49 +0200
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
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