public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russ Allbery <rra@stanford.edu>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: 2.5.3-pre1 compile error
Date: Tue, 15 Jan 2002 20:59:32 -0800	[thread overview]
Message-ID: <ylu1tm99hn.fsf@windlord.stanford.edu> (raw)
In-Reply-To: <fa.oa9ld7v.gk65b0@ifi.uio.no> <fa.g97h3fv.968725@ifi.uio.no>
In-Reply-To: <fa.g97h3fv.968725@ifi.uio.no> (dmeyer@dmeyer.net's message of "Wed, 16 Jan 2002 02:11:58 GMT")

dmeyer <dmeyer@dmeyer.net> writes:
> In article <20020116015513.L32088@suse.de> you write:

>>  I'm sure I read somewhere that gcc is clever enough to know when it
>>  hits a #include, it checks for a symbol equal to a mangled version of
>>  the filename before including it.  (Ie, doing this transparently).

>>  Then again, I may have imagined it all.

No, you read that gcc notices when the entirety of a source file is
wrapped in an #ifdef guard and won't re-read that file when it's included
again if the symbol is defined.

> In answer to Linus' question...yes, in a large system redundent include
> guards can make a real difference, particularly for headers which get
> included by other headers regularly.

Yes, but you don't need to put them around the #include.  Just make sure
there is nothing but comments outside the multiple inclusion guards in the
header files and any competent compiler will do the right thing.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

       reply	other threads:[~2002-01-16  5:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.oa9ld7v.gk65b0@ifi.uio.no>
     [not found] ` <fa.g97h3fv.968725@ifi.uio.no>
2002-01-16  4:59   ` Russ Allbery [this message]
     [not found] <20020115192048.G17477@redhat.com.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.33.0201151628440.1140-100000@penguin.transmeta.com.suse.lists.linux.kernel>
2002-01-16 11:27   ` [PATCH] Re: 2.5.3-pre1 compile error Andi Kleen
2002-01-16 11:39     ` Dave Jones
2002-01-17  7:40       ` Neil Booth
     [not found] <20020115194425.J17477@redhat.com>
2002-01-16  0:52 ` Davide Libenzi
2002-01-16  1:16   ` David Weinehall
2002-01-16  1:24     ` Davide Libenzi
2002-01-16  0:05 John Weber
2002-01-16  0:20 ` [PATCH] " Benjamin LaHaise
2002-01-16  0:29   ` Linus Torvalds
2002-01-16  0:38     ` David Weinehall
2002-01-16  0:41       ` Linus Torvalds
2002-01-16  0:55         ` Dave Jones
2002-01-16  2:10           ` dmeyer
2002-01-16 18:32           ` Peter Osterlund
2002-01-16  0:43     ` Benjamin LaHaise
2002-01-16  0:44       ` Linus Torvalds
2002-01-16  0:52         ` Benjamin LaHaise
2002-01-16  1:18           ` David Weinehall
2002-01-17 22:11         ` Christopher Turcksin
2002-01-16  1:24       ` Robert Love
2002-01-16  1:25         ` Benjamin LaHaise
2002-01-16  1:39           ` Robert Love
2002-01-16  0:46     ` Davide Libenzi
2002-01-16  0:43       ` Linus Torvalds
2002-01-16  0:52         ` David S. Miller
2002-01-16  1:06           ` Andre Hedrick
2002-01-16  1:17         ` Davide Libenzi
2002-01-16  1:23           ` Davide Libenzi

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=ylu1tm99hn.fsf@windlord.stanford.edu \
    --to=rra@stanford.edu \
    --cc=linux-kernel@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