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]
Other format: [Raw text]

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


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.


> 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.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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