This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Creating a variable declaration of custom type.


Ferad Zyulkyarov wrote:
type_id = get_identifier("MyType");
type_node = make_node(POINTER_TYPE);
TYPE_NAME(type_node) = type_id;
var_decl = build(VAR_DECL, get_identifier("t"), type_node);

Best way to figure this out is to write a simple 5 line testcase that defines a structure type and also defines a pointer to that type, and then step through gcc to see what it does. Try putting breakpoints in finish_struct and build_pointer_type.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]