This is the mail archive of the 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]

Re: obj_coff_loc Internal Error

Hi Tracy,

> Following is a patch that I think solves the problems.

First of all - do you have a binutils copyright assignment on file
with the FSF ?  Without such an assignment we cannot accept your
patch.  (I know that the patch is small, but I consider it to be
non-trivial and not-obvious, so we do need the assignment).

> +  /* Skip the comma if it exists; otherwise, give warning.  */
> +  if (*input_line_pointer == ',')
> +    input_line_pointer++;
> +  else
> +    as_warn (_("missing comma assumed."));

Secondly I am not sure that it is correct to issue a warning if the
comma is missing.  The code before your patch parsed the expression
without requiring an line number and I feel that we should continue to
support that behaviour unless there is a good reason not too.

> NOTE:  I have moved the add_lineno before the listing code.  I am
> not sure if this is correct.

This does look wrong, or at least different.  The listing code does
change the variable 'lineno' which is used by the call to add_lineno()
so the behaviour will change.  Why did you move the call ?  Were you
detecting incorrect line numbers in your output ?

Finally, since you are changing the behaviour of the .loc directive, it
would be great if you could add some documentation about it to the
assembler doc file (gas/doc/as.texinfo).  This is optional, but nice.


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