This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] getc/putc -Wunused-value warnings in source.c
- From: Andreas Schwab <schwab at suse dot de>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 07 May 2013 14:37:41 +0200
- Subject: Re: [RFC] getc/putc -Wunused-value warnings in source.c
- References: <1367926842-22398-1-git-send-email-brobecker at adacore dot com>
Joel Brobecker <brobecker@adacore.com> writes:
> The last option could be to #undef getc + #define getc fgetc,
You only need #undef getc to fall back to the function.
> but I do not think that this would be correct, since the man page
> indicates that the file might be evaluated multiple time in the case
> of the getc macro.
How is that not correct? Surely nothing *requires* that the argument is
evaluated more than once.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."