From: Bruce Korb <bruce.korb@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: unknown location: definition in expression context in subform optname-from of "_^"
Date: Thu, 26 Jan 2012 18:44:20 -0800 [thread overview]
Message-ID: <4F220F84.5090601@gmail.com> (raw)
In-Reply-To: <8762fxq3rr.fsf@netris.org>
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.
That is precisely why I hate having this function in my code:
SCM
ag_scm_c_eval_string_from_file_line(
char const * pzExpr, char const * pzFile, int line)
{
SCM port = scm_open_input_string(AG_SCM_STR02SCM(pzExpr));
if (OPT_VALUE_TRACE >= TRACE_EVERYTHING)
fprintf(pfTrace, TRACE_EVAL_STRING, pzFile, line, pzExpr);
{
static SCM file = SCM_UNDEFINED;
static char * pzOldFile = NULL;
if ((pzOldFile == NULL) || (strcmp(pzOldFile, pzFile) != 0)) {
if (pzOldFile != NULL)
AGFREE(pzOldFile);
AGDUPSTR(pzOldFile, pzFile, "scheme source");
file = AG_SCM_STR02SCM(pzFile);
}
{
SCM ln = AG_SCM_INT2SCM(line);
scm_set_port_filename_x(port, file);
scm_set_port_line_x(port, ln);
}
}
{
SCM ans = SCM_UNSPECIFIED;
/* Read expressions from that port; ignore the values. */
for (;;) {
SCM form = scm_read(port);
if (SCM_EOF_OBJECT_P(form))
break;
ans = scm_primitive_eval_x(form);
}
return ans;
}
}
Every evaluation comes from here and in this instance, "pzFile"
pointed to "/path/to/aginfo.tpl" and "line" was set to 163.
Therefore, the location should *NOT* have been unknown and
in fact, the displayed line number ought to have been 171.
Why that failed I would very much want to know so that I can
fix this ag_scm_c_eval_string_from_file_line() thingy.
> The message "definition in expression context" accurately conveys the
Yes, it does. I was thrown off by the "unknown location" stuff.
Thank you for your help!!
Regards, Bruce
next prev parent reply other threads:[~2012-01-27 2:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 3:56 unknown location: definition in expression context in subform optname-from of "_^" Bruce Korb
2012-01-26 4:22 ` Mike Gran
2012-01-26 5:31 ` David Kastrup
2012-01-26 21:05 ` Bruce Korb
2012-01-26 21:21 ` Mike Gran
2012-01-26 21:37 ` Bruce Korb
2012-01-27 0:10 ` Mark H Weaver
2012-01-27 0:56 ` Bruce Korb
2012-01-27 2:26 ` Mark H Weaver
2012-01-27 2:44 ` Bruce Korb [this message]
2012-01-27 2:59 ` Noah Lavine
2012-01-27 3:36 ` Bruce Korb
2012-01-28 7:02 ` Mark H Weaver
2012-01-28 16:58 ` Bruce Korb
2012-01-28 19:03 ` Andy Wingo
2012-01-28 19:47 ` Mark H Weaver
2012-01-28 22:58 ` Andy Wingo
2012-01-29 4:12 ` Mark H Weaver
2012-01-29 17:40 ` Bruce Korb
2012-01-29 18:06 ` Mike Gran
2012-01-29 20:28 ` Andy Wingo
2012-01-29 21:14 ` Bruce Korb
2012-01-29 21:32 ` Mark H Weaver
2012-01-28 22:59 ` Andy Wingo
2012-01-27 6:27 ` Mark H Weaver
2012-01-27 6:19 ` Mark H Weaver
2012-01-27 14:04 ` Bruce Korb
2012-01-27 14:32 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F220F84.5090601@gmail.com \
--to=bruce.korb@gmail.com \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).