Re:Torvalds: Standards need to be questioned
by dragontamer on Tuesday June 05, 2018 @07:18PM
(#17242982)
> And that's shortsighted and silly, because GCC (being working software) is if anything a more reliable and more accessible authority than any spec-writer will ever be.
Well, until you decide to use CLang, ICC, or Visual Studio or something out there. The reason why people follow the standards is because they want their code to correctly work on more than just one compiler.
Re:Torvalds: Standards need to be questioned
by ajross on Tuesday June 05, 2018 @07:59PM
(#17243254)
No, that's exactly backwards. In fact ICC and Clang (I have no idea about VS) both follow GCC on this particular feature, largely because important software like Linux relies on GCC's useful and practical feature set. See also support for GCC's struct initializer syntax, statement expressions, inline assembly constraint system, etc... GCC invented all this stuff, and software developers everywhere (Hi!) love them and use them, and the industry follows suit.
Fundamentally you're still missing the point. Standards are important. Features are more important. The best standards are ones driven by features and not paper. GCC has been a far better, more innovative, and more practical driver of "standards" than any committee.
If you need type-punning, use a union. Done and done.
You're just making an appeal to authority here and deciding that The C++ Standards Committee (who give us one official way to do this) is a better authority than The GCC Authors (who give us another).
And that's shortsighted and silly, because GCC (being working software) is if anything a more reliable and more accessible authority than any spec-writer will ever be. That's exactly the point Linus was making, albeit with more profanity.