New cpp predefines for POSIX/ANSI C

Alan J Rosenthal flaps at dgp.toronto.edu
Fri Feb 24 14:44:11 AEST 1989


In article <12040014 at hpfcdc.HP.COM> jimb at hpfcdc.HP.COM (Jim Bigelow) writes:
>Since lint(1) defines the preprocessor symbol lint when it runs cpp, I
>don't think that lint should be transformed to __lint --  any comments?

I think it should.  The advantage of not intruding in the user's name space is
just as great when they're writing programs that they intend to lint as it is
when they're writing programs that they do not intend to lint.  (Besides, one
should intend to lint all programs anyway.)

The current lint documentation says:
    The preprocessor symbol "lint" is defined, in order to allow certain
    questionable code to be altered or removed for lint.  Therefore, the symbol
    "lint" should be thought of as a reserved word for all code that is planned
    to be checked by lint.
    [Sun unix 3.5 man lint(1)]

In my opinion this is a wart, at least these days if not in the first place.
Get rid of it.

To put it another way, people writing portable C programs should be able to
lint them without having to write lint-ized C programs.  Having to treat
``lint'' as a reserved word is writing a lint-ized C program.

ajr

--
"The goto statement has been the focus of much of this controversy."
	    -- Aho & Ullman, Principles of Compiler Design, A-W 1977, page 54.




More information about the Comp.std.c mailing list