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: [Patch] Internal functions for testsuite in regex


On 10/05/2013 03:58 AM, Tim Shen wrote:
On Fri, Oct 4, 2013 at 12:30 PM, Paolo Carlini <paolo.carlini@oracle.com> 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.
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.

Thanks!
Paolo.


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