From mboxrd@z Thu Jan 1 00:00:00 1970 From: Enache Adrian To: 9fans@cse.psu.edu Subject: Re: [9fans] plan9's C compiler and // comments Message-ID: <20030915022121.GC1290@ratsnest.hole> References: <1e56ac67c75ab0ab0d61e9569b44f97f@plan9.bell-labs.com> <20030915011658.GB1290@ratsnest.hole> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030915011658.GB1290@ratsnest.hole> User-Agent: Mutt/1.4i Date: Mon, 15 Sep 2003 05:21:21 +0300 Topicbox-Message-UUID: 35f2c63c-eacc-11e9-9e20-41e7f4b1d025 > On Sun, Sep 14, 2003 a.d., David Presotto wrote: > > It accepts it just fine. You're just defining a macro as > > > > "wow!" // this won't work > > > > and when it gets expanded in the exits you get > > > > void main() { exits("wow!" // this won't work); } Judging about what I understand of cmd/cc/macbody:237-260, ex. the /**/ comments are not passed through macros to be dealt with later, but discarded during the parsing of the '#define' directive. So the handling of '//' comments is just special in this case. Regards, Adi