I've extended GCC's -Wrange-loop-construct: now it warns when a loop var in a range-based for is initialized with a value of a different type resulting in a copy. E.g.,
int arr[10];
for (const double &x : arr) { }
where in every iteration we create and destroy a temporary value.
GCC 11 now supports the C++20 'using enum' feature: it allows the programmer to import enumerator names into the
current scope.
gcc.gnu.org/git/?p=gcc.git;a…
The diagnostic for static_assert has been improved in GCC 11: g++ now shows the expression including its template arguments (if there were any), and can point to the failing clause if the condition comprised of any logical AND operators.
GCC 11 now supports the long-desired -Wvexing-parse warning. It warns about the most vexing parse rule: the cases when a declaration looks like a variable definition, but the C++ language requires it to be interpreted as a function declaration: gcc.gnu.org/git/?p=gcc.git;a…
Mary, Pietra and Jessica of @Embecosm have published a blog post on how to add @risc_v instructions to the @gnutools assembler! 👀Read the post or see their talk at our lightning talks evening: ossg.bcs.org/blog/2020/10/29…