public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joe Buck <Joe.Buck@synopsys.com>
To: mark@codesourcery.com (Mark Mitchell)
Cc: Joe.Buck@synopsys.COM (Joe Buck), phil@jaj.com (Phil Edwards),
	gcc@gcc.gnu.org (gcc@gcc.gnu.org),
	bkoz@redhat.com (bkoz@redhat.com)
Subject: Re: GCC 3.1 Release
Date: Wed, 10 Apr 2002 07:59:00 -0000	[thread overview]
Message-ID: <200204101455.HAA23170@atrus.synopsys.com> (raw)
In-Reply-To: <510276782.1018417525@localhost> from "Mark Mitchell" at Apr 10, 2002 05:45:25 AM


> > It's a library bug.  It can be fixed by adding explicit comparison
> > operators for the vector and string iterators.
> >
> > The downside of that is that it adds a bit of extra bloat.
> 
> If you can produce a patch for the problem, the I will review it --
> and I'm sure the V3 folks will be happy to do so as well.  It sounds
> like you're in the best position to produce the patch.

I'm going to give you a partial patch.  The reason is that I still
haven't won my battle with a company lawyer who doesn't like the FSF's
patent clause in the contribution document.  So instead I'll show you
how to fix the bug by giving one of the four new templates needed.
That way the size of my contribution will be smaller than the limit
RMS feels comfortable with for folks with no papers on file.

The issue is that, for std::rel_ops::operator!=, the types of the two
arguments are constrained to be the same, while in stl_iterator.h, we
define another operator!= template that allows the two arguments to be
different.  The solution is to add another template definition, as
follows:

*** /u/jbuck/gcc-3.1-pre/include/g++-v3/bits/stl_iterator.h~	Wed Apr 10
13:26:51 2002
--- /u/jbuck/gcc-3.1-pre/include/g++-v3/bits/stl_iterator.h	Wed Apr 10
16:43:56 2002
***************
*** 645,650 ****
--- 645,657 ----
	     const __normal_iterator<_IteratorR, _Container>& __rhs)
    { return !(__lhs == __rhs); }
  
+   // the following is to avoid conflict with std::rel_ops::operator!=
+   template<typename _Iterator, typename _Container>
+   inline bool
+   operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
+	     const __normal_iterator<_Iterator, _Container>& __rhs)
+   { return !(__lhs == __rhs); }
+ 
    // Random access iterator requirements
    template<typename _IteratorL, typename _IteratorR, typename
_Container>
    inline bool 

---------------------------------
This removes the ambiguity: in all cases where the new template can
be used, it wins over the one from rel_ops because it is more specific,
as well as the alternative template in stl_iterator.h.

In addition to the above, we also need the corresponding operator>,
operator>=, and operator<=.

  reply	other threads:[~2002-04-10 14:55 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-02 14:38 Mark Mitchell
2002-04-02 14:47 ` Tom Tromey
2002-04-03 15:06 ` Phil Edwards
2002-04-03 16:08   ` Joe Buck
2002-04-03 17:57     ` Phil Edwards
2002-04-04 10:17     ` Mark Mitchell
2002-04-09  9:48       ` Joe Buck
2002-04-09 10:44         ` Benjamin Kosnik
2002-04-09 11:35         ` Gabriel Dos Reis
2002-04-10  2:37         ` Mark Mitchell
2002-04-10  7:59           ` Joe Buck [this message]
2002-04-10  8:17             ` Gabriel Dos Reis
2002-04-10  8:22               ` Joe Buck
2002-04-10 10:14             ` Mark Mitchell
2002-04-10 11:39               ` Benjamin Kosnik
2002-04-10 11:47                 ` Paolo Carlini
     [not found]                   ` <flwuvfqrme.fsf@jambon.cmla.ens-cachan.fr>
2002-04-12  5:12                     ` Paolo Carlini
2002-04-10 13:01                       ` Gabriel Dos Reis
2002-04-11  6:02                         ` Joe Buck
2002-04-11 14:58                           ` Gabriel Dos Reis
2002-04-10 15:44                 ` Fixing libstdc++/3628 (was: Re: GCC 3.1 Release) Paolo Carlini
2002-04-10 15:49                   ` Phil Edwards
2002-04-10 17:29                     ` Paolo Carlini
2002-04-12 16:10                       ` Mark Mitchell
2002-04-12 18:20                         ` Paolo Carlini
2002-04-15 17:51               ` GCC 3.1 Release Gabriel Dos Reis
2002-04-15 19:36                 ` Gabriel Dos Reis
2002-04-15 19:43                 ` Mark Mitchell
2002-04-15 20:03                   ` Gabriel Dos Reis
2002-04-16  9:49                     ` rel_ops (was Re: GCC 3.1 Release) Joe Buck
2002-04-16 10:04                       ` Mark Mitchell
2002-04-16 10:35                         ` Joe Buck
2002-04-16 10:53                         ` Gabriel Dos Reis
2002-04-16 11:05                           ` Mark Mitchell
2002-04-16 10:49                       ` Gabriel Dos Reis
2002-04-17 11:56                         ` Richard B. Kreckel
2002-04-17 12:15                           ` Joe Buck
2002-04-19 12:54                             ` Gabriel Dos Reis
2002-04-17 12:16                           ` Phil Edwards
2002-04-17 16:54                             ` Joe Buck
2002-04-19 13:19                               ` Gabriel Dos Reis
2002-04-19 15:05                                 ` Joe Buck
2002-04-19 12:59                             ` Gabriel Dos Reis
2002-04-19 14:34                               ` Phil Edwards
2002-04-19 12:47                           ` Gabriel Dos Reis
2002-04-06  7:47 ` GCC 3.1 Release Jason Merrill
2002-04-10 10:17 ` Janis Johnson
2002-04-10 10:24   ` Mark Mitchell
2002-04-10 10:35   ` Christian Jönsson
2002-04-03  2:38 Reichelt
2002-04-03 13:21 ` Mark Mitchell
2002-04-03 23:20 John David Anglin
2002-04-12 18:51 Mark Mitchell
2002-04-13  2:21 ` Neil Booth
2002-04-13  7:50   ` Toon Moene
2002-04-13  8:40     ` Tim Prince
2002-04-13 23:07     ` Bryce McKinlay
2002-04-14 17:04       ` David Edelsohn
2002-04-15 17:19         ` David O'Brien
2002-04-15 18:02           ` David Edelsohn
2002-04-16 17:06           ` Marc Espie
2002-04-22 19:44       ` David O'Brien
2002-04-22 20:11         ` Bryce McKinlay
2002-04-23 11:04           ` David O'Brien
2002-04-23 16:15             ` Bryce McKinlay
2002-04-22 22:25         ` Kaveh R. Ghazi
2002-04-14  1:33     ` H . J . Lu
2002-04-16 17:00     ` Marc Espie
2002-04-17  2:08       ` Gerald Pfeifer
2002-05-17  5:42         ` Marc Espie
2002-05-17 16:19           ` Loren James Rittle
2002-05-17 17:07             ` David O'Brien
2002-05-17 17:08               ` Marc Espie
2002-04-13 13:18 ` Tom Tromey
2002-04-14  6:59   ` Jason Merrill
2002-04-14  7:25     ` Andreas Jaeger
2002-04-14  8:16       ` Jason Merrill
2002-04-15 10:56     ` Geoff Keating
2002-04-15 11:19       ` H . J . Lu
2002-04-16 15:16         ` mark
2002-04-16 15:23           ` H . J . Lu
2002-04-17  2:54             ` Andreas Schwab
2002-04-15 11:36       ` Andreas Jaeger
2002-04-15 11:37         ` Joe Buck
2002-04-15 13:13         ` Geoff Keating
2002-04-15 12:00 ` Andreas Jaeger
2002-04-15 12:01   ` Mark Mitchell
2002-04-15 12:13     ` Michael Matz
2002-04-15 12:22       ` Mark Mitchell
2002-04-15 14:52 ` Geoff Keating
2002-04-15 15:01   ` Mark Mitchell
2002-04-13 13:51 Robert Dewar
2002-04-14 10:34 Robert Dewar
2002-04-15 15:06 Richard Kenner
2002-05-05 11:37 Mark Mitchell
2002-05-05 15:00 ` Florian Weimer
2002-05-06  3:24   ` Andreas Schwab
2002-05-06  7:54     ` Mark Mitchell
2002-05-06  7:57       ` Andreas Schwab
2002-05-06 15:16         ` Mark Mitchell
2002-05-07  1:43           ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200204101455.HAA23170@atrus.synopsys.com \
    --to=joe.buck@synopsys.com \
    --cc=bkoz@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    --cc=phil@jaj.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).