This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: [v3] install backwards headers in prefix
On Fri, Dec 15, 2000 at 01:12:43PM +0100, Gabriel Dos Reis wrote:
> Alexandre Oliva <oliva@lsd.ic.unicamp.br> writes:
> | On Dec 15, 2000, Nathan Myers <ncm@nospam.cantrip.org> wrote:
> | > The "-iobsolete" flag would add $(prefix)/backward to the set of
> | > directories searched by g++, as you say. I just don't want that to
> | > happen by default. (It might be "-ibackward", instead, for consistency,
> | > or $(prefix)/backward might be changed to $(prefix)/obsolete.)
> |
> | I'm ok with doing it *after* we've had a release in which people are
> | just warned. We don't want to go out gratuitously breaking
> | everybody's previously-working C++ code. Warn first, give them time
> | to adjust their programs, and only then disable the feature by
> | default.
>
> I'm a bit between Nathan's position and Benjamin's: That is provide
> an option to turn off backward headers; and in subsequent release make
> it the default, and eventually remove them completely. Obviously, we
> should be warning in the next release.
This needs careful attention because we don't have a consensus yet.
<iostream.h> is a very special case, as the only backward/ header that
is mentioned in textbooks. That directory has been shoveled full of
all *kinds* of crap, and we don't do users any favors including from
it by default.
Here's what I propose now:
1. In the standard include directory, add a header iostream.h as follows:
#ifndef _GCC_ENORMOUS_IOSTREAM_H_HACK
#define _GCC_ENORMOUS_IOSTREAM_H_HACK
#warning <iostream.h> is obsolete; <iostream> is standard.
#warning Use ``-iobsolete'' to expose obsolete headers.
#include <backward/iostream.h>
#endif
2. Add a compiler option ``-iobsolete'' which adds backward/ to the
standard search path, so this file wouldn't be seen.
Nathan Myers
ncm at cantrip dot org