* read.c (read_a_source_file): Rearrange evaluation order when

looking for '=' to avoid conditional on undefined contents of
	input_line_pointer[1].
This commit is contained in:
Hans-Peter Nilsson 2008-11-12 01:41:12 +00:00
parent de04a24895
commit 18d7868b1b
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2008-11-12 Hans-Peter Nilsson <hp@axis.com>
* read.c (read_a_source_file): Rearrange evaluation order when
looking for '=' to avoid conditional on undefined contents of
input_line_pointer[1].
2008-11-06 Adam Nemet <anemet@caviumnetworks.com>
* config/tc-mips.c (COP_INSN): Change logic to always return false

View File

@ -791,10 +791,10 @@ read_a_source_file (char *name)
/* Input_line_pointer->after ':'. */
SKIP_WHITESPACE ();
}
else if (input_line_pointer[1] == '='
&& (c == '='
|| ((c == ' ' || c == '\t')
&& input_line_pointer[2] == '=')))
else if ((c == '=' && input_line_pointer[1] == '=')
|| ((c == ' ' || c == '\t')
&& input_line_pointer[1] == '='
&& input_line_pointer[2] == '='))
{
equals (s, -1);
demand_empty_rest_of_line ();