Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!rchland.ibm.com!turner From: turner@rchland.ibm.com (Mark Turner) Newsgroups: comp.soft-sys.andrew Subject: Possible bug in class preprocessor Message-ID: Date: 8 Aug 90 20:09:06 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Organization: The Internet Lines: 61 We've come across a possible bug in the class preprocessor. It has to do with defining macromethods with the word 'data' in them. Example: class test : view { macromethods: push(char *elem) test_push((self), elem); }; when run through the class preprocessor, produces a line in the .ih file likethis: #define test_push(self,elem) \ test_push(((self)), elem); which is fine. However, changing the definition slightly, class test : view { macromethods: push(char *data) test_push((self), data); }; produces the line #define test_push(self,char) \ test_push(((self)), data); which fails miserably because nowhere does 'data' appear in the in the macrodefinition portion. Even more fun is running the following through the preprocessor: class test : view { macromethods: push(data) test_push((self), data); }; which produces #define test_push(self,rew/include/atk/view.ch) \ test_push(((self)), data); I don't know if data is a reserved word, and if so, I could live withit. However, there are classes in the distribution (list, forexample) which use the word 'data' in their macro definitions. So is this a bug? Scott Stekel - IBM Rochester