Re: [Ctool-develop] testing the gcc test suite
Brought to you by:
flisakow
|
From: Stefan S. <se...@sy...> - 2003-09-05 16:22:42
|
Shaun Flisakowski wrote:
> There is code inside lexer.l that turns "__builtin_va_list" into an
> ellipsis. There is code commented out there to turn it into an "int"
> instead. If it was made a builtin type like INT (defined near the top
> of gram.y) and had support inside printing, etc. it would work just like
> it always existed.
ok, I'v enabled the code that turns it into an 'INT' for now. I may add
a new type later if it is needed.
> __restrict doesn't appear to me to be a type, it looks like some sort of
> storage class modifier like extern or auto.
borrowing an idea from another (C++) parser I work with, I simply
ignore '__restrict' tokens.
Now 89.66% of the accept0 tests pass (yay !). The rest seems to stem
from a parse error in /usr/include/stdio.h, specifically at a line like:
extern char *tempnam (__const char *__dir, __const char *__pfx)
__attribute__ ((__malloc__));
While the scanner supports '__attribute__', the grammar doesn't look
as if it allows it at that particular place. As I don't quite
undererstand the grammar (yet), I don't know what change to make
to gram.y to add an optional attribute to a function declaration
like the above.
It might be a one-line fix...
Regards,
Stefan
|