Commit 77880ae4 by Kazu Hirata Committed by Kazu Hirata

class.c, [...]: Fix comment typos.

	* 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.

From-SVN: r87292
parent cad79bac
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.
2004-09-09 Ziemowit Laski <zlaski@apple.com> 2004-09-09 Ziemowit Laski <zlaski@apple.com>
* typeck.c (build_c_cast): Preserve the cast if casting * typeck.c (build_c_cast): Preserve the cast if casting
......
...@@ -1247,7 +1247,7 @@ check_bases (tree t, ...@@ -1247,7 +1247,7 @@ check_bases (tree t,
/* Determine all the primary bases within T. Sets BINFO_PRIMARY_BASE_P for /* Determine all the primary bases within T. Sets BINFO_PRIMARY_BASE_P for
those that are primaries. Sets BINFO_LOST_PRIMARY_P for those those that are primaries. Sets BINFO_LOST_PRIMARY_P for those
that have had a nearly-empty virtual primary base stolen by some 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. */ T. */
static void static void
...@@ -1320,7 +1320,7 @@ determine_primary_bases (tree t) ...@@ -1320,7 +1320,7 @@ determine_primary_bases (tree t)
/* A "nearly-empty" virtual base class can be the primary base /* A "nearly-empty" virtual base class can be the primary base
class, if no non-virtual polymorphic base can be found. Look for class, if no non-virtual polymorphic base can be found. Look for
a nearly-empty virtual dynamic base that is not already a primary 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. */ just pick the first nearly-empty virtual base. */
for (base_binfo = TREE_CHAIN (type_binfo); base_binfo; for (base_binfo = TREE_CHAIN (type_binfo); base_binfo;
...@@ -3072,7 +3072,7 @@ check_field_decls (tree t, tree *access_decls, ...@@ -3072,7 +3072,7 @@ check_field_decls (tree t, tree *access_decls,
user at least implemented the cleanup correctly, and a destructor user at least implemented the cleanup correctly, and a destructor
is needed to free dynamic memory. is needed to free dynamic memory.
This seems enough for pratical purposes. */ This seems enough for practical purposes. */
if (warn_ecpp if (warn_ecpp
&& has_pointers && has_pointers
&& TYPE_HAS_CONSTRUCTOR (t) && TYPE_HAS_CONSTRUCTOR (t)
......
...@@ -313,7 +313,7 @@ struct tree_baselink GTY(()) ...@@ -313,7 +313,7 @@ struct tree_baselink GTY(())
tree access_binfo; tree access_binfo;
}; };
/* The different kinds of ids that we ecounter. */ /* The different kinds of ids that we encounter. */
typedef enum cp_id_kind typedef enum cp_id_kind
{ {
...@@ -738,8 +738,8 @@ struct language_function GTY(()) ...@@ -738,8 +738,8 @@ struct language_function GTY(())
#define cp_function_chain (cfun->language) #define cp_function_chain (cfun->language)
/* In a constructor destructor, the point at which all derived class /* In a constructor destructor, the point at which all derived class
destroying/contruction has been has been done. Ie. just before a destroying/construction has been has been done. Ie. just before a
constuctor returns, or before any base class destroying will be done constructor returns, or before any base class destroying will be done
in a destructor. */ in a destructor. */
#define cdtor_label cp_function_chain->x_cdtor_label #define cdtor_label cp_function_chain->x_cdtor_label
......
...@@ -1427,7 +1427,7 @@ duplicate_decls (tree newdecl, tree olddecl) ...@@ -1427,7 +1427,7 @@ duplicate_decls (tree newdecl, tree olddecl)
A namespace-name or namespace-alias shall not be declared as A namespace-name or namespace-alias shall not be declared as
the name of any other entity in the same declarative region. the name of any other entity in the same declarative region.
A namespace-name defined at global scope shall not be 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. */ of the program. */
error ("declaration of `namespace %D' conflicts with", newdecl); error ("declaration of `namespace %D' conflicts with", newdecl);
cp_error_at ("previous declaration of `namespace %D' here", olddecl); cp_error_at ("previous declaration of `namespace %D' here", olddecl);
...@@ -5763,7 +5763,7 @@ set_linkage_for_static_data_member (tree decl) ...@@ -5763,7 +5763,7 @@ set_linkage_for_static_data_member (tree decl)
TREE_STATIC (decl) = 1; TREE_STATIC (decl) = 1;
/* For non-template classes, static data members are always put /* For non-template classes, static data members are always put
out in exactly those files where they are defined, just as 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) if (!processing_template_decl)
DECL_INTERFACE_KNOWN (decl) = 1; DECL_INTERFACE_KNOWN (decl) = 1;
} }
...@@ -6145,7 +6145,7 @@ get_scope_of_declarator (const cp_declarator *declarator) ...@@ -6145,7 +6145,7 @@ get_scope_of_declarator (const cp_declarator *declarator)
&& TREE_CODE (declarator->u.id.name) == SCOPE_REF) && TREE_CODE (declarator->u.id.name) == SCOPE_REF)
return TREE_OPERAND (declarator->u.id.name, 0); 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. */ be declared in the current scope. */
return NULL_TREE; return NULL_TREE;
} }
...@@ -6257,7 +6257,7 @@ check_special_function_return_type (special_function_kind sfk, ...@@ -6257,7 +6257,7 @@ check_special_function_return_type (special_function_kind sfk,
if (type) if (type)
error ("return type specification for destructor invalid"); error ("return type specification for destructor invalid");
/* We can't use the proper return type here because we run into /* 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 classes are left unchanged because (void *) isn't a valid
Java type, and we don't want to change the Java ABI. */ Java type, and we don't want to change the Java ABI. */
if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype)) if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype))
...@@ -9109,8 +9109,8 @@ xref_basetypes (tree ref, tree base_list) ...@@ -9109,8 +9109,8 @@ xref_basetypes (tree ref, tree base_list)
{ {
tree *basep; tree *basep;
tree binfo, base_binfo; tree binfo, base_binfo;
unsigned max_vbases = 0; /* Maxium direct & indirect virtual bases. */ unsigned max_vbases = 0; /* Maximum direct & indirect virtual bases. */
unsigned max_bases = 0; /* Maxium direct bases. */ unsigned max_bases = 0; /* Maximum direct bases. */
int i; int i;
tree default_access; tree default_access;
tree igo_prev; /* Track Inheritance Graph Order. */ tree igo_prev; /* Track Inheritance Graph Order. */
...@@ -9232,7 +9232,7 @@ xref_basetypes (tree ref, tree base_list) ...@@ -9232,7 +9232,7 @@ xref_basetypes (tree ref, tree base_list)
if (CLASS_TYPE_P (basetype) && !dependent_type_p (basetype)) if (CLASS_TYPE_P (basetype) && !dependent_type_p (basetype))
{ {
base_binfo = TYPE_BINFO (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); basetype = BINFO_TYPE (base_binfo);
/* Inherit flags from the base. */ /* Inherit flags from the base. */
...@@ -9431,7 +9431,7 @@ finish_enum (tree enumtype) ...@@ -9431,7 +9431,7 @@ finish_enum (tree enumtype)
narrower than their underlying type are suitably zero or sign narrower than their underlying type are suitably zero or sign
extended to fill their mode. g++ doesn't make these guarantees. extended to fill their mode. g++ doesn't make these guarantees.
Until the middle-end can represent such paradoxical types, we 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); TYPE_PRECISION (enumtype) = TYPE_PRECISION (underlying_type);
set_min_and_max_values_for_integral_type (enumtype, precision, unsignedp); set_min_and_max_values_for_integral_type (enumtype, precision, unsignedp);
......
...@@ -578,7 +578,7 @@ check_java_method (tree method) ...@@ -578,7 +578,7 @@ check_java_method (tree method)
/* Sanity check: report error if this function FUNCTION is not /* Sanity check: report error if this function FUNCTION is not
really a member of the class (CTYPE) it is supposed to belong to. 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 passed as FUNCTION_DECL. If the member template is passed as a
TEMPLATE_DECL, it can be NULL since the parameters can be extracted TEMPLATE_DECL, it can be NULL since the parameters can be extracted
from the declaration. If the function is not a function template, it from the declaration. If the function is not a function template, it
...@@ -2998,7 +2998,7 @@ cp_finish_file (void) ...@@ -2998,7 +2998,7 @@ cp_finish_file (void)
reconsider = true; reconsider = true;
/* Ask the back end to emit functions and variables that are /* 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. */ as needed. */
if (cgraph_assemble_pending_functions ()) if (cgraph_assemble_pending_functions ())
reconsider = true; reconsider = true;
......
...@@ -2167,7 +2167,7 @@ write_template_arg_literal (const tree value) ...@@ -2167,7 +2167,7 @@ write_template_arg_literal (const tree value)
write_char ('E'); write_char ('E');
} }
/* Non-terminal <tempalate-arg>. /* Non-terminal <template-arg>.
<template-arg> ::= <type> # type <template-arg> ::= <type> # type
::= L <type> </value/ number> E # literal ::= L <type> </value/ number> E # literal
......
...@@ -231,7 +231,7 @@ struct cp_binding_level GTY(()) ...@@ -231,7 +231,7 @@ struct cp_binding_level GTY(())
/* The kind of scope that this object represents. However, a /* The kind of scope that this object represents. However, a
SK_TEMPLATE_SPEC scope is represented with KIND set to 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; ENUM_BITFIELD (scope_kind) kind : 4;
/* True if this scope is an SK_TEMPLATE_SPEC scope. This field is /* True if this scope is an SK_TEMPLATE_SPEC scope. This field is
......
...@@ -4226,7 +4226,7 @@ cp_parser_postfix_open_square_expression (cp_parser *parser, ...@@ -4226,7 +4226,7 @@ cp_parser_postfix_open_square_expression (cp_parser *parser,
If we are in an integral constant expression context, then we might If we are in an integral constant expression context, then we might
could accept any constant expression; hard to say without analysis. could accept any constant expression; hard to say without analysis.
Rather than open the barn door too wide right away, allow only integer Rather than open the barn door too wide right away, allow only integer
constant expresions here. */ constant expressions here. */
if (for_offsetof) if (for_offsetof)
index = cp_parser_constant_expression (parser, false, NULL); index = cp_parser_constant_expression (parser, false, NULL);
else else
......
...@@ -2140,8 +2140,8 @@ check_hidden_convs (tree binfo, int virtual_depth, int virtualness, ...@@ -2140,8 +2140,8 @@ check_hidden_convs (tree binfo, int virtual_depth, int virtualness,
/* Helper for lookup_conversions_r. PARENT_CONVS is a list of lists /* Helper for lookup_conversions_r. PARENT_CONVS is a list of lists
of conversion functions, the first slot will be for the current 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 binfo, if MY_CONVS is non-NULL. CHILD_CONVS is the list of lists
of conversion functions from childen of the current binfo, of conversion functions from children of the current binfo,
concatenated with conversions from elsewhere in the heirarchy -- concatenated with conversions from elsewhere in the hierarchy --
that list begins with OTHER_CONVS. Return a single list of lists that list begins with OTHER_CONVS. Return a single list of lists
containing only conversions from the current binfo and its containing only conversions from the current binfo and its
children. */ children. */
......
...@@ -1348,7 +1348,7 @@ check_accessibility_of_qualified_id (tree decl, ...@@ -1348,7 +1348,7 @@ check_accessibility_of_qualified_id (tree decl,
tree scope; tree scope;
tree qualifying_type = NULL_TREE; tree qualifying_type = NULL_TREE;
/* If we're not checking, return imediately. */ /* If we're not checking, return immediately. */
if (deferred_access_no_check) if (deferred_access_no_check)
return; return;
......
...@@ -207,7 +207,7 @@ complete_type_check_abstract (tree type) ...@@ -207,7 +207,7 @@ complete_type_check_abstract (tree type)
pat = prev; pat = prev;
/* Go through the list, and call abstract_virtuals_error for each /* 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) while (pat)
{ {
gcc_assert (type == pat->type); gcc_assert (type == pat->type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment