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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,1042f393323e22da X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,1042f393323e22da X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,1042f393323e22da X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: Any research putting c above ada? Date: 1997/04/14 Message-ID: <33526280.62B3@gsfc.nasa.gov>#1/1 X-Deja-AN: 234786725 References: <5ih6i9$oct$1@waldorf.csc.calpoly.edu> <5ijb0o$ajc@ns1.sw-eng.falls-church.va.us> <334d3da5.14386594@aplcen.apl.jhu.edu> <2senchydgk.fsf@hpodid2.eurocontrol.fr> <3359e813.340466234@news.pacificnet.net> <33508283.56DD@aonix.com> <3373409f.494266577@news.pacificnet.net> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Reply-To: Stephen.Leake@gsfc.nasa.gov Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.ada Date: 1997-04-14T00:00:00+00:00 List-Id: Kevin D. Quitt wrote (in part): > > I would much rather have a development environment like UNIX where > dereferencing a NULL pointer is going to dump, than MS-DOS, where you > *might* get a message when the program exits. I *don't* like systems that > can fail silently. On the other hand, I don't want to have to incur the > overhead in continual run-time checking. > I recently ported some code from AIX (IBM's UNIX variant) to cygwin32 (Cygnus' POSIX layer for Win32). Under the AIX C libraries, dereferencing a NULL pointer does NOT always cause a dump; it is often handled in the way I would have if I had written the code correctly. But under cygwin32 and the Cygnus C library, it does usually cause an access violation. So is Win32 better than UNIX in this regard? I prefer the Cygnus behavior, but it is just as permitted by the ANSI C standard as the AIX behavior. The lesson I get from this is that I want a well defined library. Ada gives me that; C does not. There is an ANSI C library definition, but it is vague on error handling, and there is not a widely used validation method. The Ada library defines the error semantics, and has a widely used validation suite. > Kevin D Quitt USA 91351-4454 96.37% of all statistics are made up > Per the FCA, this email address may not be added to any commercial mail list -- - Stephe