Extremely impressed by #GCC 14.1 static analysis (-fanalyzer). Not only really finding real bugs but enough information to convince oneself of the reality of the issue. A bit frightening on an old codebase.
I spent ~hour yesterday fighting an issue with my C++ code, only to later figure out it's a possible GCC bug, because Clang accepts the same code.
The issue is that GCC does not permit a constrained type parameter in a template template parameter of an aliased template. See the simplified code with the issue.
A cursory search of GCC Bugzilla does not readily show any related bug. I'll look carefully but lemme know if this is a known bug (probably is). 🙏🏽
Learning about the gcc attribute ((ifunc ("resolve_xxx"))) construct is making me wonder what the hell the person who thought it up was drinking, smoking or eating, and the code review team too.
I'm struggling to think of a reasonable usecase for this monstrosity of a construct.
@penguin42 in that case it feels like a function pointer would be almost as efficient (preinitialise on load then have the wrapper call it), without the obfuscatory effects of the ifunc. plus it can be boundschecked if needed to see if the fptr is one of the valid functions, ie a corruption canary.
In the 1990s I used DJGPP to run a small C-based Unix tool I wrote on a DOS machine. Later years Cygwin was more the way I would do cross-platform GCC stuff. I now have even more appreciation for what they needed to do behind the scenes to get DJGPP working. #gcc#djgpp#history#ComputerHistory#RetroComputing Running GNU on DOS with DJGPP
@withoutclass
If you haven't updated in awhile, emerge the new glibc, reboot, then emerge GCC. I also had to explicitly set "march=raptorlake" on one of my systems vs "native". ☹️
@ScottE I did see some folks having to do that on the forums while I was poking around a bit. It must've been some error the devs found because between yesterday and today, a new emerge sync corrected the problem for me