This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Patch] Fix HP_SMALL_TIMING_AVAIL undef warnings
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: Steve Ellcey <sellcey at mips dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 28 Apr 2014 14:53:37 +0000
- Subject: Re: [Patch] Fix HP_SMALL_TIMING_AVAIL undef warnings
- Authentication-results: sourceware.org; auth=none
- References: <ad1e0a7b-521b-44e3-b7bf-ddb7b3b45fba at BAMAIL02 dot ba dot imgtec dot org> <CANu=DmhDfkKzqFbR1Qvxu61o2hVnUwB+MYxvhZ6y4qy4X3LZzg at mail dot gmail dot com>
On Mon, 28 Apr 2014, Will Newton wrote:
> This looks like it is the right thing to do, however I believe the
> warnings will persist on:
>
> ia64
> x86_64
> i386
> powerpc32
> powerpc64
> sparc32
> sparc64
>
> Which all use their own hp-timing.h.
Indeed. For such a patch you need to:
* Work out what header should define the macro.
* Ensure that it does define the macro, for all configurations of glibc.
* Go through all uses of the macro that test #ifdef / #ifndef / #if
defined / #elif defined, and change them to use #if conditionals. Make
sure that all the users include the relevant header before the tests. If
some don't include the header, there may be pre-existing bugs from testing
whether a macro is defined without including the header that defines it -
in which case you need (a) to work out whether the test in the file is
actually correct, or if it is bitrotten, and (b) to call out these cases
in the patch submission, giving your analysis of whether the test is
actually correct or not.
--
Joseph S. Myers
joseph@codesourcery.com