3 ms·
Reminds me once saw an comment about optimizing on UB by a compiler maintainer for Microsoft. He pointedly said the gcc maintainers would do better to work on t
by Gibbon1 5y ago
Reminds me once saw an comment about optimizing on UB by a compiler maintainer for Microsoft. He pointedly said the gcc maintainers would do better to work on their crummy code generation.
- astrange 5y agoAren't gcc/clang significantly better than MSVC? They're certainly better at safe code with tools like asan, and at least they support C99.
- pjmlp 5y agoNot updated with Visual Studio 2019? C11 and C17 are supported, minus C99 features made optional in C11. ASan is now in the box. And Visual Studio definitly provides a better experience of coupling static analysis with code being written.
- astrange 5y agoI am a bit behind. Sounds like a good update, since before it was effectively just a C++ compiler that implemented parts of C when it was convenient.
- pjmlp 5y agoOn the contrary, first of all there is no rule that requires a C++ compiler to also be a C compiler. Second, Microsoft considered C done on Windows, and green field systems programming should be done in C++, there were a couple of blog posts done about the subject, which apparently hater kept forgeting to read about. So no, it wasn't about when it was convenient, rather to the extent required by ISO C++ compliance. In fact, as per Microsoft Security Center advisory, C# or other managed languages, Rust or C++ with Core Guidelines, should be the main languages to use for new applications. Most likely they ended up backtracking with the goal to drop C support from Visual Studio due to pressure from high profile customers, WSL and FOSS code on Windows, or even the culture change brought by Satya.
- josephcsible 5y ago> On the contrary, first of all there is no rule that requires a C++ compiler to also be a C compiler. This is true, but an OS with no C compiler is horrifically bad. If Microsoft didn't want their C++ compiler to also be a C compiler, then they should have made a separate C compiler, instead of forcing people to rely on something like MinGW.
- pjmlp 5y agoThe compilers are separate, just like in most C and C++ compilers out there. There is hardly any reason to keep writing new C code in 2021 other than UNIX like codebases or embedded development that keeps resisting C++ adoption. I was actually disappointed with Microsoft's decision to backtrack on their decision.
- josephcsible 5y ago> The compilers are separate Was there a separate C compiler? I thought Microsoft had a C++-only compiler but not a corresponding C-only compiler, and that the lack of a separate C compiler was the problem. > There is hardly any reason to keep writing new C code in 2021 other than UNIX like codebases or embedded development that keeps resisting C++ adoption. > I was actually disappointed with Microsoft's decision to backtrack on their decision. You seem to be saying that C is deprecated or something, but it isn't.
- pjmlp 5y agoThe just like most C and C++ compilers there is a common frontend that then executes the corresponding compiler infrastructure. C was deprecated from Microsoft point of view regarding systems programming on Windows, apparently complainer keep forgetting to actually read Microsoft employees blog posts. Here, have a go at them, to spare you some Google-fu. https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/ https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/ https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-s... But alas, some manager decided to backtrack on the decision and support C after all.