Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!uunet!darwin.sura.net!jvnc.net!nuscc!ntuix!eoahmad From: eoahmad@ntuix.ntu.ac.sg (Othman Ahmad) Subject: gcc 2.2.2 or 386BSD bug? Message-ID: <1992Jun22.164943.18294@ntuix.ntu.ac.sg> Organization: Nanyang Technological University - Singapore Date: Mon, 22 Jun 1992 16:49:43 GMT Lines: 55 Reading specs from /usr/local/lib/gcc-lib/i386-386bsd-bsd/2.2.2/specs gcc version 2.2.2 /usr/local/lib/gcc-lib/i386-386bsd-bsd/2.2.2/cpp -lang-c -v -undef -D__GNUC__=2 -Dunix -Di386 -Di386b -D__unix__ -D__i386__ -D__i386b__ -D__unix -D__i386 -D__i386b test.c /var/tmp/cc005650.i GNU CPP version 2.2.2 (80386, BSD syntax) /usr/local/lib/gcc-lib/i386-386bsd-bsd/2.2.2/cc1 /var/tmp/cc005650.i -quiet -dumpbase test.c -version -o /var/tmp/cc005650.s GNU C version 2.2.2 (80386, BSD syntax) compiled by GNU C version 2.2.2. test.c: In function `ocreat': test.c:7: warning: structure defined inside parms test.c:10: redefinition of `struct args' test.c:17: structure has no member named `fmode' test.c:19: warning: passing arg 1 of `open' from incompatible pointer type test.c:19: warning: passing arg 2 of `open' makes integer from pointer without a cast gcc version 1.39 /usr/libexec/cpp -v -undef -D__GNUC__ -Dunix -Di386 -Di386b -D__unix__ -D__i386__ -D__i386b__ test.c /tmp/cc005653.cpp GNU CPP version 1.39 /usr/libexec/cc1 /tmp/cc005653.cpp -quiet -dumpbase test.c -version -o /tmp/cc005653.s GNU C version 1.39 (80386, BSD syntax) compiled by GNU C version 1.39. default target switches: -m80387 test.c: In function ocreat: test.c:19: warning: argument #1: argument passing between incompatible pointer types test.c:19: warning: argument #2: argument passing of integer from pointer lacks a cast as -o test.o /tmp/cc005653.s ld /usr/lib/crt0.o test.o -lc -lgnulib /usr/lib/crt0.o: Undefined symbol _main referenced from text segment file test.c #include <sys/file.h> ocreat(p, uap, retval) struct proc *p; register struct args { char *fname; int fmode; } *uap; int *retval; { struct args { char *fname; int mode; int crtmode; } openuap; openuap.fname = uap->fname; openuap.crtmode = uap->fmode; openuap.mode = O_WRONLY | O_CREAT | O_TRUNC; return (open(p, &openuap, retval)); } -- Othman bin Ahmad, School of EEE, Nanyang Technological University, Singapore 2263. Internet Email: eoahmad@ntuix.ntu.ac.sg Bitnet Email: eoahmad@ntuvax.bitnet