importc and stb

Elronnd elronnd at elronnd.net
Thu Dec 16 18:38:10 UTC 2021


On Thursday, 16 December 2021 at 14:26:42 UTC, bachmeier wrote:
> https://github.com/ibuclaw/importC/blob/main/src/keywords.c.in

> #define __builtin_bswap16(x) ((u_int16_t) ((((x) >> 8) & 0xff) 
> | (((x) & 0xff) << 8)))

Oh, my, that's bad.  GCC __builtins don't generally evaluate more 
than once.  And this could just be an inline function anyway.


More information about the Digitalmars-d mailing list