Re: Semicolons (Re: Low-Rent Syntax)

mjr@decuac.DEC.COM (Marcus J. Ranum)
25 Aug 90 17:39:25 GMT

          From comp.compilers

Related articles
Semicolons (Re: Low-Rent Syntax) bart@videovax.tv.tek.com (Bart Massey) (1990-08-13)
Re: Semicolons (Re: Low-Rent Syntax) codex!peterd@uunet.UU.NET (1990-08-20)
Semicolons (Re: Low-Rent Syntax) thomasm@llama.ingres.com (1990-08-22)
Re: Semicolons (Re: Low-Rent Syntax) trt@rti.rti.org (1990-08-24)
Re: Semicolons (Re: Low-Rent Syntax) mjr@decuac.DEC.COM (1990-08-25)
Re: Semicolons (Re: Low-Rent Syntax) bart@videovax.tv.tek.com (Bart Massey) (1990-08-26)
Re: Semicolons (Re: Low-Rent Syntax) elsie!ado@uunet.UU.NET (1990-08-27)
Re: Semicolons (Re: Low-Rent Syntax) anw@maths.nott.ac.uk (1990-08-29)
Re: Semicolons (Re: Low-Rent Syntax) liam@cs.qmw.ac.uk (1990-09-03)
Re: Semicolons (Re: Low-Rent Syntax) firth@sei.cmu.edu (1990-09-05)
Re: Semicolons (Re: Low-Rent Syntax) lins@apple.com (Chuck Lins) (1990-09-05)
[5 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: mjr@decuac.DEC.COM (Marcus J. Ranum)
Keywords: C, design, debug
Organization: Digital Equipment Corp., Washington ULTRIX Resource Center
References: <9008202341.AA06543@llama.ingres.com> <4032@rtifs1.UUCP>
Date: 25 Aug 90 17:39:25 GMT

In article <4032@rtifs1.UUCP>, trt@rti.rti.org (Thomas Truscott) writes:


> prog.c: line 13: dubious indentation level.


No! No, please! Not indentation in the compiler! :) Next we'd
see things like:


prog.c: line 666: complicated expression, please comment it


> p = malloc(strlen(s));
> ^
> prog.c: line 32: was "strlen(s) + 1" intended?


What if 'p' was part of (or going to be part of) some data
structure that contained the string size encoded in some other manner ? I
can imagine building such capabilities into a pre-processor of some sort,
that did idiot checking based on some information about the kind of things
you wanted to do, but I don't think it belongs in the compiler (please!).


I'm really impressed with the functionality something like Saber-C
provides for catching stupid errors like the one above. Somehow, support
for catching that kind of thing needs to be built into the development
process at code-writing-time, not at compile-time. Do any syntax-directed
editors handle such things ? I can imagine a syntax directed editor that
understood The One True Brace Style :), had lint built into it, and so on.
That way I wouldn't have to use it!


mjr.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.