Re:Is That a Compiler Bug?
by cperciva on Wednesday June 07, 2023 @04:44PM
(#36233268)
Unfortunately compiler authors can be remarkably unconcerned about codegen bugs. I'm still waiting for a longjmp bug in clang from over a decade ago to be fixed:https://github.com/llvm/llvm-project/issues/21557
[ Parent
| on HN ]
Re:Is That a Compiler Bug?
by gavinhoward on Wednesday June 07, 2023 @05:18PM
(#36233726)
Oh. My. Goodness.
That is sickening. I use Clang. I use longjmp().
I'm glad I'm going to rewrite all of my stuff into my own language with a custom compiler.
Re:Is That a Compiler Bug?
by JonChesterfield on Wednesday June 07, 2023 @06:07PM
(#36234308)
There are lots of compiler bugs. The further you stray from the common use cases the more likely you are to hit them.
There are also an appreciable number of hardware bugs. Some of the complexity in compilers is working around those so that applications don't need to.
Your own compiler, assuming it emits machine code and avoids documented and undocumented hardware bugs, can be error free.
Re:Is That a Compiler Bug?
by pasmafaute on Thursday June 08, 2023 @03:59AM
(#36238638)
Brilliant :)
I also agree with JonChesterfield on this one: even home-brew compilers might have bugs! That's why I always write in HEX machine code!
I was going to complain about a GCC codegen bug open since 2007 but it looks like it finally got fixed in 2020!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33799
Clang still has the same bug though, filed in 2012.
Re:Is That a Compiler Bug?
by armchairhacker on Wednesday June 07, 2023 @08:27PM
(#36235542)
At least they didn't turn it into a language feature
https://stackoverflow.com/questions/18808226/why-is-typeof-n...