[RFC] type safe trees

Nathan Sidwell nathan@codesourcery.com
Wed Jun 23 15:06:00 GMT 2004


Paolo Bonzini wrote:
>>     #else
>>     #include "expr_t.h"
>>     #endif
> Why not feeding gengtype with the classes only, and have it produce a 
> file with all the #include directives?

gengtype already scans all of the source to do its GTY magic.  The idea of
defining the nodes inline like this appeals to me more than having them off
in some meta file elsewhere.  If we do that, it is natural to make the
generated C have the same scope and lifetime as the original class
declaration.  That way you know exactly where and when you can use the
generated macros and structs.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc mailing list