diff options
author | DJ Delorie <dj@redhat.com> | 2002-02-19 21:01:40 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2002-02-19 21:01:40 +0000 |
commit | 59ea9fe7b61c424fc1e45039a6c3a9af0966965b (patch) | |
tree | 5c165df79d208caae2b4d6669d9be8da3b08b603 /libiberty/cplus-dem.c | |
parent | 375fd65be638b8de9aa7d5c0b261164840111000 (diff) | |
download | gdb-59ea9fe7b61c424fc1e45039a6c3a9af0966965b.zip gdb-59ea9fe7b61c424fc1e45039a6c3a9af0966965b.tar.gz gdb-59ea9fe7b61c424fc1e45039a6c3a9af0966965b.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/cplus-dem.c')
-rw-r--r-- | libiberty/cplus-dem.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index 710b69d..203e30d 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -2414,8 +2414,15 @@ demangle_arm_hp_template (work, mangled, n, declp) break; default: /* Not handling other HP cfront stuff */ - if (!do_type (work, &args, &arg)) - goto cfront_template_args_done; + { + const char* old_args = args; + if (!do_type (work, &args, &arg)) + goto cfront_template_args_done; + + /* Fail if we didn't make any progress: prevent infinite loop. */ + if (args == old_args) + return; + } } string_appends (declp, &arg); string_append (declp, ","); |