linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Christopher Li <sparse@chrisli.org>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [RFC PATCH] Handling multiple -include directives
Date: Fri, 22 Dec 2006 17:27:44 -0500	[thread overview]
Message-ID: <1166826464.27009.10.camel@dv> (raw)
In-Reply-To: <20061222094748.GA32376@chrisli.org>

Hello!

On Fri, 2006-12-22 at 01:47 -0800, Christopher Li wrote:
> On Fri, Dec 22, 2006 at 02:36:48AM -0500, Pavel Roskin wrote:
> > On Fri, 2006-12-22 at 02:06 -0500, Pavel Roskin wrote:
> > > It seems to me that the existing add_pre_buffer() mechanism can be used
> > > instead.  I'm just a bit worried why it wasn't done like this in the
> > > first place.
> 
> I believe the reason it is not in the pre buffer is that it should first
> search the current directory instead of the source file directory. The command
> line -include has some subtle differences with #include "filename"

Then maybe we need some variation of #include, e.g. #include_cmdline.
And while at that, I think -imacros should be processed slightly
differently.
 
> > There was a reason to worry.  Now create_builtin_stream() is run after
> > the includes have been processed, so that e.g. the Linux compiler.h
> > tells me that my compiler is too old (because it was included from the
> > command line before __GNUC__ was defined).
> 
> That is the other reason as well :-)
>
> Can you please try this patch and see if it works for you?

I have tried it in current (svn) MadWifi, and the output is much more
agreeable, so I think the patch is working.

However, I would prefer that we don't use fixed size arrays.  It would
be much better in the long term to use the existing "code generator".
It would be a more uniform and scalable approach.  Besides, the
generated code could be dumped for debugging purposes.

By the way, the current MadWifi is a treasure trove for anyone looking
to improve sparse.  My impression is that most if not all reported
problems are bogus.

-- 
Regards,
Pavel Roskin

      reply	other threads:[~2006-12-22 22:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22  7:06 [RFC PATCH] Handling multiple -include directives Pavel Roskin
2006-12-22  7:36 ` Pavel Roskin
2006-12-22  9:47   ` Christopher Li
2006-12-22 22:27     ` Pavel Roskin [this message]

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=1166826464.27009.10.camel@dv \
    --to=proski@gnu.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.org \
    /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).