This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix wrong backup variable initialization in regex
- From: Tim Shen <timshen91 at gmail dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Oct 2013 18:22:57 -0400
- Subject: Re: [Patch] Fix wrong backup variable initialization in regex
- Authentication-results: sourceware.org; auth=none
- References: <CAPrifD==3q9Ysedyj5Zbmex26RXTazraN2TNKanXji4XcpRcpQ at mail dot gmail dot com> <524DD5EF dot 5080905 at oracle dot com> <CAPrifD=B8RuF5fPMRbV7XYBsHOJc+sOv1Q2qS7m2BfK2QkN+-g at mail dot gmail dot com> <524DE448 dot 7090109 at oracle dot com>
On Thu, Oct 3, 2013 at 5:40 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Before figuring out a fully general solution, I would anyway add a testcase
> which manually switches the executor and tests for the problem. More elegant
> would be a testcase which due to its nature automatically leads to an
> executor switch. Not sure if it's possible in this specific case.
I may find a possible workaround: when set _GLIBCXX_DEBUG, run both
matchers and check if they agree. Then `make check-debug` will test
them all. I really want a macro _GLIBCXX_TESTSUITE which is set in
`make check`.
> But in principle yes, since we deliver two, and the users have a way to choose
> which one they want (X)
Users can "choose" the matcher only by adding/removing brs to/from the
regex input string. We can easily convert every no-br regex to a br
one, by adding an empty capture and make a br to it(which won't change
the regex's meaning) to "choose" the non-default matcher. There's no
explicit switch exported to users, because it's designed to be
completely transparent to users.
> Well, unless we want to keep secret - that is, undocumented - the switching facility,
> but I'm thinking that we should not.
Yes I think we should keep secret, because the standard doesn't
specify it. They only way to publish the switch to user is making a
library extension(is that true?), but there's no obvious benefit to do
that(is that true? I shall be humble).
--
Tim Shen