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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public X-Google-Thread: 10db24,fec75f150a0d78f5 X-Google-Attributes: gid10db24,public From: kst@thomsoft.com (Keith Thompson) Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada) Date: 1996/04/11 Message-ID: #1/1 X-Deja-AN: 146888822 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: <4k9qhe$65r@solutions.solon.com> <828964950snz@genesis.demon.co.uk> <4kbfup$2vd@news1.mnsinc.com> <4kbl5i$p3@mordred.gatech.edu> organization: Thomson Software Products, San Diego, CA, USA newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu originator: kst@pulsar Date: 1996-04-11T00:00:00+00:00 List-Id: In dewar@cs.nyu.edu (Robert Dewar) writes: [...] > A competent compiler tries to implement 100% of the required standard > functionality, plus as much as possible of the expected behavior that > goes beyond this standard, consistent with not damaging the quality > of code, or the performance of the compiler, too severely. On the other hand, it's tempting to suggest that a compiler should implement 100% of the required functionality and as *little* as possible of the expected behavior that goes beyond the standard. For example: As many instances as possible of erroneous execution are detected and raise Program_Error. No predefined integer types other than Integer, and no predefined floating-point types other than Float. Elaboration order is chosen to *maximize* the likelihood of access-before-elaboration errors. Unchecked_Conversion behaves strangely in some cases. Access values are not addresses. Different access types are represented differently. The internal representation of a null access value or address is not 0. Perverse task scheduling to the extent allowed by the standard. Similar ideas can be applied to languages other than Ada. Porting existing code to such a compiler could be an excellent way to filter out bugs and non-portable constructs. More realistically, it might be a good idea to implement this kind of thing as a compiler option; the default behavior should be more forgiving. -- Keith Thompson (The_Other_Keith) kst@thomsoft.com <*> TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718 This sig uses the word "Exon" in violation of the Communications Decency Act.