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

Carlo Wood carlo@alinoe.com
Wed Nov 26 21:35:00 GMT 2003


On Wed, Nov 26, 2003 at 07:41:47AM +0100, Gabriel Dos Reis wrote:
> normalizing floating literals helps escape the problems of
> representations on different targets.

Only if you take the value of such literals after
first normalizing them - everywhere of course, not
only in template parameters.

Thus:

source code:   1.234
                |
		V
normalization: 1.3BE76C8B439581
                |
		|----> assigning value to targets 'double'.
		V
              mangling

That way, the demangled form, re-assigned to a double
would indeed give the same result, for every target.

This means that the normalization needs to use the
largest precision of all supported targets, and a new
target with higher precision will break the ABI.

-- 
Carlo Wood <carlo@alinoe.com>



More information about the Libstdc++ mailing list