All frontends replicate this, so move it.
gcc/
* tree.cc (build_common_tree_nodes): Initialize void_list_node
here.
gcc/ada/
* gcc-interface/trans.cc (gigi): Do not initialize void_list_node.
gcc/c-family/
* c-common.h (build_void_list_node): Remove.
* c-common.cc (c_common_nodes_and_builtins): Do not initialize
void_list_node.
gcc/c/
* c-decl.cc (build_void_list_node): Remove.
gcc/cp/
* decl.cc (cxx_init_decl_processing): Inline last
build_void_list_node call.
(build_void_list_node): Remove.
gcc/d/
* d-builtins.cc (d_build_c_type_nodes): Do not initialize
void_list_node.
gcc/fortran/
* f95-lang.cc (gfc_init_decl_processing): Do not initialize
void_list_node.
gcc/go/
* go-lang.cc (go_langhook_init): Do not initialize
void_list_node.
gcc/jit/
* dummy-frontend.cc (jit_langhook_init): Do not initialize
void_list_node.
gcc/lto/
* lto-lang.cc (lto_build_c_type_nodes): Do not initialize
void_list_node.
save_gnu_tree (gnat_literal, t, false);
/* Declare the building blocks of function nodes. */
- void_list_node = build_tree_list (NULL_TREE, void_type_node);
void_ftype = build_function_type_list (void_type_node, NULL_TREE);
ptr_void_ftype = build_pointer_type (void_ftype);
TYPE_NAME (void_type_node) = void_name;
}
- void_list_node = build_void_list_node ();
-
/* Make a type to be the domain of a few array types
whose domains don't really matter.
200 is small enough that it always fits in size_t
extern bool names_builtin_p (const char *);
extern tree c_linkage_bindings (tree);
extern void record_builtin_type (enum rid, const char *, tree);
-extern tree build_void_list_node (void);
extern void start_fname_decls (void);
extern void finish_fname_decls (void);
extern const char *fname_as_string (int);
debug_hooks->type_decl (decl, false);
}
-/* Build the void_list_node (void_type_node having been created). */
-tree
-build_void_list_node (void)
-{
- tree t = build_tree_list (NULL_TREE, void_type_node);
- return t;
-}
-
/* Return a c_parm structure with the given SPECS, ATTRS and DECLARATOR. */
struct c_parm *
record_unknown_type (init_list_type_node, "init list");
/* Used when parsing to distinguish parameter-lists () and (void). */
- explicit_void_list_node = build_void_list_node ();
+ explicit_void_list_node = build_tree_list (NULL_TREE, void_type_node);
{
/* Make sure we get a unique function type, so we can give
}
}
-/* Build the void_list_node (void_type_node having been created). */
-tree
-build_void_list_node (void)
-{
- tree t = build_tree_list (NULL_TREE, void_type_node);
- return t;
-}
-
bool
cp_missing_noreturn_ok_p (tree decl)
{
static void
d_build_c_type_nodes (void)
{
- void_list_node = build_tree_list (NULL_TREE, void_type_node);
string_type_node = build_pointer_type (char_type_node);
const_string_type_node
= build_pointer_type (build_qualified_type (char_type_node,
only use it for actual characters, not for INTEGER(1). */
build_common_tree_nodes (false);
- void_list_node = build_tree_list (NULL_TREE, void_type_node);
-
/* Set up F95 type nodes. */
gfc_init_kinds ();
gfc_init_types ();
{
build_common_tree_nodes (false);
- /* I don't know why this has to be done explicitly. */
- void_list_node = build_tree_list (NULL_TREE, void_type_node);
-
/* We must create the gogo IR after calling build_common_tree_nodes
(because Gogo::define_builtin_function_trees refers indirectly
to, e.g., unsigned_char_type_node) but before calling
build_common_tree_nodes (false);
- /* I don't know why this has to be done explicitly. */
- void_list_node = build_tree_list (NULL_TREE, void_type_node);
-
build_common_builtin_nodes ();
/* The default precision for floating point numbers. This is used
{
gcc_assert (void_type_node);
- void_list_node = build_tree_list (NULL_TREE, void_type_node);
string_type_node = build_pointer_type (char_type_node);
const_string_type_node
= build_pointer_type (build_qualified_type (char_type_node, TYPE_QUAL_CONST));
void_node = make_node (VOID_CST);
TREE_TYPE (void_node) = void_type_node;
+ void_list_node = build_tree_list (NULL_TREE, void_type_node);
+
null_pointer_node = build_int_cst (build_pointer_type (void_type_node), 0);
layout_type (TREE_TYPE (null_pointer_node));