Subject: Re: missing #include ?
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
From: Jachym Holecek <email@example.com>
Date: 12/12/2006 21:37:48
# Hauke Fath 2006-12-10:
> At 23:02 Uhr +0100 10.12.2006, Pavel Cahyna wrote:
> >On Sun, Dec 10, 2006 at 09:45:39PM +0100, Hauke Fath wrote:
> >> With the way unix includes are done traditionally, the #include is
> >> unconditional. Even if <sys/types.h> has been pulled in two dozen times
> >> before by other headers, cpp will still read the file once more, just to
> >> ignore its content.
> >"CPP optimizes even further. It remembers when a header file has a wrapper
> >`#ifndef'. If a subsequent `#include' specifies that header, and the macro
> >in the `#ifndef' is still defined, it does not bother to rescan the file
> >at all."
> I thought about that, since the preprocessor is the obvious place for an
> optimisation, and ISTR C++ does something similar with the #import
AFAIK #import is from Objective-C. With gcc, you need -Wno-import to make
it work w/o emitting warnings on you (I never understood the reason said
warning exists at all).