From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] C compiler and junk mail From: "rob pike" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20010302195541.A97DD199EB@mail.cse.psu.edu> Date: Fri, 2 Mar 2001 14:55:34 -0500 Topicbox-Message-UUID: 6bd94eae-eac9-11e9-9e20-41e7f4b1d025 1) I sent a mild complaint earlier about how the 2nd edition C compiler fails to remove // type comments from #define statements. This caused me some grief when importing code into plan 9. Is this an over sight in the implementation or leaving these comments in place part of the language specifications? Well, first, those are not ANSI C comments. They may be in C99. But they were added to the Plan 9 compilers because some people prefer them. The real problem here is that the Plan 9 compiler remove comments at a slightly different point in the processing than the ANSI standard suggests, so comments on #include and #define lines can cause trouble. If you really care, use 8c -p to invoke a strict ANSI preprocessor. -rob