This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] Internal functions for testsuite in regex
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Tim Shen <timshen91 at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 05 Oct 2013 09:42:31 +0200
- Subject: Re: [Patch] Internal functions for testsuite in regex
- Authentication-results: sourceware.org; auth=none
- References: <CAPrifDmLY-=nJa8dNcsduTgWN2fT1PJ7bu9JEDqYdQCcyqC2JA at mail dot gmail dot com> <524EE6F2 dot 3080906 at oracle dot com> <524EE971 dot 6020904 at oracle dot com> <524EED43 dot 804 at oracle dot com> <CAPrifDmnwuOtHo==VPTwg5v37WN2UhDPCnd6TWM4tEB6qHhz-g at mail dot gmail dot com>
On 10/05/2013 03:58 AM, Tim Shen wrote:
And excellent implementation ;) A few nits: I would not use "Abstract
function...", because Abstract is a term of art in C++, something like
Common is better; I would not use using namespace __detail in
regex_match and regex_search, instead fully qualify (you never know with
the damn name lookup issues (you know that in v3 as a general policy we
always fully qualify in the implementation details)); _M_set_results is
now smaller but it still includes a loop, let's keep it out of line;
unrelated to the patch, I noticed for the first time that you have quite
a few unsigned int and int, which always make me nervous, because the
standards guarantee only 16 bits for those, thus unless you are sure
that in practice only a few bits will be used, please consider using
long and unsigned long instead.
On Fri, Oct 4, 2013 at 12:30 PM, Paolo Carlini <firstname.lastname@example.org> wrote:
A completely different option, which I also like a lot in fact, would be
putting the new *_testsuite functions inside the already existing
testsuite/util/testsuite/regex.h. There you would use namespace __gnu_test,
would not require strict uglification, etc.
A good idea.