[Top][All Lists]

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

Re: reasons for having no inclusion guards in config.h

From: Bob Friesenhahn
Subject: Re: reasons for having no inclusion guards in config.h
Date: Mon, 8 Mar 2010 10:00:27 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Mon, 8 Mar 2010, Steffen Dettmer wrote:

On Mon, Mar 8, Bob Friesenhahn <address@hidden> wrote:
It is also interesting to note that it is usually ok for the
content of the header file to be parsed any number of times.
The only exception might be with some weird macro expansion
(but that would be a bug).

The conditional inclusion of content is only an optimization.

If you have a struct definition (C/C++) or a typedef (C) in the
.h file, C compilers may refuse to process it twice and an
inclusion guard is needed:

That is true, but if the same definition comes from two different config.h files, how does the multiple inclusion protection help?

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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