You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Farid Zaripov <Fa...@kyiv.vdiweb.com> on 2006/10/18 16:04:56 UTC
[PATCH] Re: testsuite process helpers
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com]
> Sent: Thursday, August 03, 2006 5:48 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: testsuite process helpers
>
[...]
> Okay, let's go with it. How about
>
> rw_enable(int(*)(int, int, const char*, const char*, ...),
> bool = true);
>
> so that we can simply call it like so:
>
> rw_enable(rw_error, false); // disable errors
> rw_enable(rw_note); // enable notes
>
> and we don't have to move diag_t into driver.h.
The patch is attached.
ChangeLog:
* driver.h (rw_enable): New function to enable/disable
specified diagnostics
* driver.cpp (rw_enable): New function to enable/disable
specified diagnostics
(_rw_vdiag): Added checking whether the diagnostic
is enabled or disabled
* opt_trace.h: Added declaration of the _rw_ignore_mask variable
* opt_trace.cpp: Added definition of the _rw_ignore_mask variable
Farid.
Re: [PATCH] Re: testsuite process helpers
Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:
> > -----Original Message-----
> > From: Martin Sebor [mailto:sebor@roguewave.com]
> > Sent: Thursday, August 03, 2006 5:48 PM
> > To: stdcxx-dev@incubator.apache.org
> > Subject: Re: testsuite process helpers
> >
> [...]
> > Okay, let's go with it. How about
> >
> > rw_enable(int(*)(int, int, const char*, const char*, ...),
> > bool = true);
> >
> > so that we can simply call it like so:
> >
> > rw_enable(rw_error, false); // disable errors
> > rw_enable(rw_note); // enable notes
> >
> > and we don't have to move diag_t into driver.h.
>
> The patch is attached.
Excellent! Just one question/suggestion regarding naming...
[...]
> Index: src/opt_trace.cpp
> ===================================================================
> --- src/opt_trace.cpp (revision 465232)
> +++ src/opt_trace.cpp (working copy)
> @@ -33,7 +33,10 @@
> // masked diagnostics (those that shouldn't be issued)
> int _rw_diag_mask = 1 << diag_trace;
>
> +// masked diagnostics (those that should be ignored)
> +int _rw_ignore_mask = 0;
Would _rw_diag_ignore be a better name? The variable is a bitmap
of diagnostics to ignore (the one above is a bitman of those that
are masked).
Thanks
Martin