This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Make macOS build warning-free
- From: Simon Marchi <simark at simark dot ca>
- To: Tom Tromey <tom at tromey dot com>, Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 2 Jul 2018 12:53:09 -0400
- Subject: Re: [RFA] Make macOS build warning-free
- References: <20180629165453.22888-1-tom@tromey.com> <ee30b149-6a2b-d7e4-4d2f-28428d266087@ericsson.com> <87woudofal.fsf@tromey.com>
On 2018-07-02 10:58 AM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
>
> Simon> About the gettext / non-literal warning, this is the patch I carry. I tried
> Simon> to dig up why gettext doesn't define _INTL_MAY_RETURN_STRING_ARG for __APPLE_CC__
> Simon> but couldn't find it. My guess is that in a distant past, the Apple compiler
> Simon> did not know about that attribute. You need another change to get rid of the warning
> Simon> though.
>
> Thanks.
>
> I looked into this a little more. It seems like a huge effort, because,
> first, upstream doesn't have this fix; and second, it seems like it
> would have to be imported into gcc first.
>
> Fixing this upstream would probably require the same thing for other
> functions, not just gettext.
_INTL_MAY_RETURN_STRING_ARG thing is a gcc/binutils/gdb addition, on top of the
v0.12.1 version of gettext. So we shouldn't have to deal with upstream gettext
to fix this, since it's just the gcc/binutils/gdb addition that needs to be fixed.
Getting the fixed accepted in gcc shouldn't take took long.
> I think in the meantime I'll just --disable-nls. Perhaps you wouldn't
> mind approving the symfile.c change in isolation.
That bit looks good to me, at least to shut up the compiler. But I'm wondering
if we still need that section_offsets structure, or if we could just replace
it with std::vector<CORE_ADDR>/gdb:array_view<CORE_ADDR>.
Simon