From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079044115500.tru64-unix-managers.marc@archive.invalid> From: JTNishimoto Date: Wed, 02 Jun 1999 16:27:01 +0000 To: tru64-unix-managers Subject: Summary: C compiler errors with 4.0E and F X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079044115500 My Thanks to everyone! Joe Fletcher Alan Rollow Paul A Sand Thomas Leitner Peter Stern Malek Shabou Lee, Hank Joe Mario David Komanek There is a bug in the C compiler! I did not try all suggestions but the suggested change from Paul A Sand compiled cleanly while the suggestion from Joe Mario still generated errors. -------------------------------------------------------------- From: Joe Fletcher Hi, I've heard there are problems with the optimiser in the current C compiler shipping with 4.0E and later. Don't know about any other problems yet. I'll see if I can dig out the original post. Joe -------------------------------------------------------------- From: Alan Rollow - Dr. File System's Home for Wayward Inodes. I think this is a compiler bug. There is probably a patch by now. -------------------------------------------------------------- From: Paul A Sand It's certainly a bug I've seen on 4.0e. (I think it's also been reported on the list previously.) Haven't tried 4.0f. My workaround was to do lcl = strcpy (name,"#news."); lcl += 6; -------------------------------------------------------------- From: Thomas Leitner This is not a well behaved C construction, IMHO. It depends on strcpy being define as "char *strcpy(char*, char*)". If this is not the case, for whatever reasons, you get this error message. Try this: strcpy (name,"#news."); lcl = name + 6; alternatively: lcl = ((char*) strcpy(name, "#news.")) + 6; -------------------------------------------------------------- From: Peter Stern Maybe this helps you. Regards, Peter Stern ----- Forwarded message from Mark Crispin ----- >From MRC@Panda.COM Tue Mar 23 17:14:47 1999 Date: Tue, 23 Mar 1999 07:13:07 -0800 (PST) From: Mark Crispin Sender: Mark Crispin Subject: re: Error building Pine 4.10 on DU 4.0E To: Peter.Stern@weizmann.ac.il cc: pine-bugs-vector@cac.washington.edu In-Reply-To: <199903231417.QAA0000005247@chemphys.weizmann.ac.il> Message-ID: X-Status: X-UID: 132 On Tue, 23 Mar 1999 16:17:16 +0200 (IST), Peter Stern wrote: > I just tried to build Pine v4.10 on a Digital Unix v4.0E system > using ./build os4 This is a new bug in DEC's C compiler. The workaround is in the next version of Pine. In the meantime, can you use the pre-built binary that we supply? ----- End of forwarded message from Mark Crispin ----- -------------------------------------------------------------- From: Malek Shabou Hi, the output of strcpy is a char* (string), so you cannot add to it 6!!!! try man strcpy Regards, char *strcpy( ----^ char *s1, const char *s2); -------------------------------------------------------------- From: "Lee, Hank" That is some weird C syntax if I ever seen one. Have you tried building pine with gcc? -------------------------------------------------------------- From: David Komanek Hello, a few weeks ago I had a similar problem. I suggest you try the following code: lcl = strcpy (name,"#news."); lcl += 6; It should work. Maybe (but not tested) the following statement is the way out, too : lcl = strcpy (name,"#news.") + (void *)6; -------------------------------------------------------------- From: Joe Mario Jerry: The problem you reported is a bug in the V4.0E C compiler. I believe it's fixed in the V4.0E patch pool that will be available shortly (June/July). Here are some workarounds you can use until then. For now you can get around the problem by adding "-no_intrinsics" to your cc command line. That will disable all of the compiler's default intrinsic builtins, which may be a little bit of an overkill. Another way would be to just disable the strcpy intrinsic by adding "#pragma function (strcpy)" to the offending source file after the line where string.h is included. Of course, if you can change the source, you could also change the offending line from a = strcpy (name,"foo") + 4; to a = strcpy (name,"foo"); a += 4; which might be better (since you still get the intrinsic, this way). Joe Mario Compaq Tru64 Development Environment - -------- Original Message -------- Newsgroups: dec.mail.lists.alpha-osf-managers Path: lead.zk3.dec.com!pa.dec.com!pa.dec.com!owner-alpha-osf-managers-redist From: jerry@primal.ucdavis.edu (JTNishimoto) Sender: tru64-unix-managers-owner@ornl.gov Subject: C compiler errors with 4.0E and F Hello Managers, We are setting up two AlphaServer 800 5/333's with a RA3000 drive. Originally both of the systems were set up and running with 4.0E. Later because of the problems we were having compiling C programs, One of the Alphas in the cluster was upgraded to 4.0F. Is anyone else having problems compiling C programs? Here is the error message from building pine4.05. cc -g3 -O2 -Olimit 1500 -DNFSKLUDGE -c news.c cc: Error: news.c, line 186: In this statement, "strcpy(...)" and "6" cannot be added. (noadd) lcl = strcpy (name,"#news.") + 6; - ----------^ *** Exit 1 Stop.