This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] libbacktrace: Fix compile warning building testcase
- From: "Ian Lance Taylor via gcc-patches" <gcc-patches at gcc dot gnu dot org>
- To: Sam Thursfield <sam dot thursfield at codethink dot co dot uk>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 7 Mar 2017 20:03:22 -0800
- Subject: Re: [PATCH] libbacktrace: Fix compile warning building testcase
- Authentication-results: sourceware.org; auth=none
- References: <55c3d987-1c7e-036c-2894-dac5d8d8ce4e@codethink.co.uk>
- Reply-to: Ian Lance Taylor <iant at google dot com>
On Fri, Mar 3, 2017 at 6:46 AM, Sam Thursfield
<sam.thursfield@codethink.co.uk> wrote:
>
> I hit this compile warning running `make check` on AIX. Since -Werror is
> enabled by default here it causes a build failure.
>
> Tested on powerpc-ibm-aix7.2.0.0
>
> This my first patch submission for GCC, so please let me know if I need to
> do anything differently.
Thanks. The patch submission is fine but 1) you didn't see which
version of GCC you are using; 2) I don't understand why it works. If
BACKTRACE_SUPPORTED is 0, then I would expect that you would see a
warning for test1, test2, test3, and test4. Your patch doesn't fix
those, so it sounds like you are only seeing the warning for test5, so
BACKTRACE_SUPPORTED must be 1.. test5 is not compiled if
BACKTRACE_SUPPORTS_DATA is 0, so BACKTRACE_SUPPORTS_DATA must be 1.
So both BACKTRACE_SUPPORTED and BACKTRACE_SUPPORTS_DATA must be 1, so
I don't understand what your patch fixes.
Ian