[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
...
#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~
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, (continued)
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Stefan Hajnoczi, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Dr. David Alan Gilbert, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Paolo Bonzini, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Dr. David Alan Gilbert, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Paolo Bonzini, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Richard Henderson, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Peter Maydell, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Richard Henderson, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Paolo Bonzini, 2016/03/17
- Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it, Paolo Bonzini, 2016/03/17
Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it,
Richard Henderson <=