Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: repete@cosf.zko.dec.com (Rich Peterson ZKO2-3/N30)
Subject: Re: ANSI C compiler on DEC station
Date: 19 Oct 1994 19:29:14 GMT	[thread overview]
Message-ID: <383s2a$57e@jac.zko.dec.com> (raw)
In-Reply-To: 382a2f$npq@pendragon.jsc.nasa.gov


In article <382a2f$npq@pendragon.jsc.nasa.gov>, hnguyen@killerbee.jsc.nasa.gov (Hung Nguyen) writes:

|>  We would like to know if the C compiler that normally comes
|>  with the Ultrix 4.3 ANSI compliant. If not, is there any
|>  ANSI C compiler that will work fine under Ultrix 4.3? 

The default C compiler (cc) that comes with Ultrix 4.3 is not ANSI
compliant.  The cc compiler that comes with Ultrix 4.4 is ANSI
compliant.

|>  Because we are having a problem with our DEC-C (c89) compiler
|>  in which we cannot compile our source code without the -common
|>  flag. Without the -common flag the compiler would complain
|>  about one of the typedef in the Xlib.h file.

The c89 compiler is ANSI compliant under the -std flag.  Under the
-common flag it accepts a dialect of C like that of the "portable
C compiler" common on Unix platforms and is not ANSI compliant
in that case.  Although the X header files have provisions in them
to compile under an ANSI compiler (i.e. they test the __STDC__ predfined
macro), it is possible that there is some problem in the headers you
have.  You didn't mention what the problem was or which typedef it was,
but I couldn't reproduce any problem of this kind compiling Xlib.h
with c89 and any of its language flags on RISC/Ultrix 4.3:

% head -2 /etc/motd
ULTRIX V4.3 (Rev. 44) System #3: Fri Apr 16 15:28:26 EDT 1993
UWS V4.3 (Rev. 10)
% cat c.c
#include <X11/Xlib.h>
% c89 -c c.c
% c89 -std -c c.c
% c89 -common -c c.c
% c89 -vaxc -c c.c

What version of the c89 compiler are you using?

% c89 -source_listing -c c.c
% head c.lis
c.c                                  DEC C for ULTRIX on RISC    V1.2a              Oct 19 1994    15:23:46                    1    

%

On the other hand, your best bet is probably to upgrade to Ultrix 4.4,
which has a number of bug fixes and the default C compiler has a
ANSI-compliant mode (-std1).

 -Rich
-- 
Rich Peterson,  ZK2-3/N30                       repete@tle.enet.dec.com
Digital Equipment Corporation			decwrl!tle!repete
110 Spit Brook Rd,
Nashua, NH 03062


  reply	other threads:[~1994-10-19 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-19  5:15 ANSI C compiler on DEC station Hung Nguyen
1994-10-19 19:29 ` Rich Peterson ZKO2-3/N30 [this message]
1994-10-25 19:49 ` Philip J. Tait
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox