How to update C++ compiler used by visual studio 2017?

Sebastian 1 Reputation point
2022-06-14T17:58:03.617+00:00

I am using Visual Studio 2017 to develop C++. I found there is a bug in the compiler, so I need to update it to a newer version. How can I do this? Do I have to install a newer version of Visual Studio to get it, or is it possible to get the newer compiler from within my current version of Visual Studio?

According to cl, my compiler version is: 19.16.27048.

Using godbolt to compile online, I find that my code compiles for 19.16 and later. (Probably the 19.16 godbolt is using is a later version than mine). So I need to update to a later version of 19.16, or something like 19.20 or later.

I'd prefer to update the compiler without having to install an entirely new version of visual studio if possible.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,405 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,620 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 12,846 Reputation points Microsoft Employee
    2022-06-15T09:22:55.193+00:00

    Hi @Sebastian ,

    Welcome to Microsoft Q&A forum.

    I’m afraid, the Microsoft C++ (MSVC) compiler toolset used by VS, cannot be updated separately. You may need to update VS to update the compiler toolset.

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    No comments