Subject: OSF 4.0F compile failure using cc

From: Chad Price <[email-masked]>
Date: Wed, 25 Aug 1999 16:42:25 -0500

(gcc fails miserably since the build script insists on putting things like 
-Olimit 1500 in the compile command  so I used the Dec/Compaq/OSF cc compiler.)

Here's the error.  the news.c which fails appears to be in imap/c-client 
(of the 3 sites where it is found:
./imap/src/osdep/unix/news.c
./imap/src/osdep/amiga/news.c
./imap/c-client/news.c
)

Suggestions?

/usr/local/src/pine/pine4.10
# ./build osf 2>&1  >compile-out
cc: Error: news.c, line 186: In this statement, "strcpy(...)" and "6" 
cannot be added. (noadd)
     lcl = strcpy (name,"#news.") + 6;
----------^
make[3]: *** [news.o] Error 1
make[2]: *** [osf] Error 2

Chad Price
Systems Manager
University of Nebraska Medical Center
600 S 42nd St
Omaha, NE 68506-6495
[email-masked]
(402) 559-9527
(402) 559-4077 (FAX)

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Wed, 25 Aug 1999 14:59:10 -0700 (PDT)

Either get a newer version of the OSF C compiler, or get an updated IMAP
toolkit
	ftp://ftp.cac.washington.edu/mail/imap.tar.Z
that works around the problem.

The underlying problem is a bug in the OSF C compiler.  It is not the first
such bug; that compiler has also generated bad code (for example, post
incremented shorts).

---

From: [email-masked]
Date: Wed, 25 Aug 1999 20:33:32 -0500 (CDT)

This compiler seems kind of strict...  You can typecast things.

ie: (assuming lcl is char*)
  lcl = (char *)((long)strcpy (name, "#news.") + 6)

There are problems with the above if your char pointer type is not really a
long however.  If there is a way to flag the compiler to not be so strict
about the ansi C stuff, and allow legacy C code, maybe that should be used
instead.

Bill Suetholz

---

From: Chad Price <[email-masked]>
Date: Thu, 26 Aug 1999 08:29:39 -0500

At 02:59 PM 8/25/1999 -0700, Mark Crispin wrote:
>Either get a newer version of the OSF C compiler,

That is the compiler which ships with the latest systems: this is a new 
system which arrived Friday (less than a week ago) with the latest version 
(4.0F) of what is now called Tru64 Unix on it and the latest patches 
installed. There do not appear to be any later versions.

>or get an updated IMAP

That I can do.

>such bug; that compiler has also generated bad code (for example, post

So at what point is the build script going to support gcc?  At the moment, 
you can include CC=gcc on the command line; but this is doomed to failure 
because you still specify that the system is 'osf' and so osf, but not 
gcc-specific compiler switches like the "-Olimit 1500" are included, which 
causes gcc to bomb.  The GNU configure program seems like it would be a 
good direction to go. The wuftpd group now has a working version using 
configure.

Chad

Chad Price
Systems Manager

---

From: Chad Price <[email-masked]>
Date: Thu, 26 Aug 1999 14:22:12 -0500

>such bug; that compiler has also generated bad code (for example, post

This comes out of imap-4.6.BETA:

cc -g3 -O2 -Olimit 1500 -DNFSKLUDGE    -c mail.c -o mail.o
cc: Warning: mail.c, line 2832: In this statement, the referenced type of 
the pointer value "s" is "signed char", which is not compatible with 
"unsigned char". (ptrmismatch)
   if (h.data = s) {             /* have any text? */
------^
cc -g3 -O2 -Olimit 1500 -DNFSKLUDGE    -c misc.c -o misc.o

Chad Price
Systems Manager