home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!centerline!matt
- From: matt@centerline.com (Matt Landau)
- Subject: Re: Overloading Parent Declaration: Bug or Feature?
- Message-ID: <matt.714325807@centerline.com>
- Sender: news@centerline.com
- Nntp-Posting-Host: rapier
- Organization: CenterLine Software, Inc.
- References: <1992Aug20.141830.3079@rhrk.uni-kl.de>
- Date: Thu, 20 Aug 1992 15:50:07 GMT
- Lines: 14
-
- In <1992Aug20.141830.3079@rhrk.uni-kl.de> kring@efes.physik.uni-kl.de (Jochen Voss) writes:
- >It compiles without warnings (even with the -Wall flag set) and outputs
- > B::f(1)
- > D::f(hallo)
- >when run. But in Bjarne Stroustrup's Book `Die C++ Programmiersprache'
- >(2. Auflage, 1992) in section R.13.1 he writes that the statement at the (*)
- >is an error because D::f(char*) hides B::f(int). B::f(int) is not overloaded
- >with D::f(char*) because the functions have different scopes.
- >
- >Is this a bug or a feature? Shouldn't I at least get a warning?
-
- Both ATT cfront 2.1.12 and 3.0.1 issue error messages and refuse to compile
- this example. Scanning the ARM just briefly, it looks like g++ is getting
- this wrong.
-