Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!yetti!geac!daveb From: daveb@geac.UUCP (Brown) Newsgroups: comp.unix.questions,comp.lang.c Subject: Re: lint and volatile and const constructs Message-ID: <1459@geac.UUCP> Date: Wed, 23-Sep-87 08:25:19 EDT Article-I.D.: geac.1459 Posted: Wed Sep 23 08:25:19 1987 Date-Received: Fri, 25-Sep-87 05:42:19 EDT References: <832@ektools.UUCP> <6457@brl-smoke.ARPA> <7479@elsie.UUCP> Reply-To: daveb@geac.UUCP (Dave Collier-Brown) Organization: The little blue rock next to that twinkly star. Lines: 22 Xref: mnetor comp.unix.questions:4223 comp.lang.c:4490 In article <7479@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes: >Note that neither the command-line approach nor the header file approach >will help if you have declarations such as > > const x = 3; > >in which const (or volatile) is the only keyword in the declaration. But from >what I've been reading X3J11 may be moving in the direction of outlawing such >declarations; they should be avoided. Iff const is a storage-class specifier (K&R Appendix A, 8.1, p192ff), then it is plausable to set "-Dconst=auto", and have the compiler detect when the construct is portable by barfing on "auto static"... This will get you past both lint and less-capable compilers when you go to port the porgram. --dave -- David Collier-Brown. {mnetor|yetti|utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.