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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 23 May 2015 06:09:59 -0500 Newsgroups: comp.lang.ada Date: Sat, 23 May 2015 07:09:58 -0400 From: Peter Chapin X-X-Sender: pcc09070@WIL414CHAPIN.vtc.vsc.edu Subject: Re: Build language with weak typing, then add scaffolding later to strengthen it? In-Reply-To: <65ca4d5b-b1ae-403c-99c5-dec6f2e1dd54@googlegroups.com> Message-ID: References: <127b004d-2163-477b-9209-49d30d2da5e1@googlegroups.com> <65ca4d5b-b1ae-403c-99c5-dec6f2e1dd54@googlegroups.com> User-Agent: Alpine 2.11 (CYG 23 2013-08-11) Organization: Vermont Technical College MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-xN8vQLxxDkBc7ZrgAc+tNhMEpNEjOcGXOTfJDt0uQWyDjXGJRCelSAFBqnmINx+XkupHHbbHLOsNaA9!M7nhEptGtuArcHgGh9Z74UyQjKKiW1dbGVVkZgxzQzNNyStC260N+HH/G7VxYdOrteBIgz6cbPOJ!MBiEboduCOlXgGZYQg== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2509 X-Received-Bytes: 2621 X-Received-Body-CRC: 228981519 Xref: news.eternal-september.org comp.lang.ada:25973 Date: 2015-05-23T07:09:58-04:00 List-Id: On Fri, 22 May 2015, kalvin.news@gmail.com wrote: > What I would like to see in C/C++, and what would make me a bit less > grumpy, is a compiler "#pragma strict" - or something like that - which > would enable improved type checking in the compilation entity. Better > yet, an improved Lint with strict type checking rules because some of > the C compilers are legacy and cannot be upgraded. Such tools exist. I believe even the free splint tool has "strict typedefs" where it can be configured to regard each typedef as a new type. I'm also about 98% sure the commercial PC-Lint tool has a similar feature. The problem with using such a feature is that you pretty much have to write all the code yourself (not necessarily a bad thing in a high integrity context) since the use of types in third party header files is not so strict. That said, it is generally possible to tell these tools to tone down their checking when they processs a third party header precisely to avoid the errors doing so would produce. Peter