diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/class.c | 4 | ||||
-rw-r--r-- | gcc/cp/decl.c | 12 | ||||
-rw-r--r-- | gcc/cp/lex.c | 2 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 2 | ||||
-rw-r--r-- | gcc/cp/parser.c | 52 | ||||
-rw-r--r-- | gcc/cp/pt.c | 8 | ||||
-rw-r--r-- | gcc/cp/search.c | 8 | ||||
-rw-r--r-- | gcc/cp/typeck2.c | 2 |
9 files changed, 50 insertions, 45 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 73fba486a0e..f94382ed0aa 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-08 Kazu Hirata <kazu@cs.umass.edu> + + * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c, + search.c, typeck2.c: Fix comment formatting. + 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com> PR tree-optimization/18184 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index c21d4411a02..63e2cf74666 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -1027,7 +1027,7 @@ add_method (tree type, tree method) VEC_quick_insert (tree, method_vec, slot, overload); } else - /* Replace the current slot. */ + /* Replace the current slot. */ VEC_replace (tree, method_vec, slot, overload); } @@ -4068,7 +4068,7 @@ check_bases_and_members (tree t) TYPE_HAS_COMPLEX_ASSIGN_REF (t) |= TYPE_HAS_ASSIGN_REF (t) || TYPE_CONTAINS_VPTR_P (t); - /* Synthesize any needed methods. */ + /* Synthesize any needed methods. */ add_implicitly_declared_members (t, cant_have_default_ctor, cant_have_const_ctor, no_const_asn_ref); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 479914905f5..b429a783e7f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5992,7 +5992,7 @@ grokvardecl (tree type, or enumeration declared in a local scope) shall not be used to declare an entity with linkage. - Only check this for public decls for now. */ + Only check this for public decls for now. */ tree t1 = TREE_TYPE (decl); tree t = no_linkage_check (t1, /*relaxed_p=*/false); if (t) @@ -6010,11 +6010,11 @@ grokvardecl (tree type, Note that while this construct is well formed in C++03 it is likely to become ill formed in C++0x. See open - CWG issue 389 and related issues. */ + CWG issue 389 and related issues. */ ; else { - /* It's a typedef referring to an anonymous type. */ + /* It's a typedef referring to an anonymous type. */ pedwarn ("non-local variable %q#D uses anonymous type", decl); if (DECL_ORIGINAL_TYPE (TYPE_NAME (t))) @@ -6437,7 +6437,7 @@ check_special_function_return_type (special_function_kind sfk, /* A variable or data member (whose unqualified name is IDENTIFIER) has been declared with the indicated TYPE. If the TYPE is not acceptable, issue an error message and return a type to use for - error-recovery purposes. */ + error-recovery purposes. */ tree check_var_type (tree identifier, tree type) @@ -9298,7 +9298,7 @@ xref_basetypes (tree ref, tree base_list) { tree *basep; tree binfo, base_binfo; - unsigned max_vbases = 0; /* Maximum direct & indirect virtual bases. */ + unsigned max_vbases = 0; /* Maximum direct & indirect virtual bases. */ unsigned max_bases = 0; /* Maximum direct bases. */ int i; tree default_access; @@ -9606,7 +9606,7 @@ finish_enum (tree enumtype) a smaller integral type would work, unless the user has explicitly requested that we use the smallest possible type. The user can request that for all enumerations with a command line - flag, or for just one enumeration with an attribute. */ + flag, or for just one enumeration with an attribute. */ use_short_enum = flag_short_enums || lookup_attribute ("packed", TYPE_ATTRIBUTES (enumtype)); diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index c0b79685694..d9775d94f0a 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -349,7 +349,7 @@ cxx_init (void) cxx_init_decl_processing (); /* Create the built-in __null node. It is important that this is - not shared. */ + not shared. */ null_node = make_node (INTEGER_CST); TREE_TYPE (null_node) = c_common_type_for_size (POINTER_SIZE, 0); diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 33e745df459..9031f05c2a1 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2783,7 +2783,7 @@ push_class_level_binding (tree name, tree x) gcc_assert (TYPE_BEING_DEFINED (current_class_type)); /* We could have been passed a tree list if this is an ambiguous declaration. If so, pull the declaration out because - check_template_shadow will not handle a TREE_LIST. */ + check_template_shadow will not handle a TREE_LIST. */ if (TREE_CODE (decl) == TREE_LIST && TREE_TYPE (decl) == error_mark_node) decl = TREE_VALUE (decl); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index bea2f61ec3f..646013ad35a 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -53,7 +53,7 @@ typedef struct cp_token GTY (()) ENUM_BITFIELD (rid) keyword : 8; /* Token flags. */ unsigned char flags; - /* True if this token is from a system header. */ + /* True if this token is from a system header. */ BOOL_BITFIELD in_system_header : 1; /* True if this token is from a context where it is implicitly extern "C" */ BOOL_BITFIELD implicit_extern_c : 1; @@ -80,7 +80,7 @@ static const cp_token eof_token = /* The cp_lexer structure represents the C++ lexer. It is responsible for managing the token stream from the preprocessor and supplying it to the parser. Tokens are never added to the cp_lexer after - it is created. */ + it is created. */ typedef struct cp_lexer GTY (()) { @@ -92,7 +92,7 @@ typedef struct cp_lexer GTY (()) size_t buffer_length; /* A pointer just past the last available token. The tokens - in this lexer are [buffer, last_token). */ + in this lexer are [buffer, last_token). */ cp_token_position GTY ((skip)) last_token; /* The next available token. If NEXT_TOKEN is &eof_token, then there are @@ -116,14 +116,14 @@ typedef struct cp_lexer GTY (()) allocate heap memory for it, since tokens are never removed from the lexer's array. There is also no need for the GC to walk through a cp_token_cache, since everything in here is referenced through - a lexer. */ + a lexer. */ typedef struct cp_token_cache GTY(()) { - /* The beginning of the token range. */ + /* The beginning of the token range. */ cp_token * GTY((skip)) first; - /* Points immediately after the last token in the range. */ + /* Points immediately after the last token in the range. */ cp_token * GTY ((skip)) last; } cp_token_cache; @@ -211,7 +211,7 @@ static cp_token_cache *cp_token_cache_new /* A token type for tokens that are not tokens at all; these are used to represent slots in the array where there used to be a token - that has now been deleted. */ + that has now been deleted. */ #define CPP_PURGED ((enum cpp_ttype) (CPP_NESTED_NAME_SPECIFIER + 1)) /* The number of token types, including C++-specific ones. */ @@ -237,7 +237,7 @@ cp_lexer_new_main (void) size_t space; cp_token *buffer; - /* Tell cpplib we want CPP_PRAGMA tokens. */ + /* Tell cpplib we want CPP_PRAGMA tokens. */ cpp_get_options (parse_in)->defer_pragmas = true; /* Tell c_lex not to merge string constants. */ @@ -267,7 +267,7 @@ cp_lexer_new_main (void) pos = buffer; *pos = first_token; - /* Get the remaining tokens from the preprocessor. */ + /* Get the remaining tokens from the preprocessor. */ while (pos->type != CPP_EOF) { pos++; @@ -321,7 +321,7 @@ cp_lexer_new_from_tokens (cp_token_cache *cache) return lexer; } -/* Frees all resources associated with LEXER. */ +/* Frees all resources associated with LEXER. */ static void cp_lexer_destroy (cp_lexer *lexer) @@ -382,7 +382,7 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED , /* On some systems, some header files are surrounded by an implicit extern "C" block. Set a flag in the token if it - comes from such a header. */ + comes from such a header. */ is_extern_c += pending_lang_change; pending_lang_change = 0; token->implicit_extern_c = is_extern_c > 0; @@ -405,7 +405,7 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED , token->keyword = RID_MAX; } -/* Update the globals input_location and in_system_header from TOKEN. */ +/* Update the globals input_location and in_system_header from TOKEN. */ static inline void cp_lexer_set_source_position_from_token (cp_token *token) { @@ -588,7 +588,7 @@ cp_lexer_purge_tokens_after (cp_lexer *lexer, cp_token *tok) } } -/* Consume and handle a pragma token. */ +/* Consume and handle a pragma token. */ static void cp_lexer_handle_pragma (cp_lexer *lexer) { @@ -715,7 +715,7 @@ cp_lexer_stop_debugging (cp_lexer* lexer) #endif /* ENABLE_CHECKING */ -/* Create a new cp_token_cache, representing a range of tokens. */ +/* Create a new cp_token_cache, representing a range of tokens. */ static cp_token_cache * cp_token_cache_new (cp_token *first, cp_token *last) @@ -1265,7 +1265,7 @@ typedef struct cp_parser GTY(()) bool in_type_id_in_expr_p; /* TRUE if we are currently in a header file where declarations are - implicitly extern "C". */ + implicitly extern "C". */ bool implicit_extern_c; /* TRUE if strings in expressions should be translated to the execution @@ -2361,7 +2361,7 @@ cp_parser_new (void) /* We are not parsing a type-id inside an expression. */ parser->in_type_id_in_expr_p = false; - /* Declarations aren't implicitly extern "C". */ + /* Declarations aren't implicitly extern "C". */ parser->implicit_extern_c = false; /* String literals should be translated to the execution character set. */ @@ -2557,7 +2557,7 @@ cp_parser_translation_unit (cp_parser* parser) /* If there are no tokens left then all went well. */ if (cp_lexer_next_token_is (parser->lexer, CPP_EOF)) { - /* Get rid of the token array; we don't need it any more. */ + /* Get rid of the token array; we don't need it any more. */ cp_lexer_destroy (parser->lexer); parser->lexer = NULL; @@ -5299,7 +5299,7 @@ cp_parser_binary_expression (cp_parser* parser) will happen repeatedly; - or, we found an operator which has lower priority. This is the case where the recursive descent *ascends*, as in `3 * 4 + 5' after - parsing `3 * 4'. */ + parsing `3 * 4'. */ if (new_prec <= prec) { if (sp == stack) @@ -5311,7 +5311,7 @@ cp_parser_binary_expression (cp_parser* parser) get_rhs: tree_type = binops_by_token[token->type].tree_type; - /* We used the operator token. */ + /* We used the operator token. */ cp_lexer_consume_token (parser->lexer); /* Extract another operand. It may be the RHS of this expression @@ -5320,7 +5320,7 @@ cp_parser_binary_expression (cp_parser* parser) /* Get another operator token. Look up its precedence to avoid building a useless (immediately popped) stack entry for common - cases such as 3 + 4 + 5 or 3 * 4 + 5. */ + cases such as 3 + 4 + 5 or 3 * 4 + 5. */ token = cp_lexer_peek_token (parser->lexer); lookahead_prec = TOKEN_PRECEDENCE (token); if (lookahead_prec > new_prec) @@ -6603,7 +6603,7 @@ cp_parser_declaration_seq_opt (cp_parser* parser) } /* If we're entering or exiting a region that's implicitly - extern "C", modify the lang context appropriately. */ + extern "C", modify the lang context appropriately. */ if (!parser->implicit_extern_c && token->implicit_extern_c) { push_lang_context (lang_name_c); @@ -8188,7 +8188,7 @@ cp_parser_type_parameter (cp_parser* parser) && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) { identifier = cp_parser_identifier (parser); - /* Treat invalid names as if the parameter were nameless. */ + /* Treat invalid names as if the parameter were nameless. */ if (identifier == error_mark_node) identifier = NULL_TREE; } @@ -9799,7 +9799,7 @@ cp_parser_enum_specifier (cp_parser* parser) cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); /* Look for trailing attributes to apply to this enumeration, and - apply them if appropriate. */ + apply them if appropriate. */ if (cp_parser_allow_gnu_extensions_p (parser)) { tree trailing_attr = cp_parser_attributes_opt (parser); @@ -11729,7 +11729,7 @@ cp_parser_parameter_declaration (cp_parser *parser, cp_token *token; /* Add tokens until we have processed the entire default - argument. We add the range [first_token, token). */ + argument. We add the range [first_token, token). */ first_token = cp_lexer_peek_token (parser->lexer); while (true) { @@ -15503,7 +15503,7 @@ cp_parser_next_token_starts_class_definition_p (cp_parser *parser) } /* Returns TRUE iff the next token is the "," or ">" ending a - template-argument. */ + template-argument. */ static bool cp_parser_next_token_ends_template_argument_p (cp_parser *parser) @@ -15642,7 +15642,7 @@ cp_parser_pre_parsed_nested_name_specifier (cp_parser *parser) parser->object_scope = NULL_TREE; } -/* Consume tokens up through a non-nested END token. */ +/* Consume tokens up through a non-nested END token. */ static void cp_parser_cache_group (cp_parser *parser, diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 961488443b6..c35fd11fd3f 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3570,7 +3570,7 @@ convert_nontype_argument (tree type, tree expr) A template-argument for a non-type, non-template template-parameter shall be one of: [...] - -- the address of an object or function with external linkage. */ + -- the address of an object or function with external linkage. */ if (!DECL_EXTERNAL_LINKAGE_P (expr)) { error ("%qE is not a valid template argument for type %qT " @@ -10792,7 +10792,7 @@ bt_instantiate_type_proc (binding_entry entry, void *data) /* Called from do_type_instantiation to instantiate a member (a member function or a static member variable) of an - explicitly instantiated class template. */ + explicitly instantiated class template. */ static void instantiate_class_member (tree decl, int extern_p) { @@ -10911,7 +10911,7 @@ do_type_instantiation (tree t, tree storage, tsubst_flags_t complain) we don't have any arguments for them. Note that the standard is unclear on whether the instantiation of the members are *explicit* instantiations or not. However, the most natural - interpretation is that it should be an explicit instantiation. */ + interpretation is that it should be an explicit instantiation. */ if (! static_p) for (tmp = TYPE_METHODS (t); tmp; tmp = TREE_CHAIN (tmp)) @@ -11089,7 +11089,7 @@ template_for_substitution (tree decl) If UNDEFINED_OK is nonzero, then instead we treat it as an implicit instantiation. UNDEFINED_OK is nonzero only if we are being used to instantiate the members of an explicitly instantiated class - template. */ + template. */ tree diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 9e6178ea286..635beeaef97 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -82,7 +82,7 @@ static int n_contexts_saved; struct lookup_base_data_s { - tree t; /* type being searched. */ + tree t; /* type being searched. */ tree base; /* The base type we're looking for. */ tree binfo; /* Found binfo. */ bool via_virtual; /* Found via a virtual path. */ @@ -851,7 +851,7 @@ dfs_accessible_post (tree binfo, void *data ATTRIBUTE_UNUSED) then we can tell in what context the access is occurring by looking at the most derived class along the path indicated by BINFO. If CONSIDER_LOCAL is true, do consider special access the current - scope or friendship thereof we might have. */ + scope or friendship thereof we might have. */ int accessible_p (tree type, tree decl, bool consider_local_p) @@ -2150,7 +2150,7 @@ check_hidden_convs (tree binfo, int virtual_depth, int virtualness, tree *prev, other; if (!(virtual_depth || TREE_STATIC (level))) - /* Neither is morally virtual, so cannot hide each other. */ + /* Neither is morally virtual, so cannot hide each other. */ continue; if (!TREE_VALUE (level)) @@ -2171,7 +2171,7 @@ check_hidden_convs (tree binfo, int virtual_depth, int virtualness, if (same_type_p (to_type, TREE_TYPE (other))) { if (they_hide_us) - /* We are hidden. */ + /* We are hidden. */ return 0; if (we_hide_them) diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 46cbaeaa079..ab95bc3e1b8 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -214,7 +214,7 @@ complete_type_check_abstract (tree type) /* Tweak input_location so that the diagnostic appears at the correct location. Notice that this is only needed if the decl is an - IDENTIFIER_NODE, otherwise cp_error_at. */ + IDENTIFIER_NODE, otherwise cp_error_at. */ input_location = pat->locus; abstract_virtuals_error (pat->decl, pat->type); pat = pat->next; |