Product News

New C++ features in GCC 12--Marek Polacek

Time to update.

New C++ features in GCC 12

by Marek Polacek

From the article:

Version 12.1 of the GNU Compiler Collection (GCC) is expected to be released in April 2022. Like every major GCC release, this version will bring many additions, improvements, bug fixes, and new features. GCC 12 is already the system compiler in Fedora 36. GCC 12 will also be available on Red Hat Enterprise Linux in the Red Hat Developer Toolset (version 7) or the Red Hat GCC Toolset (version 8 and 9).

Like the article I wrote about GCC 10, this article describes only new features affecting C++.

We implemented several C++23 proposals in GCC 12. The default dialect in GCC 12 is -std=gnu++17; to enable C++23 features, use the -std=c++23 or -std=gnu++23 command-line options. (The latter option allows GNU extensions.)

Note that C++20 and C++23 features are still experimental in GCC 12...

Execution and Static Analysis Support for MSVC on Compiler Explorer--Sy Brand

Will you try it?

Execution and Static Analysis Support for MSVC on Compiler Explorer

by Sy Brand

From the article:

Compiler Explorer is a popular resource for visualizing the assembly output of various compilers, trying out different compiler versions and flags, and testing many popular libraries.

We’re pleased to announce that, as of today, code execution and static analysis are now available for MSVC on Compiler Explorer. Execution on CE has been one of our highest voted tickets on Developer Community, so we hope many of you will find it useful. The static analysis tool provided is the same as offered in GitHub Actions and in the IDE as background code analysis...

Outcome enters sustaining phase, goes ABI stable--Niall Douglas

Will you use it?

Outcome enters sustaining phase, goes ABI stable

by Niall Douglas

From the article:

After three years of maturing, I am pleased to announce that the Spring release of Outcome, an alternative error handling framework, will enter its sustaining phase and thus it will be able to formally guarantee ABI stability going forth. ABI stability is tested per commit by CI and the specifics of the guarantees is documented here...

What's new in PVS-Studio in 2021?

2021 is coming to an end, which means it's time to sum up the year! Today we'll tell you about the new features we added to PVS-Studio in the past year. Buckle up and let's go!

What's new in PVS-Studio in 2021?

by Maxim Stefanov, Oleg Lisiy, Sergey Vasiliev

From the article:

PVS-Studio has plugins for various JetBrains IDEs: Rider, IntelliJ IDEA. Somehow we missed another popular IDE — CLion. Our clients expressed an increasing interest in this feature. Moreover, the PVS-Studio plugin for CLion as a cross-platform IDE would make it possible to work comfortably with the C++ analyzer regardless of the environment in which the developer works: on Windows, Linux or macOS.

PVS-Studio: Top 10 bugs found in C++ projects in 2021

It's freezing outside, everyone has already decorated the Christmas tree and bought tangerines. New Year is coming! So, it's time to meet the Top 10 interesting bugs found by the PVS-Studio C++ analyzer in 2021.

Top 10 bugs found in C++ projects in 2021

by Vladislav Stolyarov

From the article:

Let's talk about... HTML! PVS-Studio provides diagnostics that don't just check code – they also look for abnormalities in string literals. The code above triggered one of these diagnostics. Such cases are quite rare. That's why, this one is so intriguing. Someone intended to create one list but added two tags that open this list instead of one. This is clearly a typo. The first tag must open the list, and the second one must close it.

Introducing Trunk - A New Meta-Linter for C/C++ (and Dozens of Other Languages) -- David Apirian

Trunk launched its public beta! Trunk combines 30+ linters, static analyzers, and formatters covering dozens of languages to create a one-stop-shop for checking your code.

Trunk Check - Code Quality Solved

by David Apirian

From the article:

Modern repositories include many technologies, each with its own set of linters. With 30+ linters and counting, Trunk makes it dead-simple to identify, install, configure, and run the right linters, static analyzers, and formatters for all your repos. Use the beta for free today.

Itself written in C++, Trunk makes it dead simple to run C++ linters like clang-tidy, adding intelligent caching, easy setup, and a language server for IDE support. Overall, Trunk makes it dead-simple to identify, install, configure, and run the right linters, static analyzers, and formatters for all your repos across multiple languages. Available as a clivscode extension, and github action.

PVS-Studio 7.16, expanding the horizons: MISRA C, Visual Studio 2022, .NET 6

This is the latest release of PVS-Studio in 2021. With it, the PVS-Studio team accomplishes several important goals. Now, PVS-Studio supports Visual Studio 2022 (.NET 6, C# 10.0). We implemented all diagnostics categorized as Mandatory in MISRA C.

PVS-Studio 7.16, expanding the horizons: MISRA C, Visual Studio 2022, .NET 6

by Andrey Karpov

From the article:

PVS-Studio supports 80% of the MISRA C standard for safety and security. The tool fully covers the warnings categorized as Mandatory and most of the warnings from the Required category.

ReSharper C++ 2021.3 release helps upgrade your code to modern C++ -- Elvira Mustafina

ReSharper C++ 2021.3 is now available!

ReSharper C++ 2021.3: Support for Visual Studio 2022, Unreal Engine File Templates, New C++20 and C Features

by Elvira Mustafina

From the article:

Check out the highlights and read the post for more details.

  • Support for Visual Studio 2022. You will enjoy the same rich feature set as in other Visual Studio versions, but since Visual Studio 2022 is an x64 process, all ReSharper C++ features work faster.
  • New C++20 features: auto-completion of designated initializers for aggregate initialization and modernizing inspections to help you adopt new library functions.
  • File templates for Unreal Engine classes.
  • Improved C support: C11 _Generic expressions and the typeof GNU extension.
  • Navigation in goto statements and inactive code.
  • Evaluation results for constant expressions in the Quick Info tooltip.
  • Change Signature lets you control the C++17 [[nodiscard]] attribute.
  • New inspections with quick-fixes, and an update for Clang-Tidy with new checks from Clang 13.

SonarLint now supports Visual Studio 2022 for your C and C++ projects -- Marco Comi

The latest release of SonarLint supports Visual Studio 2022 and enables users to detect and fix coding issues in their C and C++ code. Enjoy the best-in-class capabilities of Visual Studio and SonarLint for your modern code development. SonarLint is a free static analysis extension and directly installable for VS 2022 from the Marketplace.

SonarLint for Visual Studio: v5.0

By Marco Comi

From the article:

The new Visual Studio version brings many new features and improvements. Starting from version 5.0 of SonarLint you are able to use our plugin in Visual Studio 2022 for all the languages we already support. The VS Marketplace page for the new version is here.