On Mon, 2016-06-06 at 10:55 +0200, Paolo Carlini wrote: > Hi, > > yesterday I had the idea of this small clean-up: move the work done > by > emit_diagnostic to a new non-variadic diagnostic_impl and use it to > implement the former and all the various inform, warning, permerror, > etc > (lately we have the *_at_rich_loc variants too). Something similar > can > be done for inform_n, warning_n and errror_n. There is the minor > subtlety of the declarations decorated with ATTRIBUTE_GCC_DIAG when > available to suppress the build-time warning: I think I did it the > right > way, I took inspiration from the declarations of diagnostic_set_info, > etc, in diagnostic.h. > > Tested x86_64-linux.
Thanks, looks like a nice simplification. I see the new prototypes are wrapped in #ifdef ATTRIBUTE_GCC_DIAG. Isn't that redundant? Looking at diagnostic-core.h, isn't it always defined? (perhaps to the empty string) Also the new functions are missing comments. Other than that, LGTM.