]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Fix typos in various files
authorDhruv Chawla <dhruvc@nvidia.com>
Wed, 13 May 2026 11:02:25 +0000 (11:02 +0000)
committerDhruv Chawla <dhruvc@nvidia.com>
Sat, 30 May 2026 14:19:32 +0000 (19:49 +0530)
Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com>
gcc/d/ChangeLog:

* d-attribs.cc (d_handle_alloc_size_attribute): Fix typos.
* d-codegen.cc (build_boolop): Likewise.
(get_frame_for_symbol): Likewise.
* d-gimplify.cc (empty_modify_p): Likewise.
* d-lang.cc (d_parse_file): Likewise.
* d-spec.cc (lang_specific_driver): Likewise.
* d-target.cc (Target::systemLinkage): Likewise.
* decl.cc (get_fndecl_arguments): Likewise.
(build_class_instance): Likewise.
* expr.cc: Likewise.
* implement-d.texi: Likewise.
* intrinsics.cc (call_builtin_fn): Likewise.
(expand_intrinsic_bsf): Likewise.
(expand_intrinsic_rotate): Likewise.
(expand_intrinsic_vastart): Likewise.
(expand_intrinsic_checkedint): Likewise.
(expand_volatile_load): Likewise.
(expand_volatile_store): Likewise.
(expand_intrinsic_vec_convert): Likewise.
(expand_intrinsic_vec_blend): Likewise.
(expand_intrinsic_vec_shuffle): Likewise.
(expand_intrinsic_vec_shufflevector): Likewise.
(expand_intrinsic_vec_load_unaligned): Likewise.
* modules.cc (get_dso_registry_fn): Likewise.
* toir.cc: Likewise.
* typeinfo.cc: Likewise.
* types.cc (finish_aggregate_type): Likewise.

14 files changed:
gcc/d/d-attribs.cc
gcc/d/d-codegen.cc
gcc/d/d-gimplify.cc
gcc/d/d-lang.cc
gcc/d/d-spec.cc
gcc/d/d-target.cc
gcc/d/decl.cc
gcc/d/expr.cc
gcc/d/implement-d.texi
gcc/d/intrinsics.cc
gcc/d/modules.cc
gcc/d/toir.cc
gcc/d/typeinfo.cc
gcc/d/types.cc

index 3f748b7bef3e1231fe4604645948e665c85c0617..6b3ec82e30a387a09debfa57242168a1a572a9e4 100644 (file)
@@ -1340,7 +1340,7 @@ d_handle_alloc_size_attribute (tree *node, tree name, tree args, int,
   tree next = TREE_CHAIN (args);
 
   /* NUM_ARG is null when the attribute includes just one argument, or is
-     explictly set to null if it has been left uninitialized by the caller.  */
+     explicitly set to null if it has been left uninitialized by the caller.  */
   tree num_arg = NULL_TREE;
   if (next != NULL_TREE)
     {
index 4303bfcd4767abf3e924a8ba996a50a192ed4333..0f51fd70eb64ef74425a6ee22e8e25e5ba768e70 100644 (file)
@@ -1520,7 +1520,7 @@ tree
 build_boolop (tree_code code, tree arg0, tree arg1)
 {
   /* Aggregate comparisons may get lowered to a call to builtin memcmp,
-     so need to remove all side effects incase its address is taken.  */
+     so need to remove all side effects in case its address is taken.  */
   if (AGGREGATE_TYPE_P (TREE_TYPE (arg0)))
     arg0 = d_save_expr (arg0);
   if (AGGREGATE_TYPE_P (TREE_TYPE (arg1)))
@@ -2634,7 +2634,7 @@ get_frame_for_symbol (Dsymbol *sym)
          int offset;
          if (cdo->isBaseOf (cd, &offset) && offset != 0)
            {
-             /* Generate a new frame to pass to the overriden function that
+             /* Generate a new frame to pass to the overridden function that
                 has the `this' pointer adjusted.  */
              gcc_assert (offset != OFFSET_RUNTIME);
 
index 82e06aa46e1b0d8b6169e67358cee36dde5b2125..25fbfbe06f617c093ae4166cbf83529a54cbac50 100644 (file)
@@ -41,7 +41,7 @@ empty_modify_p (tree type, tree op)
       return empty_modify_p (type, TREE_OPERAND (op, 1));
 
     case CONSTRUCTOR:
-      /* Non-empty construcors are valid.  */
+      /* Non-empty constructors are valid.  */
       if (CONSTRUCTOR_NELTS (op) != 0 || TREE_CLOBBER_P (op))
        return false;
       break;
index cbdd3bfdffdfcd9b37ac479231f9bffdbfda0331..38380c8d3f7d3d2c5d59f8c55c470cef1a8e9d3e 100644 (file)
@@ -1345,7 +1345,7 @@ d_parse_file (void)
 
   dmd::runDeferredSemantic3 ();
 
-  /* Check again, incase semantic3 pass loaded any more modules.  */
+  /* Check again, in case semantic3 pass loaded any more modules.  */
   while (builtin_modules.length != 0)
     {
       Module *m = builtin_modules.pop ();
index 2993d3475b47b4b7961cc667ae4a4caee1ef5f5d..295e7e8f492520f8248428aa9de551d7db7815bf 100644 (file)
@@ -224,7 +224,7 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
        case OPT_M:
        case OPT_MM:
        case OPT_fsyntax_only:
-         /* Don't specify libaries if we won't link, since that would
+         /* Don't specify libraries if we won't link, since that would
             cause a warning.  */
          saw_opt_c = true;
          phobos_library = PHOBOS_NOLINK;
index 10911ac227121db92c8f6f21a8643345d10efebd..b619c1facbf900e2ca3aa615586e3a1702ba47ec 100644 (file)
@@ -431,7 +431,7 @@ Target::systemLinkage (void)
 /* Generate a TypeTuple of the equivalent types used to determine if a
    function argument of the given type can be passed in registers.
    The results of this are highly platform dependent, and intended
-   primarly for use in implementing va_arg() with RTTI.  */
+   primarily for use in implementing va_arg() with RTTI.  */
 
 TypeTuple *
 Target::toArgTypes (Type *)
index 3b6f8544f2a55962e325915fb6eaebb5be62dc1c..1b37acbd92f134931515488ef23ec132eaec662c 100644 (file)
@@ -219,7 +219,7 @@ get_fndecl_arguments (FuncDeclaration *decl)
    emitted from the D Front-end to GCC trees.
    All visit methods accept one parameter D, which holds the frontend AST
    of the declaration to compile.  These also don't return any value, instead
-   generated code are appened to global_declarations or added to the
+   generated code are appended to global_declarations or added to the
    current_binding_level by d_pushdecl().  */
 
 class DeclVisitor : public Visitor
@@ -1003,7 +1003,7 @@ public:
     rest_of_decl_compilation (fndecl, 1, 0);
 
     /* If this is a member function that nested (possibly indirectly) in another
-       function, construct an expession for this member function's static chain
+       function, construct an expression for this member function's static chain
        by going through parent link of nested classes.  */
     if (d->vthis)
       d_function_chain->static_chain = get_symbol_decl (d->vthis);
@@ -2364,7 +2364,7 @@ build_class_instance (ClassReferenceExp *exp)
    implementation detail.  The initialization of these symbols could be done at
    run-time using during as part of the module initialization or shared static
    constructors phase of run-time start-up - whichever comes after `gc_init()'.
-   And infact that would be the better thing to do here eventually.  */
+   And in fact that would be the better thing to do here eventually.  */
 
 tree
 build_new_class_expr (ClassReferenceExp *expr)
index b24c42d9f9c20918c3b979d96828c422b6c65479..3a3cd4d670a0ef03e4941022d90ef22079ed34b2 100644 (file)
@@ -635,7 +635,7 @@ public:
   void visit (CatExp *e) final override
   {
     /* This error is only emitted during the code generation pass because
-       concatentation is allowed in CTFE.  */
+       concatenation is allowed in CTFE.  */
     if (!global.params.useGC)
       {
        error_at (make_location_t (e->loc),
@@ -707,7 +707,7 @@ public:
       case EXP::unsignedRightShiftAssign:
        /* Use the original lhs type before it was promoted.  The left operand
           of `>>>=' does not undergo integral promotions before shifting.
-          Strip off casts just incase anyway.  */
+          Strip off casts just in case anyway.  */
        while (e1b->op == EXP::cast_)
          {
            CastExp *ce = e1b->isCastExp ();
index fd9e76d2401c086b21deda0f0c5a44e57b5ca01b..6ab42f039a18bb1bdc032b0a5bb51d5156f8562c 100644 (file)
@@ -1215,7 +1215,7 @@ result = __builtin_ssub (0, x, overflow);
 @deftypefnx {Function} {long} core.checkedint.subs (long @var{x}, long @var{y}, @
                                                     ref bool @var{overflow})
 
-Substract two signed integers, checking for overflow.
+Subtract two signed integers, checking for overflow.
 
 This intrinsic is the same as the GCC built-in function
 @code{__builtin_ssub_overflow}.
@@ -1226,7 +1226,7 @@ This intrinsic is the same as the GCC built-in function
 @deftypefnx {Function} {long} core.checkedint.subu (long @var{x}, long @var{y}, @
                                                     ref bool @var{overflow})
 
-Substract two unsigned integers, checking for overflow.
+Subtract two unsigned integers, checking for overflow.
 
 This intrinsic is the same as the GCC built-in function
 @code{__builtin_usub_overflow}.
@@ -1366,7 +1366,7 @@ This intrinsic is the same as the GCC built-in function @code{__builtin_va_copy}
 
 @deftypefn {Function} {void} core.stdc.stdarg.va_end (va_list ap)
 
-Destroy @var{ap} so that it is no longer useable.
+Destroy @var{ap} so that it is no longer usable.
 
 This intrinsic is the same as the GCC built-in function @code{__builtin_va_end}.
 @end deftypefn
@@ -1441,7 +1441,7 @@ computable at compile-time, either because their generic implementations are
 too complex, or do some low-level bit manipulation of floating point types.
 
 Calls to these functions that exist after CTFE has finished will get standard
-code-generation without any special compiler intrinsic suppport.
+code-generation without any special compiler intrinsic support.
 
 @deftypefn {Function} {float} std.math.exponential.exp (float x)
 @deftypefnx {Function} {double} std.math.exponential.exp (double x)
index ae1afa1b35a72a10b5cd1aa6b74f2b0c53ef3e82..f8726938edbbd6638ec12febacdbd36752a2a5ee 100644 (file)
@@ -515,7 +515,7 @@ call_builtin_fn (tree callexp, built_in_function code, int n, ...)
   return convert (TREE_TYPE (callexp), fold (exp));
 }
 
-/* Expand a front-end instrinsic call to bsf().  This takes one argument,
+/* Expand a front-end intrinsic call to bsf().  This takes one argument,
    the signature to which can be either:
 
        int bsf (uint arg);
@@ -544,7 +544,7 @@ expand_intrinsic_bsf (tree callexp)
   return call_builtin_fn (callexp, code, 1, arg);
 }
 
-/* Expand a front-end instrinsic call to bsr().  This takes one argument,
+/* Expand a front-end intrinsic call to bsr().  This takes one argument,
    the signature to which can be either:
 
        int bsr (uint arg);
@@ -714,7 +714,7 @@ expand_intrinsic_rotate (intrinsic_code intrinsic, tree callexp)
     count = CALL_EXPR_ARG (callexp, 1);
   else
     {
-      /* Retrieve from the encoded template instantation.  */
+      /* Retrieve from the encoded template instantiation.  */
       tree callee = get_callee_fndecl (callexp);
       TemplateInstance *ti = DECL_LANG_FRONTEND (callee)->isInstantiated ();
       gcc_assert (ti && ti->tiargs && ti->tiargs->length == 2);
@@ -897,7 +897,7 @@ expand_intrinsic_vastart (tree callexp)
   return call_builtin_fn (callexp, BUILT_IN_VA_START, 2, ap, parmn);
 }
 
-/* Expand a front-end instrinsic call to INTRINSIC, which is either a call to
+/* Expand a front-end intrinsic call to INTRINSIC, which is either a call to
    adds(), addu(), subs(), subu(), negs(), muls(), or mulu().  These intrinsics
    expect to take two or three arguments, the signature to which can be either:
 
@@ -987,7 +987,7 @@ expand_intrinsic_checkedint (intrinsic_code intrinsic, tree callexp)
   return compound_expr (exp, real_part (result));
 }
 
-/* Expand a front-end instrinsic call to volatileLoad().  This takes one
+/* Expand a front-end intrinsic call to volatileLoad().  This takes one
    argument, the signature to which can be either:
 
        ubyte volatileLoad (ubyte* ptr);
@@ -1015,7 +1015,7 @@ expand_volatile_load (tree callexp)
   return result;
 }
 
-/* Expand a front-end instrinsic call to volatileStore().  This takes two
+/* Expand a front-end intrinsic call to volatileStore().  This takes two
    arguments, the signature to which can be either:
 
        void volatileStore (ubyte* ptr, ubyte value);
@@ -1045,7 +1045,7 @@ expand_volatile_store (tree callexp)
   return modify_expr (result, value);
 }
 
-/* Expand a front-end instrinsic call to convertvector().  This takes one
+/* Expand a front-end intrinsic call to convertvector().  This takes one
    argument, the signature to which is:
 
        vector(T) convertvector (vector(F) vec);
@@ -1072,7 +1072,7 @@ expand_intrinsic_vec_convert (tree callexp)
                                       type, 1, vec);
 }
 
-/* Expand a front-end instrinsic call to blendvector().  This expects to take
+/* Expand a front-end intrinsic call to blendvector().  This expects to take
    three arguments, the signature to which is:
 
        vector(T) blendvector (vector(T) vec0, vector(U) vec1, vector(M) mask);
@@ -1101,7 +1101,7 @@ expand_intrinsic_vec_blend (tree callexp)
   return ret;
 }
 
-/* Expand a front-end instrinsic call to shuffle().  This expects to take three
+/* Expand a front-end intrinsic call to shuffle().  This expects to take three
    arguments, the signature to which is:
 
        vector(T) shuffle (vector(T) vec0, vector(T) vec1, vector(M) mask);
@@ -1121,7 +1121,7 @@ expand_intrinsic_vec_shuffle (tree callexp)
                     TREE_TYPE (callexp), vec0, vec1, mask);
 }
 
-/* Expand a front-end instrinsic call to shufflevector().  This takes two
+/* Expand a front-end intrinsic call to shufflevector().  This takes two
    positional arguments and a variadic list, the signature to which is:
 
        vector(TM) shuffle (vector(T) vec1, vector(T) vec2, index...);
@@ -1202,7 +1202,7 @@ expand_intrinsic_vec_shufflevector (tree callexp)
   return ret;
 }
 
-/* Expand a front-end instrinsic call to loadUnaligned().  This takes one
+/* Expand a front-end intrinsic call to loadUnaligned().  This takes one
    argument, the signature to which is:
 
        vector(T) loadUnaligned (vector(T)* ptr)
@@ -1223,7 +1223,7 @@ expand_intrinsic_vec_load_unaligned (tree callexp)
   return convert (TREE_TYPE (callexp), load);
 }
 
-/* Expand a front-end instrinsic call to storeUnaligned().  This takes two
+/* Expand a front-end intrinsic call to storeUnaligned().  This takes two
    arguments, the signature to which is:
 
        vector(T) storeUnaligned (vector(T)* ptr, vector(T) value)
index 535bf462cad9facf4cbc0e69315dd6d6e113113c..d05ad85bac67d757133c85fa9a5d17949d5f737e 100644 (file)
@@ -330,7 +330,7 @@ get_dso_registry_fn (void)
   return dso_registry_fn;
 }
 
-/* Depending on CTOR_P, builds and emits eiter a constructor or destructor
+/* Depending on CTOR_P, builds and emits either a constructor or destructor
    calling _d_dso_registry if `dso_initialized' is `false' in a constructor
    or `true' in a destructor.  */
 
index 51f840f3f28217adb3b0c8a33cf882b6594bd051..63c0af1be13fbd6b76d95ceab8f4c53fbf079efd 100644 (file)
@@ -381,7 +381,7 @@ public:
   {
     /* Don't write out label unless it is marked as used by the frontend.
        This makes auto-vectorization possible in conditional loops.
-       The only excemption to this is in the LabelStatement visitor,
+       The only exception to this is in the LabelStatement visitor,
        in which all computed labels are marked regardless.  */
     if (TREE_USED (label))
       add_stmt (build1 (LABEL_EXPR, void_type_node, label));
@@ -656,7 +656,7 @@ public:
     gcc_unreachable ();
   }
 
-  /* Do while statments implement simple loops.  The body is executed, then
+  /* Do while statements implement simple loops.  The body is executed, then
      the condition is evaluated.  */
 
   void visit (DoStatement *s) final override
@@ -840,7 +840,7 @@ public:
 
     condition = fold (condition);
 
-    /* Build LABEL_DECLs now so they can be refered to by goto case.
+    /* Build LABEL_DECLs now so they can be referred to by goto case.
        Also checking the jump from the switch to the label is allowed.  */
     if (s->cases)
       {
index c976179bb0329113faacc06fdbaffa2f1516e423..2b26cfb992bdd39a29e65fa2832f1166fc032edf 100644 (file)
@@ -195,7 +195,7 @@ make_internal_typeinfo (tinfo_kind tk, Identifier *ident, ...)
 static Module *object_module;
 
 /* Helper for create_frontend_tinfo_types.  Creates a typeinfo class
-   declaration incase one wasn't supplied by reading `object.d'.  */
+   declaration in case one wasn't supplied by reading `object.d'.  */
 
 static void
 make_frontend_typeinfo (Identifier *ident, ClassDeclaration *base = NULL)
index d79a8972b5cc1a37695ce90d31bd03013f79ab69..4ad28993b89f446b7c8123fe073aedf791907a6f 100644 (file)
@@ -727,7 +727,7 @@ finish_aggregate_type (unsigned structsize, unsigned alignsize, tree type)
   finish_incomplete_fields (type);
 }
 
-/* Returns true if the class or struct type TYPE has already been layed out by
+/* Returns true if the class or struct type TYPE has already been laid out by
    the lowering of another front-end AST type.  In which case, there will either
    be a reuse of the back-end type, or a multiple definition error.
    DECO is the uniquely mangled decoration for the type.  */