[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Minor error-reporting bug
From: |
grischka |
Subject: |
Re: [Tinycc-devel] Minor error-reporting bug |
Date: |
Mon, 2 Oct 2023 08:21:43 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 02.10.2023 05:45, Eric Raible wrote:
It seems to me that "ST_FUNC void skip(int c)" needs to be smarter
about handling 'c',
perhaps formatting it into a string before calling tcc_error(). I
could (in theory) fix this,
but it looks like it would require refactoring get_tok_str() to not
use the global cstr_buf).
> A bit above my pay grade.
I guess in tinycc one would just use a local temporary buffer for one
of the two get_tok_str(c) results, as in
char tmp[40];
pstrcpy(tmp, sizeof tmp, get_tok_str(c));
tcc_error("%s ... %s\n", tmp, get_tok_str(tok, &tokc));
-- gr
Anyway, this is not a show stopper by any means, but it is an ugly and
initially confusing message.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel