Thought on an ANSI lint

Stephen J. Friedl friedl at vsi.COM
Mon Feb 20 12:39:34 AEST 1989


Hi.ho folks,

     I've a thought on a feature that might be useful in an ANSI
lint and I'd like to bounce this off you folks.

     I am postulating that it would be helpful to have a lint
option that make string literals "array of const char" rather
than "array of char" and do type checking on that basis.  The
Committee apparently considered this for the language itself but
eventually rejected it (maybe some ANSI-kind-of-people could
comment on this).  Perhaps they rejected it because it would have
required that old code be retrofitted with /const/ everywhere,
and they felt this was too high a burden to place on those using
a new compiler.

     For new code, however, produced by those who think and use
/const/ all the time (like me) I think this might be a big win to
have lint check for this.

     Can anybody find anything wrong with this idea?  Discussions
here or via email would be fine.

     Steve

-- 
Stephen J. Friedl        3B2-kind-of-guy            friedl at vsi.com
V-Systems, Inc.       I speak for you only      attmail!vsi!friedl
Santa Ana, CA  USA       +1 714 545 6442    {backbones}!vsi!friedl
--------Barbara Bush on... on... No, I just can't do it...--------



More information about the Comp.std.c mailing list