Skip to content

Fix code will never be executed [-Wunreachable-code]#187

Closed
alagoutte wants to merge 1 commit intowestes:masterfrom
alagoutte:Wunreachable-code
Closed

Fix code will never be executed [-Wunreachable-code]#187
alagoutte wants to merge 1 commit intowestes:masterfrom
alagoutte:Wunreachable-code

Conversation

@alagoutte
Copy link
Copy Markdown
Contributor

When build with clang (and use Wunreachable-code CFLAG)

When build with clang (and use Wunreachable-code CFLAG)
@Explorer09
Copy link
Copy Markdown
Contributor

Explorer09 commented Feb 19, 2017

Wait. How is that part of code unreachable? And how are you sure that deleting that part of code is safe?
It looks like non-trivial code.

@alagoutte
Copy link
Copy Markdown
Contributor Author

if you look the line 1349 ( yywrap( M4_YY_CALL_ONLY_ARG ) the code generated is xxxxwrap(yyscanner )

and from src/main.c (line 1590)
out_str ("\n#define %swrap(yyscanner) (/CONSTCOND/1)\n", prefix);
-> Always 1 (and else case is never execute...)

@Explorer09
Copy link
Copy Markdown
Contributor

Explorer09 commented Feb 20, 2017 via email

@westes
Copy link
Copy Markdown
Owner

westes commented Feb 20, 2017

Closing as per comments.

@westes westes closed this Feb 20, 2017
@alagoutte
Copy link
Copy Markdown
Contributor Author

Ok, i will search for make a better fix :)

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.

3 participants