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

Use --Wshadow #43

Closed
tfpk opened this issue Jul 11, 2019 · 1 comment
Closed

Use --Wshadow #43

tfpk opened this issue Jul 11, 2019 · 1 comment

Comments

@tfpk
Copy link
Member

tfpk commented Jul 11, 2019

This may be contentious, but I think it makes a lot of sense to add -Wshadow as a compilation flag. Students often cause strange issues that are hard to trace by shadowing variable names. and as far as I can tell there is no good reason for us to allow them to do so. If they're shadowing i or j, they're too deeply nested. If they're shadowing anything else... surely they can name things better, or keep a temporary copy.

Is there any reason a 1511 student (or a 1521/2521 student for that matter) would want to shadow a variable?

@andrew-taylor
Copy link
Collaborator

Added in e2cc9a2

Thanks!

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

2 participants