Re: [Ctool-develop] testing the gcc test suite
Brought to you by:
flisakow
From: Stefan S. <se...@sy...> - 2003-09-04 17:44:21
|
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. Hmm, ok. It has to be a type, or else the typedef I cited yesterday wouldn't be valid. I don't have enough experience with this stuff to be able to make an educated suggestion as to how to represent that type. I fear that if we represent just that type (, i.e. '__builtin_va_list') it's too specific a solution. Other builtin types may follow. On the other hand, we could have a type token that uses a table lookup to find the real name of the type. But that doesn't work if the different types covered that way have different semantics w.r.t. the AST (and thus, gram.y). > __restrict doesn't appear to me to be a type, it looks like some sort of > storage class modifier like extern or auto. yep, that's the impression I get as well. > I don't think we need to bother with a table of types, there are many > gcc specifics which are not types, and still require handling, see the > support for __attribute in lexer.l. I think gcc is popular enough these > extensions may as well just be true built-ins in cTool. Fine. Does anybody have a reference to a document describing the grammar for these extensions ? Regards, Stefan |