Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!osu-cis!apr!whp From: whp@apr.UUCP Newsgroups: comp.unix.questions,comp.lang.c Subject: Re: lint and volatile and const constructs Message-ID: <279@apr.UUCP> Date: Thu, 24-Sep-87 06:48:07 EDT Article-I.D.: apr.279 Posted: Thu Sep 24 06:48:07 1987 Date-Received: Sat, 26-Sep-87 11:28:53 EDT References: <832@ektools.UUCP> Reply-To: whp@apr.UUCP (Wayne Pollock) Organization: APR, Columbus, OH Lines: 20 Keywords: lint volatile const c updating Xref: utgpu comp.unix.questions:3803 comp.lang.c:4307 Summary: How to alter lint to recognize new constructs It is a bad idea to modify your source code (such as lint). The simpler approach is to add a global include file: #ifdef lint #define volatile ... #endif You can also use command line arguments to lint to accomplish the same thing. If you really need to modify lint, you must modify the yacc grammar which is used for lint. As I recall, the semantics of volatile and const place them in the "sc-specifier" class, just like register or auto. If you were to search the grammer source files for the keyword "auto", I'd bet you could then use it as a guide for "volatile" or "const". Since the grammar for lint is just a recognizer, there are probably no code sequences needed. -Wayne Pollock PS DISCLAIMER: I have never attempted to modify lint! I probably don't know what I'm talking about! If you try this (which I don't recomend) and damage you system, I don't want to hear about it! (In short, add the header file or use the command line options!)