This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

Re: [v3] install backwards headers in prefix


In article <200012150005.eBF055929957@fillmore.constant.com>,
Benjamin Kosnik <bkoz@redhat.com> writes:

> If there are no major objections, I'd like to check this in today.

[Patch to install backward header files in location searched by default.]

Absolutely no objection to your patch, but should we also consider a
patch that adds some form of this bit of magic to each header file in
libstdc++-v3/include/backward (before including any other files)?

#ifndef _CPP_BACKWARD_DEPRECATED_HEADER_WARNING
#define _CPP_BACKWARD_DEPRECATED_HEADER_WARNING
#warning "this file includes at least one deprecated header,"
#warning "(in general) use <X> form instead of <X.h> form"
#endif

This would print at most one message per compilation unit.  This would
encourage people to move to new style C++ headers without breaking
them or annoying them too much.  We could extend the warning with
details of how to disable it (i.e. compile with
-D_CPP_BACKWARD_DEPRECATED_HEADER_WARNING).

BTW, it is unclear that this approach will play nicely with existing
tests run during `make check-g++'.  I would be willing to investigate
to the point of a complete patch, if this is a desired direction.

Regards,
Loren

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