diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-01-20 09:01:34 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-01-20 09:01:34 +0000 |
commit | 825da0d20f71cd82fa58e16e92099879e9a8b8f2 (patch) | |
tree | 31f580aa64b5ca42d70c133e1b634e5d8fb6daeb /gcc/ada/gcc-interface/utils2.c | |
parent | dd6f2cf98c132d493c9ba7c5602d2ade2efa97f4 (diff) | |
download | gcc-825da0d20f71cd82fa58e16e92099879e9a8b8f2.zip gcc-825da0d20f71cd82fa58e16e92099879e9a8b8f2.tar.gz gcc-825da0d20f71cd82fa58e16e92099879e9a8b8f2.tar.bz2 |
exp_ch2.adb (Expand_Current_Value): Make an appropriate character literal if the entity is of a character type.
* exp_ch2.adb (Expand_Current_Value): Make an appropriate character
literal if the entity is of a character type.
* gcc-interface/lang.opt (fsigned-char): New option.
* gcc-interface/misc.c (gnat_handle_option): Accept it.
(gnat_init): Adjust comment.
* gcc-interface/gigi.h (finish_character_type): New prototype.
(maybe_character_type): New inline function.
(maybe_character_value): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
<E_Enumeration_Subtype>: For a subtype of character with RM_Size and
Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
Copy TYPE_STRING_FLAG from type to subtype.
<E_Array_Type>: Deal with character index types.
<E_Array_Subtype>: Likewise.
* gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
char_type_node throughout.
(build_raise_check): Likewise.
(get_type_length): Deal with character types.
(Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
code. Minor tweak.
<Attr_Pred>: Likewise.
(Loop_Statement_to_gnu): Likewise.
(Raise_Error_to_gnu): Likewise.
<N_Indexed_Component>: Deal with character index types. Remove
obsolete code.
<N_Slice>: Likewise.
<N_Type_Conversion>: Deal with character types. Minor tweak.
<N_Unchecked_Type_Conversion>: Likewise.
<N_In>: Likewise.
<N_Op_Eq>: Likewise.
(emit_index_check): Delete.
* gcc-interface/utils.c (finish_character_type): New function.
(gnat_signed_or_unsigned_type_for): Deal with built-in character types.
* gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
with char_type_node.
(build_call_raise): Likewise.
(build_call_raise_column): Likewise.
(build_call_raise_range): Likewise.
From-SVN: r232604
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index efeb147..ba4a5dca 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -1804,7 +1804,7 @@ expand_sloc (Node_Id gnat_node, tree *filename, tree *line, tree *col) const int len = strlen (str); *filename = build_string (len, str); - TREE_TYPE (*filename) = build_array_type (unsigned_char_type_node, + TREE_TYPE (*filename) = build_array_type (char_type_node, build_index_type (size_int (len))); *line = build_int_cst (NULL_TREE, line_number); if (col) @@ -1834,7 +1834,7 @@ build_call_raise (int msg, Node_Id gnat_node, char kind) return build_call_n_expr (fndecl, 2, build1 (ADDR_EXPR, - build_pointer_type (unsigned_char_type_node), + build_pointer_type (char_type_node), filename), line); } @@ -1858,7 +1858,7 @@ build_call_raise_column (int msg, Node_Id gnat_node, char kind) return build_call_n_expr (fndecl, 3, build1 (ADDR_EXPR, - build_pointer_type (unsigned_char_type_node), + build_pointer_type (char_type_node), filename), line, col); } @@ -1883,7 +1883,7 @@ build_call_raise_range (int msg, Node_Id gnat_node, char kind, return build_call_n_expr (fndecl, 6, build1 (ADDR_EXPR, - build_pointer_type (unsigned_char_type_node), + build_pointer_type (char_type_node), filename), line, col, convert (integer_type_node, index), |