Thursday, March 28, 2002

I was thinking how to handle forward declarations of types.

There seems to be a macro DECL_EXTERNAL mentioned in the file :
/* Language-specific decl information. */
#define DECL_LANG_SPECIFIC(NODE) (DECL_CHECK (NODE)->decl.lang_specific)
In a VAR_DECL, nonzero means external reference:
do not allocate storage, and refer to a definition elsewhere.
In a FUNCTION_DECL, zero means that the function is declared auto
inside a function body.
These are externals.

Here is an example of the creation of a forward, it has to be looked into.
decl_specs = tree_cons (NULL_TREE, type, sc_spec); -- the declaration specifiers
decl = start_decl (synth_id_with_class_suffix (name, implementation_context), decl_specs, 1, NULL_TREE, NULL_TREE);
finish_decl (decl, expr, NULL_TREE);
I think that a forward is just a declaration, but without too much information.