public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: New STL implementation from SGI
@ 1998-07-13  1:48 Ross Smith
  1998-07-13  8:40 ` Thomas Kunert
  0 siblings, 1 reply; 36+ messages in thread
From: Ross Smith @ 1998-07-13  1:48 UTC (permalink / raw)
  To: egcs

From: Joe Buck <jbuck@synopsys.com>
>
>> Ouch! I've been happily using strings to pass around megabyte-sized
>> blobs of data, but reading about the SGI string class makes me want
>> to run and reread the spec to check on how portable my use is - I
>> thought C++ strings were *supposed* to have reference countng
>> semantics.
>
>This shows why Stepanov's (inventor of STL) notion of specifying
>performance guarantees for library algorithms in standards is so
>important.  Unfortunately this was only done for the STL part; there
are
>no performance guarantees on string operations, I'm afraid.
>(Had the committee required that string assignment is constant time
>and not dependent on length, this would have forced a
reference-counting
>or similar implementation).

Unfortunately, as the design notes for the SGI implementation explain,
reference counted containers are incompatible with thread safety. You
can do tricks to make a compromised implementation of std::basic_string
that is thread safe (in the SGI STL sense), which sometimes reference
counts and sometimes deep copies. (I gather the description of
std::basic_string in the FDIS was carefully tweaked to make this
implementation possible.) But if you require amortised-constant copying,
I think this force reference counting too often; I don't think such an
implementation could be thread safe.

I realise not everyone thinks thread safety is vital, but for me and
many others, thread safety is a killer issue. I had to switch from EGCS
to MSVC because of this; I plan to switch back as soon as a thread safe
libstdc++ is available. I'd just like to put in a plea to the library
implementors to make sure they understand this issue, and not to
compromise thread safety in favour of efficiency. (Or at least to give
us the option.)

--
Ross Smith ................................... mailto:ross.s@ihug.co.nz
.............. The Internet Group, Auckland, New Zealand ..............
  "Remember when we told you there was no future? Well, this is it."
                                                        -- Blank Reg



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

* Re: New STL implementation from SGI
  1998-07-13  1:48 New STL implementation from SGI Ross Smith
@ 1998-07-13  8:40 ` Thomas Kunert
  1998-07-13 15:28   ` Joe Buck
  0 siblings, 1 reply; 36+ messages in thread
From: Thomas Kunert @ 1998-07-13  8:40 UTC (permalink / raw)
  To: egcs

I hope this doesn't sound too stupid:

What is the purpose of reference-counted strings? For portable code, one
cannot depend on fast copy-operations and if one writes code especially
for egcs, rope is better anyway. In neither case reference counting
would be very useful.

--
Thomas Kunert

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

* Re: New STL implementation from SGI
  1998-07-13  8:40 ` Thomas Kunert
@ 1998-07-13 15:28   ` Joe Buck
  0 siblings, 0 replies; 36+ messages in thread
From: Joe Buck @ 1998-07-13 15:28 UTC (permalink / raw)
  To: Thomas Kunert; +Cc: egcs

> What is the purpose of reference-counted strings?

In many applications, they are reasonably fast.

> For portable code, one cannot depend on fast copy-operations ...

meaning that if egcs uses a reference-counted string class, people moving
from a class that works like Microsoft CString (always deep copy) will
see a speedup.  In practice, since the committee said nothing about speed,
people who need speed can't use the standard string class at all; they
would need to design a custom class or else specifically choose which
class to use on a per-platform basis.

> and if one writes code especially for egcs, rope is better anyway.

Not always.  For many operations where the current egcs string, or the SGI
string, are O(1), rope is O(log(N)).  See the SGI documentation on rope
for a discussion.  Some rope operations are slow.  But rope will run on
many compilers, not just egcs, so using rope isn't that unportable.



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

* Re: New STL implementation from SGI
  1998-07-13 17:29 Mike Stump
@ 1998-07-14  8:41 ` Joe Buck
  0 siblings, 0 replies; 36+ messages in thread
From: Joe Buck @ 1998-07-14  8:41 UTC (permalink / raw)
  To: Mike Stump; +Cc: egcs, kunert

> > and if one writes code especially for egcs, rope is better
> > anyway.
> 
> Ah, but that class is nonstandard (so far).  We might add it next time.

We already ship the rope class, so there is nothing to add. 


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

* Re: New STL implementation from SGI
@ 1998-07-13 17:29 Mike Stump
  0 siblings, 0 replies; 36+ messages in thread
From: Mike Stump @ 1998-07-13 17:29 UTC (permalink / raw)
  To: egcs, ross.s

> From: "Ross Smith" <ross.s@ihug.co.nz>
> To: <egcs@cygnus.com>
> Date: Mon, 13 Jul 1998 17:44:24 +1200

> I realise not everyone thinks thread safety is vital, but for me and
> many others, thread safety is a killer issue. I had to switch from
> EGCS to MSVC because of this; I plan to switch back as soon as a
> thread safe libstdc++ is available. I'd just like to put in a plea
> to the library implementors to make sure they understand this issue,
> and not to compromise thread safety in favour of efficiency. (Or at
> least to give us the option.)

If would be useful for us for you to add to the g++int.texi file a
chapter on thread safety, or more importantly, what isn't that you
think should be.  There are some of us that can do the work, if you
sensitize us to the issues.

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

* Re: New STL implementation from SGI
@ 1998-07-13 17:29 Mike Stump
  1998-07-14  8:41 ` Joe Buck
  0 siblings, 1 reply; 36+ messages in thread
From: Mike Stump @ 1998-07-13 17:29 UTC (permalink / raw)
  To: egcs, kunert

> Date: Mon, 13 Jul 1998 16:32:55 +0200
> From: Thomas Kunert <kunert@physik.tu-dresden.de>
> To: egcs@cygnus.com

> I hope this doesn't sound too stupid:

> What is the purpose of reference-counted strings? For portable code,
> one cannot depend on fast copy-operations

This is called a ``quality of implementation'' issue.  Sure, people
cannot rely safely of such things, but some people just don't care a
whole lot about performance and they are happy to give money to the
compiler company that gives them the best performace for their
application.

Or look at it a different way, sure you can portably rely upon
reference counted strings, because if a C++ compiler doesn't offer it,
you can just use g++, as _it_ is portable (for some definition of
portable).

> and if one writes code especially for egcs, rope is better
> anyway.

Ah, but that class is nonstandard (so far).  We might add it next time.

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

* Re: New STL implementation from SGI
@ 1998-07-11  6:31 Josh Stern
  0 siblings, 0 replies; 36+ messages in thread
From: Josh Stern @ 1998-07-11  6:31 UTC (permalink / raw)
  To: jbuck, pnagel; +Cc: egcs

>> I'm all for including different implementations of the string class. 
>> How about renaming basic_string to shallow_copy_basic_string and  
>> deep_copy_basic_string respectively, and then have a mechanism to 
>> choose which one is typedefed to basic_string - thereby allowing one 
>> to write code that uses *both*? 
                                     
>Ah, but there is a *third* implementation possibility: you could base  
>your string class on the SGI "rope" class, which gives you yet another 
>performance tradeoff.  I supposed you could call the rope implementation 
>"lots_of_pieces_string".

>Since the standard says there is just basic_string, any chosen mechanism   
>would have to compile standard programs and not pollute the namespace.  
>If you just do a #define, it is easy -- but the user has to use the same   
>#define for everything in the program.  If there is a controllable   
>typedef, 

The idea of user control is good.

>you could do different definitions in different compilation 
>units as long as you don't pass strings between units.  

If I was working on a multi-user project, I'd be scared of the
confusion resulting from such a restriction (I'd like to name
the classes different things that could turn out to be typedef'd
to the same implementation).  But the idea
of using different versions to address implementation tradeoffs comes
up over and over.  For instance, with the STL map/set/multimap etc.
classes there is a tradeoff between, on the one hand, best
small project speed and readability with a pure template solution,
and on the other hand, best space efficiency with a solution that
maps different template classes to common code based on
manipulation of void* pointers (I don't know whether
that runs into problems with exceptions, but the idea is clear).

One idea to consider is distributing a directory of c++contrib code
that #ifdef'd typedefs in user code could access based on the 
macro-defined compiler name and version number.  That should
make it easy to work around portability issues.


- Josh



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

* Re: New STL implementation from SGI
       [not found]                 ` <Pine.LNX.3.96.980710103559.18309h-100000.cygnus.egcs@basilisk>
@ 1998-07-10 20:04                   ` Nathan Myers
  0 siblings, 0 replies; 36+ messages in thread
From: Nathan Myers @ 1998-07-10 20:04 UTC (permalink / raw)
  To: egcs

Pieter Nagel wrote:
> 
> On Thu, 9 Jul 1998, Joe Buck wrote:
> 
> > Actually I suspect that the SGI version will be slower as well as require
> > more memory in some applications: if copying strings from place to place
> > is common, but concatenation is less common,
> 
> Ouch! I've been happily using strings to pass around megabyte-sized
> blobs of data, but reading about the SGI string class makes me want
> to run and reread the spec to check on how portable my use is - I
> thought C++ strings were *supposed* to have reference countng
> semantics.

Unfortunately the (sub-)committee waffled on this issue, and tried to write
the spec to tolerate either implementation, to the detriment of both.
(basic_string<> is easily the least inspiring component in the library.)

If you want a reliably reference-counting string, the "rope" from SGI-STL
might be your best bet.  It will be in the rewritten library.

> I'm all for including different implementations of the string class.
> How about renaming basic_string to shallow_copy_basic_string and
> deep_copy_basic_string respectively, and then have a mechanism to
> choose which one is typedefed to basic_string - thereby allowing one
> to write code that uses *both*?

Unfortunately C++ has no aliasing feature for templates.  However, it's
possible that basic_string<> could be *derived* from one of the above.
I will look into this; it would require some cooperation from Matt at SGI.

The ideal would be if both could be present at once (though in different
files), but I doubt that is possible in this case.

Nathan Myers
ncm@cantrip.org

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

* Re: New STL implementation from SGI
       [not found]               ` <199807100002.RAA10346.cygnus.egcs@atrus.synopsys.com>
@ 1998-07-10 16:49                 ` Nathan Myers
  0 siblings, 0 replies; 36+ messages in thread
From: Nathan Myers @ 1998-07-10 16:49 UTC (permalink / raw)
  To: egcs

Joe Buck wrote:

> > To decide which version we use somebody will have to make measurements
> > with a thread-safe version of either implementation.  My guess is that
> > the SGI version is faster since we don't have to care for locking.
> 
> Actually I suspect that the SGI version will be slower as well as require
> more memory in some applications: if copying strings from place to place
> is common, but concatenation is less common, a deep copy may cost more
> than a reference count adjustment. 

In particular, returning a string from a function will be substantially
more expensive.

> But other operations are faster
> (e.g. get the string length without any indirection, c_str() is free etc).
> Because of the different implementation tradeoffs, just tell me which
> implementation you want to win and I will write you an appropriate
> benchmark. :-)

Compared with the rewritten version, length() or c_str() should be about 
equally fast in either case. 

Nathan Myers
ncm@cantrip.org

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

* Re: New STL implementation from SGI
  1998-07-10  6:04                 ` Pieter Nagel
@ 1998-07-10 13:32                   ` Joe Buck
  0 siblings, 0 replies; 36+ messages in thread
From: Joe Buck @ 1998-07-10 13:32 UTC (permalink / raw)
  To: pnagel; +Cc: egcs

> Ouch! I've been happily using strings to pass around megabyte-sized
> blobs of data, but reading about the SGI string class makes me want
> to run and reread the spec to check on how portable my use is - I
> thought C++ strings were *supposed* to have reference countng
> semantics.

This shows why Stepanov's (inventor of STL) notion of specifying
performance guarantees for library algorithms in standards is so
important.  Unfortunately this was only done for the STL part; there are
no performance guarantees on string operations, I'm afraid.
(Had the committee required that string assignment is constant time
and not dependent on length, this would have forced a reference-counting
or similar implementation).

> I'm all for including different implementations of the string class.
> How about renaming basic_string to shallow_copy_basic_string and
> deep_copy_basic_string respectively, and then have a mechanism to
> choose which one is typedefed to basic_string - thereby allowing one
> to write code that uses *both*?

Ah, but there is a *third* implementation possibility: you could base
your string class on the SGI "rope" class, which gives you yet another
performance tradeoff.  I supposed you could call the rope implementation
"lots_of_pieces_string".

Since the standard says there is just basic_string, any chosen mechanism
would have to compile standard programs and not pollute the namespace.
If you just do a #define, it is easy -- but the user has to use the same
#define for everything in the program.  If there is a controllable
typedef, you could do different definitions in different compilation units
as long as you don't pass strings between units.

Of course, constructors could be added to convert one form of string into
another -- however, we would have to be careful not to introduce
ambiguities by doing this.

But: some of us have to write code that runs through multiple compilers,
so we can only assume that there is one string class, with unknown
implementation.





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

* Re: New STL implementation from SGI
  1998-07-09 17:02               ` Joe Buck
  1998-07-09 17:40                 ` Ulrich Drepper
@ 1998-07-10  6:04                 ` Pieter Nagel
  1998-07-10 13:32                   ` Joe Buck
       [not found]                 ` <Pine.LNX.3.96.980710103559.18309h-100000.cygnus.egcs@basilisk>
  2 siblings, 1 reply; 36+ messages in thread
From: Pieter Nagel @ 1998-07-10  6:04 UTC (permalink / raw)
  To: egcs

On Thu, 9 Jul 1998, Joe Buck wrote:

> Actually I suspect that the SGI version will be slower as well as require
> more memory in some applications: if copying strings from place to place
> is common, but concatenation is less common,

Ouch! I've been happily using strings to pass around megabyte-sized
blobs of data, but reading about the SGI string class makes me want
to run and reread the spec to check on how portable my use is - I
thought C++ strings were *supposed* to have reference countng
semantics.

I'm all for including different implementations of the string class.
How about renaming basic_string to shallow_copy_basic_string and
deep_copy_basic_string respectively, and then have a mechanism to
choose which one is typedefed to basic_string - thereby allowing one
to write code that uses *both*?

-- 
     ,_
     /_)              /| /
    /   i e t e r    / |/ a g e l



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

* Re: New STL implementation from SGI
  1998-07-09 17:02               ` Joe Buck
@ 1998-07-09 17:40                 ` Ulrich Drepper
  1998-07-10  6:04                 ` Pieter Nagel
       [not found]                 ` <Pine.LNX.3.96.980710103559.18309h-100000.cygnus.egcs@basilisk>
  2 siblings, 0 replies; 36+ messages in thread
From: Ulrich Drepper @ 1998-07-09 17:40 UTC (permalink / raw)
  To: Joe Buck; +Cc: egcs

Joe Buck <jbuck@Synopsys.COM> writes:

> I'd like to encourage the developers (e.g. you and Nathan) to make
> available even partially working code so that others can assist with
> testing, suggestions for improvement, etc.

You can believe me that I would prefer tis as well.  If nothing bad
happens this wish will be reality soon.  The problem is that Nathan is
currently working almost alone on this since I'm working on a
different project in the moment.

> Because of the different implementation tradeoffs, just tell me which
> implementation you want to win and I will write you an appropriate
> benchmark. :-)

This is why I want to see both implementations in the final package.
But I fear that we'll get compatibility problems then since different
machines running the same system can have different string code from
the instanciations in the libstdc++.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

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

* Re: New STL implementation from SGI
  1998-07-09 11:18             ` Ulrich Drepper
@ 1998-07-09 17:02               ` Joe Buck
  1998-07-09 17:40                 ` Ulrich Drepper
                                   ` (2 more replies)
       [not found]               ` <199807100002.RAA10346.cygnus.egcs@atrus.synopsys.com>
  1 sibling, 3 replies; 36+ messages in thread
From: Joe Buck @ 1998-07-09 17:02 UTC (permalink / raw)
  To: drepper; +Cc: egcs

I wrote:

> > The real issue (whenever we decide to pick up the new STL) is the string
> > class: do we use the SGI one, the existing one, or the one Ulrich Drepper
> > is working on?

Ulrich replies:

> Actually Nathan is doing the work.  Anyhow, we will not completely
> abandom the version we have in the moment since on some platforms
> space consumption is more important than speed and here the current
> implementation we have is superior.

Yes, the SGI implementation is basically a slightly different
vector<charT> that is always null-terminated, meaning that there is no
reference counting and string copy is a deep copy operation, but
conversion to/from const char* is cheaper.  I would prefer something that
works more like what we have (reference counting).

However, I am discouraged by the fact that we still don't have anything
available for testing.  I'd like to encourage the developers (e.g. you and
Nathan) to make available even partially working code so that others can
assist with testing, suggestions for improvement, etc.

> To decide which version we use somebody will have to make measurements
> with a thread-safe version of either implementation.  My guess is that
> the SGI version is faster since we don't have to care for locking.

Actually I suspect that the SGI version will be slower as well as require
more memory in some applications: if copying strings from place to place
is common, but concatenation is less common, a deep copy may cost more
than a reference count adjustment.  But other operations are faster
(e.g. get the string length without any indirection, c_str() is free etc).
Because of the different implementation tradeoffs, just tell me which
implementation you want to win and I will write you an appropriate
benchmark. :-)




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

* Re: New STL implementation from SGI
       [not found]           ` <199807081547.IAA06604.cygnus.egcs@atrus.synopsys.com>
@ 1998-07-09 11:18             ` Ulrich Drepper
  1998-07-09 17:02               ` Joe Buck
       [not found]               ` <199807100002.RAA10346.cygnus.egcs@atrus.synopsys.com>
  0 siblings, 2 replies; 36+ messages in thread
From: Ulrich Drepper @ 1998-07-09 11:18 UTC (permalink / raw)
  To: egcs

jbuck@synopsys.com (Joe Buck) writes:

> The real issue (whenever we decide to pick up the new STL) is the string
> class: do we use the SGI one, the existing one, or the one Ulrich Drepper
> is working on?

Actually Nathan is doing the work.  Anyhow, we will not completely
abandom the version we have in the moment since on some platforms
space consumption is more important than speed and here the current
implementation we have is superior.

To decide which version we use somebody will have to make measurements
with a thread-safe version of either implementation.  My guess is that
the SGI version is faster since we don't have to care for locking.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

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

* Re: New STL implementation from SGI
       [not found]         ` <6669.899795405.cygnus.egcs@hurl.cygnus.com>
@ 1998-07-08 16:34           ` Nathan Myers
  0 siblings, 0 replies; 36+ messages in thread
From: Nathan Myers @ 1998-07-08 16:34 UTC (permalink / raw)
  To: egcs

Jeffrey A Law wrote:
> IMHO, it's unwise to try and
> suck in a new STL release at this point.  Unless we want to push back
> the release schedule again (which then runs the risk of hitting the
> next Cygnus EOQ).
> 
> Getting the egcs-1.1 release out in August is still the target, if we
> miss it, it's likely to fall into October due to Cygnus EOQ concerns.

The new release fixes bugs and is substantially closer to conformance.  
I'd like to see somebody try integrating it before any decision is made. 
It probably will fold in easily, as SGI has been responsive to the needs 
of Egcs users.  The version in the rewrite (which is identical in all but
packaging details) passes the test suites fine.

People using STL have learned not to expect binary compatibility from one 
release to the next.  Eventually it will stabilize, but it does no harm
to remind people that we're not near there yet.

Nathan Myers
ncm@cygnus.com

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

* Re: New STL implementation from SGI
  1998-07-08  3:16     ` Gerald Pfeifer
@ 1998-07-08 16:34       ` Branko Cibej
  0 siblings, 0 replies; 36+ messages in thread
From: Branko Cibej @ 1998-07-08 16:34 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: egcs

Gerald Pfeifer wrote:

> I would also like to see those instances fixed, where EGCS prints
> -- more or less warranted -- warnings for code in the STL headers.

I guess STL headers would count as system headers as far as egcs is
concerned. In that case, this patch:

      http://www.cygnus.com/ml/egcs/1998-Jun/1137.html

could help. I don't know its status, though.

--
Branko Cibej   <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
phone: (++386 61) 186 53 49  fax: (++386 61) 186 52 70



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

* Re: New STL implementation from SGI
  1998-07-07 12:51         ` Martin von Loewis
  1998-07-07 22:54           ` H.J. Lu
@ 1998-07-08  9:58           ` Joe Buck
       [not found]           ` <199807081547.IAA06604.cygnus.egcs@atrus.synopsys.com>
  2 siblings, 0 replies; 36+ messages in thread
From: Joe Buck @ 1998-07-08  9:58 UTC (permalink / raw)
  To: Martin von Loewis; +Cc: carlo, egcs

> > I'd like to see the latest STL be added to egcs-1.1 too.
> > Or at least we should try it, and see if anything obvious
> > breaks.
> 
> I have a concern about binary compatibility. Most likely,
> instantiations of templates will introduce slight
> incompatibilities. So people might have to recompile even more stuff,
> or run into non-obvious traps.

I'm afraid that egcs-1.1 will already break binary compatibility on at
least some platforms (linux-glibc2), because of thread-safe exceptions.

> So I'd rather keep the incompatible changes together, so that people
> will surely know at link time that things changed, instead of breaking
> everything at every release.

The real issue (whenever we decide to pick up the new STL) is the string
class: do we use the SGI one, the existing one, or the one Ulrich Drepper
is working on?



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

* Re: New STL implementation from SGI
  1998-07-05 19:46   ` Nathan Myers
@ 1998-07-08  3:16     ` Gerald Pfeifer
  1998-07-08 16:34       ` Branko Cibej
  0 siblings, 1 reply; 36+ messages in thread
From: Gerald Pfeifer @ 1998-07-08  3:16 UTC (permalink / raw)
  To: Nathan Myers; +Cc: egcs

On Sun, 5 Jul 1998, Nathan Myers wrote:
> Things left to do include putting "feature-select" macro guards around
> the non-standard extensions and renaming some types and templates [...]

I would also like to see those instances fixed, where EGCS prints
-- more or less warranted -- warnings for code in the STL headers. 

I definitely would be willing to contribute in that direction, just
let me know...

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/


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

* Re: New STL implementation from SGI
  1998-07-07 12:51         ` Martin von Loewis
@ 1998-07-07 22:54           ` H.J. Lu
  1998-07-08  9:58           ` Joe Buck
       [not found]           ` <199807081547.IAA06604.cygnus.egcs@atrus.synopsys.com>
  2 siblings, 0 replies; 36+ messages in thread
From: H.J. Lu @ 1998-07-07 22:54 UTC (permalink / raw)
  To: Martin von Loewis; +Cc: carlo, egcs

> 
> > I'd like to see the latest STL be added to egcs-1.1 too.
> > Or at least we should try it, and see if anything obvious
> > breaks.
> 
> I have a concern about binary compatibility. Most likely,
> instantiations of templates will introduce slight
> incompatibilities. So people might have to recompile even more stuff,
> or run into non-obvious traps.
> 
> So I'd rather keep the incompatible changes together, so that people
> will surely know at link time that things changed, instead of breaking
> everything at every release.
> 

That is what is my interface patch for.

-- 
H.J. Lu (hjl@gnu.org)

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

* Re: New STL implementation from SGI
@ 1998-07-07 22:54 Josh Stern
  0 siblings, 0 replies; 36+ messages in thread
From: Josh Stern @ 1998-07-07 22:54 UTC (permalink / raw)
  To: carlo, martin; +Cc: egcs

If the new STL is not obviously incompatible/broken when used
with egcs 1.1, how about making the choice of which STL is built
and installed a configure option?  The extra src would only
be a small percentage of the total package.  The configure could
also bump the minor version number on libstdc++.

- Josh

jstern@citilink.com

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

* Re: New STL implementation from SGI
  1998-07-07  5:29       ` Carlo Wood
  1998-07-07 10:14         ` B. James Phillippe
@ 1998-07-07 12:51         ` Martin von Loewis
  1998-07-07 22:54           ` H.J. Lu
                             ` (2 more replies)
  1 sibling, 3 replies; 36+ messages in thread
From: Martin von Loewis @ 1998-07-07 12:51 UTC (permalink / raw)
  To: carlo; +Cc: egcs

> I'd like to see the latest STL be added to egcs-1.1 too.
> Or at least we should try it, and see if anything obvious
> breaks.

I have a concern about binary compatibility. Most likely,
instantiations of templates will introduce slight
incompatibilities. So people might have to recompile even more stuff,
or run into non-obvious traps.

So I'd rather keep the incompatible changes together, so that people
will surely know at link time that things changed, instead of breaking
everything at every release.

Of course, there are claims that egcs g++ 1.1 will be incompatible on
some platforms, anyway, so this might not be an issue.

Martin

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

* Re: New STL implementation from SGI
  1998-07-07  5:29       ` Carlo Wood
@ 1998-07-07 10:14         ` B. James Phillippe
  1998-07-07 12:51         ` Martin von Loewis
  1 sibling, 0 replies; 36+ messages in thread
From: B. James Phillippe @ 1998-07-07 10:14 UTC (permalink / raw)
  To: Carlo Wood; +Cc: egcs

On Tue, 7 Jul 1998, Carlo Wood wrote:

> I'd like to see the latest STL be added to egcs-1.1 too.
> Or at least we should try it, and see if anything obvious
> breaks.  Chances are that it will work immedeately, and
> then a bug of a more difficult type (that temporally will
> stay hidden) isn't as bad as releasing the compiler with
> an old STL.
> 
> Just my $0.02,

If "me too"'s count here, I'll throw my two cents in with yours.  I think
it's a bigger deal to get the STL in; too many people are starting to ask
for it.

-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan


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

* Re: New STL implementation from SGI
  1998-07-06 18:52     ` Alex Buell
@ 1998-07-07  5:29       ` Carlo Wood
  1998-07-07 10:14         ` B. James Phillippe
  1998-07-07 12:51         ` Martin von Loewis
  0 siblings, 2 replies; 36+ messages in thread
From: Carlo Wood @ 1998-07-07  5:29 UTC (permalink / raw)
  To: egcs

I'd like to see the latest STL be added to egcs-1.1 too.
Or at least we should try it, and see if anything obvious
breaks.  Chances are that it will work immedeately, and
then a bug of a more difficult type (that temporally will
stay hidden) isn't as bad as releasing the compiler with
an old STL.

Just my $0.02,

 Carlo Wood  <carlo@runaway.xs4all.nl>

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

* Re: New STL implementation from SGI
  1998-07-06  8:09   ` H.J. Lu
  1998-07-06 14:48     ` Jeffrey A Law
  1998-07-06 18:52     ` Alex Buell
@ 1998-07-07  1:12     ` Joe Buck
  1998-07-06 18:10       ` H.J. Lu
  2 siblings, 1 reply; 36+ messages in thread
From: Joe Buck @ 1998-07-07  1:12 UTC (permalink / raw)
  To: H.J. Lu; +Cc: law, peter.simons, egcs

> > I think upgrading the STL code would be wise for egcs-1.2.  
> > 
> 
> What is the time table for 1.2?

Possibly we should attempt a smaller cycle for 1.2.  But I'd like for
1.2 to be the release which finally has the new libstdc++.

> FYI, I know some C++ codes use auto_ptr.
> I have to fix it in egcs 1.0.3.

And I know some codes that use namespaces.  I would like to get the
new STL out too, but you have to decide if 1.1 is to be a stable
release or not.

Now, for classes that previously did not exist (like auto_ptr) it would
be risk-free to add them from the new STL -- it cannot break any old
code.  If you only want auto_ptr, then we could do that.

> It may be a good idea
> to include a better STL in egcs 1.1, since more and more C++ codes
> are using STL, even if it means 1.1.1.

We can't introduce new features into 1.1.1.  If we do something major
like a new STL, it is 1.2.  Note that this doesn't say anything about
timing; 1.2 could come one month after 1.1 if it is ready.

> Delaying it means people
> may say "don't use STL in egcs and get a real one in stead".

I think that the new STL should go into the snapshots ASAP.  But it
can't go directly into the release -- that would be irresponsible
(inadequate testing).

> As far
> as they know, STL in egcs is broken since 1.0 and it is broken.

What do you mean?  The existing STL works quite well.  True, there
have been improvements.

We will have to mention that the egcs 1.1 release is an old SGI release,
which is kind of embarrassing.  If you want the new SGI release into
egcs 1.1, this is possible -- *if* we move all the dates back (feature
freeze will have been extended).

Unfortunately there are some issues: the new SGI STL has a standard
string class.  But we already have a string class.  And Uli has a new
(yet a third) standard string class.  Which one should we use?

Maybe it's best to release what we have, and *then* settle issues like
this.



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

* Re: New STL implementation from SGI
  1998-07-06 22:11       ` Ben Scherrey
@ 1998-07-07  0:14         ` Jeffrey A Law
       [not found]         ` <6669.899795405.cygnus.egcs@hurl.cygnus.com>
  1 sibling, 0 replies; 36+ messages in thread
From: Jeffrey A Law @ 1998-07-07  0:14 UTC (permalink / raw)
  To: scherrey; +Cc: egcs

  In message < 35A19F9D.F5D3B9CC@gte.net >you write:
  > I'm not sure if I fully understand what we're talking about. Do you
  > mean integrating the latest STL for distribution or for use in actually
  > implementing the compiler?
No, integrating it for use by folks that use egcs.


  > 	I agree that bringing it in might not be warranted for internal use.
  > However, If we're talking about using it for distribution of the STL
  > library than I'd hope that it made it into 1.1 as everyone out there is
  > going to be trying to build it on their own anyway.
That's fine, they're welcome to try, but IMHO, it's unwise to try and
suck in a new STL release at this point.  Unless we want to push back
the release schedule again (which then runs the risk of hitting the
next Cygnus EOQ).

Getting the egcs-1.1 release out in August is still the target, if we
miss it, it's likely to fall into October due to Cygnus EOQ concerns.


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

* Re: New STL implementation from SGI
  1998-07-06 14:48     ` Jeffrey A Law
@ 1998-07-06 22:11       ` Ben Scherrey
  1998-07-07  0:14         ` Jeffrey A Law
       [not found]         ` <6669.899795405.cygnus.egcs@hurl.cygnus.com>
  0 siblings, 2 replies; 36+ messages in thread
From: Ben Scherrey @ 1998-07-06 22:11 UTC (permalink / raw)
  To: law, egcs

I'm not sure if I fully understand what we're talking about. Do you
mean integrating the latest STL for distribution or for use in actually
implementing the compiler? I haven't looked to see if egcs is using any
STL code internally so this may be an ignorant question.
	I agree that bringing it in might not be warranted for internal use.
However, If we're talking about using it for distribution of the STL
library than I'd hope that it made it into 1.1 as everyone out there is
going to be trying to build it on their own anyway.

	thanx,

		Ben Scherrey
		Proteus Technologies, Inc.

Jeffrey A Law wrote:
> Yes, I fully understand this issue.  I just don't think now is the
> time to bring in a bunch of code we have never built or tested.
> 
> Ultimiately it's Jason's call, but I would personally recommend against
> importing this code for egcs-1.1.
> jeff

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

* Re: New STL implementation from SGI
  1998-07-06  8:09   ` H.J. Lu
  1998-07-06 14:48     ` Jeffrey A Law
@ 1998-07-06 18:52     ` Alex Buell
  1998-07-07  5:29       ` Carlo Wood
  1998-07-07  1:12     ` Joe Buck
  2 siblings, 1 reply; 36+ messages in thread
From: Alex Buell @ 1998-07-06 18:52 UTC (permalink / raw)
  To: Linux-Egcs

On Mon, 6 Jul 1998, H.J. Lu wrote:

> What is the time table for 1.2? FYI, I know some C++ codes use
> auto_ptr. I have to fix it in egcs 1.0.3. It may be a good idea
> to include a better STL in egcs 1.1, since more and more C++ codes
> are using STL, even if it means 1.1.1. Delaying it means people
> may say "don't use STL in egcs and get a real one in stead". As far
> as they know, STL in egcs is broken since 1.0 and it is broken.

Seconded, the sooner this is included in egcs, the better, as people
won't have to go commercial for their STL needs.  

Cheers,
Alex
--
 /\_/\  Legalise cannabis now! 
( o.o ) Smoke some cannabis today!
 > ^ <  Peace, Love, Unity and Respect to all.

http://www.tahallah.demon.co.uk


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

* Re: New STL implementation from SGI
  1998-07-07  1:12     ` Joe Buck
@ 1998-07-06 18:10       ` H.J. Lu
  0 siblings, 0 replies; 36+ messages in thread
From: H.J. Lu @ 1998-07-06 18:10 UTC (permalink / raw)
  To: Joe Buck; +Cc: law, peter.simons, egcs

> 
> 
> > > I think upgrading the STL code would be wise for egcs-1.2.  
> > > 
> > 
> > What is the time table for 1.2?
> 
> Possibly we should attempt a smaller cycle for 1.2.  But I'd like for
> 1.2 to be the release which finally has the new libstdc++.
> 
> > FYI, I know some C++ codes use auto_ptr.
> > I have to fix it in egcs 1.0.3.
> 
> And I know some codes that use namespaces.  I would like to get the
> new STL out too, but you have to decide if 1.1 is to be a stable
> release or not.
> 
> Now, for classes that previously did not exist (like auto_ptr) it would
> be risk-free to add them from the new STL -- it cannot break any old
> code.  If you only want auto_ptr, then we could do that.
> 

Yes.

H.J.

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

* Re: New STL implementation from SGI
  1998-07-06  8:09   ` H.J. Lu
@ 1998-07-06 14:48     ` Jeffrey A Law
  1998-07-06 22:11       ` Ben Scherrey
  1998-07-06 18:52     ` Alex Buell
  1998-07-07  1:12     ` Joe Buck
  2 siblings, 1 reply; 36+ messages in thread
From: Jeffrey A Law @ 1998-07-06 14:48 UTC (permalink / raw)
  To: H.J. Lu; +Cc: peter.simons, egcs

  In message < m0ytCni-000266C@ocean.lucon.org >you write:
  > What is the time table for 1.2?
It depends on how things go with egcs-1.1.  We don't know yet.

   > FYI, I know some C++ codes use
  > auto_ptr. I have to fix it in egcs 1.0.3. It may be a good idea
  > to include a better STL in egcs 1.1, since more and more C++ codes
  > are using STL, even if it means 1.1.1. Delaying it means people
  > may say "don't use STL in egcs and get a real one in stead". As far
  > as they know, STL in egcs is broken since 1.0 and it is broken.
Yes, I fully understand this issue.  I just don't think now is the
time to bring in a bunch of code we have never built or tested.

Ultimiately it's Jason's call, but I would personally recommend against
importing this code for egcs-1.1.
jeff

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

* Re: New STL implementation from SGI
  1998-07-06  4:08 ` Jeffrey A Law
@ 1998-07-06  8:09   ` H.J. Lu
  1998-07-06 14:48     ` Jeffrey A Law
                       ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: H.J. Lu @ 1998-07-06  8:09 UTC (permalink / raw)
  To: law; +Cc: peter.simons, egcs

> 
> 
>   In message < x7sokk1h55.fsf@peti.gmd.de >you write:
>   > -----BEGIN PGP SIGNED MESSAGE-----
>   > 
>   > I just checked the latest STL release from SGI and was pleased to see
>   > that auto_ptr and a few other things have been fixed/added. I notice,
>   > though, that the latest egcs snapshot (obtained via CVS today) does
>   > still have the old STL implementation. Are there any plans to upgrade
>   > to the new STL before the next release?
> I doubt we'd want to make that kind of change since egcs-1.1 is feature
> frozen.
> 
> I think upgrading the STL code would be wise for egcs-1.2.  
> 

What is the time table for 1.2? FYI, I know some C++ codes use
auto_ptr. I have to fix it in egcs 1.0.3. It may be a good idea
to include a better STL in egcs 1.1, since more and more C++ codes
are using STL, even if it means 1.1.1. Delaying it means people
may say "don't use STL in egcs and get a real one in stead". As far
as they know, STL in egcs is broken since 1.0 and it is broken.


-- 
H.J. Lu (hjl@gnu.org)

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

* Re: New STL implementation from SGI
  1998-07-02  7:08 Peter Simons
@ 1998-07-06  4:08 ` Jeffrey A Law
  1998-07-06  8:09   ` H.J. Lu
  0 siblings, 1 reply; 36+ messages in thread
From: Jeffrey A Law @ 1998-07-06  4:08 UTC (permalink / raw)
  To: Peter Simons; +Cc: egcs

  In message < x7sokk1h55.fsf@peti.gmd.de >you write:
  > -----BEGIN PGP SIGNED MESSAGE-----
  > 
  > I just checked the latest STL release from SGI and was pleased to see
  > that auto_ptr and a few other things have been fixed/added. I notice,
  > though, that the latest egcs snapshot (obtained via CVS today) does
  > still have the old STL implementation. Are there any plans to upgrade
  > to the new STL before the next release?
I doubt we'd want to make that kind of change since egcs-1.1 is feature
frozen.

I think upgrading the STL code would be wise for egcs-1.2.  

jeff

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

* Re: New STL implementation from SGI
       [not found] ` <k2d8bm4x5k.fsf.cygnus.egcs@zero.aec.at>
@ 1998-07-05 19:46   ` Nathan Myers
  1998-07-08  3:16     ` Gerald Pfeifer
  0 siblings, 1 reply; 36+ messages in thread
From: Nathan Myers @ 1998-07-05 19:46 UTC (permalink / raw)
  To: egcs

Andi Kleen wrote:
> 
> Nathan Myers <ncm@cygnus.com> writes:
> 
> > Peter Simons wrote:
> >
> > > I just checked the latest STL release from SGI and was pleased to see
> > > that auto_ptr and a few other things have been fixed/added. I notice,
> > > though, that the latest egcs snapshot (obtained via CVS today) does
> > > still have the old STL implementation. Are there any plans to upgrade
> > > to the new STL before the next release?
> >
> > Probably we should do that.
> 
> I have another related question. Does the all-singing, all-dancing, promised
> rewriten GNU C++ Library only cover the non STL parts [and still relies on
> the SGI codebase], or does it include a rewriten STL too?

The ASAD rewrite includes a (slightly modified) copy of SGI STL, currently 
at release 3.1.  Our goal is to have it identical, but that will depend 
on (even more!) cooperation from Matt Austern at SGI.

Things left to do include putting "feature-select" macro guards around
the non-standard extensions and renaming some types and templates that
have "__" in their names.  (These can interfere with name-mangling on 
some targets.)  Most of the other differences are in how things are 
split up into files and how the files are found -- these make a difference
particularly when you want to keep track of (or avoid) the use of 
extensions, or when you are ready to support separate template compilation.

There will be very good reasons to want to support separate template
compilation.

Nathan Myers
ncm@cantrip.org

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

* Re: New STL implementation from SGI
  1998-07-03 12:21   ` Andi Kleen
@ 1998-07-05 15:40     ` Martin von Loewis
  0 siblings, 0 replies; 36+ messages in thread
From: Martin von Loewis @ 1998-07-05 15:40 UTC (permalink / raw)
  To: ak; +Cc: ncm, egcs

> I have another related question. Does the all-singing, all-dancing, promised
> rewriten GNU C++ Library only cover the non STL parts [and still relies on 
> the SGI codebase], or does it include a rewriten STL too?

My understanding is that it would still use the SGI code (which, of
course, comes from various sources). At least, I don't see any reason
not to use it.

Regards,
Martin

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

* Re: New STL implementation from SGI
  1998-07-02 15:15 ` Nathan Myers
@ 1998-07-03 12:21   ` Andi Kleen
  1998-07-05 15:40     ` Martin von Loewis
  0 siblings, 1 reply; 36+ messages in thread
From: Andi Kleen @ 1998-07-03 12:21 UTC (permalink / raw)
  To: Nathan Myers; +Cc: egcs

Nathan Myers <ncm@cygnus.com> writes:

> Peter Simons wrote:
> 
> > I just checked the latest STL release from SGI and was pleased to see
> > that auto_ptr and a few other things have been fixed/added. I notice,
> > though, that the latest egcs snapshot (obtained via CVS today) does
> > still have the old STL implementation. Are there any plans to upgrade
> > to the new STL before the next release?
> 
> Probably we should do that.  

I have another related question. Does the all-singing, all-dancing, promised
rewriten GNU C++ Library only cover the non STL parts [and still relies on 
the SGI codebase], or does it include a rewriten STL too?

-Andi

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

* Re: New STL implementation from SGI
       [not found] <x7sokk1h55.fsf.cygnus.egcs@peti.gmd.de>
@ 1998-07-02 15:15 ` Nathan Myers
  1998-07-03 12:21   ` Andi Kleen
       [not found] ` <k2d8bm4x5k.fsf.cygnus.egcs@zero.aec.at>
  1 sibling, 1 reply; 36+ messages in thread
From: Nathan Myers @ 1998-07-02 15:15 UTC (permalink / raw)
  To: egcs

Peter Simons wrote:

> I just checked the latest STL release from SGI and was pleased to see
> that auto_ptr and a few other things have been fixed/added. I notice,
> though, that the latest egcs snapshot (obtained via CVS today) does
> still have the old STL implementation. Are there any plans to upgrade
> to the new STL before the next release?

Probably we should do that.  

Nathan Myers
ncm@cantrip.org

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

* New STL implementation from SGI
@ 1998-07-02  7:08 Peter Simons
  1998-07-06  4:08 ` Jeffrey A Law
  0 siblings, 1 reply; 36+ messages in thread
From: Peter Simons @ 1998-07-02  7:08 UTC (permalink / raw)
  To: egcs

-----BEGIN PGP SIGNED MESSAGE-----

I just checked the latest STL release from SGI and was pleased to see
that auto_ptr and a few other things have been fixed/added. I notice,
though, that the latest egcs snapshot (obtained via CVS today) does
still have the old STL implementation. Are there any plans to upgrade
to the new STL before the next release?

	-peter

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1

iQCVAwUBNZuT9g9HL1s0103BAQF25AP+PFM/C4QDrcTca5IxcXCEYWu0k1GP3yqM
a2gMdrWyrhs97AkA0aaAZjOWTIcAmZ5guaItlxyPYCwHdAF3FBzmKWIPwBWyngSp
KYGtk7uwluH5KaZCxCiO5ICM47W6oX732S8fwEoNuhrZYi9ARFZxVBeL1xvXyy82
WTTQuXv+/wM=
=jnE4
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~1998-07-14  8:41 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-13  1:48 New STL implementation from SGI Ross Smith
1998-07-13  8:40 ` Thomas Kunert
1998-07-13 15:28   ` Joe Buck
  -- strict thread matches above, loose matches on Subject: below --
1998-07-13 17:29 Mike Stump
1998-07-14  8:41 ` Joe Buck
1998-07-13 17:29 Mike Stump
1998-07-11  6:31 Josh Stern
1998-07-07 22:54 Josh Stern
     [not found] <x7sokk1h55.fsf.cygnus.egcs@peti.gmd.de>
1998-07-02 15:15 ` Nathan Myers
1998-07-03 12:21   ` Andi Kleen
1998-07-05 15:40     ` Martin von Loewis
     [not found] ` <k2d8bm4x5k.fsf.cygnus.egcs@zero.aec.at>
1998-07-05 19:46   ` Nathan Myers
1998-07-08  3:16     ` Gerald Pfeifer
1998-07-08 16:34       ` Branko Cibej
1998-07-02  7:08 Peter Simons
1998-07-06  4:08 ` Jeffrey A Law
1998-07-06  8:09   ` H.J. Lu
1998-07-06 14:48     ` Jeffrey A Law
1998-07-06 22:11       ` Ben Scherrey
1998-07-07  0:14         ` Jeffrey A Law
     [not found]         ` <6669.899795405.cygnus.egcs@hurl.cygnus.com>
1998-07-08 16:34           ` Nathan Myers
1998-07-06 18:52     ` Alex Buell
1998-07-07  5:29       ` Carlo Wood
1998-07-07 10:14         ` B. James Phillippe
1998-07-07 12:51         ` Martin von Loewis
1998-07-07 22:54           ` H.J. Lu
1998-07-08  9:58           ` Joe Buck
     [not found]           ` <199807081547.IAA06604.cygnus.egcs@atrus.synopsys.com>
1998-07-09 11:18             ` Ulrich Drepper
1998-07-09 17:02               ` Joe Buck
1998-07-09 17:40                 ` Ulrich Drepper
1998-07-10  6:04                 ` Pieter Nagel
1998-07-10 13:32                   ` Joe Buck
     [not found]                 ` <Pine.LNX.3.96.980710103559.18309h-100000.cygnus.egcs@basilisk>
1998-07-10 20:04                   ` Nathan Myers
     [not found]               ` <199807100002.RAA10346.cygnus.egcs@atrus.synopsys.com>
1998-07-10 16:49                 ` Nathan Myers
1998-07-07  1:12     ` Joe Buck
1998-07-06 18:10       ` H.J. Lu

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