My personal highlights, skimming this release:<p>> -fallocation-dce removes unneeded pairs of new and delete operators<p>> -fno-allocation-dce Do not remove unused C++ allocations in dead code elimination.<p>Nice!<p>> -fanalyzer enables a new static analysis pass and associated warnings [...] analysis of non-C code is unlikely to work.<p>I'm super excited to see what this does, we need <i>way</i> more static analysis for C! Does anyone know any good static analysers other than gcc's or clang's?<p>> -Wstring-compare, enabled by -Wextra, warns about equality and inequality expressions between zero and the result of a call to either strcmp and strncmp that evaluate to a constant as a result of the length of one argument being greater than the size of the array pointed to by the other<p>Again, more (static) analysis and compile-time stuff is super nice!<p>> -Wzero-length-bounds, enabled by -Warray-bounds, warns about accesses to elements of zero-length arrays that might overlap other members of the same object.<p>Hell yes! Scary that this wasn't already a thing?
All the other improvements to warnings are incredibly useful, too!<p>> Extended characters in identifiers may now be specified directly in the input encoding<p>> get_naïve_pi<p>Why...?<p>C2x revision:
> The [[]] attribute syntax is supported, as in C++.<p>I always have to look up the old one. What is it, __attribute, __attribute__, _attribute_, attribute, ...?<p>C++ 20:<p>> P1301R4, [[nodiscard("with reason")]]<p>Awesome, will use this right away!<p>> P0912R5, Coroutines (requires -fcoroutines)<p>> P0784R7, constexpr new<p>Exciting! Will have to learn these now :D<p>C++ 2a:<p>> std::span, std::atomic_ref and std::atomic<floating point>, std::ssize, std::to_array, std::construct_at, std::destroy, constexpr std::allocator.
Mathematical constants in <numbers><p>And so many more! I'm very excited to use all these, when they're eventually supported by more platforms!