[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Our use of #include is undisciplined, and what to do ab

From: Richard Henderson
Subject: Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it
Date: Thu, 17 Mar 2016 12:40:21 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 03/15/2016 02:29 AM, Markus Armbruster wrote:
> Headers can
> be read multiple times, which can only hurt compilation time.  You need
> to make an effort to avoid cyclic dependencies and excessive inclusion.

I just want to point out that the preprocessor understands the

#ifndef FOO
#define FOO

idiom, where nothing but comments precedes the #ifndef in the file, and
likewise nothing succeeds the matching #endif.  If FOO is still defined at the
next #include of the file, the preprocessor will skip the #include entirely.

So don't let this be a consideration in the argument.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]