summaryrefslogtreecommitdiff
path: root/gcc/mips-tfile.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-11 10:56:52 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-11 10:56:52 +0000
commita32384d7fd4db5621edf60de6b37ae9f4d81a271 (patch)
tree85b1b8232c612c7db96129cf396694b9a64a637b /gcc/mips-tfile.c
parenta4c4d703da497326a521ab23daecdb0f241e3620 (diff)
downloadgcc-a32384d7fd4db5621edf60de6b37ae9f4d81a271.tar.gz
PR debug/7055
* gcc/mips-tfile.c (parse_def): Fix parsing of def strings starting with digits. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143265 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mips-tfile.c')
-rw-r--r--gcc/mips-tfile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
index 87b278ab4d6..b984f47cb3f 100644
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -2855,7 +2855,8 @@ parse_def (const char *name_start)
{
int ch2;
arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
- if (arg_end_p1 != arg_start || ((ch2 = *arg_end_p1) != ';') || ch2 != ',')
+ /* It's only a number if followed by ';' or ','. */
+ if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ','))
arg_was_number++;
}
@@ -2911,7 +2912,7 @@ parse_def (const char *name_start)
{
int ch2;
arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
- if (arg_end_p1 != arg_start || ((ch2 = *arg_end_p1) != ';') || ch2 != ',')
+ if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ','))
arg_was_number++;
if (t_ptr == &temp_array[0])
@@ -2985,7 +2986,7 @@ parse_def (const char *name_start)
{
int ch2;
arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
- if (arg_end_p1 != arg_start || ((ch2 = *arg_end_p1) != ';') || ch2 != ',')
+ if (arg_end_p1 != arg_start && (((ch2 = *arg_end_p1) == ';') || ch2 == ','))
arg_was_number++;
if (t_ptr == &temp_array[0])