This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix GLIBC build error with recent GCC6
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>, "'GNU C Library'" <libc-alpha at sourceware dot org>
- Date: Mon, 20 Jul 2015 13:40:59 -0400
- Subject: Re: [PATCH] Fix GLIBC build error with recent GCC6
- Authentication-results: sourceware.org; auth=none
- References: <002b01d0c309$84ed71a0$8ec854e0$ at com>
On 07/20/2015 12:31 PM, Wilco Dijkstra wrote:
> iconvdata/iso-2022-cn-ext.c fails to build with modern GCC, so add a warning disable. I created PR
> 66946 to see whether this can be fixed in GCC.
>
>
> ChangeLog:
> 2015-07-20 Wilco Dijkstra <wdijkstr@arm.com>
>
> * iconvdata/iso-2022-cn-ext.c: Add warning disable.
>
>
> ---
> iconvdata/iso-2022-cn-ext.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c
> index 2c9846d..75590a0 100644
> --- a/iconvdata/iso-2022-cn-ext.c
> +++ b/iconvdata/iso-2022-cn-ext.c
> @@ -656,6 +656,7 @@ enum
> while (0)
> #define UPDATE_PARAMS *setp = (set | ann) << 3
> #define LOOP_NEED_FLAGS
> +# pragma GCC diagnostic ignored "-Wuninitialized"
> #include <iconv/loop.c>
Can you localize it more? Add a comment and reference the BZ?
e.g.
/* Building with -O3 GCC emits a `array subscript is above array
bounds' warning. GCC BZ #64739 has been opened for this. */
DIAG_PUSH_NEEDS_COMMENT;
DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Warray-bounds");
while (inptr < inend)
bytebuf[inlen++] = *inptr++;
DIAG_POP_NEEDS_COMMENT;
Cheers,
Carlos.