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

It fixes for compiling error on C++20. #314

Merged
merged 1 commit into from
Nov 16, 2024
Merged

Conversation

mura-orz
Copy link
Contributor

If it changes the version of CMAKE_CXX_STANDARD to 20, the following errors occurred by g++11.4.0.

In file included from ~/cpp-peglib/test/test1.cc:2:
~/cpp-peglib/test/../peglib.h: In static member function ‘static bool peg::ParserGenerator::parse_test(const char8_t*, const char8_t*)’:
~/cpp-peglib/test/../peglib.h:3324:5: error: ‘reutnr’ was not declared in this scope
 3324 |     reutnr parse_test(reinterpret_cast<const char *>(s), s);
      |     ^~~~~~
~/cpp-peglib/test/../peglib.h:3325:3: warning: no return statement in function returning non-void [-Wreturn-type]
 3325 |   }
      |   ^
~/cpp-peglib/test/../peglib.h:3323:41: warning: unused parameter ‘d’ [-Wunused-parameter]
 3323 |   static bool parse_test(const char8_t *d, const char8_t *s) {
      |                          ~~~~~~~~~~~~~~~^
~/cpp-peglib/test/../peglib.h:3323:59: warning: unused parameter ‘s’ [-Wunused-parameter]
 3323 |   static bool parse_test(const char8_t *d, const char8_t *s) {
      |                                            ~~~~~~~~~~~~~~~^
make[2]: *** [test/CMakeFiles/peglib-test-main.dir/build.make:76: test/CMakeFiles/peglib-test-main.dir/test1.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:152: test/CMakeFiles/peglib-test-main.dir/all] Error 2

@yhirose yhirose merged commit 9e405c4 into yhirose:master Nov 16, 2024
4 checks passed
@yhirose
Copy link
Owner

yhirose commented Nov 16, 2024

@mura-orz thanks for catching my mistake!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants