public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64936] New: regex, ECMA treated as posix
@ 2015-02-04 14:56 pierreblavy at yahoo dot fr
  2015-02-10 13:27 ` [Bug c++/64936] " redi at gcc dot gnu.org
  2015-02-10 14:43 ` [Bug libstdc++/64936] " pierreblavy at yahoo dot fr
  0 siblings, 2 replies; 3+ messages in thread
From: pierreblavy at yahoo dot fr @ 2015-02-04 14:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64936

            Bug ID: 64936
           Summary: regex, ECMA treated as posix
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pierreblavy at yahoo dot fr

Hi!

I've tested gcc regex with the following code (seen on
http://en.cppreference.com/w/cpp/regex/syntax_option_type). According to this
website, I expect ECMA to match zzxa, and not zzxayy. I don't know if it's gcc
or cppreference.com that's wrong.


--- test code ---
int main()
{
    std::string str = "zzxayyzz";
    std::regex re1(".*(a|xayy)"); // ECMA
    std::regex re2(".*(a|xayy)", std::regex::extended); // POSIX

    std::cout << "Searching for .*(a|xayy) in zzxayyzz:\n";
    std::smatch m;
    std::regex_search(str, m, re1);
    std::cout << " ECMA (depth first search) match: " << m[0] << '\n'; //expect
zzxa, have zzxayy ==> WRONG
    std::regex_search(str, m, re2);
    std::cout << " POSIX (leftmost longest)  match: " << m[0] << '\n'; //expect
zzxayy, have zzxayy ==> OK
}


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/64936] regex, ECMA treated as posix
  2015-02-04 14:56 [Bug c++/64936] New: regex, ECMA treated as posix pierreblavy at yahoo dot fr
@ 2015-02-10 13:27 ` redi at gcc dot gnu.org
  2015-02-10 14:43 ` [Bug libstdc++/64936] " pierreblavy at yahoo dot fr
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2015-02-10 13:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64936

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-02-10
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Please read https://gcc.gnu.org/bugs/ -- your testcase is incomplete and you
didn't provide the requested information. Did you search for existing bugs and
determine this is not a duplicate of PR61424?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libstdc++/64936] regex, ECMA treated as posix
  2015-02-04 14:56 [Bug c++/64936] New: regex, ECMA treated as posix pierreblavy at yahoo dot fr
  2015-02-10 13:27 ` [Bug c++/64936] " redi at gcc dot gnu.org
@ 2015-02-10 14:43 ` pierreblavy at yahoo dot fr
  1 sibling, 0 replies; 3+ messages in thread
From: pierreblavy at yahoo dot fr @ 2015-02-10 14:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64936

pierreblavy at yahoo dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from pierreblavy at yahoo dot fr ---
Hi, I seems to be a duplicate of the bug you've cited. I've missed it.

*** This bug has been marked as a duplicate of bug 61424 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-10 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 14:56 [Bug c++/64936] New: regex, ECMA treated as posix pierreblavy at yahoo dot fr
2015-02-10 13:27 ` [Bug c++/64936] " redi at gcc dot gnu.org
2015-02-10 14:43 ` [Bug libstdc++/64936] " pierreblavy at yahoo dot fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).