> tree type_id, type_node, var_decl; > > 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); > > But, when I compile my source with the modified GCC (as above) I get > an error: "t" has an incomplete type. I know that I miss something but > I cannot figure out what is it.
I think that the type of type_node is missing. Try to add TREE_TYPE (type_node); For example TREE_TYPE (type_node) = integer_type_node. (if MyType is int). Revital > > -- > Ferad Zyulkyarov > Barcelona Supercomputing Center