[patch] cp/*.[ch]: Fix comment typos.

Kazu Hirata kazu@cs.umass.edu
Fri Sep 10 11:55:00 GMT 2004


Hi,

Attached is a patch to fix comment typos.  Committed as obvious.

Kazu Hirata

2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>

	* class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
	name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
	comment typos.

Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.668
diff -u -r1.668 class.c
--- class.c	1 Sep 2004 03:45:25 -0000	1.668
+++ class.c	10 Sep 2004 11:04:49 -0000
@@ -1247,7 +1247,7 @@
 /* Determine all the primary bases within T.  Sets BINFO_PRIMARY_BASE_P for
    those that are primaries.  Sets BINFO_LOST_PRIMARY_P for those
    that have had a nearly-empty virtual primary base stolen by some
-   other base in the heirarchy.  Determines CLASSTYPE_PRIMARY_BASE for
+   other base in the hierarchy.  Determines CLASSTYPE_PRIMARY_BASE for
    T.  */
 
 static void
@@ -1320,7 +1320,7 @@
   /* A "nearly-empty" virtual base class can be the primary base
      class, if no non-virtual polymorphic base can be found.  Look for
      a nearly-empty virtual dynamic base that is not already a primary
-     base of something in the heirarchy.  If there is no such base,
+     base of something in the hierarchy.  If there is no such base,
      just pick the first nearly-empty virtual base.  */
 
   for (base_binfo = TREE_CHAIN (type_binfo); base_binfo;
@@ -3072,7 +3072,7 @@
 	user at least implemented the cleanup correctly, and a destructor
 	is needed to free dynamic memory.
 	
-     This seems enough for pratical purposes.  */
+     This seems enough for practical purposes.  */
     if (warn_ecpp
 	&& has_pointers
 	&& TYPE_HAS_CONSTRUCTOR (t)
Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1044
diff -u -r1.1044 cp-tree.h
--- cp-tree.h	9 Sep 2004 00:48:26 -0000	1.1044
+++ cp-tree.h	10 Sep 2004 11:04:52 -0000
@@ -313,7 +313,7 @@
   tree access_binfo;
 };
 
-/* The different kinds of ids that we ecounter.  */
+/* The different kinds of ids that we encounter.  */
 
 typedef enum cp_id_kind
 {
@@ -738,8 +738,8 @@
 #define cp_function_chain (cfun->language)
 
 /* In a constructor destructor, the point at which all derived class
-   destroying/contruction has been has been done. Ie. just before a
-   constuctor returns, or before any base class destroying will be done
+   destroying/construction has been has been done. Ie. just before a
+   constructor returns, or before any base class destroying will be done
    in a destructor.  */
 
 #define cdtor_label cp_function_chain->x_cdtor_label
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1289
diff -u -r1.1289 decl.c
--- decl.c	6 Sep 2004 17:38:16 -0000	1.1289
+++ decl.c	10 Sep 2004 11:04:57 -0000
@@ -1427,7 +1427,7 @@
          A namespace-name or namespace-alias shall not be declared as
 	 the name of any other entity in the same declarative region.
 	 A namespace-name defined at global scope shall not be
-	 declared as the name of any other entity in any glogal scope
+	 declared as the name of any other entity in any global scope
 	 of the program.  */
       error ("declaration of `namespace %D' conflicts with", newdecl);
       cp_error_at ("previous declaration of `namespace %D' here", olddecl);
@@ -5763,7 +5763,7 @@
   TREE_STATIC (decl) = 1;
   /* For non-template classes, static data members are always put
      out in exactly those files where they are defined, just as
-     with ordinarly namespace-scope variables.  */
+     with ordinary namespace-scope variables.  */
   if (!processing_template_decl)
     DECL_INTERFACE_KNOWN (decl) = 1;
 }
@@ -6145,7 +6145,7 @@
       && TREE_CODE (declarator->u.id.name) == SCOPE_REF)
     return TREE_OPERAND (declarator->u.id.name, 0);
 
-  /* Otherwise, the declarator is not a quablified name; the entity will
+  /* Otherwise, the declarator is not a qualified name; the entity will
      be declared in the current scope.  */
   return NULL_TREE;
 }
@@ -6257,7 +6257,7 @@
       if (type)
 	error ("return type specification for destructor invalid");
       /* We can't use the proper return type here because we run into
-	 problems with abiguous bases and covariant returns.
+	 problems with ambiguous bases and covariant returns.
 	 Java classes are left unchanged because (void *) isn't a valid
 	 Java type, and we don't want to change the Java ABI.  */
       if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype))
@@ -9109,8 +9109,8 @@
 {
   tree *basep;
   tree binfo, base_binfo;
-  unsigned max_vbases = 0; /* Maxium direct & indirect virtual bases. */
-  unsigned max_bases = 0;  /* Maxium direct bases.  */
+  unsigned max_vbases = 0; /* Maximum direct & indirect virtual bases. */
+  unsigned max_bases = 0;  /* Maximum direct bases.  */
   int i;
   tree default_access;
   tree igo_prev; /* Track Inheritance Graph Order.  */
@@ -9232,7 +9232,7 @@
       if (CLASS_TYPE_P (basetype) && !dependent_type_p (basetype))
 	{
 	  base_binfo = TYPE_BINFO (basetype);
-	  /* The orignal basetype could have been a typedef'd type.  */
+	  /* The original basetype could have been a typedef'd type.  */
 	  basetype = BINFO_TYPE (base_binfo);
 
 	  /* Inherit flags from the base.  */
@@ -9431,7 +9431,7 @@
      narrower than their underlying type are suitably zero or sign
      extended to fill their mode.  g++ doesn't make these guarantees.
      Until the middle-end can represent such paradoxical types, we
-     set the TYPE_PRECISON to the width of the underlying type.  */
+     set the TYPE_PRECISION to the width of the underlying type.  */
   TYPE_PRECISION (enumtype) = TYPE_PRECISION (underlying_type);
 
   set_min_and_max_values_for_integral_type (enumtype, precision, unsignedp);
Index: decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.744
diff -u -r1.744 decl2.c
--- decl2.c	9 Sep 2004 17:11:18 -0000	1.744
+++ decl2.c	10 Sep 2004 11:04:59 -0000
@@ -578,7 +578,7 @@
 
 /* Sanity check: report error if this function FUNCTION is not
    really a member of the class (CTYPE) it is supposed to belong to.
-   TEMPLATE_PARMS is used to specifiy the template parameters of a member
+   TEMPLATE_PARMS is used to specify the template parameters of a member
    template passed as FUNCTION_DECL. If the member template is passed as a 
    TEMPLATE_DECL, it can be NULL since the parameters can be extracted
    from the declaration. If the function is not a function template, it
@@ -2998,7 +2998,7 @@
 	reconsider = true;
 
       /* Ask the back end to emit functions and variables that are
-	 enqued.  These emissions may result in marking more entities
+	 enqueued.  These emissions may result in marking more entities
 	 as needed.  */
       if (cgraph_assemble_pending_functions ())
 	reconsider = true;
Index: mangle.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/mangle.c,v
retrieving revision 1.110
diff -u -r1.110 mangle.c
--- mangle.c	30 Aug 2004 15:28:48 -0000	1.110
+++ mangle.c	10 Sep 2004 11:05:00 -0000
@@ -2167,7 +2167,7 @@
   write_char ('E');
 }
 
-/* Non-terminal <tempalate-arg>.  
+/* Non-terminal <template-arg>.  
 
      <template-arg> ::= <type>                        # type
                     ::= L <type> </value/ number> E   # literal
Index: name-lookup.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/name-lookup.h,v
retrieving revision 1.28
diff -u -r1.28 name-lookup.h
--- name-lookup.h	8 Sep 2004 08:08:56 -0000	1.28
+++ name-lookup.h	10 Sep 2004 11:05:01 -0000
@@ -231,7 +231,7 @@
 
     /* The kind of scope that this object represents.  However, a
        SK_TEMPLATE_SPEC scope is represented with KIND set to
-       SK_TEMPALTE_PARMS and EXPLICIT_SPEC_P set to true.  */
+       SK_TEMPLATE_PARMS and EXPLICIT_SPEC_P set to true.  */
     ENUM_BITFIELD (scope_kind) kind : 4;
 
     /* True if this scope is an SK_TEMPLATE_SPEC scope.  This field is
Index: parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.244
diff -u -r1.244 parser.c
--- parser.c	6 Sep 2004 17:38:17 -0000	1.244
+++ parser.c	10 Sep 2004 11:05:07 -0000
@@ -4226,7 +4226,7 @@
      If we are in an integral constant expression context, then we might
      could accept any constant expression; hard to say without analysis.
      Rather than open the barn door too wide right away, allow only integer
-     constant expresions here.  */
+     constant expressions here.  */
   if (for_offsetof)
     index = cp_parser_constant_expression (parser, false, NULL);
   else
Index: search.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/search.c,v
retrieving revision 1.316
diff -u -r1.316 search.c
--- search.c	30 Aug 2004 16:03:46 -0000	1.316
+++ search.c	10 Sep 2004 11:05:08 -0000
@@ -2140,8 +2140,8 @@
 /* Helper for lookup_conversions_r.  PARENT_CONVS is a list of lists
    of conversion functions, the first slot will be for the current
    binfo, if MY_CONVS is non-NULL.  CHILD_CONVS is the list of lists
-   of conversion functions from childen of the current binfo,
-   concatenated with conversions from elsewhere in the heirarchy --
+   of conversion functions from children of the current binfo,
+   concatenated with conversions from elsewhere in the hierarchy --
    that list begins with OTHER_CONVS.  Return a single list of lists
    containing only conversions from the current binfo and its
    children.  */
Index: semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.432
diff -u -r1.432 semantics.c
--- semantics.c	9 Sep 2004 01:49:00 -0000	1.432
+++ semantics.c	10 Sep 2004 11:05:10 -0000
@@ -1348,7 +1348,7 @@
   tree scope;
   tree qualifying_type = NULL_TREE;
 
-  /* If we're not checking, return imediately.  */
+  /* If we're not checking, return immediately.  */
   if (deferred_access_no_check)
     return;
   
Index: typeck2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck2.c,v
retrieving revision 1.172
diff -u -r1.172 typeck2.c
--- typeck2.c	30 Aug 2004 18:59:12 -0000	1.172
+++ typeck2.c	10 Sep 2004 11:05:10 -0000
@@ -207,7 +207,7 @@
       pat = prev;
 
       /* Go through the list, and call abstract_virtuals_error for each
-	element: it will issue a diagostic if the type is abstract.  */
+	element: it will issue a diagnostic if the type is abstract.  */
       while (pat)
 	{
 	  gcc_assert (type == pat->type);



More information about the Gcc-patches mailing list