Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The document say gcc 4.8 is supported but failed to run with gcc 4.9.2 #1066

Closed
hcoona opened this issue Nov 15, 2021 · 4 comments · Fixed by #1069
Closed

The document say gcc 4.8 is supported but failed to run with gcc 4.9.2 #1066

hcoona opened this issue Nov 15, 2021 · 4 comments · Fixed by #1069
Labels
bug Something isn't working

Comments

@hcoona
Copy link
Contributor

hcoona commented Nov 15, 2021

It's easy to understand so didn't follow the template.

GCC didn't support std::regex at least in v4.9.2, see https://gcc.gnu.org/onlinedocs/gcc-4.9.2/libstdc++/manual/manual/status.html 7.11.2.

@hcoona hcoona added the bug Something isn't working label Nov 15, 2021
@hcoona
Copy link
Contributor Author

hcoona commented Nov 15, 2021

I found the option HAVE_WORKING_REGEX. It detects against gcc 4.8, so not working on gcc 4.9.2. I think it better to detect against libstdc++ instead of the compiler version.

@hcoona hcoona changed the title The document say gcc 4.8 is supported but failed to run The document say gcc 4.8 is supported but failed to run with gcc 4.9.2 Nov 16, 2021
@lalitb
Copy link
Member

lalitb commented Nov 16, 2021

I think it better to detect against libstdc++ instead of the compiler version.

Yes, there are better ways to detect regex support than to check the compiler version.

@hcoona
Copy link
Contributor Author

hcoona commented Nov 16, 2021

_GLIBCXX_RELEASE could do that but only provided after GCC v7.1. (https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html)

__GLIBCXX__ is the release date. However, some minor updates could be later than next major release. For example:

  • GCC 4.9.4: 2016-08-03
  • GCC 7.1.0: 2016-04-27

Google cpplint mark that only versions <= 4.9 have such problem. (google/styleguide#432)

The GCC document shows that until GCC 11.2.0 std::regex_match is not supported, which is absolutely wrong. (https://gcc.gnu.org/onlinedocs/gcc-11.2.0/libstdc++/manual/manual/status.html). I found std::regex_match is only mentioned in TR1, I'll do a futher investigation.

@hcoona
Copy link
Contributor Author

hcoona commented Nov 16, 2021

I'll just exclude gcc 4.9.x just like 4.8.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants