Missing qualifications

Chris Jefferson caj@cs.york.ac.uk
Thu Mar 10 13:12:00 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paolo Carlini wrote:
| Hi Chris and sorry about the delay...
|
|> In myy most recent patch, I missed some qualifications in the new bits of
|> predefined-ops.h (i think those were the only ones...) apologises
|>
|>
| No problem. To be sure: you mean bind2nd constructor and equal shold
| take a const ref? I'm testing now with these changes.
|
| If everything goes well, I'm going to commit to the branch later today.
|
| Two comments: can you confirm that current mainline is able to deal
| perfectly with the additional abstractions at -O2? Also, can you
| describe a bit what's going wrong with search/search_n? Or, if you have
| a draft on top of the last patch, send it over... In any case, I don't
| want to risk taking a wrong route... ;)
|

It is almost able to :) The only (very tiny) problem is that it feels
the urge to instansiate to zero the "empty classes" which are added
extra.. the way to get rid of this would be to somehow force the
forwarding functions to inline the thing they are forwarding to (for
example make find inline find_if). I'm not sure a) how I can force a
function to be inlined and b) if this might not confuse other inlining
(at the moment g++ chooses, unsurprisingly, to always inline the
forwarding functions)

The problem with inlining find_if into search and search_n I've now
tracked down. Now I understand it it's reasonably clear (although I
still don't entirely understand what is going on in this piece of code)

The problem is that src/string-inst.c instansiates search explicitally,
and so I have to add to that file all functions that get called by
search. I was getting confused a) because just changing stl_algo.h and
then running "make" doesn't seem to realise it has to rebuild this file,
so I was only getting the error on total rebuilds and b) it was only
complaining about not being able to find __find_if, as I assume the call
s to find, _gnu_cxx::__ops::equal, and
_gnu_cxx::__ops::equal_to::operator() were being inlined away.

Now I've figured out the problem, I'm slightly worried that there might
be other explicitally instansatied functions. I had a quick look around
but I couldn't find any. I'd be slightly happier if someone could tell
me how I can certainly check I haven't broken anything here :)

Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCMEcP3FpDzErifpIRAtPbAJ44VJpxhQJWXKCS0VIiP3kdcI67oQCfbYxu
dtmQGfT1wRYhDQFqEdNEZvY=
=1bZF
-----END PGP SIGNATURE-----



More information about the Libstdc++ mailing list