Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/12/84; site desint.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!trwrb!desint!geoff From: geoff@desint.UUCP (Geoff Kuenning) Newsgroups: net.lang.c Subject: Redefining keywords (is #define short int legal?) Message-ID: <321@desint.UUCP> Date: Tue, 22-Jan-85 02:27:25 EST Article-I.D.: desint.321 Posted: Tue Jan 22 02:27:25 1985 Date-Received: Thu, 24-Jan-85 19:14:43 EST Reply-To: geoff@desint.UUCP (Geoff Kuenning) Organization: his home computer, Manhattan Beach, CA Lines: 24 Having the good fortune [:-)] to port a program to a DG C compiler, I carefully ran it through lint first. Among other things, I added a whole bunch of stuff like the following to keep lint happy: (void) strcpy (buf, pathname); When I got it to the DG, I was pleased to discover it understood the void type. I was less pleased to learn that it refused to accept the above construct. No problem, though, right? You just do the old reliable #define void int and all becomes well. Only, the DG C compiler disagrees. It gave me an error message on the above line. Seems that the preprocessor is integrated, and refuses to allow you to redefine keywords. It wasn't hard to work around (just replace all void's with VOID's, and #define VOID void on intelligent compilers), but it brings up a question. Is it legal (by the ANSI standard) to treat C keywords specially *in the 'preprocessor'*? (I quote 'preprocessor' because I don't think the standard actually requires it to be a separate pass.) -- Geoff Kuenning ...!ihnp4!trwrb!desint!geoff