Xref: utzoo comp.lang.c:21163 comp.os.vms:17079 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!mcsun!unido!tub!astbe!ber From: ber@astbe.UUCP (H.Bernau) Newsgroups: comp.lang.c,comp.os.vms Subject: Re: Problem using VAX C Message-ID: <618@astbe.UUCP> Date: 25 Aug 89 06:36:00 GMT Reply-To: ber@astbe.UUCP (H.Bernau) Organization: GEI Software Technik Berlin, Germany Lines: 71 One week ago I wrote: > We are having a problem using VAX C. > [stuff deleted] > For example, the folling piece of code will compile without any > errors/warnings using VAX-C (vcc under ULTRIX or cc under VMS): > main() { > > short j; > short a[10]; > > if( a == j) { > ; > } > } > Does anyone knows how to detect these sort of things? I'm sorry that I did't RTFM. But I searched for this error the whole day so that I couldn't resist to post my request. Following the signature is a summarize of the response I got. Thanks again to all who gave help. ------------------------------------------------------------------------------- | Rolf Bernau | | GEI Software Technik mbH | Berlin: astbe!ber | Hohenzollerndamm 150 | USA: ...!pyramid!tub!astbe!ber | 1000 Berlin 33 | | West-Germany | ------------------------------------------------------------------------------- Larry Jones uunet!sdrc!scjones Steve Summit scs@adam.pika.mit.edu Jim Barbour barbour@ncar.UCAR.EDU Jerry Leichter leichter@CS.YALE.EDU They told me to use the option /STANDARD=PORTABLE on VMS. The corresponding option for the ULTRIX vcc is -V standard. That works fine indeed. ---- bill davidsen (davidsen@crdos1.crd.GE.COM) > Use another compiler. Seriously, this is a matter of "quality of > implementation" and philosophy. I like a compiler which requires setting > an option somehow (what I would call the pickey option) to warn me about > things which are legal but often misused. Another compiler isn't necessary (see the above). -- Walter Murray (..hplabs!hpda!walter) > 1. Use an ANSI-conforming compiler when you have access to one. > A conforming compiler will be required to produce a diagnostic > on this error. > 2. Use lint. I think most versions of lint will catch the problem. 1. Not necessary (see above) 2. Using lint will work. But if you use some features of VAX C (unfortunatly we must) lint will give so many messages that I think the one I want to see will get lost. ------------- Jim Patterson decvax!utzoo!dciem!nrcaer!cognos!jimp > A company called IPT sells a lint-like product called LINT-PLUS. > (It used to be called TRACER). It runs under VMS as well as a > number of other non-unix platforms, and more or less understands > VMS C. It should be able to locate missing casts as well as > various other potential problems. > IPT's address is > Information Processing Techniques Corporation > 1096 East Meadow Circle > Palo Alto, California 94303 > Phone: (415) 494-7500 in U.S.A. > (This is fairly old, but I can't locate a more up to date one).