Re: byteswap: Use inline functions instead of macros.

2024-05-17 Thread Paul Eggert
On 2024-05-16 23:25, Collin Funk wrote: Hi Paul, On 5/16/24 10:16 PM, Paul Eggert wrote: +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\ + || (defined __has_builtin && __has_builtin (__builtin_bswap32)) Unfortunately this usage is not portable, not for __has_bui

Re: byteswap: Use inline functions instead of macros.

2024-05-17 Thread Bruno Haible
Collin Funk asked: > I'm assuming that _GL_[module-name]_(rest-of-macro) can be assumed > safe? Yes, such a macro name is safe. Bruno

Re: byteswap: Use inline functions instead of macros.

2024-05-16 Thread Collin Funk
Hi Paul, On 5/16/24 10:16 PM, Paul Eggert wrote: >> +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\ >> + || (defined __has_builtin && __has_builtin (__builtin_bswap32)) > > Unfortunately this usage is not portable, not for __has_builtin or for any of > the other __

Re: byteswap: Use inline functions instead of macros.

2024-05-16 Thread Paul Eggert
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\ + || (defined __has_builtin && __has_builtin (__builtin_bswap32)) Unfortunately this usage is not portable, not for __has_builtin or for any of the other __has_XX primitives. This is because older compilers will rep