This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Add macros for diagnostic control, use them in locale/weightwc.h
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Mon, 24 Nov 2014 16:00:03 -0800 (PST)
- Subject: Re: Add macros for diagnostic control, use them in locale/weightwc.h
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1411181803130 dot 11642 at digraph dot polyomino dot org dot uk> <alpine dot DEB dot 2 dot 10 dot 1411211705270 dot 2475 at digraph dot polyomino dot org dot uk> <546F79BB dot 80604 at cs dot ucla dot edu> <alpine dot DEB dot 2 dot 10 dot 1411211807540 dot 2475 at digraph dot polyomino dot org dot uk> <546F8FA5 dot 2050702 at cs dot ucla dot edu> <alpine dot DEB dot 2 dot 10 dot 1411212240570 dot 32250 at digraph dot polyomino dot org dot uk> <54701BAA dot 1030805 at cs dot ucla dot edu>
Thanks very much for tracking down that change! That's exactly what we'd
like to see done instead of warning suppression whenever it's possible.
The only thing I'd like you to do differently is to put more explanation in
the code itself rather than only in the ChangeLog. e.g.
/* It's important that this be a scalar variable rather than a
one-element array, because GCC (at least 4.9.2 -O2 on x86-64)
can be confused by the array and diagnose a "used initialized"
in a dead branch in the findidx function. */
Thanks,
Roland