News for hackers. Stuff that matters.
Re:Compiler Bug Causes Compiler Bug: How a 12-Year-Old G++ B... by tialaramex on Friday August 15, 2025 @02:53PM (#44916161)
If we make the underlying mistake in Rust (actually I did last week for unrelated code) by defining an operator implementation as simply calling itself rather than calling some concrete implementation, the compiler warns us, this is infinite recursion which probably wasn't what you wanted.

G++ has to emit code here to recurse infinitely, so it's not as though there's no opportunity to say "Huh, that probably won't be what they meant"

Re:Compiler Bug Causes Compiler Bug: How a 12-Year-Old G++ B... by jcelerier on Friday August 15, 2025 @03:21PM (#44916431)
C++ compilers had warnings about infinite recursion for years now (since at least 2015 for clang)
Re:Compiler Bug Causes Compiler Bug: How a 12-Year-Old G++ B... by tialaramex on Friday August 15, 2025 @03:56PM (#44916689)
Fair. That's actually crazy - I dug into this more and found the chosen Boost package fails tests on the chosen compiler, and so if they'd done even a cursory check to see if what they're doing could make sense there'd be red flags everywhere.

So the overall story is mostly "Our QA is garbage".

Re:Compiler Bug Causes Compiler Bug: How a 12-Year-Old G++ B... by saalweachter on Saturday August 16, 2025 @06:57AM (#44922142)
If it's at the "we never compile with -Wall -Werror" level of non-existent QA, I feel like that's an insult to garbage.
Re:Compiler Bug Causes Compiler Bug: How a 12-Year-Old G++ B... by tialaramex on Saturday August 16, 2025 @09:21AM (#44923171)
-Wall -Werror means that instead of being able to be used as a ratchet the set of "all" warnings in C and C++ became rusted in place. I sympathise with the instinct to write this in your compiler flags, but alas thanks to Hyrum's law this makes the future worse and so today people ask that you -Wextra and no doubt I'll eventually read of how C is fine so long as you -Wall -Wextra -Wevenmore -Wyetmore -Wandthese