aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-04-10 09:19:22 +0000
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-19 04:17:31 -0400
commit6894d9101e6324972b5b105227f3412a6c46549d (patch)
tree6c62b5d7cd03657988937b1d80e5f8ca450617fb
parentbb24f34350078f92e8740713a4d241cb4c2fc9a7 (diff)
downloadgcc-6894d9101e6324972b5b105227f3412a6c46549d.zip
gcc-6894d9101e6324972b5b105227f3412a6c46549d.tar.gz
gcc-6894d9101e6324972b5b105227f3412a6c46549d.tar.bz2
[Ada] Remove handling of 'Pos and 'Val attributes from gigi
2020-06-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * gcc-interface/trans.c (lvalue_required_for_attribute_p): Do not deal with 'Pos or 'Val. (Attribute_to_gnu): Likewise. * gcc-interface/utils.c (create_field_decl): Small formatting fix.
-rw-r--r--gcc/ada/gcc-interface/trans.c13
-rw-r--r--gcc/ada/gcc-interface/utils.c2
2 files changed, 1 insertions, 14 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 3a6aa75..313a2fb 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -773,8 +773,6 @@ lvalue_required_for_attribute_p (Node_Id gnat_node)
{
switch (Get_Attribute_Id (Attribute_Name (gnat_node)))
{
- case Attr_Pos:
- case Attr_Val:
case Attr_Pred:
case Attr_Succ:
case Attr_First:
@@ -1701,17 +1699,6 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
switch (attribute)
{
- case Attr_Pos:
- case Attr_Val:
- /* These are just conversions since representation clauses for
- enumeration types are handled in the front-end. */
- gnu_expr = gnat_to_gnu (First (Expressions (gnat_node)));
- if (attribute == Attr_Pos)
- gnu_expr = maybe_character_value (gnu_expr);
- gnu_result_type = get_unpadded_type (Etype (gnat_node));
- gnu_result = convert (gnu_result_type, gnu_expr);
- break;
-
case Attr_Pred:
case Attr_Succ:
/* These just add or subtract the constant 1 since representation
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 2a6ed04..7adc313 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -3017,7 +3017,7 @@ create_field_decl (tree name, tree type, tree record_type, tree size, tree pos,
unsigned int known_align;
if (tree_fits_uhwi_p (pos))
- known_align = tree_to_uhwi (pos) & - tree_to_uhwi (pos);
+ known_align = tree_to_uhwi (pos) & -tree_to_uhwi (pos);
else
known_align = BITS_PER_UNIT;