Skip to content

Conversation

@dpfrey
Copy link
Contributor

@dpfrey dpfrey commented May 20, 2021

Without disabling this warning, g++ 11.1.0 emits this warning:
/project/erpc/Debug/Linux/erpcsniffer/obj/erpcgen_parser.tab.cpp: In function ‘int yyparse(erpcgen::ErpcLexer*, erpcgen::AstNode**)’:
/project/erpc/Debug/Linux/erpcsniffer/obj/erpcgen_parser.tab.cpp:3810:18: error: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Werror=free-nonheap-object]
3810 | YYSTACK_FREE (yyss);
/project/erpc/Debug/Linux/erpcsniffer/obj/erpcgen_parser.tab.cpp:2025:16: note: declared here
2025 | yy_state_t yyssa[YYINITDEPTH];
| ^~~~~
cc1plus: all warnings being treated as errors

Since -Werror is also enabled, this prevents erpcsniffer from building.

Background on false positives relating to this warning:
https://www.mail-archive.com/help-bison@gnu.org/msg04296.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54202

Without disabling this warning, g++ 11.1.0 emits this warning:
  /project/erpc/Debug/Linux/erpcsniffer/obj/erpcgen_parser.tab.cpp: In function ‘int yyparse(erpcgen::ErpcLexer*, erpcgen::AstNode**)’:
  /project/erpc/Debug/Linux/erpcsniffer/obj/erpcgen_parser.tab.cpp:3810:18: error: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Werror=free-nonheap-object]
   3810 |     YYSTACK_FREE (yyss);
  /project/erpc/Debug/Linux/erpcsniffer/obj/erpcgen_parser.tab.cpp:2025:16: note: declared here
   2025 |     yy_state_t yyssa[YYINITDEPTH];
        |                ^~~~~
  cc1plus: all warnings being treated as errors

Since -Werror is also enabled, this prevents erpcsniffer from building.

Background on false positives relating to this warning:
  https://www.mail-archive.com/help-bison@gnu.org/msg04296.html
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54202
@MichalPrincNXP MichalPrincNXP self-assigned this Jun 24, 2021
@MichalPrincNXP
Copy link
Member

Hello @dpfrey , thank you for trying the build in g++ 11.1.0 and providing this PR. Because the internal testing for the v1.8.1 release is almost finished, I would rather integrate this PR after the release, i.e. in about 3w. Thank you.

@MichalPrincNXP MichalPrincNXP self-requested a review June 24, 2021 07:45
@MichalPrincNXP MichalPrincNXP merged commit e310210 into EmbeddedRPC:develop Jul 19, 2021
@MichalPrincNXP
Copy link
Member

Thanks a lot for this PR!

@MichalPrincNXP
Copy link
Member

Well, this PR causes CLANG build troubles, see https://app.travis-ci.com/github/EmbeddedRPC/erpc/builds/233096082 @dpfrey , may I ask you to have a look and solve (I have not run the Travis check before the PR integration), please? Thank you.

@dpfrey dpfrey deleted the pr_g++_11_fix branch July 19, 2021 22:55
@MichalPrincNXP
Copy link
Member

resolved within #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants