Commit 8fe85775 by Carlo Wood Committed by DJ Delorie

cplus-dem.c (demangle_integral_value): Correction to reflect patch of 2002-01-10…

cplus-dem.c (demangle_integral_value): Correction to reflect patch of 2002-01-10 in order to also make negative...

* cplus-dem.c (demangle_integral_value): Correction to reflect
patch of 2002-01-10 in order to also make negative multi-digits
without leading underscore work.

From-SVN: r64179
parent d2f55c5c
2003-03-11 Carlo Wood <carlo@gnu.org>
* cplus-dem.c (demangle_integral_value): Correction to reflect
patch of 2002-01-10 in order to also make negative multi-digits
without leading underscore work.
2003-03-03 Mark Mitchell <mark@codesourcery.com>
* cplus-dem.c: Add license exception to copyright notice.
......
......@@ -1797,13 +1797,9 @@ demangle_integral_value (work, mangled, s)
success = 0;
/* Negative numbers are indicated with a leading `m'. */
if (**mangled == 'm')
if (**mangled == '_')
{
string_appendn (s, "-", 1);
(*mangled)++;
}
else if (mangled[0][0] == '_' && mangled[0][1] == 'm')
if (mangled[0][1] == 'm')
{
/* Since consume_count_with_underscores does not handle the
`m'-prefix we must do it here, using consume_count and
......@@ -1813,15 +1809,22 @@ demangle_integral_value (work, mangled, s)
string_appendn (s, "-", 1);
(*mangled) += 2;
}
else if (**mangled == '_')
else
{
/* Do not consume a following underscore;
multidigit_without_leading_underscore will consume what should be
consumed. */
consume_count_with_underscores will consume what
should be consumed. */
leave_following_underscore = 1;
}
}
else
{
/* Negative numbers are indicated with a leading `m'. */
if (**mangled == 'm')
{
string_appendn (s, "-", 1);
(*mangled)++;
}
/* Since consume_count_with_underscores does not handle
multi-digit numbers that do not start with an underscore,
and this number can be an integer template parameter,
......
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