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: f849b,d275ffeffdf83655 X-Google-Attributes: gidf849b,public X-Google-Thread: 1108a1,d275ffeffdf83655 X-Google-Attributes: gid1108a1,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 101b33,d275ffeffdf83655 X-Google-Attributes: gid101b33,public X-Google-Thread: 115aec,d275ffeffdf83655 X-Google-Attributes: gid115aec,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Ada vs C++ vs Java Date: 1999/01/22 Message-ID: #1/1 X-Deja-AN: 435673574 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <916962713.14158.0.nnrp-01.c2decf94@news.demon.co.uk> Organization: Intermetrics, Inc. Followup-To: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java,comp.java.advocacy,comp.realtime,comp.arch.embedded,comp.object,comp.lang.java.programmer Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java,comp.java.advocacy,comp.realtime,comp.arch.embedded,comp.object,comp.lang.java.programmer Date: 1999-01-22T00:00:00+00:00 List-Id: forsyth@caldo.demon.co.uk wrote: : i know several non-validated C compilers that are vastly more reliable : than several validated Ada compilers, so let's have fewer snide : remarks about the importance of being validated. Good point. Sorry I appeared snide. My point was that simply in the C compiler world, it is a bit harder to rely on any particular compiler enforcing a particular rule in a particular way. An example is whether an enumeration type is allowed as a bit field. This is not allowed by standard C, but is allowed by standard C++, and since most C compilers these days can also operate in a C++ mode, and this feature seems pretty harmless to allow, it is accepted by most (but not all) C compilers. If you decide to play by the official C rules and not use enumeration types in a bit field, you are punished in the debugger, because it displays your values numerically rather than using the enumeration identifiers. Other examples include whether you can write default: } at the end of a switch statement. Officially that is not allowed by the syntax -- you need at least one statement there, but a number of C compilers accept it anyway. It's hard to call it a serious bug, but it creates niggling portability problems. One of the things that "validation" does is to force compilers to check and complain about all of these "trivial" illegalities. If most compilers are validated for a particular language, then that helps to define what rules are enforced by most compilers, and what rules are overlooked (not many if the validation suite is good). But as you point out, validation does not guarantee reliability of compilers, though it does tend to help quite a bit with portability of programs. -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA