godump.c (go_define): Treat a single character in single quotes, or a string, as an operand.
* godump.c (go_define): Treat a single character in single quotes, or a string, as an operand. From-SVN: r179118
This commit is contained in:
parent
c75732496d
commit
9e4ef69ef8
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-09-23 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* godump.c (go_define): Treat a single character in single quotes,
|
||||
or a string, as an operand.
|
||||
|
||||
2011-09-23 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* ipa-prop.h (jump_func_type): Updated comments.
|
||||
|
|
12
gcc/godump.c
12
gcc/godump.c
|
@ -301,11 +301,13 @@ go_define (unsigned int lineno, const char *buffer)
|
|||
case '\'':
|
||||
{
|
||||
char quote;
|
||||
int count;
|
||||
|
||||
if (saw_operand)
|
||||
goto unknown;
|
||||
quote = *p;
|
||||
*q++ = *p++;
|
||||
count = 0;
|
||||
while (*p != quote)
|
||||
{
|
||||
int c;
|
||||
|
@ -313,6 +315,8 @@ go_define (unsigned int lineno, const char *buffer)
|
|||
if (*p == '\0')
|
||||
goto unknown;
|
||||
|
||||
++count;
|
||||
|
||||
if (*p != '\\')
|
||||
{
|
||||
*q++ = *p++;
|
||||
|
@ -358,7 +362,15 @@ go_define (unsigned int lineno, const char *buffer)
|
|||
goto unknown;
|
||||
}
|
||||
}
|
||||
|
||||
*q++ = *p++;
|
||||
|
||||
if (quote == '\'' && count != 1)
|
||||
goto unknown;
|
||||
|
||||
saw_operand = true;
|
||||
need_operand = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue