Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!rutgers!lll-lcc!pyramid!batcomputer!gdykes From: gdykes@batcomputer.tn.cornell.edu (Gene Dykes) Newsgroups: comp.lang.c++ Subject: Cornell V1.2 Bug Report (3/5) Message-ID: <911@batcomputer.tn.cornell.edu> Date: Thu, 7-May-87 10:22:55 EDT Article-I.D.: batcompu.911 Posted: Thu May 7 10:22:55 1987 Date-Received: Sat, 9-May-87 09:37:35 EDT Reply-To: gdykes@tcgould.tn.cornell.edu.UUCP (Gene Dykes) Distribution: world Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 60 /* * In this example, the code compiles correctly. * If the two lines that are commented out are de-commented, * the compiler states that I am passing a bad argument to my_func - * "example.c", line 17: error: bad argument list for overloaded my_func() */ // overload my_func ; // int my_func (int) ; int my_func (char *[]) ; main() { char *a[3] ; my_func (a) ; } /* * This certainly doesn't seem reasonable to me... * If it was a good argument list to a non-overloaded function, * why is it a bad argument list to an overloaded one? * * The following is an additional example using implicit overloading */ // This example compiles okay... class c_wm { // c_wm () ; c_wm(char *[]) ; } ; class c_select { void member() ; char *arg[2] ; c_wm *w_manager ; } ; void c_select::member () { w_manager = new c_wm(arg) ; } /** But if the additional constructor is not commented out, it won't compile because it claims the original constructor was called with bad arguments. **/ -- Gene Dykes, 120 Rand Hall, Cornell U., Ithaca, NY 14853 (607)255-6713 UUCP: {uw-beaver,ihnp4,decvax,allegra,vax135}!cornell!batcomputer!gdykes ARPA: gdykes@tcgould.tn.cornell.edu BITNET: gdykes@CRNLTHRY