This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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 andfunction pointer type return type postfix fix.


On 25 Nov 2003 23:51:54 -0500, Ian Lance Taylor <ian@wasabisystems.com> wrote:

> Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
>
>> It will not work. One reason was explained by DJ.  Another is that
>> it does not reduce to a normal form before outputing leading to many
>> symbols being thought different while they are the same.
>
> Note that g++ already does not reduce to normal form.

You seem to be making a leap from discussing a normal form for floating
point constants to a normal form for general expressions.

> In other words, g++ does not recognize that A<i+0> and A<0+i> are
> arguably the same type, at least in the sense that it is probably
> impossible to distinguish between them other than by different
> instantiations of static variables.
>
> Is this a bug in g++?

No.

   5.1.5 Type encodings

   Note that the expression is mangled without constant folding or other
   simplification, and without parentheses, which are implicit in the
   prefix representation.  Except for the parentheses, therefore, it
   represents the source token stream. (C++ Standard reference 14.5.5.1
   p. 5.)

Jason


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