* tree.def (CHAR_TYPE): Remove.
* dbxout.c (dbxout_type): Delete dead handling of CHAR_TYPE.
* dwarf2out.c (base_type_die, is_base_type): Likewise.
(gen_type_die) <ARRAY_TYPE>: Remove handling of CHAR_TYPE arrays.
(gen_string_type_die): Delete unreachable function.
* tree-pretty-print.c (dump_generic_node): Don't handle CHAR_TYPE.
* tree.c (build_int_cst_wide, type_contains_placeholder_1,
type_hash_eq, variably_modified_type_p, walk_type_fields): Likewise.
* tree.h (NUMERICAL_TYPE_CHECK, INTEGRAL_TYPE_P): Likewise.
* builtins.c (type_to_class): Likewise.
* fold-const.c (fold_convert, build_range_check,
merge_ranges): Likewise.
* expr.c (count_type_elements): Likewise.
* c-pretty-print.c (pp_c_type_specifier): Likewise.
* stor-layout.c (layout_type): Likewise.
* ipa-type-escape.c (type_to_consider): Likewise.
* gimplify.c (omp_firstprivatize_type_sizes,
gimplify_type_sizes): Likewise.
* explow.c (promote_mode): Likewise.
* tree-sra.c (is_sra_scalar_type): Likewise.
* varasm.c (output_constant): Likewise.
* tree-inline.c (remap_type_1): Likewise.
* convert.c (convert_to_pointer, convert_to_real,
convert_to_integer, convert_to_complex): Likewise.
From-SVN: r110775
+2006-02-08 Roger Sayle <roger@eyesopen.com>
+
+ * tree.def (CHAR_TYPE): Remove.
+ * dbxout.c (dbxout_type): Delete dead handling of CHAR_TYPE.
+ * dwarf2out.c (base_type_die, is_base_type): Likewise.
+ (gen_type_die) <ARRAY_TYPE>: Remove handling of CHAR_TYPE arrays.
+ (gen_string_type_die): Delete unreachable function.
+
+ * tree-pretty-print.c (dump_generic_node): Don't handle CHAR_TYPE.
+ * tree.c (build_int_cst_wide, type_contains_placeholder_1,
+ type_hash_eq, variably_modified_type_p, walk_type_fields): Likewise.
+ * tree.h (NUMERICAL_TYPE_CHECK, INTEGRAL_TYPE_P): Likewise.
+ * builtins.c (type_to_class): Likewise.
+ * fold-const.c (fold_convert, build_range_check,
+ merge_ranges): Likewise.
+ * expr.c (count_type_elements): Likewise.
+ * c-pretty-print.c (pp_c_type_specifier): Likewise.
+ * stor-layout.c (layout_type): Likewise.
+ * ipa-type-escape.c (type_to_consider): Likewise.
+ * gimplify.c (omp_firstprivatize_type_sizes,
+ gimplify_type_sizes): Likewise.
+ * explow.c (promote_mode): Likewise.
+ * tree-sra.c (is_sra_scalar_type): Likewise.
+ * varasm.c (output_constant): Likewise.
+ * tree-inline.c (remap_type_1): Likewise.
+ * convert.c (convert_to_pointer, convert_to_real,
+ convert_to_integer, convert_to_complex): Likewise.
+
2006-02-08 Daniel Berlin <dberlin@dberlin.org>
* df-scan.c (df_def_record_1): A set destination may
{
case VOID_TYPE: return void_type_class;
case INTEGER_TYPE: return integer_type_class;
- case CHAR_TYPE: return char_type_class;
case ENUMERAL_TYPE: return enumeral_type_class;
case BOOLEAN_TYPE: return boolean_type_class;
case POINTER_TYPE: return pointer_type_class;
/* Subroutines common to both C and C++ pretty-printers.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
This file is part of GCC.
case VOID_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
case INTEGER_TYPE:
case REAL_TYPE:
if (TYPE_NAME (t))
/* Utility routines for data type conversion for GCC.
Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1997, 1998,
- 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC.
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
if (TYPE_PRECISION (TREE_TYPE (expr)) != POINTER_SIZE)
expr = fold_build1 (NOP_EXPR,
lang_hooks.types.type_for_size (POINTER_SIZE, 0),
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
return build1 (FLOAT_EXPR, type, expr);
case COMPLEX_TYPE:
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
/* If this is a logical operation, which just returns 0 or 1, we can
change the type of the expression. */
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
return build2 (COMPLEX_EXPR, type, convert (subtype, expr),
convert (subtype, integer_zero_node));
/* Output dbx-format symbol table information from GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GCC.
stabstr_S (";0;");
break;
- case CHAR_TYPE:
- if (use_gnu_debug_info_extensions)
- {
- stabstr_S ("@s");
- stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
- stabstr_S (";-20;");
- }
- else
- {
- /* Output the type `char' as a subrange of itself.
- That is what pcc seems to do. */
- stabstr_C ('r');
- dbxout_type_index (char_type_node);
- stabstr_S (TYPE_UNSIGNED (type) ? ";0;255;" : ";0;127;");
- }
- break;
-
case BOOLEAN_TYPE:
if (use_gnu_debug_info_extensions)
{
static void gen_field_die (tree, dw_die_ref);
static void gen_ptr_to_mbr_type_die (tree, dw_die_ref);
static dw_die_ref gen_compile_unit_die (const char *);
-static void gen_string_type_die (tree, dw_die_ref);
static void gen_inheritance_die (tree, tree, dw_die_ref);
static void gen_member_die (tree, dw_die_ref);
static void gen_struct_or_union_type_die (tree, dw_die_ref);
switch (TREE_CODE (type))
{
- case CHAR_TYPE:
case INTEGER_TYPE:
if (TYPE_STRING_FLAG (type))
{
case REAL_TYPE:
case COMPLEX_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
return 1;
case ARRAY_TYPE:
return die;
}
-/* Generate a DIE for a string type. */
-
-static void
-gen_string_type_die (tree type, dw_die_ref context_die)
-{
- dw_die_ref type_die
- = new_die (DW_TAG_string_type, scope_die_for (type, context_die), type);
-
- equate_type_number_to_die (type, type_die);
-
- /* ??? Fudge the string length attribute for now.
- TODO: add string length info. */
-#if 0
- string_length_attribute (TYPE_MAX_VALUE (TYPE_DOMAIN (type)));
- bound_representation (upper_bound, 0, 'u');
-#endif
-}
-
/* Generate the DIE for a base class. */
static void
break;
case ARRAY_TYPE:
- if (TYPE_STRING_FLAG (type) && TREE_CODE (TREE_TYPE (type)) == CHAR_TYPE)
- {
- gen_type_die (TREE_TYPE (type), context_die);
- gen_string_type_die (type, context_die);
- }
- else
- gen_array_type_die (type, context_die);
+ gen_array_type_die (type, context_die);
break;
case VECTOR_TYPE:
case REAL_TYPE:
case COMPLEX_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
/* No DIEs needed for fundamental types. */
break;
/* Subroutines for manipulating rtx's in semantically interesting ways.
Copyright (C) 1987, 1991, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GCC.
{
#ifdef PROMOTE_FUNCTION_MODE
case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE:
- case CHAR_TYPE: case REAL_TYPE: case OFFSET_TYPE:
+ case REAL_TYPE: case OFFSET_TYPE:
#ifdef PROMOTE_MODE
if (for_call)
{
case REAL_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
case POINTER_TYPE:
case OFFSET_TYPE:
case REFERENCE_TYPE:
/* Fold a constant sub-tree into a single node for C-compiler
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC.
switch (TREE_CODE (type))
{
- case INTEGER_TYPE: case CHAR_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE:
+ case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE:
case POINTER_TYPE: case REFERENCE_TYPE:
case OFFSET_TYPE:
if (TREE_CODE (arg) == INTEGER_CST)
switch (TREE_CODE (orig))
{
- case INTEGER_TYPE: case CHAR_TYPE:
+ case INTEGER_TYPE:
case BOOLEAN_TYPE: case ENUMERAL_TYPE:
case POINTER_TYPE: case REFERENCE_TYPE:
return fold_build1 (FLOAT_EXPR, type, arg);
case COMPLEX_TYPE:
switch (TREE_CODE (orig))
{
- case INTEGER_TYPE: case CHAR_TYPE:
+ case INTEGER_TYPE:
case BOOLEAN_TYPE: case ENUMERAL_TYPE:
case POINTER_TYPE: case REFERENCE_TYPE:
case REAL_TYPE:
{
case INTEGER_TYPE:
case ENUMERAL_TYPE:
- case CHAR_TYPE:
/* There is no requirement that LOW be within the range of ETYPE
if the latter is a subtype. It must, however, be within the base
type of ETYPE. So be sure we do the subtraction in that type. */
break;
/* FALLTHROUGH */
case INTEGER_TYPE:
- case CHAR_TYPE:
if (tree_int_cst_equal (low0,
TYPE_MIN_VALUE (TREE_TYPE (low0))))
low0 = 0;
break;
/* FALLTHROUGH */
case INTEGER_TYPE:
- case CHAR_TYPE:
if (tree_int_cst_equal (high1,
TYPE_MAX_VALUE (TREE_TYPE (high1))))
high1 = 0;
/* Tree lowering pass. This pass converts the GENERIC functions-as-trees
tree representation into the GIMPLE form.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Major work done by Sebastian Pop <s.pop@laposte.net>,
Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@redhat.com>.
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
case REAL_TYPE:
omp_firstprivatize_variable (ctx, TYPE_MIN_VALUE (type));
omp_firstprivatize_variable (ctx, TYPE_MAX_VALUE (type));
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
case REAL_TYPE:
gimplify_one_sizepos (&TYPE_MIN_VALUE (type), list_p);
gimplify_one_sizepos (&TYPE_MAX_VALUE (type), list_p);
/* Type based alias analysis.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
switch (TREE_CODE (type))
{
case BOOLEAN_TYPE:
- case CHAR_TYPE:
case COMPLEX_TYPE:
case ENUMERAL_TYPE:
case INTEGER_TYPE:
/* C-compiler utilities for types and variables storage layout
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1996, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GCC.
case INTEGER_TYPE:
case ENUMERAL_TYPE:
- case CHAR_TYPE:
if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST
&& tree_int_cst_sgn (TYPE_MIN_VALUE (type)) >= 0)
TYPE_UNSIGNED (type) = 1;
}
}
\f
-/* TYPE is an integral type, i.e., an INTEGRAL_TYPE, ENUMERAL_TYPE,
- BOOLEAN_TYPE, or CHAR_TYPE. Set TYPE_MIN_VALUE and TYPE_MAX_VALUE
+/* TYPE is an integral type, i.e., an INTEGRAL_TYPE, ENUMERAL_TYPE
+ or BOOLEAN_TYPE. Set TYPE_MIN_VALUE and TYPE_MAX_VALUE
for TYPE, based on the PRECISION and whether or not the TYPE
IS_UNSIGNED. PRECISION need not correspond to a width supported
natively by the hardware; for example, on a machine with 8-bit,
case REAL_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
t = TYPE_MIN_VALUE (new);
if (t && TREE_CODE (t) != INTEGER_CST)
walk_tree (&TYPE_MIN_VALUE (new), copy_body_r, id, NULL);
case VECTOR_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
{
unsigned int quals = TYPE_QUALS (node);
enum tree_code_class class;
/* Scalar Replacement of Aggregates (SRA) converts some structure
references into scalar references, exposing them to the scalar
optimizers.
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
This file is part of GCC.
enum tree_code code = TREE_CODE (type);
return (code == INTEGER_TYPE || code == REAL_TYPE || code == VECTOR_TYPE
|| code == ENUMERAL_TYPE || code == BOOLEAN_TYPE
- || code == CHAR_TYPE || code == POINTER_TYPE || code == OFFSET_TYPE
+ || code == POINTER_TYPE || code == OFFSET_TYPE
|| code == REFERENCE_TYPE);
}
/* Language-independent node constructors for parse phase of GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GCC.
break;
case INTEGER_TYPE:
- case CHAR_TYPE:
case OFFSET_TYPE:
if (TYPE_UNSIGNED (type))
{
case COMPLEX_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
case POINTER_TYPE:
case OFFSET_TYPE:
case REFERENCE_TYPE:
case INTEGER_TYPE:
case REAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
return ((TYPE_MAX_VALUE (a->type) == TYPE_MAX_VALUE (b->type)
|| tree_int_cst_equal (TYPE_MAX_VALUE (a->type),
TYPE_MAX_VALUE (b->type)))
}
/* Create a range of some discrete type TYPE (an INTEGER_TYPE,
- ENUMERAL_TYPE, BOOLEAN_TYPE, or CHAR_TYPE), with
- low bound LOWVAL and high bound HIGHVAL.
- if TYPE==NULL_TREE, sizetype is used. */
+ ENUMERAL_TYPE or BOOLEAN_TYPE), with low bound LOWVAL and
+ high bound HIGHVAL. If TYPE is NULL, sizetype is used. */
tree
build_range_type (tree type, tree lowval, tree highval)
case REAL_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- case CHAR_TYPE:
/* Scalar types are variably modified if their end points
aren't constant. */
RETURN_TRUE_IF_VAR (TYPE_MIN_VALUE (type));
case BOOLEAN_TYPE:
case ENUMERAL_TYPE:
case INTEGER_TYPE:
- case CHAR_TYPE:
case REAL_TYPE:
WALK_SUBTREE (TYPE_MIN_VALUE (type));
WALK_SUBTREE (TYPE_MAX_VALUE (type));
/* The ordering of the following codes is optimized for the checking
macros in tree.h. Changing the order will degrade the speed of the
- compiler. OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, CHAR_TYPE,
- INTEGER_TYPE, REAL_TYPE, POINTER_TYPE. */
+ compiler. OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, INTEGER_TYPE,
+ REAL_TYPE, POINTER_TYPE. */
/* An offset is a pointer relative to an object.
The TREE_TYPE field is the type of the object at the offset.
INTEGRAL_TYPE. */
DEFTREECODE (BOOLEAN_TYPE, "boolean_type", tcc_type, 0)
-/* CHAR in Java; not used in C. Looks like an INTEGRAL_TYPE. */
-DEFTREECODE (CHAR_TYPE, "char_type", tcc_type, 0)
-
/* Integer types in all languages, including char in C.
Also used for sub-ranges of other discrete types.
Has components TYPE_MIN_VALUE, TYPE_MAX_VALUE (expressions, inclusive)
and TYPE_PRECISION (number of bits used by this type).
In the case of a subrange type in Pascal, the TREE_TYPE
of this will point at the supertype (another INTEGER_TYPE,
- or an ENUMERAL_TYPE, CHAR_TYPE, or BOOLEAN_TYPE).
+ or an ENUMERAL_TYPE or BOOLEAN_TYPE).
Otherwise, the TREE_TYPE is zero. */
DEFTREECODE (INTEGER_TYPE, "integer_type", tcc_type, 0)
/* Front-end tree definitions for GNU compiler.
Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC.
TREE_NOT_CHECK3 (T, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE)
#define NUMERICAL_TYPE_CHECK(T) \
- TREE_CHECK5 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, \
- CHAR_TYPE, REAL_TYPE)
+ TREE_CHECK4 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, REAL_TYPE)
/* In all nodes that are expressions, this is the data type of the expression.
In POINTER_TYPE nodes, this is the type that the pointer points to.
#define INTEGRAL_TYPE_P(TYPE) \
(TREE_CODE (TYPE) == ENUMERAL_TYPE \
|| TREE_CODE (TYPE) == BOOLEAN_TYPE \
- || TREE_CODE (TYPE) == CHAR_TYPE \
|| TREE_CODE (TYPE) == INTEGER_TYPE)
/* Nonzero if TYPE represents a scalar floating-point type. */
/* Output variables, constants and external declarations, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GCC.
Otherwise, break and ensure SIZE is the size written. */
switch (code)
{
- case CHAR_TYPE:
case BOOLEAN_TYPE:
case INTEGER_TYPE:
case ENUMERAL_TYPE: