From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4cf58a21d1a4828b X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-10-21 20:27:15 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!spool.mu.edu!caen!crl.dec.com!crl.dec.com!jac.zko.dec.com!cosf.zko.dec.com!repete From: repete@cosf.zko.dec.com (Rich Peterson ZKO2-3/N30) Newsgroups: comp.sys.dec Subject: Re: ANSI C compiler on DEC station Date: 19 Oct 1994 19:29:14 GMT Organization: DEC TLG, Spit Brook Road, Nashua, NH Distribution: world Message-ID: <383s2a$57e@jac.zko.dec.com> References: <382a2f$npq@pendragon.jsc.nasa.gov> Reply-To: repete@cosf.zko.dec.com (Rich Peterson ZKO2-3/N30) NNTP-Posting-Host: cosf.zko.dec.com X-Newsreader: mxrn 6.18-16 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 % 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