Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Should dcc use -Werror? #29

Open
andrewjbennett opened this issue Mar 2, 2019 · 0 comments
Open

Should dcc use -Werror? #29

andrewjbennett opened this issue Mar 2, 2019 · 0 comments

Comments

@andrewjbennett
Copy link
Contributor

andrewjbennett commented Mar 2, 2019

Proposal:

Use -Werror by default with dcc.

Advantages:

  • Forces students to acknowledge (and fix) any compiler warnings, which do generally mean that there's a problem with their code.

Disadvantages:

  • Attempting to demonstrate what happens with obviously-uninitialised variables (which give compiler warnings) will no longer work
    • Workaround: add -Wno-error manually when trying to demo something that dcc will otherwise stop you from doing.
  • There might be some compiler warnings that students really don't need to care about ever.
    • Workaround: add -Wno-xxx flags to dcc where appropriate.
  • There might be some compiler warnings that students only sometimes need to care about?
    • I can't think of any examples for this, can't suggest any workarounds (if there are indeed any needed).
  • Code that works "just fine" with e.g. gcc -o blah blah.c (and no other flags) but that doesn't compile with -Werror will fail to compile and thus fail the automarking
    • I would consider this a feature, not a bug -- "your code doesn't work unless it works on CSE".
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant