[4.4] remove diagnostic_count_diagnostic

Manuel López-Ibáñez lopezibanez@gmail.com
Fri Mar 14 10:06:00 GMT 2008


PING: http://gcc.gnu.org/ml/gcc-patches/2008-02/msg01108.html

Gabriel,

If the unified patch is confusing you, please look at the resulting
code. No behaviour is changed at all.

Cheers,

Manuel.

On 26/02/2008, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> On 25/02/2008, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
>  > On Mon, Feb 25, 2008 at 1:40 PM, Manuel López-Ibáñez
>  >  <lopezibanez@gmail.com> wrote:
>  >  > 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.
>  >  >
>  >
>  >
>  > Counting the different kinds of diagnostics is all that I would like retained.
>
>
> But my patch does that, so what do you mean?
>
>  Cheers,
>
>
>  Manuel.
>



More information about the Gcc-patches mailing list