guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unknown location: definition in expression context in subform optnam


From: Mark H Weaver
Subject: Re: unknown location: definition in expression context in subform optname-from of "_^"
Date: Fri, 27 Jan 2012 01:19:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Hi Bruce,

Bruce Korb <address@hidden> writes:
> On 01/26/12 18:26, Mark H Weaver wrote:
>>> Too bad.  I do prefer clue-ful error messages and "unknown location"
>>> just wasn't the helpful clue I needed.  Perhaps just use "improper 
>>> location"?
>>> "invalid location"?  Just not "unknown location".
>>
>> That part of the error message (where "unknown location" was printed)
>> would normally contain the filename, line number, and column number.
>
> Then either it ought to have printed the location, or there are new
> wrinkles in the file/line number stuff that I need to know about.

Your code looks good to me, and should allow source locations to be
properly reported in error messages.

It turns out that this was simply a bug in Guile.  For this type of
error (definition in expression context), we would _always_ say "unknown
location", even when compiling a module from a file in the normal way.

I have produced a patch to fix these error messages, and will post it as
soon as I have thoroughly tested it (within a couple of hours), in the
hopes that it may be included in 2.0.4.

>         {
>             SCM ln = AG_SCM_INT2SCM(line);
>             scm_set_port_filename_x(port, file);
>             scm_set_port_line_x(port, ln);
>         }

Ideally, you would also call 'scm_set_port_column_x' here.  Otherwise,
the column numbers of errors on the first line will not be reported
properly.  This is not crucial, but I thought I'd mention it.

    Regards,
      Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]