From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0123581076a0cf3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-13 01:35:07 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!news.bu.edu!inmet!asp!mg From: mg@asp.camb.inmet.com (Mitch Gart) Subject: Re: Ada ad in Embedded Systems Programming stinks Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: <34tu91$139u@source.asset.com> Date: Mon, 12 Sep 1994 20:49:29 GMT Date: 1994-09-12T20:49:29+00:00 List-Id: Yes, lint catches some errors in C programs. But the Ada and C type models are fundamentally different. In Ada you might have: type Time is new Integer; type Temperature is new Integer; and then objects of these types are marked as being different, and cannot be assigned or mixed in arithmetic operations without a type conversion. The equivalent in C is: typedef int Time; typedef int Temperature; but now both of these types are treated like synonyms for "int". All the integer assignment and arithmetic operations are available, mixing objects of these types, without type coercions. Because of this fundamental difference in the type model, a whole class of errors won't be detected at compile time by any C compiler (ANSI or not) or lint. Mitch Gart