Starting with GCC 12 vectorization is enabled at the -O2 optimization level
Given how prevalent -O2 is, this might actually be a hidden performance boost that will apply broadly to most of the Linux ecosystem.
Heads-up if you are compiling C++ code with -Wall: you will see a bogus warning it you assign/append a 1-char string literal to std::string. For example:
-Wall
std::string
void f (std::string& s) { s = "a"; s += "b"; }
The bug report with the details is here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
I suggested that the GCC developers delay the release until this is fixed but looks like they went ahead without a fix. Hopefully in 12.2.
You can usually work around the warning by changing to a char literal (which will also be more efficient).
You won’t find it yet in the release notes, but GCC 12.1 is finally able to compile recent D code, thanks to a big bump of the version of the D frontend integrated in GCC.
The maintainer, Iain Buclaw, said that it will be documented more officially later.
Oh, thank you for pointing this out. This is a huge accomplishment for D !
Just noticed support for m68k on OpenBSD is gone in gcc 12.
Given how prevalent -O2 is, this might actually be a hidden performance boost that will apply broadly to most of the Linux ecosystem.
Heads-up if you are compiling C++ code with
-Wall
: you will see a bogus warning it you assign/append a 1-char string literal tostd::string
. For example:The bug report with the details is here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
I suggested that the GCC developers delay the release until this is fixed but looks like they went ahead without a fix. Hopefully in 12.2.
You can usually work around the warning by changing to a char literal (which will also be more efficient).
You won’t find it yet in the release notes, but GCC 12.1 is finally able to compile recent D code, thanks to a big bump of the version of the D frontend integrated in GCC.
The maintainer, Iain Buclaw, said that it will be documented more officially later.
Oh, thank you for pointing this out. This is a huge accomplishment for D !
Just noticed support for m68k on OpenBSD is gone in gcc 12.