News for hackers. Stuff that matters.
Re:GCC null pointer check removed by gameswithgo on Wednesday August 28, 2019 @05:57PM (#20824442)
No. Each compiler has its own set of strengths and weaknesses, which is probably why for any of the big 3 (4 if you count intel?) compilers there are people who think one is the best. Whatever circle of internet people I happen to see a lot all think MSVC is terrible for instance, but the one really low level project I happened to work on, it produced the best code for it.

I wouldn't say any of the compilers runs circles around another in general

There is also a tendency for, whatever compiler you used mainly while developing your thing, it appears the best since you have been tweaking for that target the whole time.

Re:GCC null pointer check removed by blackflame7000 on Wednesday August 28, 2019 @08:14PM (#20825438)
It would be pretty hard to say objectively that MSVC is terrible without knowing what's in it.
Re:GCC null pointer check removed by tempo33 on Wednesday August 28, 2019 @11:28PM (#20826411)
No. You can evaluate compiler speed, memory use, quality of error output, generated code quality, ie most of what anyone cares about without knowing what's in it.
Re:GCC null pointer check removed by blackflame7000 on Friday August 30, 2019 @12:04AM (#20835890)
On what code? Any code you pick is an arbitrary benchmark. There are infinite number of context free grammars you could feed the compiler and for any of them in might make some unknown optimization X that is superior to all other compilers. The number of programs that you can write are infinite therefore you cannot say for certain that is better or worse for all programs, or in other words, objectively say it is terrible.
Re:GCC null pointer check removed by tempo33 on Sunday September 01, 2019 @04:24AM (#20851155)
The idea that you need to test with infinite inputs to be "objective" is preposterous. You can in fact test with one input and the result is still objective, and you can conclude that it is objectively terrible or not on that one input. In reality, a suite of real world tests within your application domain provides actual useful information -- those aren't arbitrary benchmarks if that's the actual code you care about.
Re:GCC null pointer check removed by fao_ on Thursday August 29, 2019 @01:27AM (#20826901)
No. All optimizations have tradeoffs, if you don't know what it's doing then you cannot know the tradeoffs made. Empirical black-box testing works to a degree, past which it only gives false assurance, as it would in this case.
Re:GCC null pointer check removed by raverbashing on Thursday August 29, 2019 @02:52AM (#20827292)
But you can know what's doing. Just have it output the .s/.asm file

You can also look at the flags and the different optimizations you can turn on and off.

MSVC had some issues with C++ compatibility (a long time ago) but overall it is not bad. A compiler that can compile a whole operating system probably has most of its issues ironed out.

Re:GCC null pointer check removed by fao_ on Monday September 02, 2019 @12:59PM (#20860357)
> But you can know what's doing. Just have it output the .s/.asm file

That's still black box testing. There ~may be~ almost certainly is hidden state that could mean that the optimization you expect to be applied is not (or an optimization is misapplied) under certain circumstances, and you can't/won't discover this in advance due to those conditions.

> A compiler that can compile a whole operating system probably has most of its issues ironed out.

History has shown this to be mostly wrong, given how many critical bugs have been discovered in GCC since it was capable of compiling linux