aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorToon Moene <toon@moene.indiv.nluug.nl>2002-04-10 21:49:52 +0200
committerToon Moene <toon@gcc.gnu.org>2002-04-10 19:49:52 +0000
commit03f104725f74a1dc7b6b1c7937d40e0fb931f75f (patch)
tree684eeb2df3aa27879879e6c38c2b2fb087cbdb0d /gcc
parent2f460a0a57bb984d7159f7d40f4cf8724da907ca (diff)
downloadgcc-03f104725f74a1dc7b6b1c7937d40e0fb931f75f.zip
gcc-03f104725f74a1dc7b6b1c7937d40e0fb931f75f.tar.gz
gcc-03f104725f74a1dc7b6b1c7937d40e0fb931f75f.tar.bz2
c-decl.c (c_init_decl_processing): Move generation of decls for g77_integer_type_node and friends from here ...
2002-04-10 Toon Moene <toon@moene.indiv.nluug.nl> * 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: r52141
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/c-common.c53
-rw-r--r--gcc/c-decl.c49
3 files changed, 59 insertions, 49 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd1a961..d9962c3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-10 Toon Moene <toon@moene.indiv.nluug.nl>
+
+ * 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-04-10 Ulrich Weigand <uweigand@de.ibm.com>
* reload1.c (choose_reload_regs): HARD_FRAME_POINTER_REGNUM
diff --git a/gcc/c-common.c b/gcc/c-common.c
index e5661c3..79dab3f 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2652,6 +2652,59 @@ c_common_nodes_and_builtins ()
(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)
+ {
+ (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
+ get_identifier ("__g77_integer"),
+ g77_integer_type_node));
+ (*lang_hooks.decls.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)
+ {
+ (*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
+ get_identifier ("__g77_longint"),
+ g77_longint_type_node));
+ (*lang_hooks.decls.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 acb71e5..3487aef 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2931,55 +2931,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;