Closed Bug 15580 Opened 25 years ago Closed 24 years ago

Clean-up build warnings

Categories

(Core Graveyard :: Tracking, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: slamm, Assigned: slamm)

References

()

Details

Please cleanup your build warnings (url is in the URL field above). Driving for
beta is a great time to bring down the warning noise.

http://tinderbox.mozilla.org/SeaMonkey/warnings.html#michaelp

Now you have a bug so you can check in your fixes. =)
Check out the following link for more information on the "...was hidden by..."
warnings that you have.

http://www.cerfnet.com/~mpcline/On-Line-C++-FAQs/strange-inheritance.html#[23.3]
(Be sure to get the last "]" bugzilla seems to cut it off.)

Also, here are some comments from scc that pierre added to bug #15636,

Yup.  It's a valid warning.  A name declared in a derived class hides
|all| previous declarations of the same name, regardless of signature.
  This is why over-riding and overloading don't mix.  Even if all the
|f|s in your sample were virtual, |Derived::f(int, int)| would hide
|Base::f(int)|.

This is to prevent an accident where somebody adds a new method to a
base class where, coincidentally, some derived class has a function
with the same name.  Without this rule, the entire meaning of the
program could be subtly changed.  With this rule, the meaning is the
same, and a warning is issued.

To get around it, bring all the names into scope with |using|, e.g.,

   class Derived : public Base {
     using Base::f;
       // bring all |f|s into scope, so I don't hide them

     int f(int, int);
       // now override the one I care about
   }

If |using| is not allowed, then you have to override all of them.
QA Contact: leger → slamm
reassigning to slamm. I just noticed that this was owned by
michaelp@netscape.com. This is an invalid email address. I'll
let you figure out what to do with this bug long term.
Assignee: michaelp → slamm
I will file new bugs on people as needed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.