public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-09 14:36 Phil Edwards
  0 siblings, 0 replies; 9+ messages in thread
From: Phil Edwards @ 2001-07-09 14:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3628; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: Richard.Kreckel@GiNaC.DE
Cc: gcc-gnats@gcc.gnu.org, Joe Buck <jbuck@racerx.synopsys.com>
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: Mon, 9 Jul 2001 17:27:41 -0400

 On Mon, Jul 09, 2001 at 08:50:34PM -0000, Richard.Kreckel@GiNaC.DE wrote:
 > >Severity:       serious
 > >Priority:       high
 
 Priority high is reserved for maintainers.  Please read the bug-reporting
 instructions.
 
 > using namespace std;
 > using namespace std::rel_ops;
 [...]
 > Q: Does this qulify as a regression?  After all in gcc-2.95 there was no
 > such thing as namespace rel_ops and the applications worked fine.
 
 In 2.95 you could not write "using namespace std::rel_ops" in the first place.
 
 
 Phil
 
 -- 
 Would I had phrases that are not known, utterances that are strange, in
 new language that has not been used, free from repetition, not an utterance
 which has grown stale, which men of old have spoken.
                                      - anonymous Egyptian scribe, c.1700 BC


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-10  9:06 Joe Buck
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Buck @ 2001-07-10  9:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3628; it has been noted by GNATS.

From: Joe Buck <jbuck@synopsys.COM>
To: Richard.Kreckel@ginac.de
Cc: Gabriel.Dos-Reis@cmla.ens-cachan.fr (Gabriel Dos Reis),
        gcc-gnats@gcc.gnu.org
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: Tue, 10 Jul 2001 08:58:31 -0700 (PDT)

 > On 10 Jul 2001, Gabriel Dos Reis wrote:
 > [...]
 > >                                                          The mere fact
 > > that they were sequestred in a separate namespace should be an
 > > indication that they were a mistake.
 > [...]
 > >                          in this particular case, it is well known
 > > that they were a mistake.
 > 
 > Message understood.  Just one final question: Do you have any pointers
 > where I can read more about this "consensus" that they were a mistake?
 
 Probably not, because there is no such consensus.  I, for one, do not
 think that they are a mistake at all, especially since they are now
 segregated into the optional rel_ops namespace, and the software I develop
 tends to use them heavily.  This software runs smoothly on at least five
 different C++ compilers; only gcc-3.0 needs workarounds.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-10  4:46 Richard B. Kreckel
  0 siblings, 0 replies; 9+ messages in thread
From: Richard B. Kreckel @ 2001-07-10  4:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3628; it has been noted by GNATS.

From: "Richard B. Kreckel" <kreckel@ginac.de>
To: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
Cc: gcc-gnats@gcc.gnu.org, Joe Buck <jbuck@racerx.synopsys.com>
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: Tue, 10 Jul 2001 13:36:41 +0200 (CEST)

 On 10 Jul 2001, Gabriel Dos Reis wrote:
 [...]
 >                                                          The mere fact
 > that they were sequestred in a separate namespace should be an
 > indication that they were a mistake.
 [...]
 >                          in this particular case, it is well known
 > that they were a mistake.
 
 Message understood.  Just one final question: Do you have any pointers
 where I can read more about this "consensus" that they were a mistake?
 
 Regards
      -richy.
 -- 
 Richard B. Kreckel
 <Richard.Kreckel@GiNaC.DE>
 < http://www.ginac.de/~kreckel/ >
 
 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-10  4:26 Gabriel Dos Reis
  0 siblings, 0 replies; 9+ messages in thread
From: Gabriel Dos Reis @ 2001-07-10  4:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3628; it has been noted by GNATS.

From: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
To: Richard.Kreckel@ginac.de
Cc: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>,
   gcc-gnats@gcc.gnu.org, Joe Buck <jbuck@racerx.synopsys.com>
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: 10 Jul 2001 13:16:47 +0200

 "Richard B. Kreckel" <kreckel@ginac.de> writes:
 
 | On 9 Jul 2001, Gabriel Dos Reis wrote:
 | [...]
 | > The fix is to leave std::rel_ops where it is and not to touch it.
 | > We need to tell users to forget about std::rel_ops.
 | 
 | What's the reason?
 
 The reason is that operators defined in std::rel_ops are toooo greedy
 and do not interact well with the rest of the language.  The mere fact
 that they were sequestred in a separate namespace should be an
 indication that they were a mistake.
 
 |  Is it impossible to fix this?
 
 Fix what exactly?
 
 |  If so, is there a workaround?
 
 Don't use std::rel_ops.
 
 |  After all, a compiler conforming to section 20.2
 | [lib.utility] should provide std::rel_ops.
 
 Certainly, certainly.  But not just because it is there means you're
 obliged to use it -- and in this particular case, it is well known
 that they were a mistake.
 
 -- Gaby
 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-10  4:26 Gabriel Dos Reis
  0 siblings, 0 replies; 9+ messages in thread
From: Gabriel Dos Reis @ 2001-07-10  4:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3628; it has been noted by GNATS.

From: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
To: "Richard B. Kreckel" <kreckel@ginac.de>
Cc: nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: 10 Jul 2001 13:20:29 +0200

 "Richard B. Kreckel" <kreckel@ginac.de> writes:
 
 |  True.  However, the regression is rather that as of 2.95 you could *use*
 
 The library shipped with gcc-2.95 was nonconformant, and one cannot
 claim regression where we knew w were not correct.
 
 -- Gaby


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-10  3:46 Richard B. Kreckel
  0 siblings, 0 replies; 9+ messages in thread
From: Richard B. Kreckel @ 2001-07-10  3:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3628; it has been noted by GNATS.

From: "Richard B. Kreckel" <kreckel@ginac.de>
To: Phil Edwards <pedwards@disaster.jaj.com>
Cc: gcc-gnats@gcc.gnu.org, Joe Buck <jbuck@racerx.synopsys.com>
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: Tue, 10 Jul 2001 12:38:29 +0200 (CEST)

 On Mon, 9 Jul 2001, Phil Edwards wrote:
 > On Mon, Jul 09, 2001 at 08:50:34PM -0000, Richard.Kreckel@GiNaC.DE wrote:
 > > >Severity:       serious
 > > >Priority:       high
 > 
 > Priority high is reserved for maintainers.  Please read the bug-reporting
 > instructions.
 
 I am sorry.  I copied prio etc. from c++/2405.
 
 > > using namespace std;
 > > using namespace std::rel_ops;
 > [...]
 > > Q: Does this qulify as a regression?  After all in gcc-2.95 there was no
 > > such thing as namespace rel_ops and the applications worked fine.
 > 
 > In 2.95 you could not write "using namespace std::rel_ops" in the first place.
 
 True.  However, the regression is rather that as of 2.95 you could *use*
 the operators from std::rel_ops.  By simply including <utility> it was
 possible to declare operator<() for a class foo and use operator>() and so
 on.  All this was working *together* with relations on vector<>::iterators.
 Now I have to write a using directive for std::rel_ops::, just as I have
 to write using directives for std::.  Mixing vector<>::iterator
 relations with std::rel_ops:: now renders a program
 uncompilable.  Standard-conforming programs that worked perfectly under
 gcc-2.95 with the only little exception that there was no namespace
 std::rel_ops.
 
 IMHO for this reason this bug is a regression.
 
 Regards
      -richy.
 -- 
 Richard B. Kreckel
 <Richard.Kreckel@GiNaC.DE>
 < http://www.ginac.de/~kreckel/ >
 
 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-10  3:46 Richard B. Kreckel
  0 siblings, 0 replies; 9+ messages in thread
From: Richard B. Kreckel @ 2001-07-10  3:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3628; it has been noted by GNATS.

From: "Richard B. Kreckel" <kreckel@ginac.de>
To: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
Cc: gcc-gnats@gcc.gnu.org, Joe Buck <jbuck@racerx.synopsys.com>
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: Tue, 10 Jul 2001 12:44:15 +0200 (CEST)

 On 9 Jul 2001, Gabriel Dos Reis wrote:
 [...]
 > The fix is to leave std::rel_ops where it is and not to touch it.
 > We need to tell users to forget about std::rel_ops.
 
 What's the reason?  Is it impossible to fix this?  If so, is there a
 workaround?  After all, a compiler conforming to section 20.2
 [lib.utility] should provide std::rel_ops.
 
 Regards
     -richy.
 -- 
 Richard B. Kreckel
 <Richard.Kreckel@GiNaC.DE>
 < http://www.ginac.de/~kreckel/ >
 
 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-09 14:06 Gabriel Dos Reis
  0 siblings, 0 replies; 9+ messages in thread
From: Gabriel Dos Reis @ 2001-07-09 14:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3628; it has been noted by GNATS.

From: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
To: Richard.Kreckel@GiNaC.DE
Cc: gcc-gnats@gcc.gnu.org, Joe Buck <jbuck@racerx.synopsys.com>
Subject: Re: c++/3628: "using std::rel_ops" blows up std::vector
Date: 09 Jul 2001 23:05:09 +0200

 Richard.Kreckel@GiNaC.DE writes:
 
 | This bug is related to c++/2405, which has been closed already.
 | Indeed, the example given there seems to be fixed.  But something
 | similar can be easily triggered with the GCC-3.0 release by 
 | this example:
 |  
 | #include <iostream>
 | #include <vector>
 | #include <utility>
 | using namespace std;
 | using namespace std::rel_ops;
 | 
 | int main(void)
 | {
 |     vector<int> iv;
 |     iv.push_back(0);
 |     iv.push_back(1);
 |     //... 
 |     for (vector<int>::iterator i=iv.begin(); i!=iv.end(); ++i) { }
 | }
 | 
 | 
 | Q: Does this qulify as a regression?
 
 With respect to what?  Previous releases of GCC were not conformant in
 that they didn't put the library in the required namespaces.
 
 The fix is to leave std::rel_ops where it is and not to touch it.
 We need to tell users to forget about std::rel_ops.
 
 -- Gaby


^ permalink raw reply	[flat|nested] 9+ messages in thread

* c++/3628: "using std::rel_ops" blows up std::vector
@ 2001-07-09 13:56 Richard.Kreckel
  0 siblings, 0 replies; 9+ messages in thread
From: Richard.Kreckel @ 2001-07-09 13:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: Joe Buck

>Number:         3628
>Category:       c++
>Synopsis:       "using std::rel_ops" blows up std::vector
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 09 13:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Richard Kreckel
>Release:        gcc version 3.0 (release)
>Organization:
>Environment:
Debian GNU/Linux (potato)
>Description:
This bug is related to c++/2405, which has been closed already.
Indeed, the example given there seems to be fixed.  But something
similar can be easily triggered with the GCC-3.0 release by 
this example:
 
#include <iostream>
#include <vector>
#include <utility>
using namespace std;
using namespace std::rel_ops;

int main(void)
{
    vector<int> iv;
    iv.push_back(0);
    iv.push_back(1);
    //... 
    for (vector<int>::iterator i=iv.begin(); i!=iv.end(); ++i) { }
}


Q: Does this qulify as a regression?  After all in gcc-2.95 there was no
such thing as namespace rel_ops and the applications worked fine.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-07-10  9:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-09 14:36 c++/3628: "using std::rel_ops" blows up std::vector Phil Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-07-10  9:06 Joe Buck
2001-07-10  4:46 Richard B. Kreckel
2001-07-10  4:26 Gabriel Dos Reis
2001-07-10  4:26 Gabriel Dos Reis
2001-07-10  3:46 Richard B. Kreckel
2001-07-10  3:46 Richard B. Kreckel
2001-07-09 14:06 Gabriel Dos Reis
2001-07-09 13:56 Richard.Kreckel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).