aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cplus-dem.c
diff options
context:
space:
mode:
authorCarlo Wood <carlo@gnu.org>2003-03-11 19:55:46 +0000
committerDJ Delorie <dj@gcc.gnu.org>2003-03-11 14:55:46 -0500
commit8fe857758f7f4c4b77e5fbdf77d3ccaae6acd592 (patch)
treed11fcd23dac8ba0b123b34a7b5675e70632db235 /libiberty/cplus-dem.c
parentd2f55c5c66c85b644d09982c3c7b2462596766c7 (diff)
downloadgcc-8fe857758f7f4c4b77e5fbdf77d3ccaae6acd592.zip
gcc-8fe857758f7f4c4b77e5fbdf77d3ccaae6acd592.tar.gz
gcc-8fe857758f7f4c4b77e5fbdf77d3ccaae6acd592.tar.bz2
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
Diffstat (limited to 'libiberty/cplus-dem.c')
-rw-r--r--libiberty/cplus-dem.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index af35bc1..59afcd3 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -1797,31 +1797,34 @@ demangle_integral_value (work, mangled, s)
success = 0;
- /* Negative numbers are indicated with a leading `m'. */
- if (**mangled == 'm')
- {
- string_appendn (s, "-", 1);
- (*mangled)++;
- }
- else if (mangled[0][0] == '_' && mangled[0][1] == 'm')
- {
- /* Since consume_count_with_underscores does not handle the
- `m'-prefix we must do it here, using consume_count and
- adjusting underscores: we have to consume the underscore
- matching the prepended one. */
- multidigit_without_leading_underscore = 1;
- string_appendn (s, "-", 1);
- (*mangled) += 2;
- }
- else if (**mangled == '_')
- {
- /* Do not consume a following underscore;
- multidigit_without_leading_underscore will consume what should be
- consumed. */
- leave_following_underscore = 1;
+ if (**mangled == '_')
+ {
+ 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
+ adjusting underscores: we have to consume the underscore
+ matching the prepended one. */
+ multidigit_without_leading_underscore = 1;
+ string_appendn (s, "-", 1);
+ (*mangled) += 2;
+ }
+ else
+ {
+ /* Do not consume a following underscore;
+ 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,
@@ -1862,7 +1865,7 @@ demangle_integral_value (work, mangled, s)
/* All is well. */
success = 1;
}
- }
+ }
return success;
}