Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!lll-lcc!lll-crg!seismo!rochester!sher From: sher@rochester.ARPA Newsgroups: net.lang.c++ Subject: Program that causes cfront to dump core Message-ID: <17702@rochester.ARPA> Date: Tue, 29-Apr-86 02:34:07 EDT Article-I.D.: rocheste.17702 Posted: Tue Apr 29 02:34:07 1986 Date-Received: Fri, 2-May-86 09:55:28 EDT Sender: sher@rochester.ARPA Organization: U of Rochester, CS Dept., Rochester, NY Lines: 56 From: sher I was getting a somewhat anomalous error message from c++ so I built a short test file to find out what I was doing wrong. Imagine my surprize when the file caused cfront to dump core. Imagine my shock when I found out that the core that was dumped was in an improper format for dbx to parse. This makes life a bit difficult. I include the file that dumps the core. This may not be correct c++. However dumping core is not the way to notify me of this fact. -David Sher sher@rochester.ARPA seismo!rochester!sher #include overload foo_player; class foo { enum foo_enum { abc , cde } foo_type; union { int foo_int; char foo_char; } ; public: friend void foo_player ( int i , foo& f ); friend void foo_player ( char c , foo& f ); foo ( int i ) { foo_player ( i , *this ); } foo ( char c ) { foo_player ( c , * this ); } ~foo ( ) { ; } }; void foo_player ( int i , foo& f ) { f.foo_type = abc; f.foo_int = i; } void foo_player ( char c , foo& f ) { f.foo_type = cde; f.foo_char = c; }