Unify and simplify bits/byteswap.h, bits/byteswap-16.h headers (bug 14508, bug 15512, bug 17082, bug 20530)

Joseph Myers joseph@codesourcery.com
Wed Feb 7 00:54:00 GMT 2018


On Tue, 6 Feb 2018, Adhemerval Zanella wrote:

> > The __bswap_constant_32 macro needs to stay around because of uses in
> > static initializers within glibc and its tests, and so for consistency
> > all __bswap_constant_* are kept rather than just being inlined into
> > the old-GCC-or-non-GCC parts of the __bswap_* inline function
> > definitions.
> 
> Wouldn't be better to use static inline for these as well?

You can't use a call to a static inline function in a static initializer; 
it needs to be a macro for those uses so it expands to a C constant 
expression.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list