From: Toon Moene Date: Sat, 23 Nov 2002 00:12:02 +0000 (+0100) Subject: c-decl.c (c_init_decl_processing): Move generation of decls for g77_integer_type_node... X-Git-Tag: releases/gcc-3.2.2~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89119fd6f82647584b1dafb9e09d58a9f85dc5e2;p=thirdparty%2Fgcc.git c-decl.c (c_init_decl_processing): Move generation of decls for g77_integer_type_node and friends from here ... 2002-11-22 Toon Moene * c-decl.c (c_init_decl_processing): Move generation of decls for g77_integer_type_node and friends from here ... * c-common.c (c_common_nodes_and_builtins): ... to here. From-SVN: r59393 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ba30d3e2631..9de3fc6077de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-11-22 Toon Moene + + * c-decl.c (c_init_decl_processing): Move generation of + decls for g77_integer_type_node and friends from here ... + * c-common.c (c_common_nodes_and_builtins): ... to here. + 2002-11-22  Eric Botcazou   PR optimization/8599 diff --git a/gcc/c-common.c b/gcc/c-common.c index 066cb7c04c8e..647b7b7b8a4b 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2623,6 +2623,59 @@ c_common_nodes_and_builtins () pushdecl (build_decl (TYPE_DECL, get_identifier ("complex long double"), complex_long_double_type_node)); + /* Types which are common to the fortran compiler and libf2c. When + changing these, you also need to be concerned with f/com.h. */ + + if (TYPE_PRECISION (float_type_node) + == TYPE_PRECISION (long_integer_type_node)) + { + g77_integer_type_node = long_integer_type_node; + g77_uinteger_type_node = long_unsigned_type_node; + } + else if (TYPE_PRECISION (float_type_node) + == TYPE_PRECISION (integer_type_node)) + { + g77_integer_type_node = integer_type_node; + g77_uinteger_type_node = unsigned_type_node; + } + else + g77_integer_type_node = g77_uinteger_type_node = NULL_TREE; + + if (g77_integer_type_node != NULL_TREE) + { + pushdecl (build_decl (TYPE_DECL, + get_identifier ("__g77_integer"), + g77_integer_type_node)); + pushdecl (build_decl (TYPE_DECL, + get_identifier ("__g77_uinteger"), + g77_uinteger_type_node)); + } + + if (TYPE_PRECISION (float_type_node) * 2 + == TYPE_PRECISION (long_integer_type_node)) + { + g77_longint_type_node = long_integer_type_node; + g77_ulongint_type_node = long_unsigned_type_node; + } + else if (TYPE_PRECISION (float_type_node) * 2 + == TYPE_PRECISION (long_long_integer_type_node)) + { + g77_longint_type_node = long_long_integer_type_node; + g77_ulongint_type_node = long_long_unsigned_type_node; + } + else + g77_longint_type_node = g77_ulongint_type_node = NULL_TREE; + + if (g77_longint_type_node != NULL_TREE) + { + pushdecl (build_decl (TYPE_DECL, + get_identifier ("__g77_longint"), + g77_longint_type_node)); + pushdecl (build_decl (TYPE_DECL, + get_identifier ("__g77_ulongint"), + g77_ulongint_type_node)); + } + record_builtin_type (RID_VOID, NULL, void_type_node); void_zero_node = build_int_2 (0, 0); diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 765dc036228f..7feca7c198e2 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3097,55 +3097,6 @@ c_init_decl_processing () = build_function_type (ptr_type_node, tree_cons (NULL_TREE, ptr_type_node, endlink)); - /* Types which are common to the fortran compiler and libf2c. When - changing these, you also need to be concerned with f/com.h. */ - - if (TYPE_PRECISION (float_type_node) - == TYPE_PRECISION (long_integer_type_node)) - { - g77_integer_type_node = long_integer_type_node; - g77_uinteger_type_node = long_unsigned_type_node; - } - else if (TYPE_PRECISION (float_type_node) - == TYPE_PRECISION (integer_type_node)) - { - g77_integer_type_node = integer_type_node; - g77_uinteger_type_node = unsigned_type_node; - } - else - g77_integer_type_node = g77_uinteger_type_node = NULL_TREE; - - if (g77_integer_type_node != NULL_TREE) - { - pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_integer"), - g77_integer_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_uinteger"), - g77_uinteger_type_node)); - } - - if (TYPE_PRECISION (float_type_node) * 2 - == TYPE_PRECISION (long_integer_type_node)) - { - g77_longint_type_node = long_integer_type_node; - g77_ulongint_type_node = long_unsigned_type_node; - } - else if (TYPE_PRECISION (float_type_node) * 2 - == TYPE_PRECISION (long_long_integer_type_node)) - { - g77_longint_type_node = long_long_integer_type_node; - g77_ulongint_type_node = long_long_unsigned_type_node; - } - else - g77_longint_type_node = g77_ulongint_type_node = NULL_TREE; - - if (g77_longint_type_node != NULL_TREE) - { - pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_longint"), - g77_longint_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_ulongint"), - g77_ulongint_type_node)); - } - pedantic_lvalues = pedantic; make_fname_decl = c_make_fname_decl;