On Mon, Apr 24, 2023 at 11:47 PM Samuel Thibault <samuel.thiba...@gnu.org> wrote: > Is it really worth making the code a bit obscure?
No, not really. What happened here was I looked at what my mask computation compiled to, to verify it does the right thing on both x86_64 and i686, and then I saw how the error branches are compiled, and next thing you know there are new __glibc_unlikely's in my tree :) What I should rather look into is marking __hurd_fail and friends with __attribute__((cold)); that would take care of all the error branches everywhere automatically without having to mark things up. But I did a quick grep and found nothing using __attribute__((cold)) yet, so I don't know what the right way of using it would be (and maybe it's not being used intentionally?). I'm thinking it should probably go into misc/sys/cdefs.h as __COLD (or __attribute_cold?). Something like this: #if __glibc_has_attribute (cold) #define __COLD __attribute__ ((cold)) #else #define __COLD #endif What do you think? Sergey