[RFC] libstdc++/5734

Phil Edwards phil@jaj.com
Wed Feb 20 08:14:00 GMT 2002


On Wed, Feb 20, 2002 at 05:04:19PM +0100, Gabriel Dos Reis wrote:
> Phil Edwards <phil@jaj.com> writes:
> 
> | -  If the bug is "we meant to call push_back(foo), but we accidentally called
> |    push_back(), and the compiler should have errored, and it didn't, and it's
> |    a library bug,"
> 
> Yes, that is what he intended.
> 
> |  then I tend to view that as Not Our Problem.  :-)
> 
> On the contrary, it -is- Our Problem. True, we didn't put it there,
> but it is found in our library; it is definitely our problem.

Perhaps I came off as being too cavalier.  Certainly something should
be done.  This kind of thing is what I had in mind when I worked up my
"generalized warning" extension for the compiler:

  void push_back()
     __attribute__((warning("No-argument push_back() is a GNU extension.")))
  {
      ...
  }

I'd rather not remove the function, since a) it can be useful, and b)
I suspect people are already using it.


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



More information about the Libstdc++ mailing list