This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [4.4] remove diagnostic_count_diagnostic


On 25/02/2008, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> I believe this patch misses the semantics of the function.
>  It isn't just to return true.  It also count the number of
>  diagnostic kinds emitted.

This is done by the following line:

+  ++diagnostic_kind_count (context, diagnostic->kind);

No more is needed to count a diagnostic. Of course, we could
encapsulate that in a function:

static void
diagnostic_count_diagnostic (diagnostic_context *context,
			     diagnostic_info *diagnostic)
{
 ++diagnostic_kind_count (context, diagnostic->kind);
}

Do we really need to do that? Nobody outside diagnostics.c is using
such function.

Cheers,

Manuel.


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