This is the mail archive of the
mailing list for the glibc project.
Re: Don't check __GNUC__ together with __USE_EXTERN_INLINES
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 8 Jan 2013 19:50:38 +0530
- Subject: Re: Don't check __GNUC__ together with __USE_EXTERN_INLINES
- References: <Pine.LNX.email@example.com>
On Tue, Jan 08, 2013 at 01:54:58PM +0000, Joseph S. Myers wrote:
> Two places in glibc's installed headers use a condition defined
> __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES. This is
> redundant, since __USE_EXTERN_INLINES is only defined if __GNUC_PREREQ
> (2, 7). (Logically such a combination could make sense of a sort *if*
> the inline functions used some other extension, beyond
> __extern_inline, but they don't, other than through macros that
> sys/cdefs.h defines to empty for compilers not supporting them.)
> This patch accordingly changes those conditionals to test just the
> logical feature macro __USE_EXTERN_INLINES, and not the GCC version.
> Tested x86_64.
There are a couple of places where __USE_EXTERN_INLINES is explicitly
set, for example in argp/argp-xinl.h. The patch could break such code
if it includes any of the headers you've changed after explcitly
setting __USE_EXTERN_INLINES. If you've verified that these cases
don't break then the change should be safe.