]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Typo and indentation fix
authorMarc Poulhiès <poulhies@adacore.com>
Thu, 29 Feb 2024 09:51:40 +0000 (10:51 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 14 Jun 2024 07:34:50 +0000 (09:34 +0200)
Fixes typo in comments and 2 instances of bad indentation.

gcc/ada/

* gcc-interface/decl.cc (gnat_to_gnu_entity): Typo fix.
(gnat_to_gnu_component_type): Indent fix.
* gcc-interface/gigi.h (build_call_alloc_dealloc): Typo fix.
* gcc-interface/utils.cc (make_dummy_type): Typo fix.
* gcc-interface/utils2.cc (gnat_protect_expr): Indent fix.

gcc/ada/gcc-interface/decl.cc
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/utils.cc
gcc/ada/gcc-interface/utils2.cc

index 8b72c96c4396acac14b3e2fca7bea83f652edd49..239837426059fb5c8671f788c2eb54f12004e2b7 100644 (file)
@@ -1384,7 +1384,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
            volatile_flag = false;
            gnu_size = NULL_TREE;
 
-           /* In case this was a aliased object whose nominal subtype is
+           /* In case this was an aliased object whose nominal subtype is
               unconstrained, the pointer above will be a thin pointer and
               build_allocator will automatically make the template.
 
@@ -2103,7 +2103,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 
           1. the array type (suffix XUA) containing the actual data,
 
-          2. the template type (suffix XUB) containng the bounds,
+          2. the template type (suffix XUB) containing the bounds,
 
           3. the fat pointer type (suffix XUP) representing a pointer or a
              reference to the unconstrained array type:
@@ -5445,8 +5445,8 @@ gnat_to_gnu_component_type (Entity_Id gnat_array, bool definition,
          if (gnu_comp_align > TYPE_ALIGN (gnu_type))
            gnu_comp_align = 0;
        }
-       else
-        gnu_comp_align = 0;
+      else
+       gnu_comp_align = 0;
 
       gnu_type = maybe_pad_type (gnu_type, gnu_comp_size, gnu_comp_align,
                                 gnat_array, true, definition, true);
index f3205a8a25d9b544c07f5932683e98b9a763e598..6ed74d6879eef3eed5e9a54ccd03344d0225a1a0 100644 (file)
@@ -906,7 +906,7 @@ extern tree build_call_alloc_dealloc (tree gnu_obj, tree gnu_size,
                                      Entity_Id gnat_pool, Node_Id gnat_node);
 
 /* Build a GCC tree to correspond to allocating an object of TYPE whose
-   initial value if INIT, if INIT is nonzero.  Convert the expression to
+   initial value is INIT, if INIT is nonzero.  Convert the expression to
    RESULT_TYPE, which must be some type of pointer.  Return the tree.
 
    GNAT_PROC and GNAT_POOL optionally give the procedure to call and
index ae520542ace669ac0082db510b942f2d67ad2d5a..771cb1a17cadb354d18caab5468be4b812fccf49 100644 (file)
@@ -499,7 +499,7 @@ make_dummy_type (Entity_Id gnat_type)
   if (No (gnat_equiv))
     gnat_equiv = gnat_type;
 
-  /* If it there already a dummy type, use that one.  Else make one.  */
+  /* If there is already a dummy type, use that one.  Else make one.  */
   if (PRESENT_DUMMY_NODE (gnat_equiv))
     return GET_DUMMY_NODE (gnat_equiv);
 
index 4b7e2739f6a21611e26a2f3d95626e98f61b7b8e..70271cf28365516819cf195b872358a5222d944c 100644 (file)
@@ -2884,7 +2884,7 @@ gnat_protect_expr (tree exp)
   if (code == NON_LVALUE_EXPR
       || CONVERT_EXPR_CODE_P (code)
       || code == VIEW_CONVERT_EXPR)
-  return build1 (code, type, gnat_protect_expr (TREE_OPERAND (exp, 0)));
+    return build1 (code, type, gnat_protect_expr (TREE_OPERAND (exp, 0)));
 
   /* If we're indirectly referencing something, we only need to protect the
      address since the data itself can't change in these situations.  */