News for hackers. Stuff that matters.
Re:Exploring GNU extensions in the Linux kernel by o11c on Tuesday May 14, 2024 @10:14PM (#40362386)
I don't kernel, but:

Empty structures are useful, but behave weirdly. Structures containing a zero-size `char` array are much more portable.

Although `__builtin_choose_expr` isn't available in C++, it's trivial to implement using templates. Actually a lot of these are a reminder that GNU C exists for people who refuse to use C++ for political reasons.

`__builtin_types_compatible_p` is mostly not needed now that C11 `_Generic` exists.

There are no comments on this comment yet.