This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.

Jonathan Lennox <> writes:

> Ian Lance Taylor <> writes:
> > DJ Delorie <> writes:
> > 
> > > > Well, to do this, we would have to find some target-specific library.
> > > 
> > > libiberty has floatformat.[ch]
> > 
> > Sure, but that's not what we need.  We need a library which provides a
> > single API which is configured based on the target.  floatformat
> > doesn't help, because the demangler doesn't know which floatformat
> > structure to use.
> Alternately, couldn't the demangler API be modified so that the *caller*
> specifies a const struct floatformat* argument?
> This would avoid the need for a target-specific libiberty, and also allow
> run time selection of the floatformat, which could be necessary on some
> platforms (particularly for long double).

Yes, that should work for gdb, which has to know details of the
floating point format anyhow.

It ought to be possible to do that for collect2, I would think.

It's not obvious how to use it for the linker or the stand-alone
c++filt program.  So it should be an optional argument.

You actually need more than one floatformat struct: you need a mapping
from type name to floatformat struct.  But that's OK.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]