Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.co.jp (Norman Diamond) Newsgroups: comp.std.c Subject: Re: Macro names imbedded in pp-numbers [repost] Message-ID: <11148@riks.csl.sony.co.jp> Date: 20 Nov 89 01:51:46 GMT References: <11134@riks.csl.sony.co.jp> <15217@haddock.ima.isc.com> Reply-To: diamond@ws.sony.junet (Norman Diamond) Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 29 I posted: >>I will have to add code to my scanner, and slow it down, so that >>it will not call the preprocessor if it finds a macro in the middle >>of a pp-number. In article <15217@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >Why should it "find" a macro in the middle of a pp-number, any more than it >should try to expand the substring "getc" in the token "fgetc"? Because my scanner finds the hex number, and then finds the operator, and then finds the macro. My scanner does not look for pp-numbers. (When it calls the preprocessor, the preprocessor looks for pp-numbers internal to its own operation.) In a related posting, I have already asked if it is really necessary to give a warning when a part of the program is processed which depends on undefined behavior. I guessed no, because 2.1.1.2 (and various other sections) do not say "constraints." But Mr. Heuer says yes. Why? (I will have to add code to my scanner, and slow it down, so that it will give a warning if it finds a macro in the middle of a pp-number.) -- Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work) Should the preceding opinions be caught or | James Bond asked his killed, the sender will disavow all knowledge | ATT rep for a source of their activities or whereabouts. | licence to "kill".