linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: Kamil Dudka <kdudka@redhat.com>
Cc: sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH] make sparse headers self-compilable...
Date: Tue, 11 Aug 2009 02:40:45 -0700	[thread overview]
Message-ID: <70318cbf0908110240w5067933dv92e92829c0bb2e8f@mail.gmail.com> (raw)
In-Reply-To: <200908081310.27671.kdudka@redhat.com>

On Sat, Aug 8, 2009 at 4:10 AM, Kamil Dudka<kdudka@redhat.com> wrote:
> On Friday 07 of August 2009 22:27:08 Kamil Dudka wrote:
>> attached is another fix for SPARSE headers improving their sanity. I am
>> also attaching a simple test for the dependency tracking of headers. It's
>> not enough generic and portable and therefore not really useful. Maybe
>> someone skilled in writing makefiles might want to include something like
>> that to the SPARSE Makefile as part of the 'check' target.

What is the significant of making every header file self compilable?
Unlike the kernel header files exported to user space, which usually
have self contained meaning. Most of these header file have tight interaction
with each other. I don't think it make sense for other sparse application
to just use one of the header file.

Enforcing each header file to be self compilable will result in a lot
of unnecessary include. Gcc needs to include "symbol.h" many times
just to skip over it. Take a look at pre-process.c. It is not exactly
trivial. It needs to scan the token to find out the end of the if
scope. In this case, it might be better just let other header
file depend on "symbol.h".

I want to heard what other people think about it too. I am a little bit
reluctant on this one.

Chris

  reply	other threads:[~2009-08-11 11:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 20:27 [PATCH] make sparse headers self-compilable Kamil Dudka
2009-08-08 11:10 ` Kamil Dudka
2009-08-11  9:40   ` Christopher Li [this message]
2009-08-11  9:55     ` Kamil Dudka
2009-08-11 10:40       ` Kamil Dudka
2009-08-11 21:08         ` Christopher Li
2009-08-11 21:25           ` Kamil Dudka
2009-08-11 12:48     ` Hannes Eder
2009-08-11 12:59       ` Kamil Dudka
2009-08-11 21:08         ` Christopher Li

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=70318cbf0908110240w5067933dv92e92829c0bb2e8f@mail.gmail.com \
    --to=sparse@chrisli.org \
    --cc=kdudka@redhat.com \
    --cc=linux-sparse@vger.kernel.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).