This is the mail archive of the libstdc++@gcc.gnu.org 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: backward -> deprecated


Benjamin Kosnik wrote:-

> I've broken up these objectives into two sets of patches.
> 
> Part one: Put libstdc++-v3/include/backward headers into separate
> backwards directory when installing.
> http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00339.html
> http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00341.html
> 
> Part two: Warn about using backward/*.h files.
> I've got a patch to do this (enclosed in this email), but....
> 
> I'm hoping that you've got a better way to do this. For one, my patch
> doesn't work (I'm not quite sure why: __GXX_DEPRECATED is being
> defined correctly, but I suspect warnings/errors are off for all
> libstdc++ headers?) 

Ah.  I bet that #warning in system headers is suppressed because we
suppress warnings generated in system headers.  Ugh.  This diagnostic
suppression business just continues to get uglier.

It shouldn't be too hard to fix, though.  Give me a day or two.

> In addition, it would be nice if only the first backward header gave
> the deprecated message, instead of every deprecated header giving
> it. Most of the deprecated headers include other deprecated headers,
> so we get cascading warning messages with this approach. I seem to
> remember that g++ has a warning message for -fguiding-decls that only
> warns the first time it finds things, not everytime.

That should be easy.  I believe you have the #warning stuff in a header
file by itself, right?  If you add mulitple include guards to that file,
then the warnings would be issued at most once, I think.  I don't think
you need any command line options for that, unless I misunderstand
the issues.

Neil.


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