[libstdc++] Separate distance(i,j,n) extension from internal routines.

Paolo Carlini pcarlini@unitus.it
Wed Jan 2 04:24:00 GMT 2002


Phil Edwards wrote:

> On Mon, Dec 31, 2001 at 05:28:35PM +0100, Paolo Carlini wrote:
> > I have to questions inspired by your patch:
> > 1- What about backward/iterator.h ? Should we modify it as I have done for backward/algo.h
> > ?
>
> Yeah, probably.  I didn't think of that.  Good catch.

Ok. I will take care of it in a small patch which also fix a minor problem in my backward
header ;-)

> > 2-
> >
> > > +#pragma GCC system_header
> >
> > Could you possibly explain a bit the meaning of this #pragma? I did'nt put it in my
> > ext/algorithm? Should I correct it?
>
> Honestly, I left that in out of habit.  :-)  It's a question to the group
> at large:  should the extension headers also receive this special treatment?
> I could go either way.
>
> What it does is this:  normally GCC will warn when it sees certain constructs
> which are deprecated or not quite standard, especially when -pedantic
> is used.  Since we have to play tricks sometimes inside the implementation,
> but at the same time we don't want the compiler issuing warnings on library
> headers that the user can't do anything about, we flag these headers as
> "system headers," which turns off those warnings for these files only.

Thanks for the explanation.

Probably, then, for consistence, I have to put it in ext/algorithm too. Benjamin?

Paolo.




More information about the Libstdc++ mailing list