This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.4] remove diagnostic_count_diagnostic
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Gabriel Dos Reis" <gdr at integrable-solutions dot net>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 14 Mar 2008 10:48:19 +0100
- Subject: Re: [4.4] remove diagnostic_count_diagnostic
- References: <6c33472e0802241213u19adf3bbn9e8f078b271c9bec@mail.gmail.com> <206fcf960802251136y340d0a2flbee5fed39e5cc7c1@mail.gmail.com> <6c33472e0802251140sff99682s668b308586d68802@mail.gmail.com> <206fcf960802251157x164b84bfyb588c022e3a68d47@mail.gmail.com> <6c33472e0802251518r5ec8f889x6a92cffe37a6fe29@mail.gmail.com>
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.
>