This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix up bswap_* types
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Sun, 19 Aug 2012 22:49:05 +0000
- Subject: Re: [PATCH] Fix up bswap_* types
- References: <20120819160958.GB3156@redhat.com>
On Sun, 19 Aug 2012, Marek Polacek wrote:
> it would be IMNSHO better to use uint64_t directly, as this is the type
> that the gcc builtin takes and returns. For instance __builtin_bswap64
> is defined as:
> DEF_GCC_BUILTIN (BUILT_IN_BSWAP64, "bswap64", BT_FN_UINT64_UINT64,
> ATTR_CONST_NOTHROW_LEAF_LIST)
> and BT_UINT64 is:
> DEF_PRIMITIVE_TYPE (BT_UINT64, uint64_type_node)
But uint64_type_node etc. do not necessarily correspond to the stdint.h
typedefs (see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37743>; making
them correspond to the typedefs involves finishing adding stdint.h type
information to GCC for various target OSes).
> So this patch changes various unsigned ints to uint*_t variants. It
When posting a patch where corresponding ports changes would be
appropriate but are not included, please call out in the submission where
ports changes may be appropriate.
> silences two warnings in debug/pcprofiledump.c and does not cause
> any new warnings on both x86_64/i?86. I've checked places where
> these bswap_* functions are used and callers are using appropriate
> uint*_t types. So no changes needed there.
You are making headers include <stdint.h> that didn't previously. Could
you detail the analysis of what public headers, directly or indirectly,
end up including <stdint.h> as a result, and why it is OK in namespace
terms for those headers to expose all symbols from <stdint.h> if they
didn't already do so?
--
Joseph S. Myers
joseph@codesourcery.com