Skip to content

Warnings as errors #200

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

Closed
Y-Less opened this issue Oct 24, 2017 · 6 comments
Closed

Warnings as errors #200

Y-Less opened this issue Oct 24, 2017 · 6 comments

Comments

@Y-Less
Copy link
Member

Y-Less commented Oct 24, 2017

Add something like -W to convert warnings to errors. A common flag in other languages.

@SysadminJeroen
Copy link
Contributor

This, I'd use this.

Because generally whenever I program and I get a warning, something in the code is wrong.

@Y-Less
Copy link
Member Author

Y-Less commented Oct 24, 2017

I've written a basic version (opted for -E instead of -W as it goes better with the existing -e). Testing now (if I can get a build working).

@tmp64
Copy link

tmp64 commented Nov 5, 2017

Does it mean that I'll get an error if a symbol hasn't been used yet?

@Zeex
Copy link
Contributor

Zeex commented Nov 5, 2017

Yes, if you use the -E flag it will turn "unused symbol" warnings into errors (so the script won't compile).

Closing this because #202 has been merged.

@Zeex Zeex closed this as completed Nov 5, 2017
@Y-Less
Copy link
Member Author

Y-Less commented Nov 5, 2017

You can still remove the symbol, mark it stock, use #prgama unused, or #pragma warning disable 203 and #pragma warning disable 204. There isn't much reason why you should be getting unused symbol warnings except during development.

@Y-Less
Copy link
Member Author

Y-Less commented Nov 5, 2017

And thanks @Zeex

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

4 participants