Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!inria!crin!tombre From: tombre@crin.UUCP (Karl Tombre) Newsgroups: comp.lang.c Subject: Bug in cc on VAX 11/785 with Berkeley 4.2 ? Message-ID: <264@crin.UUCP> Date: Mon, 22-Jun-87 11:27:30 EDT Article-I.D.: crin.264 Posted: Mon Jun 22 11:27:30 1987 Date-Received: Fri, 26-Jun-87 04:02:41 EDT Reply-To: tombre@crin.UUCP (Karl Tombre) Distribution: world Organization: C.R.I.N., Nancy, France Lines: 40 A collegue showed me a strange problem today : calling one of her functions in a very common way, she got strange results as the parameters seemed to change between the call and the execution. Looking at this with dbx, we found that a bogus parameter "c" was added somewhere. We checked the most obvious explanation (some strange #defines) by running only the preprocessor but this added no "c". We also isolated the code from the rest of the program, and then nothing was added. So we don't see any valid reason. Is this a bug of the cc compiler with Bsd 4.2 (on a Vax 11/785) ? Here are some lines from a dbx run to illustrate the problem : vax Cprog 52 %dbx sagat dbx version of 11/2/83 16:31 (ucbmonet). Type 'help' for help. reading symbolic information ... (dbx) list pos_ecrit 9 pos_ecrit(pf,nom,mode,d) <== this is the original code 10 FILE *pf; 11 char *nom,*mode; 12 long d; 13 (dbx) whatis pos_ecrit int pos_ecrit(c, pf, nom, mode, d) int c; <== where does this c come from ?? struct _iobuf *pf; char *nom; char *mode; int d; Thanks for all replies, in this newsgroups or by Email. If you reply by Email, you can add zertal@crin.UUCP to the Destination field. -- --- Karl Tombre @ CRIN (Centre de Recherche en Informatique de Nancy) EMAIL : tombre@crin.UUCP POST : Karl Tombre, CRIN, B.P. 239, 54506 VANDOEUVRE CEDEX, France PHONE : +33 83.91.21.25