23 ms·
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 w
by dave2000 10y ago
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?
- coldpie 10y agoCompiler 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 https://bugs.winehq.org/show_bug.cgi?id=38653 That said, I agree with treehau5.
- lmm 10y ago"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.
- lomnakkus 10y ago> 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.
- lmm 10y agoThe 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.