Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.g++.bug Subject: BUG(s) in G++ 1.34.0 - bogus warnings Message-ID: <8903110058.AA08798@riunite.aca.mcc.com> Date: 11 Mar 89 00:58:03 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 44 The following code causes G++ 1.34.0 to correctly issue an error (actually two errors) for the ambigous declaration(s). Unfortunately, it then also issues two bogus warnings. The compiler messages follow the code below: Cut here ---------------------------------------------------------------------- /* Description - check that if two overloaded functions are declared within the same scope, and if these two functions are essentially identical in their names and in their number, order, and type of parameters except that one of the two has more parameters than the other, but these additional parameters all have defaults, an appropriate error is issued for the (ambiguous) declaration(s). */ overload function1; void function1 (int arg1, int arg2); void function1 (int arg1, int arg2, int arg3 = 88); main () { function1 (3,4); } ------------------------------------------------------------------------ g++ -S -v x02.cc g++ version 1.34.0.0 /usr/local/src/lib/1.34.0.0/sun3/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 x02.cc /tmp/cca08777.cpp GNU CPP version 1.34.0.0 /usr/local/src/lib/1.34.0.0/sun3/gcc-c++ /tmp/cca08777.cpp -quiet -dumpbase x02.cc -noreg -version -o x02.s GNU C++ version 1.34.0.0 (68k, MIT syntax) compiled by GNU C version 1.33. x02.cc:14: conflicting types for `void function1 (int, int, int (= 88 ))' x02.cc:13: previous declaration of `void function1 (int, int)' x02.cc:14: warning: `function1_SI_SI' was declared `extern' and later `static' x02.cc:13: warning: previous declaration of `function1_SI_SI' // Ron Guilmette - MCC - Experimental (parallel) Systems Kit Project // 3500 West Balcones Center Drive, Austin, TX 78759 - (512)338-3740 // ARPA: rfg@mcc.com // UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg