News for hackers. Stuff that matters.
Re:GCC 6.1 Released by lmm on Wednesday April 27, 2016 @08:38AM (#11579813)
> We complain that compiler technology is not keeping pace

Who was complaining about that?

> when they put in god knows how many hundreds of hours of work improving, we complain when we might have to spend a few to go back through our programs and make sure everything's okay. We want everyone else to do the work for us.

Their whole job is to compile our programs - what else is a compiler good for? I don't know who GCC's users are these days - people who care more about benchmarks than working code? Because that seems to be who they're optimising for. Then again I suppose that's the entirety of C/C++'s market these days.

Re:GCC 6.1 Released by chriswarbo on Wednesday April 27, 2016 @09:45AM (#11580355)
> Their whole job is to compile our programs - what else is a compiler good for? I don't know who GCC's users are these days - people who care more about benchmarks than working code? Because that seems to be who they're optimising for.

If all you want the compiler to do is make a working program, just disable all optimisations.

Re:GCC 6.1 Released by dave2000 on Wednesday April 27, 2016 @08:51AM (#11579885)
Are you saying you have an example of valid c++ code which fails to compile, and that this problem is getting worse, or just that you get unexpected behaviour when write bad code?
Re:GCC 6.1 Released by coldpie on Wednesday April 27, 2016 @09:04AM (#11579988)
Compiler bugs caused by optimizations aren't at all unheard of. We got bit by one recently: https://bugs.winehq.org/show_bug.cgi?id=38653

That said, I agree with treehau5.

Re:GCC 6.1 Released by lmm on Wednesday April 27, 2016 @09:54AM (#11580427)
"Valid" in that the standard absolutely requires that compilers give them some particular meaning, no matter how rules-lawyery the compiler is? No. "Valid" in the sense that the intent is perfectly obvious to any reader? Yes, plenty. "bad"? No, unless you use the standard as your definition of good/bad.
Re:GCC 6.1 Released by lomnakkus on Wednesday April 27, 2016 @01:47PM (#11582699)
> the intent is perfectly obvious to any reader

So compilers need to judge what is "perfectly obvious to any reader", now? And you're willing to deal with the fallout of different compilers having different conceptions of "perfectly obvious"?

That's... an ambitious project.

Maybe your time would be better spent convincing the C++ committee to define some more behavior instead of leaving it undefined.

Re:GCC 6.1 Released by lmm on Wednesday April 27, 2016 @05:42PM (#11584814)
The C++ committee exists to standardise the behaviour that major compilers implement. Trying to get them to define behaviour where there isn't already at least broad support would be putting the cart before the horse.
Re:GCC 6.1 Released by wtetzner on Wednesday April 27, 2016 @11:02AM (#11581002)
If you're not interested in performance, but are interested in working code, then why wouldn't you pick something other than C/C++?