Open zmajeed opened 1 year ago
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
Got this warning from gcc 13 for a C++ lexer when all warnings are enabled with -Wall
Caused by the yylex overload in my lexer derived from yyFlexLexer. I fixed it by making the inherited virtual function private
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