9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "rob pike" <rob@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] C compiler and junk mail
Date: Fri,  2 Mar 2001 14:55:34 -0500	[thread overview]
Message-ID: <20010302195541.A97DD199EB@mail.cse.psu.edu> (raw)

	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



             reply	other threads:[~2001-03-02 19:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-02 19:55 rob pike [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-03-05 23:17 Russ Cox
2001-03-02 20:41 dmr
2001-03-02 17:45 ed
2001-03-02 18:28 ` Scott Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010302195541.A97DD199EB@mail.cse.psu.edu \
    --to=rob@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).