4 ms·
Rasmus Lerdorf just tweeted that it's a gcc optimizer issue: Works fine with -O0 but not -O2 http://twitter.com/rasmus/statuses/22212610308964353 http://twi
by istvanp 16y ago
Rasmus Lerdorf just tweeted that it's a gcc optimizer issue:
Works fine with -O0 but not -O2
http://twitter.com/rasmus/statuses/22212610308964353 http://twitter.com/rasmus/statuses/22212610308964353
- gjm11 16y agoWhen a problem is described as an optimizer issue, it usually means that the code is making some unsound assumptions that happen to be true when compiling without optimization. Of course it's easier on the programmer's ego to blame it on the compiler... (I haven't looked at this particular issue; maybe it really is a compiler bug. But the odds are against it.)
- istvanp 16y agoMight be true in general, but when the creator of PHP says it's a compiler issue it's hard to 2nd guess. He also later added: We still need to fix the code to make it immune to compiler switches.
- naz 16y agohttp://en.wikipedia.org/wiki/Argument_from_authority http://en.wikipedia.org/wiki/Argument_from_authority
- SimHacker 16y ago"I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that."" -Rasmus Lerdorf When you attempt to make an argument from authority, at least choose someone who has some credibility to use as an authority.
- marshray 16y agoWe still need to fix the code to make it immune to compiler switches. In other words, "We know that our code is buggy and it is relying on undefined behavior." I.e., this developer knows it's a problem with his code, not the compiler, but he phrases it as if the "compiler switches" are the things causing the problems. This is classic developer arrogance and immaturity. Thank God I don't rely on his software for anything important.
- SimHacker 16y ago"I was really, really bad at writing parsers. I still am really bad at writing parsers." -Rasmus Lerdorf
- mightbyte 16y ago"For all the folks getting excited about my quotes. Here is another - Yes, I am a terrible coder, but I am probably still better than you :)" - Rasmus Lerdorf
- yuhong 16y agoThat is because with x87 floating point, when the number is in registers, it is 80-bit, but when the compiler spills it to memory, it is 64-bit, which is why -ffloat-store works.