On 26/07/2015 08:50, Matthias Klose wrote:
On 07/26/2015 12:09 AM, Roger Leigh wrote:
On 25/07/2015 22:07, Roger Leigh wrote:
On 25/07/2015 21:45, Roger Leigh wrote:

OK, some further investigation has shown what the exact error is.  It
looks like a GCC bug.  Please see the attached source file testcase.
This regex is failing:

    std::regex("^[a-z0-9][a-z0-9-]*$", std::regex::extended);

however this one works:

    std::regex("^[a-z0-9][-a-z0-9]*$", std::regex::extended);

In the same vein, the attached sample using basic rather than extended
expressions fails in the opposite way. In this case both compile but the
latter expression fails to match correctly. Since the expression should
be valid and behave the same in both cases, it looks like there are two
bugs here, the first being unable to compile a valid extended regex, the
second here being unable to match (which is likely also a compile
failure, but not a fatal one).

Note this latter issue is seen with GCC 4.9 but appears to work with GCC 5.

now forwarded as https://gcc.gnu.org/PR67015

however I can't see different behaviour with 4.9 and 5 (making sure to use the
corresponding library using -static-libstdc++). Also I see regex2.cc always
succeeding.

Note I used GCC 4.9.2 in jessie. This fails every time with or without -static-libstdc++. GCC 4.9.3 in sid does not exhibit this behaviour, so it was likely just fixed with the 4.9.3 release.


Regards,
Roger


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to