This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] getc/putc -Wunused-value warnings in source.c


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]