public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Veksler <mveksler@tx.technion.ac.il>
To: gcc@gcc.gnu.org
Subject: Re: RFC: -Wall by default
Date: Thu, 05 Apr 2012 13:00:00 -0000	[thread overview]
Message-ID: <4F7D974F.9080004@tx.technion.ac.il> (raw)
In-Reply-To: <4F7D911D.8020800@adacore.com>

On 04/05/2012 03:33 PM, Robert Dewar wrote:
>
> 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?

They use an IDE, which is either Code-Blocks or Dev-C++, which run on
Windows, but these IDEs don't turn -Wall on by default. As for the advice
  to use -Wall, there is so much to advise  and so little time, and the 
sheer
mass of information confuses students. I'd have GCC emit more warnings
by default rather than explain what -Wall is  (and have half of them forget
that by the time they get to the computer).

After seeing the disaster of their first home assignment, students would
be more attentive to the advise regarding -Wall. It is much more effective
to wait for the submission of the first assignment and explain -Wall
afterwards. On the other hand, it had been far more effective had GCC
turned it on by default!

In my code I use -Wextra and find it very helpful, but I would not recommend
it to others since it requires to have a very strict coding style. I 
find it very
effective that it warns when a symbol in an inner context overshadows a
symbol in an outer context, or warns on unused parameters,  On the other
hand, it gets annoying at times. Nevertheless, it caught enough bugs to make
it worth the trouble.

Michael

  parent reply	other threads:[~2012-04-05 13:00 UTC|newest]

Thread overview: 201+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04 18:34 Dominique Dhumieres
2012-04-04 21:22 ` Robert Dewar
2012-04-04 22:42   ` Gabriel Dos Reis
2012-04-05  1:27     ` Robert Dewar
2012-04-05  4:23       ` Gabriel Dos Reis
2012-04-05 10:34         ` Robert Dewar
2012-04-04 22:41 ` Gabriel Dos Reis
2012-04-04 22:57   ` Eric Botcazou
2012-04-04 23:04     ` Gabriel Dos Reis
2012-04-05  1:19       ` Robert Dewar
2012-04-05  4:17         ` Miles Bader
2012-04-05 10:27           ` Robert Dewar
2012-04-05 12:06             ` Vincent Lefevre
2012-04-05 12:18               ` Robert Dewar
2012-04-05 12:30                 ` Vincent Lefevre
2012-04-05 13:10                   ` Erik Trulsson
2012-04-05 14:07                     ` Vincent Lefevre
2012-04-05 12:45                 ` Richard Guenther
2012-04-05 12:49                   ` Robert Dewar
2012-04-05 13:13                     ` Richard Guenther
2012-04-05  4:21         ` Gabriel Dos Reis
2012-04-05  6:40           ` Arnaud Charlet
2012-04-05 10:42             ` Robert Dewar
2012-04-05 12:16               ` Vincent Lefevre
2012-04-05  9:36           ` Richard Guenther
2012-04-05  9:41             ` Gabriel Dos Reis
2012-04-05 11:46       ` Eric Botcazou
2012-04-05 12:29         ` Michael Veksler
2012-04-05 12:33           ` Robert Dewar
2012-04-05 12:43             ` Andrey Belevantsev
2012-04-05 13:16               ` Michael Veksler
2012-04-05 13:00             ` Michael Veksler [this message]
2012-04-05 13:17               ` Robert Dewar
2012-04-05 14:29             ` Gabriel Dos Reis
2012-04-06  2:17               ` Pedro Lamarão
2012-04-05 13:08           ` Basile Starynkevitch
2012-04-10 16:36           ` Andrew Haley
2012-04-11 16:18             ` Ian Lance Taylor
2012-04-11 16:23               ` Andrew Haley
2012-04-11 16:45               ` Peter Bigot
2012-04-11 19:20               ` Robert Dewar
2012-04-12  8:56               ` Fabien Chêne
2012-04-12  9:46                 ` Robert Dewar
2012-04-12  9:55                   ` Miles Bader
2012-04-12  9:59                     ` Robert Dewar
2012-04-12 10:26                   ` Fabien Chêne
2012-04-12 10:44                   ` Andrew Haley
2012-04-12 13:04                     ` Robert Dewar
2012-04-12 13:31                       ` Andrew Haley
2012-04-12 14:37                         ` Robert Dewar
2012-04-12 14:48                           ` Andrew Haley
2012-04-12 15:29                             ` Robert Dewar
2012-04-12 15:35                             ` Robert Dewar
2012-04-12 17:34                               ` pcpa
2012-04-13 22:51                               ` Dave Korn
2012-04-05 14:25         ` Gabriel Dos Reis
2012-04-05  4:12 ` Miles Bader
2012-04-05  4:26   ` Gabriel Dos Reis
2012-04-05  4:34   ` Miles Bader
  -- strict thread matches above, loose matches on Subject: below --
2012-04-04  9:44 Gabriel Dos Reis
2012-04-04 11:30 ` Rick Hodgin
2012-04-04 12:08 ` Andrew Haley
2012-04-04 12:12   ` Gabriel Dos Reis
2012-04-04 12:15     ` Andrew Haley
2012-04-04 12:20       ` Richard Guenther
2012-04-04 12:29         ` Gabriel Dos Reis
2012-04-04 14:57   ` Ian Lance Taylor
2012-04-04 15:07     ` Andrew Haley
2012-04-04 15:17       ` Ian Lance Taylor
2012-04-05  9:32         ` Richard Guenther
2012-04-05  9:37           ` Gabriel Dos Reis
2012-04-04 18:03       ` Gabriel Dos Reis
2012-04-04 21:19         ` Robert Dewar
2012-04-04 21:20         ` Robert Dewar
2012-04-05 10:50         ` Andrew Haley
2012-04-05 14:21           ` Gabriel Dos Reis
2012-04-10 13:32             ` Andrew Haley
2012-04-10 13:54               ` Miles Bader
2012-04-04 15:17     ` Jeff Law
2012-04-04 18:04       ` Gabriel Dos Reis
2012-04-04 18:07         ` Jeff Law
2012-04-04 18:11           ` Gabriel Dos Reis
2012-04-04 19:01             ` Andrew Haley
2012-04-05 10:50               ` Vincent Lefevre
2012-04-05 10:56                 ` Andrew Haley
2012-04-05 11:31                   ` Vincent Lefevre
2012-04-10 13:48                     ` Andrew Haley
2012-04-11  8:04                       ` Vincent Lefevre
2012-04-04 18:00     ` Gabriel Dos Reis
2012-04-07 21:47       ` James Cloos
2012-04-07 22:06         ` Gabriel Dos Reis
2012-04-07 22:32         ` Miles Bader
2012-04-08 15:18           ` James Cloos
2012-04-08 15:25             ` Gabriel Dos Reis
2012-04-08 17:56             ` Jonathan Wakely
2012-04-08 18:51               ` Robert Dewar
2012-04-08 19:34                 ` Gabriel Dos Reis
2012-04-08 19:53                   ` Robert Dewar
2012-04-08 20:24                     ` Gabriel Dos Reis
2012-04-08 20:28                       ` Robert Dewar
2012-04-08 20:57                         ` Gabriel Dos Reis
2012-04-08 19:37                 ` Jonathan Wakely
2012-04-08 19:55                   ` Robert Dewar
2012-04-08 20:03                     ` Jonathan Wakely
2012-04-08 20:13                       ` Robert Dewar
2012-04-08 20:26                         ` Gabriel Dos Reis
2012-04-08 20:30                           ` Robert Dewar
2012-04-08 21:00                             ` Gabriel Dos Reis
2012-04-08 21:41                               ` Robert Dewar
2012-04-08 20:25                     ` Gabriel Dos Reis
2012-04-08 20:29                       ` Robert Dewar
2012-04-09 16:30                     ` Gerald Pfeifer
2012-04-09 16:40                       ` Paul_Koning
2012-04-09 17:08                       ` Gabriel Dos Reis
2012-04-09 17:15                         ` Robert Dewar
2012-04-09 17:29                           ` Gabriel Dos Reis
2012-04-09 17:31                             ` Robert Dewar
2012-04-09 17:31                         ` Eric Botcazou
2012-04-09 17:33                           ` Robert Dewar
2012-04-09 17:36                           ` Jonathan Wakely
2012-04-09 17:44                             ` Robert Dewar
2012-04-09 18:03                               ` Gabriel Dos Reis
2012-04-09 20:31                                 ` Andreas Schwab
2012-04-10  6:11                                   ` James Cloos
2012-04-10  6:27                                     ` Eric Botcazou
2012-04-10  7:08                                       ` Miles Bader
2012-04-10  7:37                                         ` Gabriel Dos Reis
2012-04-10 12:41                                           ` Michael Matz
2012-04-10 14:18                                             ` Gabriel Dos Reis
2012-04-10 14:39                                             ` Gabriel Dos Reis
2012-04-11  8:51                                 ` Vincent Lefevre
2012-04-12 10:23                                   ` Dave Korn
2012-04-12 12:34                                     ` Diego Novillo
2012-04-12 14:27                                     ` Gabriel Dos Reis
2012-04-12 14:39                                       ` Robert Dewar
2012-04-12 14:44                                         ` Gabriel Dos Reis
2012-04-12 14:46                                           ` Dave Korn
2012-04-12 14:55                                             ` Gabriel Dos Reis
2012-04-12 15:01                                               ` Dave Korn
2012-04-12 15:06                                                 ` Gabriel Dos Reis
2012-04-12 15:16                                                   ` Robert Dewar
2012-04-12 15:23                                                     ` Gabriel Dos Reis
2012-04-12 15:33                                                       ` Robert Dewar
2012-04-12 15:38                                                         ` Jonathan Wakely
2012-04-12 15:49                                                           ` Gabriel Dos Reis
2012-04-12 16:03                                                             ` Gabriel Dos Reis
2012-04-12 20:55                                                               ` Dave Korn
2012-04-12 21:36                                                                 ` Gabriel Dos Reis
2012-04-12 21:39                                                                   ` Robert Dewar
2012-04-12 21:40                                                                     ` Gabriel Dos Reis
2012-04-12 21:42                                                                       ` Robert Dewar
2012-04-12 21:48                                                                         ` Gabriel Dos Reis
2012-04-12 21:51                                                                           ` Robert Dewar
2012-04-13  6:04                                                                             ` Gabriel Dos Reis
2012-04-13  9:53                                                                               ` Robert Dewar
2012-04-12 21:30                                                             ` Jonathan Wakely
2012-04-12 21:37                                                               ` Gabriel Dos Reis
2012-04-12 15:44                                                       ` Pedro Alves
2012-04-12 15:52                                                         ` Gabriel Dos Reis
2012-04-12 16:08                                                           ` Pedro Alves
2012-04-12 15:24                                                   ` Dave Korn
2012-04-12 15:48                                                     ` Gabriel Dos Reis
2012-04-12 20:59                                                       ` Dave Korn
2012-04-12 21:37                                                         ` Gabriel Dos Reis
2012-04-13 22:39                                                           ` Dave Korn
2012-04-13 23:18                                                             ` Gabriel Dos Reis
2012-04-13 21:46                                   ` Oleg Smolsky
2012-04-13 22:46                                     ` Dave Korn
2012-04-14  0:10                                       ` NightStrike
2012-04-14  0:18                                         ` Chris Lattner
2012-04-09 18:03                             ` Gabriel Dos Reis
2012-04-11  8:30               ` Vincent Lefevre
2012-04-05  8:58 ` Pedro Alves
2012-04-05  9:32   ` Gabriel Dos Reis
2012-04-05  9:39     ` Richard Guenther
2012-04-05  9:47       ` Gabriel Dos Reis
2012-04-05  9:51         ` Richard Guenther
2012-04-05 10:01           ` Gabriel Dos Reis
2012-04-05 10:04             ` Arnaud Charlet
2012-04-05 10:12               ` Gabriel Dos Reis
2012-04-05 10:16                 ` Arnaud Charlet
2012-04-05 10:22                   ` Gabriel Dos Reis
2012-04-05 10:30                     ` Arnaud Charlet
2012-04-05 14:19                       ` Gabriel Dos Reis
2012-04-05 20:24                         ` Russ Allbery
2012-04-05 20:32                           ` Gabriel Dos Reis
2012-04-05 20:44                           ` Robert Dewar
2012-04-11  7:28                             ` Vincent Lefevre
2012-04-05 10:24                   ` Gabriel Dos Reis
2012-04-05 14:00                   ` Jonathan Wakely
2012-04-05 10:03           ` Gabriel Dos Reis
2012-04-05 13:58             ` Jonathan Wakely
2012-04-05 13:59               ` Gabriel Dos Reis
2012-04-07 22:41         ` Dave Korn
2012-04-07 22:57           ` Miles Bader
2012-04-07 23:03             ` Gabriel Dos Reis
2012-04-07 23:08             ` Robert Dewar
2012-04-07 22:58           ` Gabriel Dos Reis
2012-04-08 17:22             ` Dave Korn
2012-04-05  9:48       ` Pedro Alves
2012-04-05 11:11         ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7D974F.9080004@tx.technion.ac.il \
    --to=mveksler@tx.technion.ac.il \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).