This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 3.0.2: errno conflict.


> To: mike stump <mrs@windriver.com>
> From: Alexandre Oliva <aoliva@redhat.com>
> Date: 14 Dec 2001 23:51:30 -0200

> Is this supposed to be read as *any* other headers?

Yes.  For example, older wording said:

2    None of the C headers includes any of the other headers,  except  that
  each  C  header  includes  its  corresponding C++ header, as described
  above.  None of the C++ headers includes any of the C  headers.   How-
  ever, any of the C++ headers can include any of the other C++ headers,
  and must include a C++ header that contains any needed definition.99)

  99) Including any one of the C++ headers can introduce all of the  C++
  headers  into a translation unit, or just the one that is named in the
  #include preprocessing directive.

As you can see, the idea and semantic history can clearly be seen.

> What's the point of defining separate headers and what each one
> should include, then?

Just in case the implementation doesn't offer performance when all
headers are included.  Some C++ systems still do that, like ours.

With a good precompiled header scheme, and because everything is in
std, it seems reasonable to just have all std things visible, all the
time.  The rule was put in at least in part to allow for a single
precompiled header that did the entire std library in one shot with no
subdivision.  In fact, we used to have the header <all>:

4 The header <all> includes all the other C++ headers.

But, for some reason, I can't find it anymore.  Hum, I'll have to go
digging to find out why it didn't last.  It seems like a good idea.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]