This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Cast to int32 first when casting pointer to int64
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Andreas Schwab <schwab at suse dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 3 Mar 2016 13:13:00 -0800 (PST)
- Subject: Re: PATCH: Cast to int32 first when casting pointer to int64
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOpOdaJhN0U_8xUOyGG0JHeO7k9626=v5hdzgxBroLxkOw at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1211212309380 dot 11924 at digraph dot polyomino dot org dot uk> <CAMe9rOpv3eNQ7=L_4spxkTOVF_vgDXNgh7VXzBCRUyOOtejGyg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1211212320170 dot 11924 at digraph dot polyomino dot org dot uk> <CAMe9rOouBm0KY7+FcL6vUFazNk_iAmZTkR0uo=e+YYbO7ntwYA at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1211212352020 dot 11924 at digraph dot polyomino dot org dot uk> <mvm7gpe9f57 dot fsf at g208 dot suse dot de> <CAMe9rOpKao4bXAbX=yJYtZxt=05Onr3UZvh8K+f1hr54O8ZAag at mail dot gmail dot com> <20121126235708 dot 8FC9D2C071 at topped-with-meat dot com> <87y4ac22kh dot fsf at mid dot deneb dot enyo dot de>
> * Roland McGrath:
>
> > These are new private macros. They don't really belong in any shadow
> > version of an installed header. Put them in some purely internal header.
> > If there isn't an obvious good choice, libc-internal.h is probably OK.
>
> The problem with this approach is that <libc-internal.h> is now
> included everyone on x86_64, causing things to build which break on
> most other architectures.
>
> Can we make the macro definition x86_64-only? It is used for i386 as
> well, but it's not clear if it's not obscuring real bugs there.
libc-internal.h is a catch-all for when nobody can think of a better
topical header to use (or invent). If throwing too many things into
libc-internal.h causes problems, then things should be split out into
smaller headers with meaningful names and groupings.