diff options
author | DJ Delorie <dj@delorie.com> | 2003-03-11 20:18:26 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2003-03-11 20:18:26 +0000 |
commit | 5be79056f47ee8fd56310577a4a30afa6a0d916c (patch) | |
tree | b147e57022ea2edd6b537f75385e8ce52f1852d3 /libiberty/cplus-dem.c | |
parent | f865df7da5eacb76b97da699a187b217bd584b9f (diff) | |
download | gdb-5be79056f47ee8fd56310577a4a30afa6a0d916c.tar.gz |
merge from gcc
Diffstat (limited to 'libiberty/cplus-dem.c')
-rw-r--r-- | libiberty/cplus-dem.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index af35bc13119..59afcd371ba 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; } |