After elf_common_parse calls ignore_rest_of_line on some errors,
s_comm_internal calls demand_empty_rest_of_line. These functions
cannot be both called, as they consume the end_of_stmt char in the
input buffer and the second call then consumes the next line of input,
which may not even be in the input buffer.
* config/obj-elf.c (elf_common_parse): Don't call
ignore_rest_of_line here.
* read.c (ignore_rest_of_line): Expand comment.
*input_line_pointer = '\0';
as_bad (_("bad .common segment %s"), p);
*input_line_pointer = c;
- ignore_rest_of_line ();
return NULL;
}
/* ??? Don't ask me why these are always global. */
/* Silently advance to the end of a statement. Use this after already having
issued an error about something bad. Like demand_empty_rest_of_line,
this function may leave input_line_pointer one after buffer_limit;
- Don't call it from within expression parsing code in an attempt to
- silence further errors. */
+ Don't call it twice, and don't call both ignore_rest_of_line and
+ demand_empty_rest_of_line as that will consume two lines of input.
+ This rule leads to: Don't call it from within expression parsing
+ code in an attempt to silence further errors. */
void
ignore_rest_of_line (void)