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,1d321b3a6b8bcab2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-23 00:49:41 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!gatech!howland.reston.ans.net!news.sprintlink.net!EU.net!uknet!hrc63!gmrc.gecm.com!valiant!bill From: bill@valiant (R.A.L Williams) Newsgroups: comp.lang.ada Subject: "Subtract C, add Ada" Date: 23 Jan 1995 08:49:41 GMT Organization: GEC-Marconi Research Centre Message-ID: <3fvqj5$ofr@miranda.gmrc.gecm.com> NNTP-Posting-Host: valiant.gmrc.gecm.com X-Newsreader: TIN [version 1.2 PL1] Date: 1995-01-23T08:49:41+00:00 List-Id: In article <3feevh$615@gnat.cs.nyu.edu> Robert Dewar wrote: : "Dennis Ritchie once said in an interview that there is *nothing* in the : C language that keeps compiler writers from issuing stringent warnings : about stuff that most Ada people take for granted." : Dennis may have said this, but it is misleading. Yes, there is stuff that : Ada people take for granted that C compilers could (and in some compilers : *do*) check for. : But there are lots of things that Ada people take for granted that cannot : be checked in C, there just isn't enough information. C has no separation : of scalar types, no ranges on scalar types, and the ubquitous use of : pointers, and their similarity to arrays means that sophisticated aliasing : analysis is required to even approximate the type checking that occurs : in the context of access types in Ada. There are many other examples. Ranges - no, but my Microsoft C compiler certainly *does* warn me when I - mix signed and unsigned integers (of course, Ada83 doesn't have unsigned) - assign the result of 'long' expressions to shorts or chars etc. - perform 'unchecked conversion' between integers and pointers There are probably other things as well, but these are certainly some of the gripes it comes up with when I try to port typical UNIX C code to WIN32. I agree with Dennis Ritchie, If I go to the trouble of typedef'ing a new type, there is nothing to stop the compiler from griping at me if I do something inappropriate with it. This is mainly a compiler issue, not a language issue. Bill Williams