diff options
author | kan <kan@FreeBSD.org> | 2003-02-10 05:57:03 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-02-10 05:57:03 +0000 |
commit | bb9b382fea4fa3d2fe33c4a9d966b363347afcef (patch) | |
tree | 3a7c89db0003b063b5dafd1f6e976cdf70346bda /contrib/gcc/c-common.c | |
parent | 09014fac80bdcf5130fb2835c511337d9433d980 (diff) | |
download | FreeBSD-src-bb9b382fea4fa3d2fe33c4a9d966b363347afcef.zip FreeBSD-src-bb9b382fea4fa3d2fe33c4a9d966b363347afcef.tar.gz |
Update HEAD with stock GCC 3.2.2 release files.
Diffstat (limited to 'contrib/gcc/c-common.c')
-rw-r--r-- | contrib/gcc/c-common.c | 65 |
1 files changed, 59 insertions, 6 deletions
diff --git a/contrib/gcc/c-common.c b/contrib/gcc/c-common.c index 066cb7c..3511f15 100644 --- a/contrib/gcc/c-common.c +++ b/contrib/gcc/c-common.c @@ -2425,7 +2425,7 @@ c_alignof (type) else t = size_int (TYPE_ALIGN (type) / BITS_PER_UNIT); - return fold (build1 (NOP_EXPR, c_size_type_node, t)); + return fold (build1 (NOP_EXPR, size_type_node, t)); } /* Implement the __alignof keyword: Return the minimum required @@ -2473,7 +2473,7 @@ c_alignof_expr (expr) else return c_alignof (TREE_TYPE (expr)); - return fold (build1 (NOP_EXPR, c_size_type_node, t)); + return fold (build1 (NOP_EXPR, size_type_node, t)); } /* Give the specifications for the format attributes, used by C and all @@ -2601,12 +2601,12 @@ c_common_nodes_and_builtins () /* `unsigned long' is the standard type for sizeof. Note that stddef.h uses `unsigned long', and this must agree, even if long and int are the same size. */ - c_size_type_node = + size_type_node = TREE_TYPE (identifier_global_value (get_identifier (SIZE_TYPE))); - signed_size_type_node = signed_type (c_size_type_node); + signed_size_type_node = signed_type (size_type_node); if (flag_traditional) - c_size_type_node = signed_size_type_node; - set_sizetype (c_size_type_node); + size_type_node = signed_size_type_node; + set_sizetype (size_type_node); build_common_tree_nodes_2 (flag_short_double); @@ -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); |