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

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

Closed
wants to merge 1 commit into from

Conversation

alagoutte
Copy link
Contributor

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

When build with clang (and use Wunreachable-code CFLAG)
@Explorer09
Copy link
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
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
Contributor

Explorer09 commented Feb 20, 2017 via email

@westes
Copy link
Owner

westes commented Feb 20, 2017

Closing as per comments.

@westes westes closed this Feb 20, 2017
@alagoutte
Copy link
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