Re: [Ctool-develop] testing the gcc test suite
Brought to you by:
flisakow
From: Stefan S. <se...@sy...> - 2003-09-08 00:30:53
|
Shaun Flisakowski wrote: > > On Friday, September 5, 2003, at 09:22 AM, Stefan Seefeld wrote: > >> >> 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... >> > > It looks to me like __attribute__ is already accepted at the proper spot > (after any declarator), in gram.y: > decl: declarator [opt_gcc_attrib] > > I would guess the problem might stem from lexer.l not having an entry > for __malloc__, you would need a line like the other supported flags > have, see __format__, __noreturn__ etc. while in the <GCC_ATTRIB> state. good guess ! I added the necessary code to support the '__malloc__' attribute and the error is gone. Thanks a lot ! I was confused because the error message reported a parse error *before* '__attribute__', but that's probably just because of the way gram.y is written. Anyways, I'm getting closer to 100% passing tests :-) Best regards, Stefan |