[v3] Return of the son of fp printing.

Phil Edwards phil@codesourcery.com
Mon Aug 30 00:29:00 GMT 2004

On Sun, Aug 29, 2004 at 07:45:36PM -0400, Jerry Quinn wrote:
> Phil Edwards writes:
>  > On Sun, Aug 29, 2004 at 07:11:41PM -0400, Jerry Quinn wrote:
>  > > Glibc uses a version of GMP under the
>  > > covers for its printing and it seemed like too much work and licensing hassle
>  > > to bring it over.
>  > 
>  > It's already required to build F95, and there's increased pressure to
>  > import it into the GCC tree.  So this may not be so far away as you think.
> This would be excellent for allowing a local implementation without falling
> back to printf.

Perhaps we should coordinate with the Fortran people and push for its
inclusion?  If it would save us huge chunks of labor, that sounds like
a maintainence win.

Question:  Assume that GMP is available, then how much of this do we still
want?  Do we:

1) keep __convert_from_v as our fallback, or
2) use this work as a fallback, or
3) just say "hey, we're building GMP as part of the compiler installation,
   we know it's available, we don't need a fallback at all," or
4) other.

If GMP goes in, it'll probably only be for 3.6 (maybe 3.5).  I wonder if
the floatconv.cc change is too large for 3.5?

>  > Mark froze the branch a couple hours ago, so we'll pretend you wrote 3.4.x
>  > instead.  :-)
> Yeah, I just saw after posting.  Phooey.  What should the linker-map change
> look like now?

Do we want a change like this for the current release branch at all?

> Do we really have to uglify all the static and local stuff in a cc file?  No
> symbols there are going to be visible to the outside world.  And uglifying
> makes the code so much harder to read :-)

It's just that seeing non-uglified stuff inside namespace std triggers a
reflexive scream in me.  We could move them elsewhere?

>  > > +++ include/bits/locale_facets.tcc	29 Aug 2004 22:22:27 -0000
>  > > @@ -36,6 +36,7 @@
>  > >  #pragma GCC system_header
>  > >  
>  > >  #include <limits>		// For numeric_limits
>  > > +#include <cmath>		// For log10
>  > 
>  > Is there no easier (yet safe) way to get log10 than by pulling in the entire
>  > math header?  (I don't know, it's an honest question.)
> How about __builtin_log10?  More generally, are all these builtins safe on the
> 3.4 branch?

Good question, I don't know offhand.

Behind everything some further thing is found, forever; thus the tree behind
the bird, stone beneath soil, the sun behind Urth.  Behind our efforts, let
there be found our efforts.
              - Ascian saying, as related by Loyal to the Group of Seventeen

More information about the Gcc-patches mailing list