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


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


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