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: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: C is 'better' than Ada because... Date: 1996/06/23 Message-ID: #1/1 X-Deja-AN: 162352595 references: <4q8fbo$701@red.interact.net.au> <31CC75C1.5BF2AF6A@jinx.sckans.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.c,comp.lang.ada Date: 1996-06-23T00:00:00+00:00 List-Id: "The Deviant" said "But, the variable was initialized as char blah[5]; which means it goes out of its bouts as soon as it tries to access blah[5], and thats when SIGSEGV, by definition, should occur." Most amusing, someone who thinks that C works the way Ada does, and that sigsegv means an out of bounds subscript :-) Sorry to disappoint, but C typically has no bounds checking. A sigsegv means you wandered out of *the entire data area for your program*, not out of a particular array you have defined. So, I am afraid the "by definition" in your above note is very wrong. Perhaps you would like to take a closer look at languages like Ada which do indeed define that a runtime exception must occur in such circumstances!