This is the mail archive of the
mailing list for the GCC project.
Re: RFC: -Wall by default
On 05.04.2012 16:33, Robert Dewar wrote:
On 4/5/2012 8:28 AM, Michael Veksler wrote:
It is not that they can't remember. I am a TA at a moderately basic
and student submit home assignments with horrible errors. These errors,
free(*str) or *str=malloc(n) are easily be caught by -Wall. I have to
advise them to use -Wall and to fix all the warnings, which I sometimes
forget to do.
Wouldn't it be better in a "moderately basic programming course" to
provide standard canned scripts that set things up nicely for students
including the switches they need? Indeed for such a course wouldn't it
be better to use an appropriate IDE, so they could concentrate on the
task at hand and not fiddling with commands. Yes, I think it is very
important for students to learn what is going on, but you can't do
everything at once in a basic course.
And even in the context you give, surely it is not too much to expect
a TA to remember important advice like this?
FWIW, in our "basic programming" course students have to hand their
homework to an automated testing system which forces the compiler options
we think useful, including all the relevant warning switches and -Werror.
Of course, there is a web page explaining the meaning of the switches and
TAs help with emphasizing their importance to students. And indeed, you
can't do everything in an 101 course, thus not much of this (helpful)
information remains in their heads. But it's better than nothing.