home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12650 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.1 KB  |  27 lines

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