[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Minor error-reporting bug
From: |
Eric Raible |
Subject: |
[Tinycc-devel] Minor error-reporting bug |
Date: |
Sun, 1 Oct 2023 20:45:44 -0700 |
Here's a minimal test case:
void f()
{
do { };
}
which gives:
tccbug.c:3: error: '[bletch]' expected (got ";")
where bletch is the code for TOK_WHILE (value==261 in my build) rendered as %c.
In emacs/eshell this displays as error: '^E' expected (got ";")
In bash this displays as: error: '' expected (got ";")
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.
Anyway, this is not a show stopper by any means, but it is an ugly and
initially confusing message.
- [Tinycc-devel] Minor error-reporting bug,
Eric Raible <=