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.
{
switch (Get_Attribute_Id (Attribute_Name (gnat_node)))
{
- case Attr_Pos:
- case Attr_Val:
case Attr_Pred:
case Attr_Succ:
case Attr_First:
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
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;