Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.g++.bug Subject: misleading error messages in G++ 1.35.0- Message-ID: <8904272353.AA05639@riunite.aca.mcc.com> Date: 27 Apr 89 23:53:08 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 When the following code is compiled with G++ 1.35.0/Sun3, you get the error message shown below which says that a float was expected. That's wrong. A double was expected. Apparently the compiler doesn't know the difference. ---------------------------------------------------------------- // Check that type-mismatch messages are reasonable int function (double d) { return 0; } struct s { } s_object; int main () { function (s_object); return 0; } -------------------------------------------------------------------- /usr/local/src/src/g++/build/sun3/1.35-.0-.0/g++ -B/usr/local/src/src/g++/build/sun3/1.35-.0-.0/ -Wall -Wwrite-strings -S -v s001.C In function int main (): s001.C:13: aggregate value used where a float was expected // Ron Guilmette - MCC - Experimental 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