Subject: bug#73725: Master: Wrong position for byte compiler warning message.

From: Alan Mackenzie <[email-masked]>
Date: Wed, 23 Oct 2024 19:03:02 +0000

Hello, Mattias.

On Wed, Oct 23, 2024 at 19:49:13 +0200, Mattias Engdegård wrote:
> 23 okt. 2024 kl. 13.22 skrev Alan Mackenzie <[email-masked]>:

> > I've incorporated your (Stafan's) suggestions from yesterday into
> > the code.  See the patch below.

> Thank you, I'll try to get some time to look at it -- a couple of
> quick notes:

> - Isn't the code mutating the return value of a macro? I may be
> mistaken but surely it could be a constant.

Not really.  It's preserving a label on the code between the source and
the code generated by the macro.  It has no effect whatsoever on the
code generated.  It merely records the source position for the display
of warning and error messages.

Whether that label is regarded as part of the "value" seems to be rather
an academic question.

> - The unknown free variable warning which was the motivation of this
> issue should really be moved from codegen to the frontend (ie, cconv
> at present). Unless someone can think of a reason why it couldn't (I
> can't).

That seems unrelated to the two bugs here.  Regardless of where the
warnings/errors are generated, the correct source file position needs to
be attached to the pertinent source form.

> Sorry if these were mentioned in your discussion; I haven't read it
> through yet.

-- 
Alan Mackenzie (Nuremberg, Germany).