From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agdmW-00018n-Q7 for qemu-devel@nongnu.org; Thu, 17 Mar 2016 15:40:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agdmT-00059w-K8 for qemu-devel@nongnu.org; Thu, 17 Mar 2016 15:40:28 -0400 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:32808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agdmT-00059k-Fd for qemu-devel@nongnu.org; Thu, 17 Mar 2016 15:40:25 -0400 Received: by mail-qg0-x234.google.com with SMTP id a36so49806523qge.0 for ; Thu, 17 Mar 2016 12:40:25 -0700 (PDT) Sender: Richard Henderson References: <87wpp4m6n1.fsf@blackfin.pond.sub.org> From: Richard Henderson Message-ID: <56EB0825.6070303@twiddle.net> Date: Thu, 17 Mar 2016 12:40:21 -0700 MIME-Version: 1.0 In-Reply-To: <87wpp4m6n1.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: Peter Maydell , Stefan Hajnoczi 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 ... #endif 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. r~