TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GCC 10.3 has been released

23 pointsby aleclmabout 4 years ago

2 comments

lionkorabout 4 years ago
My personal highlights, skimming this release:<p>&gt; -fallocation-dce removes unneeded pairs of new and delete operators<p>&gt; -fno-allocation-dce Do not remove unused C++ allocations in dead code elimination.<p>Nice!<p>&gt; -fanalyzer enables a new static analysis pass and associated warnings [...] analysis of non-C code is unlikely to work.<p>I&#x27;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&#x27;s or clang&#x27;s?<p>&gt; -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>&gt; -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&#x27;t already a thing? All the other improvements to warnings are incredibly useful, too!<p>&gt; Extended characters in identifiers may now be specified directly in the input encoding<p>&gt; get_naïve_pi<p>Why...?<p>C2x revision: &gt; 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>&gt; P1301R4, [[nodiscard(&quot;with reason&quot;)]]<p>Awesome, will use this right away!<p>&gt; P0912R5, Coroutines (requires -fcoroutines)<p>&gt; P0784R7, constexpr new<p>Exciting! Will have to learn these now :D<p>C++ 2a:<p>&gt; std::span, std::atomic_ref and std::atomic&lt;floating point&gt;, std::ssize, std::to_array, std::construct_at, std::destroy, constexpr std::allocator. Mathematical constants in &lt;numbers&gt;<p>And so many more! I&#x27;m very excited to use all these, when they&#x27;re eventually supported by more platforms!
评论 #26763940 未加载
pjmlpabout 4 years ago
Nice to see the D improvements.