Marek Polacek
Marek Polacek's contributions
Article
New C features in GCC 13
Marek Polacek
The GNU Compiler Collection 13 release implemented a number of interesting features in its C front-end. This article summarizes the most interesting ones.
Article
New C++ features in GCC 12
Marek Polacek
Version 12 of GCC implements much of the recent C++ standard, allows a number of previously prohibited constructs, and fixes some problematic behaviors.
Article
Porting your code to C++17 with GCC 11
Marek Polacek
C++17 is now the default version in the GNU Compiler Collection. Find out what you need to know when updating your code to C++17 with GCC 11.
Article
New C++ features in GCC 10
Marek Polacek
Explore the front end-based C++ features that C++ application programmers care most about in GCC 10.1 (G++ 10.1), which include many C++20 proposals.
Article
Understanding when not to std::move in C++
Marek Polacek
New warnings have been added to GCC 9 that can help with wrong or redundant usage of std::move in C++ code. Learn how to enable them.
Article
-Wimplicit-fallthrough in GCC 7
Marek Polacek
(See this article to install GCC 7 on Red Hat Enterprise Linux.) In C and C++, the cases of a switch statement are in fact labels, and the switch is essentially a go to that jumps to the desired label. Since labels do not change the flow of control, one case block falls through to the following case block, unless terminated by a return, a break, a no return call or similar. In the example below, "case 1" falls through...
Article
Testing GCC in the wild
Marek Polacek
Currently, the GCC testsuite contains more than fifty thousand tests which make up to two million lines of code. Since we, the GCC developers, try hard to avoid regressions in the compiler, almost every change to the compiler or to a related library requires a new test or a set of tests to be added. Hence the internal testsuite keeps growing at a rapid pace. It goes without saying that a new change should not break any existing test. Despite...
Article
GCC Undefined Behavior Sanitizer - ubsan
Marek Polacek
(See this article to install GCC 7 on Red Hat Enterprise Linux via yum.) Not every software bug has as serious consequences as seen in the Ariane 5 rocket crash. Notwithstanding that, bugs cost software companies a lot of money every year and upset customers, users, and developers. Some bugs happen as a result of undefined behavior occurring in the program. Undefined behavior is a concept known especially in the C and C++ languages which means that the semantics of...

Article
New C features in GCC 13
Marek Polacek
The GNU Compiler Collection 13 release implemented a number of interesting features in its C front-end. This article summarizes the most interesting ones.

Article
New C++ features in GCC 12
Marek Polacek
Version 12 of GCC implements much of the recent C++ standard, allows a number of previously prohibited constructs, and fixes some problematic behaviors.

Article
Porting your code to C++17 with GCC 11
Marek Polacek
C++17 is now the default version in the GNU Compiler Collection. Find out what you need to know when updating your code to C++17 with GCC 11.

Article
New C++ features in GCC 10
Marek Polacek
Explore the front end-based C++ features that C++ application programmers care most about in GCC 10.1 (G++ 10.1), which include many C++20 proposals.

Article
Understanding when not to std::move in C++
Marek Polacek
New warnings have been added to GCC 9 that can help with wrong or redundant usage of std::move in C++ code. Learn how to enable them.

Article
-Wimplicit-fallthrough in GCC 7
Marek Polacek
(See this article to install GCC 7 on Red Hat Enterprise Linux.) In C and C++, the cases of a switch statement are in fact labels, and the switch is essentially a go to that jumps to the desired label. Since labels do not change the flow of control, one case block falls through to the following case block, unless terminated by a return, a break, a no return call or similar. In the example below, "case 1" falls through...

Article
Testing GCC in the wild
Marek Polacek
Currently, the GCC testsuite contains more than fifty thousand tests which make up to two million lines of code. Since we, the GCC developers, try hard to avoid regressions in the compiler, almost every change to the compiler or to a related library requires a new test or a set of tests to be added. Hence the internal testsuite keeps growing at a rapid pace. It goes without saying that a new change should not break any existing test. Despite...

Article
GCC Undefined Behavior Sanitizer - ubsan
Marek Polacek
(See this article to install GCC 7 on Red Hat Enterprise Linux via yum.) Not every software bug has as serious consequences as seen in the Ariane 5 rocket crash. Notwithstanding that, bugs cost software companies a lot of money every year and upset customers, users, and developers. Some bugs happen as a result of undefined behavior occurring in the program. Undefined behavior is a concept known especially in the C and C++ languages which means that the semantics of...