This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
Carlo Wood <carlo@alinoe.com> writes:
| On Tue, Nov 25, 2003 at 10:47:30PM +0100, Gabriel Dos Reis wrote:
| > You get +Inf or -Inf only if you ascribe/assume a given data type
| > (with a limited precision) of an object that will contain that value.
| > I.e. You're getting the value that would be represented in an object,
| > while the issue here is that of a *literal* value. Not quite the same.
|
| I am not sure what you mean, the resulting mangled name
| contains Inf - that is what you asked.
|
| _Z1fILi1ELc120EEv1AIXplT_cvingLd7ff0000000000000EEE
|
| ~/c++/demangler>c++filt _Z1fILi1ELc120EEv1AIXplT_cvingLd7ff0000000000000EEE 2>/dev/null
| void f<1, (char)120>(A<(1) + ((int)(-((double)inf)))>)
|
| Hmm - heh, -Inf is also not possible it seems.
I do mean is that neither +inf nor -inf can be used as part of
template arguments. That g++ managed to emit such symbol is a bug.
| > | > signed zeros are spelt +0 and -0.
| > |
| > | Actually, I can't produce a -0 either as literal in
| > | a symbol.
| >
| > Huh????
|
| -0 is interpreted as integer, and -0.0 is interpreted as 0.0.
Well, I intended -0.0 when I wrote -0.
-0.0 is to be differentiated from 0.0 (which is the same as +0.0)
because we do intend to support IEEE-754. On target we don't support
that plateform, the notion of negative is irrelevant.
[...]
| I am getting tired of this disussion... when are people
| putting floating point values at all in template parameters?
Because it is part of well-formed expressions?
I can understand you're not interested in providing a tool that
support C++ language use (as you said previously, you only wanted
something for your won use); but from GCC/g++ point of view we can't
just hand wave. You may decide to sign off; it would be a cavalier
decision of V3 to take.
| It makes no sense; we are wasting our time. Lets make
| some quick decisions and do useful things again.
You're wasting time only on things that cannot exsit, i.e. NaN (all
forms) and +/-Inf.
The C99 hex floating point notation does provide a better solution,
compared to current situation.
-- Gaby
- References:
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values andfunction pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.