Path: utzoo!telly!attcan!utgpu!watmath!uunet!tut.cis.ohio-state.edu!JMW.LARCH.CS.CMU.EDU!dld From: dld@JMW.LARCH.CS.CMU.EDU (David Detlefs) Newsgroups: gnu.g++.bug Subject: no error message when non-existent constructor is called. Message-ID: <8908161258.AA00930@AENEAS.MIT.EDU> Date: 14 Aug 89 21:53:51 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 32 Michael et. al. -- G++ 1.35.0 on a uvax3. Consider the following program: -------------------------------------------------- #includestruct foo { public: foo(); private: int i; }; foo::foo() { cout << "Hello.\n"; } void main() { foo f(7); } -------------------------------------------------- This should give an error message, because there is no "foo" constructor that takes an integer argument. Instead if gives no argument. Even more insidious, it does not call the default constructor -- when run, the above program prints nothing. Thanks. Ad astra. Dave