News

Clang with Microsoft CodeGen: A VS 2015 Update 1 Gem

It's just one facet of the recent Visual Studio 2015 Update 1 release, but it's one that Visual C++ developers are excited to deploy. The update also includes numerous fixes to the standard library.

The Visual C++ team has introduced a new toolset in preview aimed at allowing code written with Visual C++ to be compiled and parsed for a number of differing platforms and targets. Clang with Microsoft CodeGen is a compiler that pairs up an open source version of the Clang parser with Visual C++'s code generator, optimizer and compiler.

Dave Bartolomeo with the Visual C++ team writes in a blog post that the goal is to allow developers using Visual C++ to use "the same Clang parser that you use for other targets, while still taking advantage of the advanced optimizations from the Visual C++ optimizer when you build for Windows."

"Because the new toolset uses the same Clang parser used for non-Windows targets, you won't need to have annoying #ifdefs throughout the code just to account for differences between the compilers," explains Bartolomeo, in the post. "Also, your code can take advantage of language features that are not currently available in the Visual C++ compiler, including C99 complex types and C++14 extended constexpr support. And because the Clang-based compiler generates the same debug information format as the Visual C++ compiler, you'll still be able to debug your code with the same great Visual Studio debugger experience."

Related to Bartolomeo's post, a few days earlier Visual C++ team member Cody Miller blogged about support for C++ 11-variety constant expressions that are part of the Visual Studio 2015 Update 1 release. An issue that reared up its head during development, wrote Miller, was that the compiler was having a problem with emitting static initializers. "Although the compiler had enough information to emit fully instantiated types that could be loaded from the compiled executable, it didn't emit the fully instantiated types," he explained. "These types were instantiated and constructed at runtime, as most C++ objects traditionally have been." Update 1 ships with the issue resolved.

Visual Studio 2015 Update 1 also includes a vast list of fixes to the Visual C++ Standard Library, noted here and in several links embedded in that link.

About the Author

You Tell 'Em, Readers: If you've read this far, know that Michael Domingo, Visual Studio Magazine Editor in Chief, is here to serve you, dear readers, and wants to get you the information you so richly deserve. What news, content, topics, issues do you want to see covered in Visual Studio Magazine? He's listening at [email protected].

comments powered by Disqus

Featured

  • Cloud-Focused .NET Aspire 9.1 Released

    Along with .NET 10 Preview 1, Microsoft released.NET Aspire 9.1, the latest update to its opinionated, cloud-ready stack for building resilient, observable, and configurable cloud-native applications with .NET.

  • Microsoft Ships First .NET 10 Preview

    Microsoft shipped .NET 10 Preview 1, introducing a raft of improvements and fixes across performance, libraries, and the developer experience.

  • C# Dev Kit Previews .NET Aspire Orchestration

    Microsoft's dev team has been busy updating the C# Dev Kit, a Visual Studio Code extension that enhances the C# development experience by providing tools for managing, debugging, and editing C# projects.

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

Subscribe on YouTube

Upcoming Training Events