This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: demand_empty_rest_of_line and ignore_rest_of_line


Nathan Sidwell <nathan@codesourcery.com> writes:

> what is the intended difference between demand_empty_rest_of_line and
> ignore_rest_of_line? From the source I see that demand_empty_ROL skips
> whitespace but ignore_ROL does not. Then, demand_empty falls into
> ignore_ROL to issue a warning and skip up to the EOL. All but one use
> of ignore_ROL I saw (I've not checked the config dir yet) were of the form
> 	as_{bad,warn} ("something bad happened");
> 	ignore_rest_of_line ();
> which implies to me that ignore_ROL should be silent.

demand_empty_rest_of_line is called when the rest of the line is
required to be empty, and we have no reason to think that it is not
empty.

ignore_rest_of_line is called after an error occurs, and is intended
to help the user see where the error happened, by indicating what
point the assembler reached on the line before it got the error.

So, I agree that demand_empty_rest_of_line should probably issue an
error rather than a warning.

I'm agnostic about whether ignore_rest_of_line should be silent.  The
current code is not a mistake.  But it's fine with me to change it if
making it shut up appears more useful in practice.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]