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.

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.


~/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.

> | > 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.

template <int I, char J> void f(A<I+int(-0.0)>) {}



which is

void f<1, (char)120>(A<(1) + ((int)(-((double)0)))>)

same as for the -1e1000


template <int I, char J> void f(A<I+int(-0)>) {}
gives of course just


I am getting tired of this disussion... when are people
putting floating point values at all in template parameters?
It makes no sense; we are wasting our time.  Lets make
some quick decisions and do useful things again.

Carlo Wood <>

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