Commit e8ed4ac2 by Ian Lance Taylor Committed by Ian Lance Taylor

cp-demangle.c (__cxa_demangle): Adjust last patch to handle empty string correctly.

	* cp-demangle.c (__cxa_demangle): Adjust last patch to handle
	empty string correctly.

From-SVN: r78353
parent fa0ac78a
2004-02-23 Ian Lance Taylor <ian@wasabisystems.com> 2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
* cp-demangle.c (__cxa_demangle): Adjust last patch to handle
empty string correctly.
* cp-demangle.c (__cxa_demangle): It is not an error if status is * cp-demangle.c (__cxa_demangle): It is not an error if status is
not NULL. It is an error if the mangled name is the same as a not NULL. It is an error if the mangled name is the same as a
built-in type name. built-in type name.
......
...@@ -3964,8 +3964,8 @@ __cxa_demangle (mangled_name, output_buffer, length, status) ...@@ -3964,8 +3964,8 @@ __cxa_demangle (mangled_name, output_buffer, length, status)
internal built-in type names are a single lower case character. internal built-in type names are a single lower case character.
Frankly, this simplistic disambiguation doesn't make sense to me, Frankly, this simplistic disambiguation doesn't make sense to me,
but it is documented, so we implement it here. */ but it is documented, so we implement it here. */
if (mangled_name[1] == '\0' if (IS_LOWER (mangled_name[0])
&& IS_LOWER (mangled_name[0]) && mangled_name[1] == '\0'
&& cplus_demangle_builtin_types[mangled_name[0] - 'a'].name != NULL) && cplus_demangle_builtin_types[mangled_name[0] - 'a'].name != NULL)
{ {
if (status != NULL) if (status != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment