From: Michal Marek <mmarek@suse.cz>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: include guard weirdness
Date: Fri, 11 Jul 2014 14:20:56 +0200 [thread overview]
Message-ID: <53BFD6A8.5080803@suse.cz> (raw)
In-Reply-To: <87a98gnmeg.fsf@rasmusvillemoes.dk>
On 2014-07-11 13:51, Rasmus Villemoes wrote:
> Hi,
>
> gcc/cpp claims to be smart enough to recognize the include guard idiom,
> and most of the time this works very well: the second and subsequent
> #includes do not even cause the file to be opened (thus saving at least
> open+fstat+read+close). Except in a few cases, which are so common that
> it might be worth investigating.
>
> For example, linux/mm.h often shows up exactly twice in strace output;
> another very common header such as linux/types.h always occurs only
> once.
My guess is that <linux/mm.h> includes a header which at some point
includes <linux/mm.h> again.
Michal
next prev parent reply other threads:[~2014-07-11 12:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 11:51 include guard weirdness Rasmus Villemoes
2014-07-11 12:20 ` Michal Marek [this message]
2014-07-12 11:11 ` Rasmus Villemoes
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=53BFD6A8.5080803@suse.cz \
--to=mmarek@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.