Bug in libm or libstdc++.
Paul Derbyshire
pderbysh@usa.net
Tue Mar 2 08:32:00 GMT 1999
At 12:07 PM 3/1/99 PST, you wrote:
[Deleted]
['export' is in Stroustrup 3rd Ed.]
Interesting. There is one lone mention in connection with templates, which
seems to describe some usage that never actually occurs, namely, putting a
template in a .cc file and expecting another .cc file to magically be able
to use it, instead of putting it in a .h file. How would such a scheme be
implemented anyways? Making the compiler scan the filesystem (and then
maybe the net) for .cc files that might define a template after it sees one
used without definition in a translation unit it is processing, strikes me
as impractical... Perhaps the idea is for the "export" to cause a compiler,
on reading a .cc file, to add any instantiations of the template in
question to a global collection of object files the linker always links
against, but then of course,
1. What if the other cc file is encountered first?
2. What if the other cc file uses a combination of template
parameters the first does not instantiate?
3. What if the compiler does this and the linker expects otherwise,
or vice versa?
>Please note that while Stroustrup's 3rd edition is an excellent book, it
>contains many errors. See http://www.research.att.com/~bs/3rd_errata.html
>for a list of the known ones.
Read them. (For the printing that produced my copy.) The only one with
potential to really trip someone up is:
pg 218 s/if (atexit(&my_cleanup))/if (atexit(&my_cleanup)==0)/
:-)
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." -------------------------------------------------
-- B. Mandelbrot | http://surf.to/pgd.net
_____________________ ____|________ Paul Derbyshire pderbysh@usa.net
Programmer & Humanist|ICQ: 10423848|
More information about the Gcc
mailing list