This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug report


Here is my bug report.  Enjoy.

Script started on Wed Mar 18 01:29:39 1998
Notre Dame[1] ~/cs284> uname -a
SunOS ultra6 5.5.1 Generic sun4u sparc SUNW,Ultra-1
Notre Dame[2] ~/cs284> cat qd.cpp 
//Server
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <pthread.h>
#include <stream.h>

void baby();

int main()
{
void * exit_stat;
int socket_fd=3;
pthread_t worker[3];

pthread_create(&worker[0], NULL, (void*)baby, (void*) & socket_fd);
pthread_join(&worker[0],  &exit_stat);
return 0;
}


void baby(int socket_fd)
{
char * msg;
char  choice[256];
char prompt="What would you like to read today?\nType the number";
char opt1[]="1 Walt Whitman\n";
char opt2[]="2 Billy Shakes\n";
char opt3[]="3 William Blake\n";
/*
send(socket_fd, prompt, sizeof(prompt), 0);
send(socket_fd, opt1, sizeof(opt1), 0);
send(socket_fd, opt2, sizeof(opt2), 0);
send(socket_fd, opt3, sizeof(opt3), 0);

recv(socket_fd, choice, length, 0);
*/

switch (atoi(choice) )
{

case 1: msg=new char = "I am the teacher of athletes.\nHe that by me 
spreads a wider breast than my own, proves the width of my own.\n";

case 2: msg=new char []="Lay on MacDuff and damned be he that first cries 
'Hold!  Enough!'\n";

case 3: msg=new char[]="The eagle never lost so much time, as when he 
submitted to learn of the crow.\n";

default: msg=new char[]="You picked nobody.  Illiterate fool.\n";
}
cout <<msg;

}
Notre Dame[3] ~/cs284> g++ -lpthread qd.cpp
qd.cpp: In function `int main()':
qd.cpp:18: warning: ANSI C++ forbids implicit conversion from `void *' in argument passing
qd.cpp:19: warning: passing `unsigned int *' to argument 1 of `pthread_join(unsigned int, void **)' lacks a cast
qd.cpp: In function `void baby(int)':
qd.cpp:28: warning: initialization to `char' from `char *' lacks a cast
qd.cpp:45: Internal compiler error.
qd.cpp:45: Please submit a full bug report to `egcs-bugs@cygnus.com'.

script done on Wed Mar 18 01:30:25 1998

-- 
The eagle never lost so much time, as when he submitted to learn of the crow.
	"The Marriage of Heaven and Hell"
		William Blake

Bill Fellows		bjf@umr.edu		http://www.umr.edu/~bjf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]