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: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 26 Nov 2014 00:43:53 +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> <54752077 dot 7000002 at cs dot ucla dot edu>
On Tue, 25 Nov 2014, Paul Eggert wrote:
> This sort of thing looks intrusive. Instead, how about defining a macro
> 'C99_sscanf' that does the push and pop and commentary, and then simply
> replacing warned-about uses of sscanf with C99_scanf? That'd be a lot easier
> to read, and it's more along the lines of Roland's original suggestion.
Again, it doesn't work to have the pragmas in the same macro as the code
in which the diagnostics are suppressed; they need to be in separate
macros for the suppression to be effective.
--
Joseph S. Myers
joseph@codesourcery.com