This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/61059] regex throws regex_error for valid extended regular expression


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61059

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.10.0
         Resolution|---                         |INVALID
   Target Milestone|---                         |4.9.1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:

#include <regex>

int main()
{
  std::regex description_keys("\\]", std::regex::extended);
}

POSIX says this is undefined:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_02

The closing brace is not a POSIX ERE special character so should not be
escaped.

As a GNU extension we accept it with -std=gnu++11


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