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

FYI: New warning for C++ lexer with gcc 13 -Wall #601

Open
zmajeed opened this issue Oct 19, 2023 · 0 comments
Open

FYI: New warning for C++ lexer with gcc 13 -Wall #601

zmajeed opened this issue Oct 19, 2023 · 0 comments

Comments

@zmajeed
Copy link
Contributor

zmajeed commented Oct 19, 2023

Got this warning from gcc 13 for a C++ lexer when all warnings are enabled with -Wall

error: ‘virtual int yyFlexLexer::yylex()’ was hidden [-Werror=overloaded-virtual=]

Caused by the yylex overload in my lexer derived from yyFlexLexer. I fixed it by making the inherited virtual function private

private:
  using yyFlexLexer::yylex;

More information

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87729
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423
https://www.ibm.com/docs/en/zos/3.1.0?topic=udcmco-overloading-member-functions-from-base-derived-classes-c-only

@zmajeed zmajeed changed the title FYI: New warning for c++ lexer with gcc 13 -Wall FYI: New warning for C++ lexer with gcc 13 -Wall Oct 19, 2023
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

No branches or pull requests

1 participant