🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by sher Tue, 29 Apr 1986 06:34
Program that causes cfront to dump core
#171
Author: sher
Date: Tue, 29 Apr 1986 06:34
56 lines
1699 bytes
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 <stream.h>

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;
    }
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads