Error Checking in C

utzoo!decvax!cca!hplabs!hao!woods at sri-unix utzoo!decvax!cca!hplabs!hao!woods at sri-unix
Thu Oct 28 14:00:35 AEST 1982


  The one error check that I would like to see (perhaps as an option on
the "cc" command line, as it is with our FORTRAN compiler) would be array
bounds checking. You could still get around the checking if you really
did want to refer to something outside the boundary by using the pointer
form. Another thing that would be halpful is a traceback dump, i.e.
"aborted in routine blotto, line n". Somehow I find
"segmentation viloation, core dumped" totally unacceptable as a diagnostic.
It might as well just say "hey, stupid, you fucked up!" because it really
doesn't convey much useful info. Is there a good reason (i.e. inefficiency,
difficulty of implementation) that these things aren't available? Are/will
they be available in other C compilers?

               GREG (menlo70!hao!woods or hplabs!hao!woods)

P.S. Sorry to bore all the C wizards, I am fairly new to C programming.
Better send replies to me personally and not the net, unless you really
feel it is of general interest to C programmers.



More information about the Comp.lang.c mailing list