This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a warning to implement

Bernard Dautrevaux <> writes:

| > -----Original Message-----
| > From: Gabriel Dos Reis []
| > Sent: Friday, February 08, 2002 5:29 PM
| > To:
| > Cc:;; 
| >;
| >;
| > Subject: Re: a warning to implement
| > 
| > 
| > (Robert Dewar) writes:
| > 
| > | >>| I think here we should REALLY had a warning;
| > | 
| > | Yes, good point from Bernard, I agree this is a case that 
| > really needs
| > | a warning.
| > 
| > There was no good point.  The class I showed wasn't designed to have a
| > default constructor -- that is part of its specification.  The
| > compiler (or Bernard) shouldn't insist on knowing more than the
| > class-defisgner. 
| OK; fine. But then you are saying that if a gun-holder wants to shoot
| himself in the foot, nobody should warn him that this isn't *usually* a good
| idea?

Proof by analogy is fraud.

| an dyou insist that if someone is able to warn him, this warning
| should *in no case* be emitted by default, but only if he choose to get it?

What I'm saying is that if you want to be warned about that construct
then you should explicitly turn on the appropriate flag.  In this
case, I do think -Walll should -not- turn that flag on.  


| > There are already plenty of warnings there saying they know more than
| > thge programmer -- and in effect thery don't -- ending with being
| > completely unusable in modern C++; an example is -Weffc++ (or whatever
| > it is called). 
| OK; I 200% agree with you: "-Weffc++" is NOT a warning i would expect to be
| activated by "-Wall". It's not a warning about dubious or dangerous
| constructs,

The example I gave is by no means dubious and dangerous.  It is just a
perfectly well-formed implementation of singly-linked circular list.

| but a warning to help someone (obviously not you, nor me in
| fact) adhere to some coding conventions that nobody request anybody to
| accept.

In case you missed it, I'll repeat again: I'm not arguing against
having an option that implement the warning.

-- Gaby

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]