9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@coraid.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] trouble with include order using c compiler with ansi preprocessor
Date: Sun, 10 Jun 2007 15:26:46 -0400	[thread overview]
Message-ID: <e0ee87a2cdb8dae55cdc42fd151adbc9@coraid.com> (raw)
In-Reply-To: <20070610181019.GA2034@shodan.homeunix.net>

i think there is a real bug here.  -N is not really relevant.

cc/lex.c:51 includes the current directory to be first in the include
search path.  i think the loop at lex.c:237 should start with index 1,
not zero, so as not to confuse pcc, i.e.

			for(c = 0; c < ninclude; c++) {
				sprint(opt, "-I%s", include[c]);
				av[i++] = strdup(opt);
			}

should become

			for(c = 1; c < ninclude; c++) {
				sprint(opt, "-I%s", include[c]);
				av[i++] = strdup(opt);
			}

doing includes like you are is not quite the plan 9 style, but the point
of pcc is to accomidate.

- erik



  parent reply	other threads:[~2007-06-10 19:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-10 16:35 Kim Shrier
2007-06-10 17:27 ` [9fans] trouble with include order using c compiler with ansi Charles Forsyth
2007-06-10 17:44   ` Kim Shrier
2007-06-10 18:10 ` [9fans] trouble with include order using c compiler with ansi preprocessor Martin Neubauer
2007-06-10 19:24   ` Kim Shrier
2007-06-10 19:26   ` erik quanstrom [this message]
2007-06-10 20:07     ` Russ Cox
2007-06-10 20:44     ` Kim Shrier
2007-06-10 22:02       ` Uriel
2007-06-10 22:47         ` Kim Shrier
2007-06-11  0:10           ` Kris Maglione
2007-06-11  1:41             ` Kim Shrier
2007-06-11  7:51       ` Steve Simon

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=e0ee87a2cdb8dae55cdc42fd151adbc9@coraid.com \
    --to=quanstro@coraid.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).