This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Add macros for diagnostic control, use for scanf %a tests
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 10 Dec 2014 00:42:33 +0000
- Subject: Re: Add macros for diagnostic control, use for scanf %a tests
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1411252243090 dot 17237 at digraph dot polyomino dot org dot uk> <20141209232237 dot 79A3E2C39E0 at topped-with-meat dot com>
On Tue, 9 Dec 2014, Roland McGrath wrote:
> That's OK by me. But it would be better if the explanations about how GCC
> limitations influenced the macro API choices were in comments in the header
> itself.
I've committed the patch with this comment.
/* The macros to control diagnostics are structured like this, rather
than a single macro that both pushes and pops diagnostic state and
takes the affected code as an argument, because the GCC pragmas
work by disabling the diagnostic for a range of source locations
and do not work when all the pragmas and the affected code are in a
single macro expansion. */
--
Joseph S. Myers
joseph@codesourcery.com