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 <mario_at_zk3.dec.com> still generated
errors.
--------------------------------------------------------------
From: Joe Fletcher <joe_at_meng.ucl.ac.uk>
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.
<alan_at_nabeth.cxo.dec.com>
I think this is a compiler bug. There is probably a patch by now.
--------------------------------------------------------------
From: Paul A Sand <pas_at_unh.edu>
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 <tom_at_radar.tu-graz.ac.at>
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 <peter_at_chemphys.weizmann.ac.il>
Maybe this helps you.
Regards,
Peter Stern
----- Forwarded message from Mark Crispin -----
>From MRC_at_Panda.COM Tue Mar 23 17:14:47 1999
Date: Tue, 23 Mar 1999 07:13:07 -0800 (PST)
From: Mark Crispin <MRC_at_cac.washington.edu>
Sender: Mark Crispin <mrc_at_Ikkoku-Kan.Panda.COM>
Subject: re: Error building Pine 4.10 on DU 4.0E
To: Peter.Stern_at_weizmann.ac.il
cc: pine-bugs-vector_at_cac.washington.edu
In-Reply-To: <199903231417.QAA0000005247_at_chemphys.weizmann.ac.il>
Message-ID: <MailManager.922201987.9786.mrc_at_Ikkoku-Kan.Panda.COM>
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 <Malek.Shabou_at_nic.fr>
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" <hank.lee_at_vta.org>
That is some weird C syntax if I ever seen one. Have you tried building pine
with gcc?
--------------------------------------------------------------
From: David Komanek <xdavid_at_aragorn.natur.cuni.cz>
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 <mario_at_zk3.dec.com>
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_at_primal.ucdavis.edu (JTNishimoto)
Sender: tru64-unix-managers-owner_at_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.
Received on Wed Jun 02 1999 - 16:28:43 NZST