From: nathan Date: Wed, 18 May 2005 14:10:35 +0000 (+0000) Subject: split old changelogs by year X-Git-Tag: upstream/4.9.2~61081 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0d17eb384e8ad619a03ec1b61a4cca1a0e32eb9;p=platform%2Fupstream%2Flinaro-gcc.git split old changelogs by year git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99901 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog-1993 b/gcc/cp/ChangeLog-1993 new file mode 100644 index 0000000..074a7d2 --- /dev/null +++ b/gcc/cp/ChangeLog-1993 @@ -0,0 +1,606 @@ +Tue Dec 28 21:10:03 1993 Mike Stump + + * cp-init.c (expand_vec_init): Remove comptypes test, as it is too + harsh here. + +Tue Dec 28 13:42:22 1993 Mike Stump + + * cp-pt.c (do_pending_expansions): Decide to expand a template + member function, based upon it's class type, not the class type of + the first place it was declared. + +Tue Dec 28 05:42:31 1993 Mike Stump + + * cp-class.c (is_normal): New routine, use to determine when the + given binfo is the normal one. (The one that should have the simple + vtable name.) + * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME + to check if two fndecls are `the same'. Sometimes this routine can + modify the main vtable, and normal should be 1, in that case, so use + is_normal() to determine if this is the main vtable for the class. + Don't recurse down virtual bases, as they are shared, and we take + care of them elsewhere. + * cp-class.c (modify_vtable_entries): If we have already updated the + vtable with the new virtual, don't do it again. + * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as + appropriate. Do virtual function overriding in virtual bases, after + normal overriding, so that the base function list in DECL_VINDEX is + not overridden, before we have a chance to run through the list. + Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'. + Make sure we pass the right address into modify_vtable_entries. + * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which + binfo is the one that has the vtable that we based our vtable on. + +Fri Dec 24 09:40:52 1993 Michael Tiemann + + * cp-typeck.c (c_expand_start_case): Use default_conversion to + convert expression from reference type if necessary. + +Wed Dec 22 17:58:43 1993 Jason Merrill + + * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before + trying to read its TREE_VALUE. + + * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here. + (finish_struct): Instead of here. + +Tue Dec 21 14:34:25 1993 Brendan Kehoe + + * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't + have TYPE_PTRMEMFUNC_P set before we try to build its + CLASSTYPE_ID_AS_LIST. + (get_decl_list): Likewise, when trying to read it. + + * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined. + (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT. + +Mon Dec 20 13:35:03 1993 Brendan Kehoe + + * cp-typeck.c (rationalize_conditional_expr): New function. + (unary_complex_lvalue): Use it. + (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it + with build_unary_op won't cut it. Don't wrap the COND_EXPR with a + SAVE_EXPR either. + + * cp-decl2.c (explicit_warn_return_type): Deleted variable. + (lang_decode_option): Set warn_return_type, not explicit_*, for + -Wreturn-type and -Wall. This is what rest_of_compilation uses to + decide if it should go into jump_optimize or not. + * cp-tree.h (explicit_warn_return_type): Deleted. + * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*. + (finish_function): Also complain about no return in a non-void fn if + we're being pedantic (don't rely on use of -Wreturn-type). + +Fri Dec 17 15:45:46 1993 Brendan Kehoe + + * cp-decl.c (grokdeclarator): Forbid declaration of a function as + static if it's being done inside another function. + + * cp-search.c (compute_visibility): Check for friendship both ways. + +Fri Dec 17 14:28:25 1993 Jason Merrill + + * cp-cvt.c (build_default_binary_type_conversion): Make error + messages more helpful. + + * cp-error.c (op_as_string): New function, returns "operator ==" + given EQ_EXPR or suchlike. + +Fri Dec 17 13:28:11 1993 Brendan Kehoe + + * cp-call.c (print_n_candidates): New function. + (build_overload_call_real): Use it when we complain about a call + being ambiguous. + +Fri Dec 17 12:41:17 1993 Jason Merrill + + * cp-call.c (build_method_call): Fix checking for static call + context. + + * cp-method.c (build_opfncall): Call build_indirect_ref on argument + to operator new. + + * cp-init.c (build_new): Don't mess with rval when building + indirect ref. + +Thu Dec 16 16:48:05 1993 Kung Hsu + + * cp-lex.c (default_assign_ref_body): Add check when TYPE_NESTED_ + NAME(type) may not be exist. It's not a problem for old compiler. + +Thu Dec 16 14:46:06 1993 Brendan Kehoe + + * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's + never used for anything. + (struct lang_type, member type_flags): Delete field + `alters_visibility', and up `dummy' by 1. + * cp-class.c (finish_base_struct): Delete code that copies the + setting of CLASSTYPE_ALTERS_VISIBILITIES_P. + (finish_struct): Delete code that sets it. + +Thu Dec 16 14:44:39 1993 Jason Merrill + + * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to + build_method_call that I messed up before. + + * cp-search.c (get_base_distance): If protect > 1, allow immediate + private base. + + * cp-class.c (finish_base_struct): Set cant_synth_* correctly. + (finish_struct): Likewise. Well, nigh-correctly; it won't deal + properly with the case where a class contains an object of an + ambiguous base class which has a protected op=. Should be fixed + when the access control code gets overhauled. + (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly. + +Thu Dec 16 12:17:06 1993 Brendan Kehoe + + * cp-lex.c (real_yylex): Turn the code back on that deals with + __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to + avoid the ambiguity problems that led to it being turned off in the + first place. + + * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P + to see if something is a method. + +Wed Dec 15 18:35:58 1993 Mike Stump + + * cp-typeck.c (build_modify_expr): Avoid error messages on small + enum bit fields. + * cp-typeck.c (convert_for_assignment): Add missing argument to + cp_warning and cp_pedwarn calls. + +Wed Dec 15 18:25:32 1993 Jason Merrill + + * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base + initializers; it's just anachronistic. + + * cp-decl.c (finish_decl): Don't require external-linkage arrays + to have a complete type at declaration time when pedantic. + +Tue Dec 14 11:37:23 1993 Jason Merrill + + * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set. + + * cp-call.c (build_method_call): Don't dereference pointer given + as instance. + + * cp-decl.c (finish_function): Don't pass pointer to + build_method_call. + (finish_function): Likewise. + + * cp-typeck.c (build_x_function_call): Likewise. + + * cp-method.c (build_component_type_expr): Likewise. + + * cp-init.c (build_member_call): Likewise. + (build_new): Likewise. + +Mon Dec 13 18:04:33 1993 Kung Hsu + + * cp-decl.c (xref_tag): Fix regression created by changes made + in Dec. 7 1993. + * cp-decl.c (xref_defn_tag): Fix parallel nested class problem. + +Fri Dec 10 12:40:25 1993 Brendan Kehoe + + * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print + out the final evaluation of the function, so we can see if ELLIPSIS, + USER, and EVIL were set at the end. + + * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue, + only go for setting TRIVIAL_CODE if we are dealing with types that + are compatible. + +Thu Dec 9 18:27:22 1993 Mike Stump + + * cp-decl.c (flag_huge_objects): New flag to allow large objects. + * toplev.c (lang_options): Likewise. + * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise. + * cp-decl.c (delta_type_node): New type for delta entries. + * cp-tree.h (delta_type_node): Likewise. + * cp-decl.c (init_decl_processing): Setup delta_type_node. + * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use + delta_type_node instead of short_integer_type_node. + * cp-class.c (build_vtable_entry): Likewise. + +Thu Dec 9 16:19:05 1993 Brendan Kehoe + + * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of + NO_{DOLLAR,DOT} macro checks, so it always gets defined. + (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL. + +Wed Dec 8 17:38:06 1993 Mike Stump + + * cp-decl.c (finish_decl): Make sure things that can go into + "common", do go into common, if -fcommon is given. + +Wed Dec 8 13:01:54 1993 Brendan Kehoe + + * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function. + (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out + argument matching diagnostics to make instantly clear what the + compiler is doing. + + * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue, + then check to see if the penalty was increased due to + signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't. + +Tue Dec 7 18:29:14 1993 Kung Hsu + + * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution + problem. + +Tue Dec 7 16:09:34 1993 Jason Merrill + + * cp-class.c (finish_struct): Before synthesizing methods, if no + methods have yet been declared then set nonprivate_method. Don't + set non_private method after synthesizing a method. + + * cp-lex.c (extract_interface_info): If flag_alt_external_templates + is set, tie emitted code to the location of template instantiation, + rather than definition. + + * cp-tree.h: Declare flag_alt_external_templates. + + * cp-decl2.c (lang_decode_option): Support -falt-external-templates. + + * toplev.c (lang_options): Likewise. + +Mon Oct 4 12:50:02 1993 Chip Salzenberg + + [changes propagated from 930810 snapshot] + * cp-decl.c (init_decl_processing): Make long long available for use + as SIZE_TYPE and PTRDIFF_TYPE. + (finish_decl): Allow file-scope static incomplete array. + (grokdeclarator): Don't pass on const and volatile fron function + value type to function type. + Warn here for volatile fn returning non-void type. + * cp-parse.y (attrib): Accept attributes `volatile' with alias + `noreturn', and `const'. + * cp-typeck.c (default_conversion): Don't lose const and volatile. + (build_binary_op_nodefault): Generate pedantic warning for comparison + of complete pointer type with incomplete pointer type. + (build_c_cast): Be careful that null pointer constant be INTEGER_CST. + +Tue Dec 7 10:46:48 1993 Jason Merrill + + * cp-init.c (expand_vec_init): When creating a temporary for copying + arrays, use the type of the source, not the target. + + * cp-cvt.c (convert): Pass an argument for errtype to + convert_to_reference. + + * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with + methods, -> and `this'. + +Mon Dec 6 17:12:33 1993 Jason Merrill + + * cp-error.c (parm_as_string): New function; returns `this' or arg + number. Corresponds to %P. + (dump_expr): Deal with method calls. + + * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment. + * cp-typeck.c (convert_for_assignment): Likewise. + (warn_for_assignment): Lose. + +Mon Dec 6 11:33:35 1993 Brendan Kehoe + + * cp-call.c (ideal_candidate_ansi): Delete code that was never + doing anything useful. Instead, sort once, and DO NOT wipe + out any codes with EVIL_CODE, since that's what we use as a + marker for the end of the list of candidates. + + * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN. + +Mon Dec 6 12:49:17 1993 Jason Merrill + + * cp-init.c (get_aggr_from_typedef): New function, like + is_aggr_typedef but returns the _TYPE. + + * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name. + +Sun Dec 5 18:12:48 1993 Brendan Kehoe + + * cp-lex.c (readescape): Pedwarn when a hex escape is out of range. + +Thu Nov 25 23:50:19 1993 Chip Salzenberg + + Delay language context change until beginning of next decl. + + * cp-lex.h (c_header_level): Removed. + (pending_lang_change): Declared. + * cp-lex.c (c_header_level): Renamed from in_c_header, made static. + (pending_lang_change): Defined. + (check_newline): Rework code that recognizes line number and + filename changes. Instead of pushing and popping lang context, + increment and decrement pending_lang_change. + (do_pending_lang_change): Push and pop lang context according + to value of pending_lang_change. + * cp-parse.y (extdefs): Use lang_extdef instead of extdef. + (extdef): Same as extdef, but call do_pending_lang_change() first. + +Mon Nov 15 15:39:15 1993 Chip Salzenberg + + * cp-typeck.c (build_binary_op_nodefault): Warn for ordered + compare of ptr with 0 only if pedantic in both cases. + +Thu Nov 25 13:31:37 1993 Chip Salzenberg + + Reinstate the below patch, which got lost in the Cygnus merge: + Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no) + * cp-parse.y (maybe_type_qual): Don't fail to set $$. + +Wed Nov 17 19:03:30 1993 Chip Salzenberg + + * cp-parse.y (attrib): Allow "ident(ident)" like the C front end. + +Fri Oct 22 20:43:37 1993 Paul Eggert + + * cp-lex.c (real_yylex): Diagnose floating point constants + that are too large. + +Wed Nov 17 19:10:37 1993 Chip Salzenberg + + * cp-type2.c (build_functional_cast): ARM page 16: When a class + and an object, function or enumerator are declared in the same + scope with the same name, the class name is hidden. + +Wed Nov 17 19:07:18 1993 Chip Salzenberg + + * cp-call.c (convert_harshness_ansi): Distinguish float, double, + and long double from each other when overloading. + (compute_conversion_costs_{ansi,old}, build_method_call, + build_overlay_call_real, convert_to_aggr): Always set and + always use H_LEN member of candidate structure. + +Mon Oct 11 23:10:53 1993 Chip Salzenberg + + * cp-decl.c (duplicate_decls): Note redeclarations of library + functions, and generate distinct warnings for them. + +Mon Oct 4 12:26:49 1993 Chip Salzenberg + + Support format warnings in G++. + + * cp-tree.h: Protect against multiple inclusion. + Declare all public functions in c-common.c (copy from c-tree.h). + (STDIO_PROTO): Define. + (warn_format): Declare. + (record_format_info): Remove declaration. + * cp-decl.c (init_decl_processing): Call init_function_format_info. + * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format. + * cp-typeck.c (build_function_call_real): Call check_function_format. + (record_format_info): Remove -- obsolete stub. + +Sat Jul 24 12:04:29 1993 Chip Salzenberg + + * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl + following an extern one (for -Wredundant-decls). + * cp-parse.y (primary): In statement expression case, if compstmt + returns something other than a BLOCK, return it unchanged. + +Thu Dec 2 20:44:58 1993 Chip Salzenberg + + * cp-decl.c (warn_extern_redeclared_static): New function made + from code extracted from pushdecl. + (duplicate_decls, pushdecl): Call new function. + (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE + to be a TREE_LIST when function is declared in 'extern "C" {}'. + +Fri Dec 3 16:01:10 1993 Jason Merrill + + * cp-class.c (duplicate_tag_error): Use cp_error. + (finish_base_struct): Check for ambiguity with direct base, and don't + generate op= or copy ctor if it exists. + +Fri Dec 3 15:32:34 1993 Kung Hsu + + * cp-init.c (expand_member_init): When initializer name is null, + don't try to build it now because emit_base_init will handle it. + +Fri Dec 3 12:28:59 1993 Jason Merrill + + * cp-lex.c (init_lex): Initialize input_filename to "" for + code such as ExceptionHandler::operator=. + +Fri Dec 3 10:32:08 1993 Jason Merrill + + * cp-decl.c (grokdeclarator): Don't try to print out dname when + complaining about arrays of references if decl_context==TYPENAME, + since it will be null. + + * cp-decl2.c: Default to flag_ansi_overloading. + +Thu Dec 2 18:05:56 1993 Kung Hsu + + * cp-call.c (build_method_call): Use binfo from instance if it's + different from binfo (basetype_path) passed from above. + +Wed Nov 17 19:14:29 1993 Chip Salzenberg + + cp-error.c (dump_expr): Use unsigned chars to output a + TREE_REAL_CST in hex. + +Thu Dec 2 11:05:48 1993 Jason Merrill + + * cp-class.c (finish_struct): Fix typo in setting + cant_synth_asn_ref. + + * cp-tree.h (TYPE_NESTED_NAME): New macro, does + DECL_NESTED_TYPENAME (TYPE_NAME (NODE)). + + * cp-lex.c (default_copy_constructor_body): Change + DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype). + (default_assign_ref_body): Likewise. + (default_copy_constructor_body): Call operator= explicitly for + base classes that have no constructor. + +Thu Dec 2 10:47:15 1993 Michael Tiemann + + * cp-call.c (build_method_call): If the instance variable is + converted to error_mark_node when we're trying to convert it to the + base type of a method we're looking up, return error_mark_node. + +Thu Dec 2 10:41:16 1993 Torbjorn Granlund + + * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR + cases, tests for unsigned operands by peeking inside a NOP_EXPR. + +Wed Dec 1 13:33:34 1993 Brendan Kehoe + + * cp-call.c (compute_conversion_costs_ansi): Use the size of struct + harshness_code, not the size of short, for clearing out the + ansi_harshness. + + * cp-call.c (print_candidates): New function. + (build_method_call): When we had some candidates, but didn't get a + usable match, don't report that we got an error with the first + candidate. Instead, say there were no matches, and list the + candidates with print_candidates. In the second pass, make sure we + clear out ever_seen, so we can accurately count the number of + functions that qualified. + +Wed Dec 1 09:53:59 1993 Torbjorn Granlund + + * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR + only if op1 is known to be != -1. + (build_binary_op_nodefault): Handle *_DIV_EXPR likewise. + +Tue Nov 30 14:07:26 1993 Brendan Kehoe + + * cp-method.c (hack_identifier): If the field itself is private, and + not from a private base class, say so. + +Mon Nov 29 03:00:56 1993 Jason Merrill + + * cp-decl.c (grokdeclarator): Always warn on initialization of + const member. + +Wed Nov 24 00:49:35 1993 Jason Merrill + + * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly. + (finish_base_struct): Set cant_synth_asn_ref properly. + + * cp-lex.c (cons_up_default_function): Add section for operator=. + (default_assign_ref_body): New function, mostly cribbed from + default_copy_constructor_body. + + * cp-class.c (base_info): Add members cant_synth_copy_ctor, + cant_synth_asn_ref, no_const_asn_ref. + (finish_base_struct): Update no_const_asn_ref, note that you should + update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF. + (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and + initialize them properly. Set no_const_asn_ref properly. Set + cant_synth_* in some of the situations where they should be set. + Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call + to cons_up_default_function for operator=. + +Tue Nov 23 20:24:58 1993 Mike Stump + + * cp-cvt.c (convert_force): Add code to perform casting of pointer + to member function types. + * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate + when the conversion should be done, regardless. + * cp-tree.h (build_ptrmemfunc): Likewise. + * cp-type2.c (digest_init): Likewise. + * cp-typeck.c (convert_for_assignment): Likewise. + +Tue Nov 23 18:06:58 1993 Jason Merrill + + * cp-error.c (dump_expr): Do the right thing for variables of + reference type. + + * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF + and its kin properly. + (xref_tag): Propagate TYPE_GETS_ASSIGN_REF. + +Tue Nov 23 12:26:13 1993 Mike Stump + + * cp-method.c (build_opfncall): Don't count pointer to member + functions as aggregates here, as we don't want to look up methods in + them. The compiler would core dump if we did, as they don't have + normal names. + * cp-typeck.c (build_indirect_ref): Improve wording on error + message. + +Mon Nov 22 14:22:23 1993 Jason Merrill + + * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn + (since it's supported in other compiler bits). + + * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name + argument. + + * cp-error.c (dump_function_decl): Don't print return type for + constructors and destructors. + + * cp-cvt.c (cp_convert_to_pointer): Import code from + convert_to_pointer so we can return error_mark_node in the case of an + error, and to allow more meaningful error messages. + (build_type_conversion): Don't go through void* when trying + to convert to a pointer type. + + * cp-decl.c (grokfndecl): Move call to grok_op_properties back + after grokclassfn so that it's dealing with the right decl. + (grok_op_properties): Don't assert !methodp for op new and op delete. + + * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now + no uses of it in the compiler). + + * cp-call.c (build_scoped_method_call): Fix for destructors of simple + types. + (build_method_call): Likewise. + +Fri Nov 19 12:59:38 1993 Jason Merrill + + * cp-tree.c (count_functions): Abstraction function. + + * cp-call.c (build_overload_call_real): Deal with new overloading + properly, remove dead code. + + * gcc.c (default_compilers): Generate and use .ii files in the + intermediate stage of compiling C++ source. + +Fri Nov 19 11:26:09 1993 Jim Wilson + + * cp-expr.c (cplus_expand_expr): Make call_target a valid memory + address before using it, so it can be later safely compared. + +Fri Nov 12 15:30:27 1993 Jason Merrill + + * cp-pt.c (tsubst): Deal with new overloading. + + * cp-typeck.c (fntype_p): Is the arg function type? + (comp_target_parms): pedwarn on conversion from (anything) to (...). + (build_x_function_call): Deal with new overloading. + + * cp-tree.c (decl_list_length): Deal with new overloading. + (decl_value_member): Like value_member, but for DECL_CHAINs. + + * cp-decl.c (duplicate_decls): Deal with new overloading. + (start_decl): Likewise. + + * cp-class.c (instantiate_type): Deal with new overloading. + + * cp-call.c (convert_harshness_ansi): Deal with new overloading. + (convert_harshness_old): Deal with new overloading. + (build_overload_call_real): Likewise. + +Mon Nov 8 13:50:49 1993 Jason Merrill + + * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL + if unambiguous, NULL_TREE otherwise. + (get_first_fn): Returns the first appropriate FUNCTION_DECL. + (is_overloaded_fn): Returns whether or not the passed tree is + a function or list of functions. + + * cp-init.c (init_init_processing): Use `get_first_fn' to find + the FUNCTION_DEFN for new and delete. + + * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut + code size in half (I spit on special cases). + +Tue Sep 7 20:03:33 1993 Jason Merrill + + * cp-decl.c: Allow references and template type parameters as well diff --git a/gcc/cp/ChangeLog.1 b/gcc/cp/ChangeLog-1994 similarity index 56% rename from gcc/cp/ChangeLog.1 rename to gcc/cp/ChangeLog-1994 index 01ef399..1ec125f 100644 --- a/gcc/cp/ChangeLog.1 +++ b/gcc/cp/ChangeLog-1994 @@ -1,3443 +1,3 @@ -Sun Nov 26 14:47:42 1995 Richard Kenner - - * Version 2.7.2 released. - -Mon Nov 20 14:05:00 1995 Mike Stump - - * g++.c (pfatal_with_name): Add missing third argument to concat. - -Thu Oct 26 13:59:54 1995 Mike Stump - - * init.c (expand_aggr_init): Handle cv qualifiers on the object's - type. - -Sat Nov 11 08:25:55 1995 Richard Kenner - - * Version 2.7.1 released. - -Thu Nov 2 17:02:47 1995 Jason Merrill - - * call.c (convert_harshness): Handle references to arrays. - -Fri Oct 27 14:20:21 1995 Jason Merrill - - * typeck.c (comp_target_types): Check multi-level pointer - conversions in both directions. - -Tue Oct 17 21:39:05 1995 Jason Merrill - - * parse.y (explicit_instantiation): Fix 'extern template' with no - return type. - -Mon Oct 16 14:35:20 1995 Jason Merrill - - * parse.y (explicit_instantiation): Support automatic instantiation - of constructors. - (named_class_head_*): Support out-of-class definition of nested - types. - -Wed Oct 11 12:20:56 1995 Mike Stump - - * search.c (envelope_add_decl): New routine. Fix so that - methods are hidden in the same way that other members are. - (dfs_pushdecls): Cleanup and move functionality out of line, - into envelope_add_decl. - -Tue Oct 10 15:46:01 1995 Mike Stump - - * typeck.c (mark_addressable): Only call assemble_external if we - have started the output file. - -Tue Oct 10 11:27:18 1995 Jason Merrill - - * decl.c (start_function): Fix earlier cv-quals change. - -Mon Oct 9 23:53:05 1995 Mike Stump - - * parse.y (complex_direct_notype_declarator): Only push the class if - we are not already in the class. - -Mon Oct 9 11:22:03 1995 Doug Evans - - * decl.c (duplicate_decls): Call merge_machine_decl_attributes. - Update olddecl's attributes too. - (grokdeclarator): #if 0 out call to build_decl_attribute_variant. - * typeck.c (common_type): Call merge_machine_type_attributes. - -Fri Oct 6 14:44:27 1995 Mike Stump - - * typeck.c (mark_addressable): Add missing call to - assemble_external. - -Wed Oct 4 15:06:39 1995 Mike Stump - - * decl.c (store_parm_decls): Make sure the unwinder start comes - before the exception specification start. - * except.c (expand_exception_blocks): Make sure the unwinder end - comes after the terminate protected catch clause region and after - the end of the exception specification region. - -Wed Oct 4 12:47:02 1995 Jason Merrill - - * lex.c (real_yylex): Fix identifier case for linemode. - (handle_sysv_pragma): Don't abort when we see a pragma we don't - recognize. - -Tue Oct 3 14:09:46 1995 Mike Stump - - * decl.c (store_parm_decls): Add a call to start_eh_unwinder. - * except.c (init_exception_processing): __throw doesn't take any - arguments. - (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode - for all pointers. Use expand_builtin_return_addr to unwind the - first level off the stack. - (do_unwind): Always use Pmode, instead of SImode for all pointers. - (expand_exception_blocks): Add a call to end_eh_unwinder. - (start_eh_unwinder, end_eh_unwinder): New routines to build machine - independent stack unwinders for function/method calls. - -Mon Oct 2 17:20:42 1995 Mike Stump - - * tree.c (unsave_expr_now): Make sure we process the argument list - of any called functions. Fixes incorrect code generation for - cleanups. - -Mon Oct 2 13:04:16 1995 Mike Stump - - * typeck.c (get_member_function_from_ptrfunc): Save function if it - needs it. Cures core dump on things like (this->*(f()))(). - -Sat Sep 23 22:51:25 1995 Jason Merrill - - * decl.c (start_function): Conform to gcc cv-quals convention (no - expression has a cv-qualified type) in RESULT_DECLs. - * method.c (make_thunk): Likewise. - -Fri Sep 22 10:21:13 1995 Mike Stump - - * decl.c (pushtag): Add in the namespace name for the tag. - -Thu Sep 21 13:11:13 1995 Mike Stump - - * parse.y (maybe_base_class_list, base_class_list, base_class, - base_class_access_list): Make sure we see the typenames for base - classes. - * lex.c (see_typename): Instead of failing to see a typename when - there is no next token, perfer a typename, and get the next token. - -Wed Sep 20 12:35:27 1995 Michael Meissner - - * decl.c (init_decl_processing): Add __builtin_expect. - -Tue Sep 19 16:48:11 1995 Mike Stump - - * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to - or from pointer to member functions, they must all be handled before - this point. - -Fri Sep 15 17:14:47 1995 Brendan Kehoe - - * init.c (resolve_offset_ref): Fix wording of non-static member - being referenced as a static. - -Fri Sep 15 12:39:11 1995 Jason Merrill - - * typeck.c (build_indirect_ref): Only bash pointer if we actually - call build_expr_type_conversion. - -Thu Sep 14 18:24:56 1995 Jason Merrill - - * cvt.c (build_expr_type_conversion): Handle conversion from - reference. - * typeck.c (build_indirect_ref): Avoid infinite recursion. - -Thu Sep 14 17:23:28 1995 Mike Stump - - * decl.c (expand_start_early_try_stmts): New routine to start a try - block at the start of the function, for function-try-blocks. - * cp-tree.h (expand_start_early_try_stmts): Declare it. - * parse.y (function_try_block): Use it, instead of doing it here, as - we don't want to include rtl.h here, as that conflicts with RETURN - in the parser. - -Wed Sep 13 18:32:24 1995 Mike Stump - - * lex.c (reinit_parse_for_block): Support saving inline - function-try-blocks, uses peekyylex. - * parse.y (eat_saved_input): New rule, permit the parser to see that - END_OF_SAVED_INPUT is ok, as it can see this when parsing the - handlers of a function-try-block. - (fndef): Use it. - (component_decl): Make sure TRY and RETURN can come after fn.def2. - * spew.c (peekyylex): New routine to peek at what will come next. - -Wed Sep 13 16:52:06 1995 Jason Merrill - - * typeck.c (comptypes): Tighten up comparisons of template type - parms. - - * decl.c (duplicate_decls): Turn off whining about virtual functions - redeclared inline for now. - -Wed Sep 13 11:13:40 1995 Mike Stump - - * decl.c (store_in_parms): New routine to put things before we - put base inits. - * cp-tree.h (store_in_parms): Declare it. - * decl.c (store_parm_decls): Use it to makr sure the starting of the - eh spec comes before base inits. - (finish_function): Use sequences instead of the obsolete - reorder_insns. - * parse.y (fndef): Enhance readability and maintainability. Update - to include function_try_block syntax. - (function_try_block): Add. - -Tue Sep 12 17:43:07 1995 Brendan Kehoe - - * call.c (convert_harshness): Use comptypes, not ==, to check if - TYPE and PARMTYPE are equivalent on a function type. - -Tue Sep 12 17:31:33 1995 Douglas Rupp - - * Make-lang.in (cc1plus): Removed unnecessary $(exeext). - -Mon Sep 11 23:24:07 1995 Mike Stump - - * except.c (expand_throw): Never allocate storage for thrown pointer - to objects. - -Mon Sep 11 19:36:45 1995 Mike Stump - - * except.c (expand_start_catch_block): Pointers to objects come - back from catch matching already dereferenced, don't dereference - again. - -Mon Sep 11 15:46:28 1995 Mike Stump - - * except.c (expand_throw): Only decay the throw expression, don't do - any default conversions. This is so that one can throw and catch - characters, and not have them match integers. - -Mon Sep 11 13:46:45 1995 Mike Stump - - * error.c (dump_aggr_type): Deal with anonymous unions that don't - have a TYPE_NAME. - -Fri Sep 8 20:40:27 1995 Brendan Kehoe - - * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex. - -Fri Sep 8 15:51:41 1995 Mike Stump - - * except.c (expand_end_eh_spec): Handle empty EH specifications. - -Fri Sep 8 15:27:22 1995 Mike Stump - - * cp-tree.h (expand_start_eh_spec): Declare new routine. - (expand_end_eh_spec): Likewise. - * decl.c (store_parm_decls): Call expand_start_eh_spec to process - exception specifications. - * except.c (expand_leftover_cleanups): Remove unused parameter. - (expand_end_catch_block): Likewise. - (expand_exception_blocks): Likewise. - (expand_start_eh_spec): New routine to mark the start of an - exception specification region. - (expand_end_eh_spec): New routine to mark the end of an exception - specification region. - (expand_exception_blocks): Call expand_end_eh_spec to process - exception specifications. - -Fri Sep 8 14:40:48 1995 Per Bothner - - * lex.c (do_identifier): Use global binding in preference of - dead for local variable. - -Wed Sep 6 19:32:59 1995 Mike Stump - - * cp-tree.h (build_exception_variant): Remove used first argument. - * decl.c (duplicate_decls): Likewise. - (grokfndecl): Likewise. - (revert_static_member_fn): Likewise. - * decl2.c (grok_method_quals): Likewise. - * tree.c (build_exception_variant): Likewise. - * typeck.c (common_type): Likewise. - * decl2.c (grokclassfn): After changing the type, call - build_exception_variant, if necessary. - -Tue Sep 5 15:56:27 1995 Mike Stump - - * except.c (expand_throw): Run cleanups for the throw expression. - -Wed Aug 30 15:24:38 1995 Stephen L. Favor - - * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond - the store_parm_decls call which does initialization in the emit_* - code concerning label numbering. - -Thu Aug 31 09:01:07 1995 Mike Stump - - * except.c (expand_internal_throw): Let the frontend be responsible - for managing all frontend EH parameters, the backend routine only - needs to deal with backend values. type and value are no longer - passed to __throw. - (init_exception_processing): Likewise. - (expand_start_all_catch): Likewise. - (expand_end_all_catch): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - (expand_builtin_throw): Likewise. - (expand_throw): Likewise. - -Tue Aug 29 15:04:36 1995 Jason Merrill - - * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context - for a decl. - * decl.c (cp_finish_decl): Use it. - -Tue Aug 29 10:30:27 1995 Mike Stump - - * except.c (expand_internal_throw): Oops, almost forgot type and - value are now trees. - -Mon Aug 28 17:57:45 1995 Brendan Kehoe - - Fix the attribute handling to make sure they get noted before we - create the function's RTL, in case they can affect that. - * decl.c (grokfndecl): New arg ATTRLIST. Run - cplus_decl_attributes before creating the decl's rtl. - (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl. - (shadow_tag, groktypename, start_decl, start_method): Pass a - NULL_TREE to grokdeclarator's new last arg. - * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator. - (grokbitfield, grokoptypename): Pass a NULL_TREE to - grokdeclarator's new last arg. - * except.c (expand_start_catch_block): Likewise. - * pt.c (process_template_parm, end_template_decl, - do_function_instantiation): Likewise. - * cp-tree.h (grokfield): Add arg. - (grokdeclarator): Move the prototype from here... - * decl.h: ...to here. - * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield - ATTRLIST argument. - * parse.y: Create a list for the grokfield arg where appropriate, - and pass it down instead of calling cplus_decl_attributes. - -Mon Aug 28 15:07:24 1995 Mike Stump - - * except.c: Always allow turning on exception handling. Allow cross - compilations to use EH. - -Thu Aug 24 17:39:24 1995 Mike Stump - - * except.c (saved_pc, saved_throw_type, saved_throw_value): Use - trees, instead of rtxs, and don't depend on using special machine - dependent registers. - (expand_internal_throw): Likewise. - (init_exception_processing): Likewise. - (expand_start_all_catch): Likewise. - (expand_end_all_catch): Likewise. - (expand_start_catch_block): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - (expand_builtin_throw): Likewise. - (expand_throw): Likewise. - -Wed Aug 23 17:25:51 1995 Jason Merrill - - * cvt.c (build_expr_type_conversion): Handle conversions to - reference types. - -Wed Aug 23 15:33:59 1995 Mike Stump - - * except.c (do_unwind): Work around backend bug with -fpic. - -Tue Aug 22 17:20:07 1995 Per Bothner - - * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI - for-scoping, but supports (and warns about) old programs. - Make the new mode (with value 1) the default. - (lang_f_options): The on-value for flag_new_for_scope is now 2. - * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros - (DECL_SHADOWED_FOR_VAR): Likewise. - * decl.c (struct binding_level): New fields dead_vars_from_for - and is_for_scope. - (note_level_for_for): New function. - (poplevel): Special processing if is_for_scope. - (pushdecl): Warn if for-scope variable shadows local. - * lex.c (do_identifier): Handle old (non-ANSI) for scoping, - and warn if conflicts. - * parse.y (FOR): Call note_level_for_for. - -Mon Aug 21 10:28:31 1995 Jason Merrill - - * decl2.c (import_export_inline): Class interface hackery does not - apply to synthesized methods. - -Sun Aug 20 16:29:00 1995 Mike Stump - - * search.c (virtual_context): Find the right context more often. - Solves a `recoverable compiler error, fixups for virtual function' - problem. - -Sun Aug 20 13:53:24 1995 Mike Stump - - * except.c (expand_start_all_catch): Ensure that we always transfer - control to the right EH handler, by rethrowing the end label on the - region, instead of hoping we are nested and falling through. - (expand_leftover_cleanups): Likewise. - (end_protect): Since we now rethrow the end label, put a - nop after it, so that outer regions are recognized. - * init.c (build_vec_delete_1): New routine to handle most of vector - deleting, all code moved here from build_vec_delete. - (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real - work. - (expand_vec_init): If the array needs partial destructing, setup an - EH region to handle it. - (build_vec_delete): Move lots of code to build_vec_delete_1, use - build_vec_delete_1 to do the grunt work. - -Sat Aug 19 14:25:33 1995 Brendan Kehoe - - Handle decl attributes properly for function definitions without - previous attribute-loaded declarations. - * decl.c (start_function): New arg ATTRS. Add a call to - cplus_decl_attributes with it before we create the RTL. - * cp-tree.h (start_function): Update prototype. - * parse.y (fn.def1): Pass ATTRS into start_function instead of - trying to call cplus_decl_attributes too late. Pass a NULL_TREE - for other use. - * decl2.c (finish_file): Pass NULL_TREE as fourth arg to - start_function. - * method.c (synthesize_method): Likewise. - * except.c (expand_builtin_throw): Likewise for start on __throw. - -Sat Aug 19 13:36:08 1995 Mike Stump - - * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support. - This changes -fvtable-thunks vtable layout, so a recompile will be - necessary, if you use -fvtable-thunks. - (get_vtable_entry): Use n, instead of i to be consistent with the - rest of the compiler. - (get_vtable_entry_n): Likewise. - (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks - are being used. - (finish_struct_1): Likewise. - (skip_rtti_stuff): New routine to collapse similar code from many - different parts of the compiler. I think I got them all. - (modify_one_vtable): Use it. - (fixup_vtable_deltas1): Likewise. - (override_one_vtable): Likewise. - * decl2.c (mark_vtable_entries): Likewise. - * tree.c (debug_binfo): Likewise. - * search.c (expand_upcast_fixups): Likewise. - (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to - consistent with the rest of the compiler. - (get_abstract_virtuals): Likewise. - * cp-tree.h (skip_rtti_stuff): New routine, declare it. - * gc.c (build_headof): Support -fvtable-thunk and -frtti together. - (build_typeid): Likewise. - (build_classof): Remove old style way of doing rtti. Remove support - for `classof' and `headof'. - * gxx.gperf: Likewise. - * hash.h: Likewise. - * parse.y: Likewise. - -Fri Aug 18 17:31:58 1995 Jason Merrill - - * decl.c (start_function): Clear ctor_label and dtor_label. - - * class.c (finish_struct_1): Fix handling of access decls. - -Tue Aug 15 19:21:54 1995 Jason Merrill - - * class.c (finish_struct): Only do minimal processing here, so it - can be used for class template definitions, as well. - (finish_struct_1): New function with the rest of the code. - -Tue Aug 15 09:46:16 1995 Mike Stump - - * class.c (prepare_fresh_vtable): On second though, always build the - offset (see Aug 10 change), unless -fvtable-thunks is given. It - does this by calling the new routine set_rtti_entry. - (finish_struct): Likewise. - (set_rtti_entry): New routine to update the rtti information at the - start of the vtable. - -Mon Aug 14 12:21:22 1995 Brendan Kehoe - - * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor - if it's declared in the C++ language spec. - (dump_function_decl): Likewise. - (dump_function_name): Likewise. - (ident_fndecl): Make sure we got something back from lookup_name. - * decl.c (start_function): Likewise. - -Fri Aug 11 16:52:15 1995 Jason Merrill - - * call.c (build_method_call): Don't call build_new when calling a - constructor without an instance. - -Thu Aug 10 20:00:17 1995 Mike Stump - - * class.c (prepare_fresh_vtable): Always build the offset to the - complete object, as it doesn't cost much. This allows dynamic_cast - to void * to work when -frtti isn't given. - (finish_struct): Likewise. - -Thu Aug 10 16:31:28 1995 Mike Stump - - * except.c (build_eh_type): Split out some functionality to new - routine named build_eh_type_type. - (build_eh_type_type): New routine. - (expand_start_catch_block): Use build_eh_type_type, as we never want - the dynamic type of the catch parameter, just the static type. - Fixes core dumps when -frtti is used and one catchs pointers to - classes. - -Thu Aug 10 14:55:29 1995 Mike Stump - - * except.c (expand_builtin_throw): Since we now use normal calling - conventions for __throw, we have to remove the first layer off the - stack, so that the next context we search for handlers is the outer - context instead of the context that had the call to __throw, if we - don't immediately find the desired context. - -Tue Aug 8 17:44:23 1995 Jason Merrill - - * tree.c (cp_expand_decl_cleanup): Returns int, not tree. - * cp-tree.h: Update. - - * parse.y (template_type_parm): Add support for `typename'. - -Tue Aug 8 12:06:31 1995 Mike Stump - - * except.c (expand_internal_throw): New internal routine to throw a - value. - (expand_end_all_catch, expand_leftover_cleanups): All throwers - changed to use `expand_internal_throw' instead of jumping to throw - label. - (expand_end_catch_block, expand_throw): Likewise. - (throw_label): Removed. - (expand_builtin_throw): Changed so that EH parameters are passed by - normal function call conventions. Completes Aug 4th work. - -Fri Aug 4 17:17:08 1995 Mike Stump - - * cp-tree.h (expand_builtin_throw): Declare it. - * decl2.c (finish_file): Call expand_builtin_throw. - * except.c (make_first_label): Remove. - (init_exception_processing): Don't use a LABEL_REF for throw_label, - instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in - other functions that don't really appear in those functions. This - solves a problem where cc1plus consumed exponential amounts of - memory when -Wall was used. - (expand_end_all_catch, expand_leftover_cleanups, - expand_end_catch_block, expand_throw): Change all uses of - throw_label to match new style. - (do_unwind): Rename parameter to inner_throw_label, as it is now - different from throw_label. Also, assume that our caller will wrap - the passed label with a LABEL_REF, if needed. - (expand_builtin_throw): Make external, change so that the generated - throw is now a real function. - (expand_exception_blocks): Never generate throw code inside another - function. - -Fri Aug 4 12:20:02 1995 Mike Stump - - * decl.c (grokdeclarator): Move checking of mutable const objects - and mutable static objects down, as we might decide during parsing - to unset staticp or constp (for example, when const is part of the - object being pointed to). - -Thu Aug 3 17:13:43 1995 Mike Stump - - * except.c (output_exception_table_entry): Enhance portability to - weird machines. - (emit_exception_table): Likewise. - -Thu Aug 3 16:41:38 1995 Mike Stump - - * typeck.c (build_ptrmemfunc): Handle casting of pointer to - non-virtual member functions. - -Wed Aug 2 11:58:25 1995 Mike Stump - - * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T - and const T all match. - -Wed Aug 2 11:25:33 1995 Mike Stump - - * except.c (build_eh_type): Strip cv qualifiers so that const T&, - T&, T and const T all match. - -Tue Aug 1 14:20:16 1995 Mike Stump - - * except.c: Fix up comments, cleanup code and eliminate exceptNode, - exceptStack, exceptstack, push_except_stmts, pop_except_stmts, - new_except_stack, push_last_insn, pop_last_insn, insn_save_node and - InsnSave. Also, numerous speed improvements, and correctness - improvements. Double faulting in all situations should now be - handled correctly. - (expand_start_all_catch): Instead of having many terminate protected - regions, just have one. - (expand_start_catch_block): No longer have to protect - false_label_rtx, as it isn't used for EH region marking. - (expand_end_catch_block): Expand out EH cleanups here by using - expand_leftover_cleanups. - (expand_end_all_catch): Use sequences instead of playing with insn - links directly. - (expand_exception_blocks): Likewise. Also protect all catch clauses - with one terminate region. - -Mon Jul 31 13:24:30 1995 Jason Merrill - - * method.c (report_type_mismatch): Don't talk about an object - parameter for non-methods. - -Sun Jul 30 13:13:02 1995 Jason Merrill - - * class.c (finish_struct): Catch private and protected members of - anonymous unions here. - * decl2.c (finish_anon_union): And here. - * parse.y: Instead of here. - - * errfn.c (ARGSLIST): Support passing four args. - * error.c (cv_as_string): New function. - (cp_printers): Add it. - * call.c (build_method_call): Report 'const' at end of pseudo-decl. - - * method.c (report_type_mismatch): Deal with a bad_arg of 0. - - * init.c (expand_aggr_init): Handle volatile objects, too. - -Sat Jul 29 13:42:03 1995 Jason Merrill - - * decl.c (struct binding_level): Keep list of incomplete decls. - (print_binding_level): Use list_length to count them. - (pushdecl): Build up the list. - (hack_incomplete_structures): Walk it and prune completed decls. - -Fri Jul 28 15:26:44 1995 Jason Merrill - - * typeck.c (comp_target_types): Don't check const and volatile for - function types. - (comp_ptr_ttypes_real): Likewise. - -Thu Jul 27 15:40:48 1995 Jason Merrill - - * typeck.c (comp_target_types): Fix. - -Thu Jul 27 15:10:48 1995 Mike Stump - - * cp-tree.h (unsave_expr_now, build_unsave_expr, - cp_expand_decl_cleanup): Declare new routines. - * decl.c (cp_finish_decl, store_parm_decls, - hack_incomplete_structures): Change all cals from - expand_decl_cleanup to cp_expand_decl_cleanup. - * gc.c (protect_value_from_gc): Likewise. - * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs. - * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR. - (unsave_expr_now): Backend routine used by tree expander. - (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to - work around a limitation in the backend. The backend uses the - cleanups multiple times, on disjoint control flows, so we cannot - pass unsaved SAVE_EXPRs to the backend. - * tree.def (UNSAVE_EXPR): New tree code. - * typeck.c (c_expand_return): Move goto/return code up inside - conditional, as we don't always want to do this, we only want to do - this when we don't otherwise finish with this control flow. - -Thu Jul 27 10:38:43 1995 Brendan Kehoe - - * parse.y (typespec): Only complain about typeof if we're not - getting it from a system header. - -Thu Jul 27 10:26:23 1995 Doug Evans - - Clean up prefix attribute handling. - * parse.y (reserved_declspecs): Link prefix attributes with declspecs. - (declmods): Likewise. - (all rules that reference typed_declspecs and declmods): Call - split_specs_attrs or strip_attrs to separate declspecs and attrs. - (lang_extdef): Delete resetting of prefix_attributes. - (template_def, notype_declarator rule): Use NULL_TREE for - prefix_attributes. - (condition): Use NULL_TREE for prefix_attributes. - (setattrs): Deleted. - (nomods_initdcl0): Set prefix_attributes to NULL_TREE. - (component_decl): Delete resetting of prefix_attributes. - (component_decl_1, notype_components rule): Use NULL_TREE for - prefix_attributes. - (simple_stmt): Delete resetting of prefix_attributes. - -Mon Jul 24 13:37:53 1995 Jason Merrill - - * call.c (convert_harshness): Deal with reference conversions before - others. Actually do array->pointer decay. Call comp_target_types - with pointer types rather than their targets. - - * typeck.c (comp_target_types): Avoid assigning D const * to B *. - -Mon Jul 24 08:54:46 1995 Brendan Kehoe - - * pt.c (to_be_restored): Move decl to global scope. - -Sat Jul 22 12:22:11 1995 Jason Merrill - - * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P. - -Fri Jul 21 17:09:02 1995 Jason Merrill - - * decl.c (grokdeclarator): Downgrade error about 'extern int A::i' - to pedwarn. - - * pt.c (instantiate_template): Also avoid instantiation if the - function has already been declared to be a specialization. - - * decl2.c (check_classfn): Ignore cname argument, and return the - matching function. - - * decl.c (start_decl): Handle declarations of member functions - outside of the class (i.e. specialization declarations). - -Thu Jul 20 10:34:48 1995 Jason Merrill - - * class.c (finish_struct): Don't mess with the type of bitfields. - - * various.c: s/TYPE_POINTER_TO/build_pointer_type/. - -Thu Jul 20 01:43:10 1995 Mike Stump - - * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init - is not a parameter list (TREE_LIST). - (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set - LOOKUP_NO_CONVERSION so that we don't allow two-level conversions, - but don't set it otherwise. - -Wed Jul 19 20:32:01 1995 Mike Stump - - * init.c (expand_default_init): Don't allow two-level conversions - during construction. - -Wed Jul 19 18:06:37 1995 Mike Stump - - * gc.c (build_headof): The type of dyncasting to a pointer to cv - void, should be pointer to cv void. - -Wed Jul 19 17:25:43 1995 Mike Stump - - * gc.c (build_dynamic_cast): Allow casting in const. - -Wed Jul 19 16:34:27 1995 Mike Stump - - * typeck.c (build_const_cast): If we are passed error_mark_node, - return it. - -Wed Jul 19 15:24:48 1995 Brendan Kehoe - - * class.c (push_nested_class): Make sure TYPE is non-nil. - - * cvt.c (type_promotes_to): Watch for error_mark_node on the - incoming TYPE. - -Wed Jul 19 13:23:12 1995 Gerald Baumgartner - - * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME. - (SIGTABLE_VB_OFF_NAME): New macro. - (vt_off_identifier): Renamed from offset_identifier. - (vb_off_identifier): Added extern declaration. - - * decl.c (vt_off_identifier): Renamed from offset identifier. - (vb_off_identifier): New variable to hold the identifier for the - sigtable field vb_off. - (init_decl_processing): Initialize vb_off_identifier. - Renamed vt_off_identifier from offset_identifier. - * sig.c (build_signature_method_call): Renamed offset_identifier and - local variable offset to vt_off_identifier and vt_off, respectively. - * sig.c (build_signature_table_constructor): Renamed offset to vt_off. - - * decl.c (init_decl_processing): Add vb_off field to - sigtable_entry_type. Reorder fields so that pfn gets properly - aligned at a 64 bit boundary on the Alpha. - * sig.c (build_signature_table_constructor): Build the constructor - according to the new layout. Set the vb_off field to -1 for now. - - * decl.c (init_decl_processing): Align sigtable_entry_type on word - boundaries instead of double word boundaries to save space. - -Tue Jul 18 16:58:37 1995 Mike Stump - - * cvt.c (cp_convert): Always call build_cplus_new for a ctor. - -Tue Jul 18 14:24:53 1995 Brendan Kehoe - - * parse.y (opt.component_decl_list): Only forbid private/protected - in anonymous unions. We need to make this know when the type is - defined for an object, to not give the error. - -Mon Jul 17 14:22:44 1995 Brendan Kehoe - - * parse.y (opt.component_decl_list): Don't allow access control - as private or protected for union members. - -Sun Jul 16 14:01:00 1995 Jim Wilson - - * lex.c (check_newline): For 'p' case, move goto skipline line to - before end brace for 'pragma'. - -Fri Jul 7 13:55:58 1995 Mike Stump - - * g++.1: Tiny updates. - -Fri Jul 7 13:05:20 1995 Mike Stump - - * decl.c (cp_finish_decl): Only destruct local static variables if - they are constructed, and only construct the first time control - passes completely through its declaration (if not initialized with a - constant-expression). - (expand_static_init): Likewise. - -Wed Jul 5 14:05:04 1995 Brendan Kehoe - - * typeck.c (comptypes, case OFFSET_REF): If either offset basetype - is a TEMPLATE_TYPE_PARM, give a match. - -Fri Jun 30 15:42:57 1995 Mike Stump - - * method.c (build_overload_value): Handle encoding of null pointer - constants (or any pointer with a constant numeric value) for - templates. - -Fri Jun 30 13:45:51 1995 Brendan Kehoe - - * call.c (convert_harshness): Add QUAL_CODE when we're faced with - const vs non-const for void conversions. - -Fri Jun 30 10:19:52 1995 Mike Stump - - * except.c (expand_start_all_catch): Fix problem with finding an - outer nested try block when there is no code to separate it from an - inner try block. - -Fri Jun 30 02:22:26 1995 Mike Stump - - * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less - memory please when virtual bases are used. - -Thu Jun 29 19:03:47 1995 Mike Stump - - * class.c (build_vbase_path): Avoid testing things that cannot be - null to see if they are null. - * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work. - * decl.c (finish_function): Pass a type into the new - convert_pointer_to_vbase instead of a binfo. - * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase - and convert_pointer_to_real. - (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead - of the more cryptic call to get_vbase. - -Thu Jun 29 09:35:05 1995 Mike Stump - - * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check. - -Thu Jun 29 03:43:55 1995 Jason Merrill - - * pt.c (instantiate_template): Don't strip 'this' twice. - - * pt.c (coerce_template_parms): Allow null pointer constants. - - * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is - set. - -Wed Jun 28 18:39:03 1995 Jason Merrill - - * decl.c (revert_static_member_fn): Also remove 'this' from - DECL_ARGUMENTS. - * decl2.c (check_classfn): Don't revert this function until we get a - match. - -Wed Jun 28 14:07:27 1995 Brendan Kehoe - - * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here. - -Wed Jun 28 11:05:13 1995 Mike Stump - - * decl2.c (finish_file): Handle global vector news. - * init.c (build_new): Encode vector news so that later we will know - how many elements there are. - -Mon Jun 26 13:38:06 1995 Jason Merrill - - * expr.c (cplus_expand_expr): Don't mess with temp slots. - - * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl - returns null. - - * decl2.c (check_classfn): Use revert_static_member_fn. - * decl.c (revert_static_member_fn): Diagnose static member functions - declared const or volatile. - - * decl2.c (grokfield): Check for missing default args here, too. - (check_default_args): Function to do the checking. - * decl.c (pushdecl): Use it. - - * decl.c (pushdecl): Don't warn about shadowing a member of `this' - if there is no `this'. - -Sun Jun 25 11:34:25 1995 Jason Merrill - - * call.c (build_method_call): Downgrade 'called before definition' - to a warning, as it ought to go away after Monterey. - -Sat Jun 24 14:18:42 1995 Jason Merrill - - * pt.c (coerce_template_parms): Don't do extra checking on pointer - to member arguments. - - * class.c (finish_struct): const and reference members don't prevent - a class from being an aggregate. - - * class.c (finish_struct): Signatures are always aggregates. - -Fri Jun 23 17:20:29 1995 Jason Merrill - - * decl2.c (check_classfn): Improve error message. - - * pt.c (tsubst): Handle PROMOTE_PROTOTYPES. - -Thu Jun 22 01:50:42 1995 Jason Merrill - - * typeck.c (comptypes): Don't ignore method quals. - - * class.c (finish_struct): Non-abstract virtuals are always USED. - - * decl.c (build_ptrmemfunc_type): The underlying union type isn't - IS_AGGR_TYPE, either. - * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead. - * cp-tree.h: Likewise. - - * cp-tree.h (lang_type): Add aggregate. - (CLASSTYPE_AGGREGATE): New macro. - (TYPE_NON_AGGREGATE_CLASS): Likewise. - * class.c (finish_struct): Determine whether a class is an - aggregate. - * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of - TYPE_NEEDS_CONSTRUCTING. - * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for - subobjects, too. - - * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL. - - * decl.c (start_function): For pre-parsed functions, layout all of - the parm decls again. - (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not - DECL_EXTERNAL. - - * pt.c (coerce_template_parms): Improve checking for invalid - template parms. - -Wed Jun 21 12:01:16 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Forbid declaration of a static member - with the same name as its enclosing class. - -Mon Jun 19 10:28:14 1995 Jason Merrill - - * decl.c (finish_function): Clear current_class_decl. - - * typeck.c (build_conditional_expr): Use convert (boolean_type_node - instead of truthvalue_conversion. - - * class.c (finish_struct): A data member with the same name as the - class doesn't suppress constructors. - -Fri Jun 16 18:11:39 1995 Gerald Baumgartner - - * decl.c (start_function): If current_class_decl is a signature - pointer, don't dereference it but set C_C_D to current_class_decl. - -Fri Jun 16 17:06:28 1995 Jason Merrill - - * decl.c (duplicate_decls): Complain about virtual functions - redeclared to be inline. - -Fri Jun 16 13:20:38 1995 Mike Stump - - * decl.c (get_unique_name): New routine to name unnamed namespaces. - (push_namespace): Use get_unique_name for naming unnamed namespaces. - -Thu Jun 15 15:00:41 1995 Jason Merrill - - * parse.y: Call cplus_decl_attributes with prefix_attributes where - appropriate. - -Wed Jun 14 19:24:49 1995 Mike Stump - - * search.c (get_vbase): New routine to switch hierarchies from the - CLASSTYPE_VBASECLASSES to the normal one. - (expand_indirect_vtbls_init): Use get_vbase to figure out how we - want to convert to a vbase pointer. - -Mon Jun 12 17:50:30 1995 Jason Merrill - - * pt.c (instantiate_class_template): Add the new instantiation to - template_classes. - (do_pending_expansions): Call instantiate_member_templates on all of - the classes in template_classes. - -Mon Jun 12 12:36:59 1995 Mike Stump - - * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our - TYPE_MAIN_VARIANT if it is not filled in. - * init.c (build_delete): If the TYPE_DOMAIN is not set, give an - error instead of core dumping. - -Mon Jun 12 10:41:40 1995 Jason Merrill - - * call.c (can_convert): Also check for distance > 0. - (can_convert_arg): Likewise. - (user_harshness): Likewise. - -Fri Jun 9 19:17:21 1995 Jason Merrill - - * g++.c (MATH_LIBRARY): Provide default. - (main): Always link with the math library if we link with libstdc++. - - * decl.c (start_function): Complain about redefinition of a function - even when the pending_inline version is compiled after the other - version. - -Thu Jun 8 15:44:38 1995 Jason Merrill - - * gc.c (build_dynamic_cast): Build up a reference to a parameter of - aggregate type. - -Wed Jun 7 15:31:57 1995 Brendan Kehoe - - * init.c (build_vec_delete): Resolve an offset ref before we try to - use it. - -Wed Jun 7 14:19:32 1995 Jason Merrill - - * typeck.c (build_modify_expr): If the class lacks a constructor or - assignment operator, return error_mark_node. - (common_type): Use build_cplus_array_type. - -Tue Jun 6 09:41:27 1995 Mike Stump - - * class.c (dont_allow_type_definitions): New variable set when types - cannot be defined. - (finish_struct): Use it. - * cp-tree.h (dont_allow_type_definitions): Define it. - * parse.y (primary, handler_seq): Set it. - -Mon Jun 5 18:49:38 1995 Mike Stump - - * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for - results from lookup_fnfields. Always give warning/error on bad - code. - -Mon Jun 5 11:39:37 1995 Brendan Kehoe - - * init.c (member_init_ok_or_else): Don't allow initialization of - an ancestor's member from within a constructor. - -Mon Jun 5 11:20:34 1995 Gerald Baumgartner - - * sig.c (build_signature_table_constructor): Use DECL_CONTEXT - instead of DECL_CLASS_CONTEXT for calculating the vfield offset so - abstract virtual functions are handled correctly. - - * sig.c (build_signature_table_constructor): Store the correct - delta in signature table entries. It does not yet work for - classes with virtual base classes as implementations of signatures. - (build_signature_method_call): Add the delta to the object_ptr - before generating the function call. - - * call.c (build_method_call): Make instance_ptr the signature - pointer itself instead of dereferencing the optr. - * sig.c (build_signature_method_call): Dereference the optr for the - direct and virtual calls. - - * sig.c (build_signature_table_constructor): Make the tag for - default implementations -1 instead of 2. - (build_signature_method_call): Change the generated conditional - expression correspondingly. - - * sig.c (build_signature_pointer_constructor): Deleted the sorry - message that said we can't handle multiple inheritance for - implementations of signatures - (build_signature_method_call): Use the offset from the sigtable - entry instead of the vptr field from the signature pointer for - building a virtual function call. - - * class.c (build_vfn_ref): Deleted signature specific code, we don't - call this function anymore from build_signature_method_call. - - * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr - field in the object now instead of in the signature pointer/ref. - (build_vptr_ref): Deleted extern declaration. - * sig.c (build_vptr_ref): Deleted. - (build_signature_pointer_or_reference_type): Deleted construction of - the vptr field. - (build_signature_pointer_constructor): Deleted initialization of/ - assignment to the vptr field. - - * sig.c (build_signature_table_constructor): Convert the signature - table entry fields to their correct types. - - * sig.c (build_signature_table_constructor): Don't call digest_init - for the fields of a sigtable entry, it's wasted time. - - * sig.c (build_signature_table_constructor): Correctly set the - offset and index fields of a sigtable entry. Build the constructor - the way digest_init does, digest_init can't handle initializing an - anonymous union inside a struct. - (build_signature_method_call): Use the index field instead of the - delta field to get the vtable index. - - * decl.c (init_decl_processing): Fix number of fields for building - sigtable_entry_type. - - * cp-tree.h (tag_identifier, offset_identifier): Added extern decls. - (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME. - (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead. - * decl.c (tag_identifier, offset_identifier): New variables to - hold the identifiers for the sigtable fields tag and offset. - (init_decl_processing): Initialize these variables. - (init_decl_processing): Use these variables to build the - sigtable_entry_type structure. Rename the code and offset fields - to tag and delta, respectively; add offset and index fields. Changed - types of fields from short_integer_type_node to delta_type_node. - * sig.c (build_signature_table_constructor): Rename code and offset - to tag and delta, respectively. - (build_signature_method_call): Likewise. Use above variables. - -Thu Jun 1 17:03:51 1995 Jason Merrill - - * decl.c (lookup_name_real): Don't try to look anything up in an - erroneous object. - -Fri Jun 2 10:30:14 1995 Mike Stump - - * method.c (build_overload_int): New routine. Break out - functionality from build_overload_value so we can reuse it. - (build_overload_value): Handle pointer to member functions as value - parameters for templates. - (build_overload_identifier): Since template parameters are shared - among all instantiations, we have to substitute in the real types - in TREE_TYPE (parm). - pt.c (coerce_template_parms): Likewise. - (push_template_decls): Likewise. - (grok_template_type): Deleted as template parameters are shared - among all instantiations. - -Wed May 31 19:10:32 1995 Mike Stump - - * decl.c (grokdeclarator): Always give errors on constant overflow - for array indices. - -Wed May 31 11:39:43 1995 Jason Merrill - - * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0. - (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to - reference type. - (build_indirect_ref): Fix check for *&. - -Fri Jun 16 06:54:03 1995 Mike Stump - - * Version 2.7.0 released. - -Fri Jun 16 15:07:29 1995 Richard Kenner - - * Make-lang.in (DEMANGLER_PROG): Add LIBS. - -Thu Jun 15 15:00:41 1995 Jason Merrill - - * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN. - -Wed Jun 7 20:00:31 1995 Mike Stump - - * *.[chy]: Change all callers of finish_decl to cp_finish_decl. - * decl.c (finish_decl): New routine to handle call backs from the - mid end (declare_hidden_char_array). - -Wed Jun 7 19:02:50 1995 Jason Merrill - - * decl.c (start_function): Handle setting C_C_D here. - (set_C_C_D): Removed. - (struct saved_scope): Remove class_decl. - (push_to_top_level): Don't save current_class_decl. - (pop_from_top_level): Don't restore current_class_decl or C_C_D. - (struct cp_function): Add C_C_D. - (push_cp_function_context): Save C_C_D. - (pop_cp_function_context): Restore C_C_D. - -Fri Jun 2 11:05:58 1995 Jason Merrill - - * decl.c (set_C_C_D): New function. suspend_momentary before - building C_C_D. - (pop_from_top_level): Call it. - (start_function): Likewise. - (pop_cp_function_context): Likewise. - - * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references - to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR. - - * decl.c (push_cp_function_context): Save current_class_decl. - (pop_cp_function_context): Restore current_class_decl and set C_C_D. - (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D. - (start_function): Likewise. - - * class.c (popclass): Don't mess with current_class_decl, - current_vtable_decl, or C_C_D. - -Mon May 29 12:45:10 1995 Paul Eggert - - * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG). - -Wed May 24 15:55:18 1995 Richard Kenner - - * decl.c (duplicate_decls): Check simple_cst_equal result against 0. - * decl2.c (finish_anon_union): Likewise. - * method.c (largest_union_member): Likewise. - -Wed May 24 14:41:11 1995 H.J. Lu - - * Make-lang.in (cxxmain.o): Replace single quotes with backslashes. - -Mon May 22 17:38:48 1995 Richard Kenner - - * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG): - Use $@ instead of output name so works even if have .exe. - (cxxmain.o): Use cp if ln -s fails. - (c++.install-man): Use $(exeext) in executable names. - (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names. - * Makefile.in (../cc1plus): Use $(exeext) in name of executable. - -Wed May 24 01:39:03 1995 Jason Merrill - - * call.c (build_method_call): Parms can be null, duh. - -Tue May 23 01:32:09 1995 Jason Merrill - - * call.c (build_method_call): If convert_arguments failed, just bail. - -Fri May 19 10:31:11 1995 Jason Merrill - - * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert. - - * tree.c (copy_to_permanent): Oops. - -Fri May 19 10:01:07 1995 Brendan Kehoe - - * cp-tree.h (break_out_target_exprs): Add decl. - -Thu May 18 13:02:30 1995 Jason Merrill - - * decl.c (start_function): Move *all* interface handling stuff after - the pushdecl. - - * tree.c (mapcar): Renamed from make_deep_copy and generalized. - (perm_manip): Return t if permanent, otherwise 0. - (copy_to_permanent): Use them. - (bot_manip): Helper for break_out_target_exprs. - (break_out_target_exprs): New function. Uses mapcar. - - * typeck.c (convert_arguments): Use it. - - * method.c (hack_identifier): Use convert_from_reference to - dereference a reference. - -Wed May 17 17:54:54 1995 Mike Stump - - * call.c (convert_harshness): Move reference bashing before pointer - to member bashing. - -Wed May 17 16:57:53 1995 Mike Stump - - * cvt.c (convert_to_reference): Only complain, if complaints are - wanted. - * typeck.c (build_function_call_real): Likewise. If - LOOKUP_SPECULATIVELY is set and something won't work, return - NULL_TREE. - * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call. - (convert): Pass LOOKUP_NORMAL to cp_convert. - * typeck.c (convert_for_assignment): Likewise. - (convert_force): Pass LOOKUP_COMPLAIN to cp_convert. - (convert_arguments): Get out early if we get an error_mark_node. - (convert_for_initialization): Use cp_convert instead of convert so - that we can pass flags down. - * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation. - -Wed May 17 01:43:58 1995 Jason Merrill - - * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the - decl type. - - * class.c (finish_struct): Don't complain about a class with no - user-defined constructors but with a member that has no default - constructor, as this is OK for aggregates. - - * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit - constructor call, mark slot addressable. - -Tue May 16 18:37:51 1995 Douglas Rupp - - * g++.c: Changed WINNT to _WIN32. - -Tue May 16 12:40:16 1995 Jason Merrill - - * lex.c (handle_sysv_pragma): Don't use token_buffer. - -Tue May 16 12:05:26 1995 Mike Stump - - * call.c (resolve_scope_to_name): Add initial semantic support for - namespaces. - * class.c (finish_struct): Likewise. - * cp-tree.h (NAMESPACE_LEVEL): Likewise. - * cvt.c (build_up_reference, convert_to_reference): Likewise. - * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise. - (resume_binding_level, toplevel_bindings_p): Likewise - (namespace_bindings_p, declare_namespace_level): Likewise. - (resume_level, push_namespace, pop_namespace): Likewise. - (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise. - (implicitly_declare, lookup_namespace_name): Likewise. - (lookup_name_real, start_decl, make_temporary_for_reference): Likewise. - (obscure_complex_init, finish_decl, expand_static_init): Likewise. - (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise. - (store_parm_decls, hack_incomplete_structures): Likewise. - * decl2.c (get_temp_name, finish_anon_union): Likewise. - (current_namespace, push_namespace, pop_namespace): Likewise. - (do_namespace_alias, do_toplevel_using_decl): Likewise. - (do_class_using_decl): Likewise. - * error.c (dump_decl): Likewise. - * init.c (build_member_call, build_offset_ref): Likewise. - * lex.c (identifier_type): Likewise. - * parse.y (lang_extdef, using_decl, extdef): Likewise. - (component_decl_1, nested_name_specifier_1): Likewise. - * spew.c (yylex): Likewise. - * tree.def (NAMESPACE_DECL): Likewise. - -Tue May 16 11:55:35 1995 Jason Merrill - - * decl.c (push_overloaded_decl): Return the new decl even if it - can't be pushed. - -Tue May 16 11:00:37 1995 Jason Merrill - - * typeck.c (decay_conversion): Split out from default_conversion. - (default_conversion): Call it. - (build_binary_op): Likewise. - (build_binary_op_nodefault): Use decay_conversion for truth ops. - -Mon May 15 12:47:56 1995 Jason Merrill - - * decl.c (warn_extern_redeclared_static): This is a pedwarn. - (duplicate_decls): Always use the old decl's linkage info. Don't - play with linkage of consts. - (pushdecl): Don't play with linkage of consts. - (redeclaration_error_message): Don't complain about an old public - decl and a new non-public decl here. - (grokvardecl): Handle linkage of consts here. - (grokdeclarator): An 'extern inline' is public. Pass constp to - grokvardecl. - (start_function): Wait until after the pushdecl to do some linkage - stuff. - - * decl2.c (import_export_vtable): Make duplicates weak rather than - static if supported. - (import_export_inline): Likewise. - * pt.c (do_pending_expansions): Likewise. - - * class.c (build_vbase_path): flag_assume_nonnull_objects only - affects reference conversion. - - * init.c (emit_base_init): Build up an RTL_EXPR and add it to - rtl_expr_chain. - * decl.c, decl2.c: s/base_init_insns/base_init_expr/. - -Tue May 16 07:06:28 1995 Paul Eggert - - * method.c (numeric_output_need_bar): Renamed from misspelling. - - * typeck.c (build_ptrmemfunc): Fix misspellings in messages. - -Sun May 14 10:26:22 1995 Richard Kenner - - * lang-options.h, lang-specs.h: New files. - -Thu May 11 00:31:48 1995 Jason Merrill - - * typeck.c (default_conversion): Don't check for BLKmode before - pulling out the decl_constant_value. - - * decl.c (start_function): Clear named_labels and shadowed_labels. - - * typeck.c (build_function_call_real): Also synthesize methods here. - -Wed May 10 00:55:59 1995 Jason Merrill - - * decl2.c (finish_file): Synthesize exported methods before the - reconsider loop. - - * parse.y: Move declaration of flag_new_for_scope to file scope. - -Tue May 9 19:10:33 1995 Mike Stump - - * decl2.c: Add flag_new_for_scope for new -ffor-scope flag. - * parse.y (FOR): Conditionalize the pushing and popping of scope for - the for-init-statement upon the new flag_new_for_scope. - * parse.y (try_block): Simplify and use compstmt. - -Mon May 8 12:41:52 1995 Jason Merrill - - * decl.c (define_function): Mark function decl artificial. - -Sun May 7 00:51:28 1995 Jason Merrill - - * parse.y (simple_stmt, FOR): Put back push/pop for condition scope. - - * decl2.c (grokclassfn): DECLs don't have cv-qualified types. - * tree.c (build_cplus_method_type): Likewise. - - * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1. - - * typeck.c (build_function_call_real): If convert_arguments failed, - just bail. - (convert_arguments): If one of the arguments is error_mark_node, - just bail. - -Sat May 6 02:39:41 1995 Jason Merrill - - * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for - decls that don't include it. - -Fri May 5 14:23:30 1995 Jason Merrill - - * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or - DECL_NOT_REALLY_EXTERN set aren't extern decls. - - * typeck.c (build_indirect_ref): Don't call default_conversion for a - parameter of reference_type. - * cvt.c (convert_from_reference): Just use build_indirect_ref. - - * pt.c (do_type_instantiation): Only instantiate member functions - that actually come from templates. - -Fri May 5 09:46:05 1995 Mike Stump - - * parse.y: Generalized cleanup of poplevels, and compound statements - and compound statements in try blocks. Rewritten `for' rule so that - the scope of variables declared in the for clause is shortened to - span just to the end of the statement, instead of the whole - containing block. - -Fri May 5 00:37:14 1995 Jason Merrill - - * call.c (convert_harshness): Handle pointers to members better. - -Thu May 4 16:00:26 1995 Jason Merrill - - * decl2.c (delete_sanity): Do access control here. - * init.c (build_delete): Instead of here. - - * Make-lang.in: Build c++filt. - -Wed May 3 02:59:53 1995 Jason Merrill - - * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL, - update our IDENTIFIER_TYPE_VALUE. - -Fri Apr 28 07:58:41 1995 Jason Merrill - - * lex.c (cons_up_default_function): Fix linkage of #pragma - implemented functions. - -Thu Apr 27 16:56:24 1995 Jason Merrill - - * method.c (build_overload_name): Simplify and fix repeated type - folding. - - * decl.c (grokdeclarator): Prohibit pointers to void or reference - members. - -Thu Apr 27 09:49:07 1995 Mike Stump - - * typeck2.c (process_init_constructor): Make sure initializers are - fully digested. - -Thu Apr 27 01:11:55 1995 Jason Merrill - - * lex.c (cons_up_default_function): Always defer synthesis. - -Thu Apr 27 00:20:37 1995 Jason Merrill - - * decl2.c (mark_inline_for_output): Don't play with pending_inline - stuff. - -Wed Apr 26 17:48:24 1995 Jason Merrill - - * call.c (user_harshness): New function; like build_type_conversion, - but doesn't actually build anything. - (compute_conversion_costs): Use it instead of build_type_conversion. - -Wed Apr 26 17:11:25 1995 Jason Merrill - - * typeck.c (build_function_call_real): Improve error message for - calling a non-function. - - * method.c (hack_identifier): Lose check for calling a data member. - -Wed Apr 26 16:59:13 1995 Mike Stump - - * typeck2.c (build_functional_cast): Remove very old cruft. - Seems like good code is generated without it. - -Wed Apr 26 00:47:16 1995 Jason Merrill - - * method.c (do_build_assign_ref): Fix handling of anonymous unions. - (do_build_copy_constructor): Likewise. - - * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch. - - * decl.c (push_switch): New function. - (pop_switch): Likewise. - (define_case_label): Check for jumping over initialization. - - * call.c (build_method_call): Check for an inline function being - called before its definition has been seen. - * typeck.c (build_function_call_real): Likewise. - - * decl.c (duplicate_decls): Check for a function being redeclared - inline after its address has been taken. - - * typeck.c (build_conditional_expr): Handle related class lvalues. - -Tue Apr 25 13:20:45 1995 Jason Merrill - - * pt.c (do_pending_expansions): Don't expand unused templates. - - * parse.y (component_decl): Accept a lone semicolon. - -Tue Apr 25 00:25:56 1995 Jason Merrill - - * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the - object parameter anymore. - - * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns. - -Mon Apr 24 12:35:48 1995 Jason Merrill - - * parse.y (simple_stmt, decl case): Clear prefix_attributes. - (lang_extdef): Likewise. - - * parse.y (maybe_parmlist): New rule for use in declarators where - this could either be a list of expressions or parameters. Calls - suspend_momentary before deciding which. - (direct_after_type_declarator): Use it. - (complex_direct_notype_declarator): Use it. - - * pt.c (tsubst): Propagate attributes const and noreturn. - - * typeck.c (build_modify_expr): If warn_synth, call build_opfncall - before doing the default thing. - -Thu Apr 27 21:49:36 1995 Doug Evans - - * typeck.c (common_type): Call lookup_attribute instead of - value_member. - -Tue Apr 25 18:07:43 1995 Richard Kenner - - * Make-lang.in: Change "realclean" to "maintainer-clean". - -Sun Apr 23 12:32:38 1995 Mike Stump - - * decl2.c (finish_file): Fix broken linked list handling. - -Fri Apr 21 18:08:43 1995 Jason Merrill - - * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF - as often. - (finish_struct): Likewise. - - * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*. - - * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro. - (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro. - -Fri Apr 21 15:52:22 1995 Jason Merrill - - * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if - it is of the same type as the return value. - -Fri Apr 21 03:01:46 1995 Jason Merrill - - * decl2.c (finish_file): Reconsider if synthesizing a method wrote - out its assembly. - - * typeck.c (convert_for_initialization): Don't call a trivial copy - constructor. - - * typeck2.c (store_init_value): Only abort if the type has a - non-trivial copy constructor. - - * typeck.c (c_expand_return): If we're returning in a register and - the return value is a TARGET_EXPR, expand it. Only do - expand_aggr_init if we're returning in memory. - (expand_target_expr): Function to expand a TARGET_EXPR. - (build_modify_expr): Use it. - - * tree.c (build_cplus_new): Layout the slot. - - * expr.c (cplus_expand_expr): Use expand_call to expand the call - under a NEW_EXPR, so the target is not discarded. - -Thu Apr 20 14:59:31 1995 Mike Stump - - * gc.c (build_dynamic_cast): Tighten error checking. - -Thu Apr 20 11:23:54 1995 Jason Merrill - - * expr.c (cplus_expand_expr): Only abort if the returned target is - different from what we expected if the type has a non-trivial copy - constructor. - - * decl2.c (cplus_decl_attributes): Attributes applied to a template - really apply to the template's result. - - * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE - to decide whether to consider a CALL_EXPR an lvalue. - - * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the - type has a non-trivial copy constructor. - - * decl.c (start_function): If interface_known, unset - DECL_NOT_REALLY_EXTERN on the function. - -Wed Apr 19 16:53:13 1995 Jason Merrill - - * pt.c (do_function_instantiation): Handle explicit instantiation of - member functions. - (do_type_instantiation): Handle 'inline template class foo', - meaning just spit out the vtable. - - * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on - the consed functions. - - * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN. - -Wed Apr 19 16:28:17 1995 Brendan Kehoe - - * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c, - typeck.c: Include output.h. - -Wed Apr 19 14:57:21 1995 Gerald Baumgartner - - * call.c (build_method_call): Allow a signature member functions to - be called from a default implementation. - -Wed Apr 19 10:21:17 1995 Jason Merrill - - * repo.c (finish_repo): Remember what directory we are in. - - * search.c (expand_upcast_fixups): Don't mess with abort_fndecl. - - * repo.c: Use obstacks instead of fixed-size buffers. Don't spit - out the second copy of the symbol name. Don't remember COLLECT_GCC. - -Wed Apr 19 02:32:40 1995 Mike Stump - - * search.c (virtual_context): New function to get the virtual - context of a function. - (expand_upcast_fixups): New function to generate runtime vtables. - (fixup_virtual_upcast_offsets): Likewise. - (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to - ensure that the this offsets for upcasts from virtual bases into - other virtual bases or non-virtual bases are correct at construction - time and destruction time. - * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all - vtables in all virtual bases, instead of just one vtable in each - virtual base. - (fixup_vtable_deltas1): Likewise. - -Tue Apr 18 03:57:35 1995 Michael Meissner - - * Makefile.in (lex.o): Add dependency on c-pragma.h. - - * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as - appropriate, instead of 0. - -Mon Apr 17 12:28:42 1995 Jason Merrill - - * decl.c (pushdecl): Use decls_match, not duplicate_decls, for - comparing local and global decls. - -Fri Apr 14 01:46:52 1995 Jason Merrill - - * typeck.c (convert_arguments): Only prohibit passing to ... of - types with non-trivial copy constructors. - - * repo.c (repo_template_used): Don't try to mess with no id. - -Fri Apr 14 23:32:50 1995 Per Bothner - - * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls. - -Thu Apr 13 15:37:42 1995 Brendan Kehoe - - * cp-tree.h (current_tinst_level): Delete declaration, since it's - static inside pt.c. - - * typeck.c (build_modify_expr): Catch incompatible array assignment. - - * parse.y (attribute_list, attrib): Rewrite actions to feed the - right stuff to decl_attributes. - -Thu Apr 13 11:24:10 1995 Jason Merrill - - * search.c (dfs_debug_mark): Check for magic virtual like - import_export_vtable. - - * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with - four args. - -Wed Apr 12 12:02:57 1995 Jason Merrill - - * decl2.c (finish_file): Move prevtable pass before needs_messing_up - decision. - -Tue Apr 11 11:20:27 1995 Jason Merrill - - * decl.c (finish_decl): If we're writing out a static data member of - a class, we want the debug info for that class. - - * gc.c (build_t_desc): Check linkage of a class properly. - - * class.c (finish_struct): Set the 'headof' offset for the main - vtable properly. - (prepare_fresh_vtable): Fix typeinfo pointer here. - (modify_one_vtable): Instead of here. - -Mon Apr 10 12:15:59 1995 Jason Merrill - - * repo.c (repo_get_id): New function to return the interesting - identifier for a repo entity. - (repo_template_used): Use it. - (repo_template_instantiated): Mark the id as chosen. - (init_repo): Record whether or not the id was chosen. - (finish_repo): Note if an id was newly chosen. - - * pt.c (do_function_instantiation): Call repo_template_instantiated. - (do_type_instantiation): Likewise. Don't diagnose multiple - instantiation. - - * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding - whether or not to synthesize a method. - - Undo these changes: - * class.c (finish_vtbls): Build more vtables if flag_rtti is on. - * class.c (modify_all_direct_vtables): Likewise. - * init.c (expand_direct_vtbls_init): Expand more vtables if - flag_rtti is on. - -Sat Apr 8 17:45:41 1995 Mike Stump - - * gc.c (build_headof): Use ptrdiff_type_node instead of - integer_type_node on pointer arithmetic. - -Sat Apr 8 11:57:04 1995 Jason Merrill - - * typeck.c (build_modify_expr): Undo previous change. - -Thu Apr 6 01:23:50 1995 Jason Merrill - - * Makefile.in (compiler): Remove ../cc1plus before rebuilding it. - - * repo.c (get_base_filename): Put the .rpo file in the directory - with the object file, not the source. - - * typeck.c (build_conditional_expr): Handle pmf's better. - - * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out - the name of the symbol. - -Wed Apr 5 15:24:12 1995 Jason Merrill - - * repo.c (open_repo_file): Make repo filename DOS-compliant. - (*): Also write a new repo file if some previously-used - templates are no longer used. Only remember the identifier. - - * lex.c (cons_up_default_function): If this function belongs to a - template class, call repo_template_used for it. - - * repo.c (repo_template_used): Using a class means using its vtable, - if any. - (finish_repo): Likewise. - - * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs - if the type has a complex copy constructor. - - * decl2.c (lang_decode_option): -frepo implies - -fno-implicit-templates. - - * decl.c (start_function): Clear current_{base,member}_init_list. - - * lex.c (init_lex): Also unset *_eq if ! flag_operator_names. - -Tue Apr 4 16:11:08 1995 Jason Merrill - - * decl.c (struct cp_function): Add {base,member}_init_list. - (push_cp_function_context): Save current_{base,member}_init_list. - (pop_cp_function_context): Restore them. - -Mon Apr 3 16:55:08 1995 Jason Merrill - - * repo.c (get_base_filename): Take filename parm, fix logic bug. - - * typeck.c (build_compound_expr): Do not warn about a compound expr - in which the first expression has no side effects. - (build_x_compound_expr): Warn here instead. - (build_conditional_expr): Don't warn about a conditional expression - between an enum and the type it promotes to. - - * init.c (build_new): Handle initialization of arrays of builtins - properly. - -Mon Apr 3 15:08:04 1995 Brendan Kehoe - - * repo.c: Include config.h to get definitions of bcopy and rindex - on systems that don't have them (e.g., SVR4). - -Mon Apr 3 14:41:55 1995 Mike Stump - - * decl2.c (finish_table): Pass NULL_TREE instead of init to - finish_decl so that it won't try and do error checking on the - initializer. - -Mon Apr 3 10:45:50 1995 Jason Merrill - - * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to - determine whether this compile used -c -o. - (open_repo_file): Use get_base_filename. Remove the extension. - (finish_repo): Spit out the values of main_input_filename, - COLLECT_GCC and COLLECT_GCC_OPTIONS. - - * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name. - -Sun Apr 2 23:43:51 1995 Jason Merrill - - * search.c (compute_access): Don't try to do access control on - nested types. - -Fri Mar 31 10:14:23 1995 Jason Merrill - - * repo.c: New file to handle things repo. - - * pt.c (instantiate_template): Call repo_template_used if the - definition is accessible. - (mark_function_instantiated): Split out from - do_function_instantiation. - (mark_class_instantiated): Split out from do_type_instantiation. - - * parse.y (template_instantiate_once): Call repo_template_used. - - * lex.c (lang_init): Call init_repo. - - * decl2.c: Handle flag_use_repository. - (finish_file): Call finish_repo. - - * decl.c (start_method): Call repo_template_used if this is a - template method. - - * Makefile.in (CXX_OBJS): Add repo.o. - (repo.o): Add dependencies. - - * Make-lang.in (CXX_SRCS): Add repo.c. - - * decl.c (start_function): If DECL_INTERFACE_KNOWN and - DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL. - - * typeck.c (build_binary_op_nodefault): Identify the invalid operand - types used. - - * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN. - -Thu Mar 30 17:54:42 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Tidy up use of build_type - and result_type. When checking for comparison between signed - and unsigned, use result_type rather than the (possibly shortened) - type of op0. Also, don't warn about equality comparison of a - signed operand to an unsigned constant that fits in the signed - type. - - * method.c (do_build_copy_constructor): Reverse - current_base_init_list after we've built it up. - -Thu Mar 30 14:35:18 1995 Mike Stump - - * except.c (build_throw): Never warn about the value of throw not - being used. - -Thu Mar 30 13:16:54 1995 Mike Stump - - * except.c (expand_start_catch_block): Check for bad catch parameter - declarations. - -Thu Mar 30 13:06:11 1995 Jason Merrill - - * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if - DECL_EXTERNAL is not already set. - -Thu Mar 30 11:26:24 1995 Mike Stump - - * method.c (emit_thunk): Let poplevel know that the last level is - for a function so it can create a BLOCK_NODE and set DECL_INITIAL. - -Thu Mar 30 11:15:06 1995 Jason Merrill - - * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN - here. - - * decl.c (grokdeclarator): OK, don't abort if we see a decl with - METHOD_TYPE. - (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on - all deferred inlines. - -Wed Mar 29 19:35:02 1995 Jason Merrill - - * cp-tree.h (DECL_THIS_INLINE): New macro. - (DECL_NOT_REALLY_EXTERN): New macro. - (DECL_THIS_STATIC): New macro. - - * decl.c: Lose all references to current_extern_inline. Break - inline semantics into DECL_INLINE for actual inlining and - DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC. - * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to - emit an inline here. Associated changes. - * lex.c: Likewise. - * pt.c: Likewise. - * typeck.c: Likewise. - - * call.c (build_method_call): Don't bother trying to handle inlines - specially. - * cvt.c (convert_to_aggr): Likewise. - - * pt.c (do_function_instantiation): Handle instantiation of - public inlines, too. - -Wed Mar 29 16:04:25 1995 Mike Stump - - * except.c (init_exception_processing): Change the interface for - __throw_type_match and add decl for new rtti matching routine - __throw_type_match_rtti. - (build_eh_type): New routine to build a run time descriptor for the - expression given. - (expand_start_catch_block): Update to use new calling convention for - the matcher. - (expand_throw): Update to use build_eh_type. - -Mon Mar 27 07:14:33 1995 Warner Losh - - * g++.c: Removed __NetBSD__ from conditional. - Declare strerror if HAVE_STRERROR is defined; otherwise - declare sys_errlist and sys_nerr. - (my_strerror): New function. - -Tue Mar 28 14:16:35 1995 Jason Merrill - - * search.c (get_binfo): Don't try to be so clever. - - * tree.c (copy_to_permanent): Also suspend_momentary(). - - * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even - if the types are the same. - - * decl.c (start_function): Handle extern inlines more like C++ says - we should. - - * init.c (build_member_call): Hand constructor calls off to - build_functional_cast. - - * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get - the name of the type. - -Tue Mar 28 13:13:56 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Check for the decl returned by - grokfndecl to be null before using build_decl_attribute_variant. - -Mon Mar 27 18:04:41 1995 Brendan Kehoe - - * init.c (build_new): Use build_pointer_type instead of - TYPE_POINTER_TO. - -Fri Mar 24 12:11:24 1995 Jason Merrill - - * typeck.c (build_conditional_expr): Handle pmfs. - (convert_for_assignment): Fix pmf support. - - * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks. - (cp_convert_to_pointer): Handle pmfs. - (cp_convert): Pass pmfs to cp_convert_to_pointer. - - * typeck.c (common_type): Handle inheritance for pmfs. - - * typeck2.c (build_m_component_ref): Do access control. - - * typeck.c (comp_target_types): Check for conversion to void * - before checking trickier conversions. - - * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P. - - * pt.c (push_tinst_level): Complain if template instantiation depth - is greater than max_tinst_depth. - - * typeck.c (common_type): Assume that we can call common_type to - unify the target type of a pointer. - -Thu Mar 23 00:48:44 1995 Jason Merrill - - * decl2.c (finish_file): Don't synthesize methods at - finish_vtable_prevardecl time. Do synthesize methods that are not - used, but are public and not external. - - * cvt.c (build_type_conversion): Only give an error if for_sure. - - * typeck.c (comp_target_types): Only support pointer conversions if - nptrs > 0. - -Wed Mar 22 19:30:15 1995 Brendan Kehoe - - * init.c (build_new): Catch use of an initializer list where it - shouldn't be. - -Wed Mar 22 16:21:07 1995 Jason Merrill - - * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is - non-constant. - - * decl2.c: temp_name_counter is now public. - - * decl.c (struct cp_function): Add temp_name_counter field. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - - * typeck.c (common_type): Handle unifying function types, and unify - unmatched things to void* with a compiler_error, rather than - silently like before. - -Wed Mar 22 15:10:34 1995 Mike Stump - - * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert - Brendan's last change and fix latent problem that causes TD entries - to not come out when the things that need them has yet to be - expanded. - -Wed Mar 22 15:12:00 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault, comparison ops): Update type0 - and type1, since we might have changed op0 or op1. - -Wed Mar 22 13:33:45 1995 Jason Merrill - - * typeck.c (common_type): Don't mess up templates. - -Wed Mar 22 04:56:00 1995 Jason Merrill - - * typeck.c (common_type): Handle ptms properly. Also handle - T* -> void*. - (build_binary_op_nodefault): New variable build_type controls what - type is given to the expression when it is created. Set this to - boolean_type_node for comparison ops instead of using result_type. - (comp_target_types): Allow T * -> void *. - - * cvt.c (cp_convert_to_pointer): Do access control when converting - ptms, too. - -Tue Mar 21 17:25:06 1995 Brendan Kehoe - - * parse.y (extern_lang_string): Catch use of linkage specs that - aren't all naming the same language. - - * class.c (finish_struct): Delete accidental duplicate code. - -Tue Mar 21 14:00:57 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Disable pedwarns about - comparing functions and incomplete types. - - * decl.c (finish_function): Only unset current_function_decl if - !nested. - (duplicate_decls): Last change went too far; we only want to stop - checking for value/reference ambiguity. - -Tue Mar 21 01:26:39 1995 Mike Stump - - * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it - out fresh, as the new type may be larger. - -Mon Mar 20 19:01:10 1995 Jason Merrill - - * expr.c (extract_init): Try to expand the RTL for the - initialization and figure out what it will look like so we can avoid - run-time initialization. Disabled for now. - (extract_scalar_init): Helper for scalar initialization. - (extract_aggr_init): Helper for aggregate initialization. - - * decl.c (duplicate_decls): Don't complain about ambiguous - declarations. - (obscure_complex_init): Now returns a tree. Call extract_init if - we're optimizing and this is a toplevel decl. - (finish_decl): Update accordingly. - - * lex.c (check_newline): If we're just changing files (not pushing - or popping), update input_file_stack->name. - -Mon Mar 20 17:55:04 1995 Mike Stump - - * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now - in the transitive unification code. - -Mon Mar 20 16:07:50 1995 Brendan Kehoe - - * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on - non-functions. - (grokdeclarator): Don't allow friends to be defined in local classes. - -Sat Mar 18 04:03:33 1995 Jason Merrill - - * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC - rather than DECL_SAVED_INSNS to decide whether or not this method - was declared inline. - - * method.c (synthesize_method): Turn off DECL_INLINE if - function_cannot_inline_p thinks we're too large. - - * typeck.c (build_indirect_ref): Use build_expr_type_conversion. - -Fri Mar 17 17:47:36 1995 Jason Merrill - - * class.c (instantiate_type): Handle pmfs. - - * typeck.c (convert_for_assignment): Check types when assigning one - pmf to another. - - * decl.c (define_label): Fix logic for printing out the name of the - label in an error message. - - * error.c (dump_expr): Support ARRAY_REF. - -Fri Mar 17 17:43:02 1995 Brendan Kehoe - - * decl2.c (finish_vtable_vardecl): Call build_t_desc here. - (finish_prevtable_vardecl): Instead of here. - -Fri Mar 17 14:40:45 1995 Jason Merrill - - * decl.c (expand_static_init): Also use expand_aggr_init if the - initializer is a TREE_LIST. - (grokdeclarator): Only pedwarn about extra qualification if -pedantic. - - * pt.c (unify): Fix unification of return type. - - * expr.c (fixup_result_decl): Use store_expr, rather than - emit_move_insn, to move the return value into the place where - callers will expect it. - -Thu Mar 16 22:05:25 1995 Jason Merrill - - * init.c (build_offset_ref): Call assmble_external on functions. - * typeck.c (build_component_ref): Likewise. - -Thu Mar 16 20:28:16 1995 Brendan Kehoe - - * decl.c (struct saved_scope): Add members base_init_list and - member_init_list. - (push_to_top_level): Save current_base_init_list and - current_member_init_list to them. - (pop_from_top_level): Put it back. - -Thu Mar 16 19:21:14 1995 Jason Merrill - - * pt.c (instantiate_template): Call assemble_external. - -Thu Mar 16 18:07:54 1995 Brendan Kehoe - - * class.c: Include rtl.h, to get NULL_RTX. - (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems - on hosts with different sizes for each part of the union. - * tree.c: Also include rtl.h. - (layout_basetypes): Same change for DECL_SAVED_INSNS. - -Thu Mar 16 13:57:36 1995 Jason Merrill - - * pt.c (unify): Fix array domain unification for 64-bit targets. - - * decl2.c (finish_file): Push bizarre type decl before walking the - vtables the first time. - (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed - with TREE_CHAIN (prev). - - * init.c (emit_base_init): Use convert_pointer_to_real instead of - convert_pointer_to when converting to a direct base. - -Wed Mar 15 20:26:29 1995 Mike Stump - - * pt.c (type_unification): Handle transitive unification better. - -Wed Mar 15 13:56:16 1995 Jason Merrill - - * decl2.c (walk_vtables): Always set prev to vars. - (mark_vtable_entries): Call assemble_external on the vtable entries. - - * class.c (finish_struct): Set the vtable's size to NULL_TREE before - calling layout_decl, so that it gets updated properly. - - Finally re-enable dynamic synthesis. This time it works. - * method.c (synthesize_method): Pass decl_function_context (fndecl) - to {push,pop}_cp_function_context. - * decl.c (push_cp_function_context): Now takes a tree argument. - (pop_cp_function_context): Likewise. - * call.c (build_method_call): Enable synthesis. - * lex.c (cons_up_default_function): Likewise. - -Tue Mar 14 19:14:19 1995 Doug Evans - - * parse.y (setattrs): Chain onto prefix_attributes rather than - setting it. - -Wed Mar 15 13:00:00 1995 Brendan Kehoe - - * decl.c (pushdecl): Check if the type of the VAR_DECL is an - error_mark_node before trying to read TYPE_LANG_SPECIFIC. - -Mon Mar 13 21:00:28 1995 Brendan Kehoe - - * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold, - and convert the size and integer_one_node to the index type. - -Mon Mar 13 08:01:02 1995 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Save the instance - argument, and tack it onto the front of the COND_EXPR to make the - semantics come out right. Grab the instance argument from - '*instance_ptrptr', rather than having it passed in separately. - - * various: Change various consed-up comparison operations to have - boolean type. Remove the instance argument in calls to - get_member_function_from_ptrfunc. - - * error.c (dump_expr): Dump true and false as "true" and "false". - - * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the - global init function. - - * decl.c (finish_function): Only set DECL_EXTERNAL here if the - inline function is public. - -Sat Mar 11 00:58:03 1995 Jason Merrill - - * init.c (is_friend): Be more careful about checking - DECL_CLASS_CONTEXT on non-member functions. - - * decl2.c (finish_vtable_vardecl): Don't bother calling - assemble_external here. - (prune_vtable_vardecl): New function that just splices out the - vtable decl from the top-level decls. - (import_export_inline): Unset DECL_EXTERNAL at first. - (finish_file): Don't bother calling assemble_external here. Do - splice out all of the vtables. - -Fri Mar 10 14:42:29 1995 Jason Merrill - - * decl.c (finish_function): If we're not emitting the function yet, - call assemble_external for it. - - * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries - here. - (finish_vtable_vardecl): Don't do the linkage deduction thing here. - Also don't splice out the current vtable if it is unused. - (finish_file): Move the second walk_vtables and the synthesis check - inside the 'reconsider' loop. Move thunk emission after the - 'reconsider' loop. - -Thu Mar 9 16:28:16 1995 Brendan Kehoe - - * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it - was passing bogus values for readonly and volatile from the original - template decl, not the resultant type of the tsubst call. - - * class.c (duplicate_tag_error): Use cp_error_at to point out the - previous definition of the tag. - -Thu Mar 9 10:46:17 1995 Jason Merrill - - * decl.c (start_function): Clear base_init_insns and protect_list. - (struct cp_function): Add base_init_insns field. - (push_cp_function_context): Also save base_init_insns. - (pop_cp_function_context): Also restore base_init_insns. - -Wed Mar 8 13:31:44 1995 Jason Merrill - - * init.c (member_init_ok_or_else): Check for initializing a static - member here. - (emit_base_init): Instead of here. - -Tue Mar 7 16:03:26 1995 Jason Merrill - - * call.c (build_method_call): Disable synthesis as needed. - * lex.c (cons_up_default_function): Likewise. - -Tue Mar 7 10:14:29 1995 Brendan Kehoe - - * parse.y: New rules to allow attributes in a prefix position. - (prefix_attributes): New variable. Pass it into cplus_decl_attributes. - (setattr): New rule. - (reserved_declspecs, declmods): Catch attributes here. - * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument. - * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to - descendent typedef. - (grokdeclarator): Added code to support machine attributes. - * Makefile.in (stamp-parse): Expect 5 shift/reduce failures. - -Mon Mar 6 15:07:02 1995 Jason Merrill - - * call.c (build_method_call): Don't synthesize methods outside of a - function. - - Make base initialization more re-entrant so that synthesis on the - fly will work (and, eventually, template instantiation on the fly). - * init.c (sort_member_init): Don't bother with members that can't be - initialized. Reorganize a bit. Don't initialize base members here. - (sort_base_init): New function, like sort_member_init, but for base - classes. Steals some code from emit_base_init. - (emit_base_init): Simplify. Call sort_{member,base}_init before - doing any initialization, so we don't have to save - current_{member,base}_init_list in push_cp_function_context. - (expand_aggr_vbase_init_1): Adjust for sort_base_init. - (expand_aggr_vbase_init): Simplify. - * decl.c (struct cp_function): Add protect_list field. - (push_cp_function_context): Also save protect_list. - (pop_cp_function_context): Also restore protect_list. - * call.c (build_method_call): Enable synthesis at point of call. - * lex.c (cons_up_default_function): Likewise. - - * parse.y: Turn -ansi checks back into -pedantic checks. - - * init.c (build_new): Fix -fcheck-new for array new. - -Sat Mar 4 15:55:42 1995 Fergus Henderson - - * typeck.c (build_compound_expr): warn if left-hand operand of - comma expression has no side-effects. - -Fri Mar 3 15:16:45 1995 Jason Merrill - - * parse.y (primary): Change 'object qualified_id *' rules to 'object - overqualified_id *'. - -Fri Mar 3 12:48:17 1995 Brendan Kehoe - - * parse.y (unary_expr): Catch doing sizeof an overloaded function. - Make the error look the same as the one we issue in c_sizeof. - - * typeck.c (build_binary_op_nodefault): Give an error for trying - to compare a pointer-to-member to `void *'. - -Fri Mar 3 11:28:50 1995 Jason Merrill - - * typeck.c (build_unary_op): Handle bool increment with smoke and - mirrors here, rather than in expand_increment where it belongs, - because Kenner doesn't agree with me. - -Fri Mar 3 00:08:10 1995 Brendan Kehoe - - * decl.c (grokparms): Catch a PARM_DECL being used for a default - argument as well. - -Thu Mar 2 20:05:54 1995 Brendan Kehoe - - * init.c (build_new): Don't allow new on a function type. - - * parse.y (primary): Avoid a crash when seeing if the arg is of - the same type as that given for the typespec in an explicit dtor call. - -Thu Mar 2 00:49:38 1995 Jason Merrill - - * decl.c (finish_function): Change test for calling - mark_inline_for_output. - -Wed Mar 1 11:23:46 1995 Jason Merrill - - * typeck.c (build_modify_expr): Complain if - build_default_binary_type_conversion fails. - - * init.c (expand_default_init): Handle arguments of unknown type - properly. - - * cvt.c (build_expr_type_conversion): Only complain about ambiguity - if 'complain'. - * various: Pass 'complain'. - - * typeck.c (comptypes): Be more picky about comparing UPTs. - -Wed Mar 1 11:03:41 1995 Brendan Kehoe - - * decl.c (grokdeclarator): If declarator is null, say that the - type used has an incomplete type. - -Wed Mar 1 10:06:20 1995 Jason Merrill - - * pt.c (instantiate_template): Copy the template arguments to the - permanent_obstack. Also use simple_cst_equal to compare them when - looking for a previous instantiation. - - * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming - they are array domain types). - -Tue Feb 28 23:24:55 1995 Jason Merrill - - * cp-tree.h: Define WANT_* constants for passing to - build_expr_type_conversion. - * cvt.c (build_expr_type_conversion): New function to build - conversion to one of a group of suitable types. - (build_default_binary_type_conversion): Use it. - * decl2.c (grok_array_decl): Likewise. - * typeck.c (build_unary_op): Likewise. - (build_array_ref): Tidy up a bit. - (build_binary_op): Likewise. - -Tue Feb 28 19:57:31 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow decl of an argument as `void'. - -Tue Feb 28 17:23:36 1995 Jason Merrill - - * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals - reserved_declspecs' rule. - - * parse.y (expr_or_declarator): Remove notype_qualified_id rule. - (direct_notype_declarator): Likewise. - (complex_direct_notype_declarator): Add notype_qualified_id rule. - - * lex.c (real_yylex): Handle :> digraph properly. - -Tue Feb 28 12:26:29 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Check if it's a friend, not if it's - non-virtual, that's being initialized. Move the check up to - before FRIENDP would get cleared. Catch an unnamed var/field - being declared void. Say just `field' instead of `structure field' - in the error message. Only go for the operator name if DECLARATOR - is non-null. - -Tue Feb 28 00:08:01 1995 Jason Merrill - - * decl.c (start_function): Complain about abstract return type. - (grokdeclarator): Complain about declaring constructors and - destructors to be const or volatile. Complain about declaring - destructors to be static. - - * pt.c (uses_template_parms): Handle pmfs. - - * decl.c (grokdeclarator): Don't call variable_size for array bounds - that only depend on template constant parameters. - -Mon Feb 27 15:38:16 1995 Brendan Kehoe - - * error.c (dump_decl): Only look to see if it's a vtable if we - actually have a name to check out. - -Mon Feb 27 13:37:53 1995 Jason Merrill - - * cvt.c (convert_to_aggr): Lose misleading shortcut. - -Sun Feb 26 17:27:32 1995 Doug Evans - - * decl.c (set_nested_typename): Always set DECL_IGNORED_P, - not just for dwarf. - -Sun Feb 26 00:10:18 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow a static member to be - declared `register'. - - * init.c (make_friend_class): Move up to a pedwarn for the warning - about a class declaring friends with itself. - - * decl.c (grokdeclarator): You can't do `volatile friend class foo' - or `inline friend class foo'. Only try to make a friend out of - TYPE if we didn't already reset it to integer_type_node. - -Sat Feb 25 22:32:03 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow initialization of a - non-virtual function. - - * decl.c (start_function): Do a pedwarn if we're changing `main' - to have an int return type. - -Sat Feb 25 00:02:05 1995 Jason Merrill - - * typeck.c (build_modify_expr): Handle simple assignment from - TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew. - -Fri Feb 24 18:27:14 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Also don't allow virtual outside of a - class decl for a scope method definition performed at global binding. - - * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF - of a bitfield. - - * decl.c (grokdeclarator): Don't allow a const to be declared mutable. - - * typeck.c (build_binary_op): Return an error_mark_node if either - one of the args turned into an error_mark_node when we tried to - use default_conversion. - - * typeck.c (build_unary_op): Forbid using postfix -- on a bool. - - * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be - used on `__wchar_t'. - -Fri Feb 24 13:59:53 1995 Mike Stump - - * except.c (end_protect_partials): Do it the right way. - -Wed Feb 22 15:42:56 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Upgrade warning about - comparing distinct pointer types to pedwarn. - - * typeck2.c (digest_init): Cope with extra braces. - - * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead - of INT_CST_LT (..., interger_zero_node). - -Wed Feb 22 14:45:52 1995 Brendan Kehoe - - * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy - function for systems that don't have EH. - -Tue Feb 21 19:18:31 1995 Jason Merrill - - * call.c (can_convert_arg): Like can_convert, but takes an arg as - well. - - * pt.c (type_unification): Allow implicit conversions for parameters - that do not depend on template parameters. - -Tue Feb 21 18:43:48 1995 Douglas Rupp - - * Make-lang.in, config-lang.in: ($exeext): New macro. - * Make-lang.in: Try a "cp" if "ln" fails. - * cp-tree.h (decl_attributes): Added argument. - * decl2.c (cplus_decl_attribute): Add arg to decl_attributes. - * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT. - Modified spawnvp to have to correct number of arguments for OS/2, NT. - -Tue Feb 21 18:36:55 1995 Mike Stump - - * decl.c (finish_function): Add calls to end_protect_partials to end - the exception region that protects constructors so that partially - constructed objects can be partially destructed when the constructor - throws an exception. - * init.c (perform_member_init, sort_member_init, emit_base_init): - Added support for partially constructed objects. - * init.c (build_partial_cleanup_for): New routine to do partial - cleanups of a base class. - * decl2.c (finish_file): Move the emitting of the exception table - down, after we emit all code that might have exception regions in - them. - * except.c (end_protect_partials, might_have_exceptions_p): New - routines. - (emit_exception_table): Always output table if called. - * cp-tree.h (protect_list, end_protect_partials, - might_have_exceptions_p, emit_exception_table): Added. - -Tue Feb 21 16:05:59 1995 Brendan Kehoe - - * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused - address of a local variable. - * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we - were given a non-null PTR_TO_INSTPTR. - -Tue Feb 21 01:53:18 1995 Jason Merrill - - * decl.c (duplicate_decls): Always lay out the merged decl. - - * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates. - (finish_prevtable_vardecl): Likewise. - - * method.c (synthesize_method): Set interface_{unknown,only} - according to the settings for our class, not the file where it comes - from. - -Sat Feb 18 12:26:48 1995 Mike Stump - - * except.c: Handle systems that define __i386__ but not __i386. - -Fri Feb 17 15:31:31 1995 Jason Merrill - - * decl2.c (reparse_decl_as_expr): Support being called without a - type argument. - - * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r - conflicts. Sigh. - -Fri Feb 17 12:02:06 1995 Mike Stump - - * parse.y (template_def, fndef, fn.def1, return_init, condition, - initdcl0, initdcl, notype_initdcl0, nomods_initdcl0, - component_decl_1, after_type_component_declarator0, - notype_component_declarator0, after_type_component_declarator, - notype_component_declarator, after_type_component_declarator, - full_parm, maybe_raises, exception_specification_opt): Fix up, - include exception_specification_opt maybeasm maybe_attribute and - maybe_init if missing. Rename maybe_raises to - exception_specification_opt to match draft wording. Use maybe_init - to simplify rules. - -Fri Feb 17 01:54:46 1995 Jason Merrill - - * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs - built for news of scalar types. - -Thu Feb 16 17:48:28 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Update code for warning - about signed/unsigned comparisons from C frontend. Realize that the - code in the C frontend is, if anything, even more bogus. Fix it. - (build_binary_op): Undo default_conversion if it wasn't useful. - - * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for - PRE*CREMENT_EXPR. - - * decl2.c (import_export_vtable): Don't try the vtable hack - if the class doesn't have any real non-inline virtual functions. - (finish_vtable_vardecl): Don't bother trying to find a non-inline - virtual function in a non-polymorphic class. - (finish_prevtable_vardecl): Likewise. - - * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN. - - * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5. - - * init.c (expand_virtual_init): Always call assemble_external. - - * class.c (build_vfn_ref): Always call assemble_external. - (build_vtable): Always call import_export_vtable. - (prepare_fresh_vtable): Likewise. - (add_virtual_function): Don't bother setting TREE_ADDRESSABLE. - -Thu Feb 16 03:28:49 1995 Jason Merrill - - * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine - whether an enumerated type fits in a bitfield. - -Wed Feb 15 15:38:12 1995 Jason Merrill - - * class.c (grow_method): Update method_vec after growing the class - obstack. - -Wed Feb 15 13:42:59 1995 Mike Stump - - * parse.y (handler_seq): Push a level for the catch parameters. - -Wed Feb 15 12:42:57 1995 Jason Merrill - - * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my - bases, in case they've been clobbered. - -Wed Feb 15 12:07:29 1995 Mike Stump - - * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here, - so that one day it will always be valid. - * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise. - - * cp-tree.h (copy_binfo): Removed, unused. - * tree.c (copy_binfo): Likewise. - -Wed Feb 15 00:05:30 1995 Jason Merrill - - * init.c (build_new): Save the allocation before calling - expand_vec_init on it. - - * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush - match the TYPE_PRECISION of the underlying type for constant folding - to work. - -Tue Feb 14 15:31:25 1995 Mike Stump - - * except.c (push_eh_entry, expand_start_all_catch, - expand_leftover_cleanups, expand_end_catch_block): Keep track of - the context in which the exception region occurs. - (build_exception_table): If the region was not output, don't output - the entry in the eh table for it. - -Tue Feb 14 02:15:43 1995 Jason Merrill - - * init.c (expand_default_init): Only use a previous constructor call - if it's a call to our constructor. Does the word "Duh" mean - anything to you? - - * decl.c (grokparms): Fine, just don't call - convert_for_initialization at all. OK? Happy now? - -Mon Feb 13 02:23:44 1995 Jason Merrill - - * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class - method vector has a second element before returning it. - - * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling - convert_for_initialization. - -Sun Feb 12 03:57:06 1995 Jason Merrill - - * typeck.c (build_modify_expr): Compare function name to - constructor_name (current_class_type) instead of current_class_name. - - * decl.c (grokparms): Don't do anything with the return value of - convert_for_initialization. - - * error.c (dump_decl): Also dump_readonly_or_volatile on the decl. - - * decl.c (duplicate_decls): Tweak error message. - - * typeck.c (build_const_cast): Implement checking. - (build_reinterpret_cast): Implement some checking. - - * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when - converting to the same aggregate type. - (CONV_STATIC_CAST): Include it. - (CONV_C_CAST): Likewise. - * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT. - (cp_convert): Only force a new temporary if CONV_FORCE_TEMP. - -Fri Feb 10 16:18:52 1995 Jason Merrill - - * typeck.c (build_c_cast): Use non_lvalue to tack something on - where necessary. - - * decl.c (auto_function): Now a function. - * except.c (init_exception_processing): terminate, unexpected, - set_terminate, and set_unexpected have C++ linkage. - - * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of - truthvalue_conversion for converting to bool, as it handles - user-defined conversions properly. - (condition_conversion): Likewise. - - * except.c (expand_throw): Don't call convert_to_reference. - Pass the correct parameters to build_new. - - * method.c (do_build_assign_ref): Don't use access control when - converting to a base reference here. - (do_build_copy_constructor): Or here. - - * init.c (build_new): Unset TREE_READONLY on the dereferenced - pointer before assigning to it. - - * decl.c (maybe_build_cleanup): Don't bother stripping const here. - - * decl2.c (delete_sanity): You can now delete pointer to const. - -Fri Feb 10 13:28:38 1995 Jason Merrill - - * decl.c (finish_function): Don't rely on actual parameters being - evaluated left-to-right. - * except.c (expand_end_catch_block): Likewise. - -Fri Feb 10 00:52:04 1995 Jason Merrill - - * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't - considered lvalues. - * cvt.c (convert_to_reference): Use real_lvalue_p instead of - lvalue_p. - - * cvt.c (build_type_conversion_1): Don't call convert on aggregate - types. - (convert_to_reference): Fix erroneous text substitution. - - * typeck2.c (initializer_constant_valid_p): Update from C frontend. - Add new argument to all callers. - - * typeck.c (convert_arguments): Check for error_mark_node before - trying to do anything with the actual parameter. - - * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and - fold it. - (bool_truthvalue_conversion): Remove. Fix all callers to call - truthvalue_conversion instead. - (various): Fold CLEANUP_POINT_EXPRs. - - * parse.y (conditions): Call condition_conversion rather than - building up a CLEANUP_POINT_EXPR. - - * pt.c (end_template_decl): Don't warn_if_unknown_interface here - under -falt-external-templates. - -Thu Feb 9 05:24:10 1995 Jason Merrill - - * init.c (build_new): Complain about new of const type without - initializer. Other cleanup. - - * call.c (compute_conversion_costs): Don't call - build_type_conversion with a reference type; convert to the target - type and check its lvaluetude. - * cvt.c (convert_to_reference): Likewise. - - * cvt.c (build_type_conversion_1): There will never be any need to - dereference references here now. - -Thu Feb 9 00:37:47 1995 Mike Stump - - * except.c (expand_builtin_throw): Make sure we only `use' the - value of return_val_rtx. - -Wed Feb 8 15:45:55 1995 Jason Merrill - - * parse.y (structsp): Don't complain about declaring a type being - defined to be a friend. - - * decl2.c (warn_if_unknown_interface): Note the template in question - and the point of instantiation, for -falt-external-templates. - * lex.c (reinit_parse_for_method): Pass the decl to - warn_if_unknown_interface. - * pt.c (instantiate_template): Likewise. - (end_template_decl): Likewise. - - * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the - nested name again, to make local classes work a bit better. - - * typeck.c (build_function_call_real): Dereference reference after - checking for incomplete type. - - * init.c (build_new): Accept new of const and volatile types. - -Wed Feb 8 14:04:16 1995 Jason Merrill - - * decl.c (grokdeclarator): Fix error message. - -Wed Feb 8 03:16:15 1995 Jason Merrill - - * typeck.c (convert_for_initialization): Do bash arrays when - converting to a reference to non-array. - -Tue Feb 7 15:50:33 1995 Jason Merrill - - * cvt.c (cp_convert): Don't call convert_to_reference, or - automatically dereference references. Do pass reference conversions - to cp_convert_to_pointer. - (cp_convert_to_pointer): Support references. - - * call.c (build_method_call): Don't build up a reference to the - parameter here; let build_overload_call handle that. - - * typeck.c (build_c_cast): Call convert_to_reference directly if - converting to a reference type. - * method.c (do_build_copy_constructor): Likewise. - * method.c (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - - * call.c (build_method_call): Dereference a returned reference. - * typeck.c (build_function_call_real): Likewise. - - * decl.c (xref_basetypes): Check for unions with basetypes here. - (xref_tag): Instead of here. - - * pt.c (process_template_parm): Template type parm decls are - artificial. - -Mon Feb 6 04:32:09 1995 Jason Merrill - - * parse.y (typed_declspecs): Add missing semicolon. - (do_xref_defn): Resurrect. - (named_class_head_sans_basetype): Move template specialization - definition cases to named_class_head_sans_basetype_defn. - - * decl2.c (grokfield): Call pushdecl_class_level after setting the - TYPE_NAME, not before. - -Sun Feb 5 02:50:45 1995 Jason Merrill - - * call.c (convert_harshness): Don't call sorry here. Don't allow - conversions between function pointer types if pedantic. - - * pt.c (overload_template_name): Pass globalize=1 to xref_tag. - - * lex.c (cons_up_default_function): Use the full name for the return - type of op=. - - * decl.c (set_nested_typename): Don't worry about anonymous types, - as they already have a unique name. - (pushdecl): Remove redundant set_nested_typename - (xref_tag): Split out base handling into xref_basetypes. - - * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are - not considered incomplete even though their definition is unknown. - - * decl.c (xref_defn_tag): Lose. - (xref_tag): xref_next_defn = ! globalize. - (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The - ones that should have it set will have it set by pushtag. - (pushdecl_class_level): Likewise. - (pushtag): Tidy up a bit. - (set_nested_typename): Push a decl for the nested typename from - here, rather than from xref_defn_tag. - - * parse.y (do_xref): Lose. - (named_class_head): If we see 'class foo:' we know it's a - definition, so don't worry about base lists for non-definitions. - - * pt.c (push_template_decls): Template parm decls are artificial. - - * decl.c (duplicate_decls): Restore check for qualifier - disagreement for non-functions. - (decls_match): Remove check for qualifier disagreement. - -Fri Feb 3 14:58:58 1995 Jason Merrill - - * decl.c (grok_reference_init): Convert initializer from - reference. - * typeck.c (convert_for_initialization): Likewise. - - * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME. - - * cvt.c (cp_convert): Don't convert to the same class type by just - tacking on a NOP_EXPR. - (convert_to_reference): Use comp_target_types instead of comptypes - so that we don't allow conversions two levels down. - -Thu Feb 2 15:07:58 1995 Jason Merrill - - * class.c (build_vbase_path): Bash types to make the backend happy. - * cvt.c (build_up_reference): Bash the types bashed by - build_vbase_path to be reference types instead of pointer types. - (convert_to_reference): Likewise. - - * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a - reference type. - - * parse.y (structsp): Put back error for 'struct B: public A;'. - -Wed Feb 1 23:02:06 1995 Mike Stump - - * except.c: Add support for mips systems that don't define __mips - but do define mips, like Ultrix. - -Wed Feb 1 22:39:07 1995 Mike Stump - - * except.c: Add support for exception handling on the Alpha. - -Wed Feb 1 10:12:14 1995 Mike Stump - - * decl2.c (finish_file): Fix bug in Jan 31st change. - -Tue Jan 31 16:59:15 1995 Gerald Baumgartner - - * sig.c (build_signature_pointer_or_reference_type): Don't set - IS_AGGR_TYPE for signature pointers/reference so expand_default_init - doesn't expect to find a copy constructor. - * call.c (build_method_call): Treat signature pointers/reference - as if IS_AGGR_TYPE were set. - -Tue Jan 31 13:28:56 1995 Mike Stump - - * gc.c (get_typeid): Pawn off error messages to build_t_desc. - (build_t_desc): Inform the user here if they try and build - with -frtti and don't include . - - * decl2.c (finish_prevtable_vardecl): Support rescanning. - (finish_file): Move finish_prevtable_vardecl up to before the global - initializers are done as tdecls are initialized in the global - initializer. Also Pick up any new tdecls or vtables needed by - synthesized methods. - - * class.c (finish_struct): Simplify. We have to do rtti scanning at - end, so we might as well do all of it there. - -Tue Jan 31 05:35:02 1995 Jason Merrill - - * call.c (build_method_call): Fix -fthis-is-variable for 32-bit - targets, too. - -Tue Jan 31 00:11:04 1995 Mike Stump - - * decl2.c (finish_prevtable_vardecl): New routine, mostly split from - finish_vtable_vardecl. It has the first half functionality from - that routine. - * decl2.c (finish_vtable_vardecl): Update to not include stuff not - in finish_prevtable_vardecl. - * decl2.c (finish_file): Call finish_prevtable_vardecl. - * gc.c (build_generic_desc): Allow it to be called when not at the - global binding layer, but behave as if we were. - (build_t_desc): Rearrange a bit so that it really works and is - easier to follow. - * class.c (finish_struct): Don't decide on tdecls here, as we have - to wait until the end of the file in general to decide whether or - not they come out. - -Mon Jan 30 01:00:40 1995 Jason Merrill - - * init.c (build_delete): Check access to operator delete before - calling the destructor. - * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to - return error_mark_node. - * call.c (build_method_call): Use the one-argument op delete even if - it's an error. - - * init.c (build_new): Fix -fthis-is-variable support. - * call.c (build_method_call): Likewise. - - * call.c (convert_harshness): Make conversion from a pointer to bool - worse than conversion to another pointer. - -Sat Jan 28 16:46:10 1995 Jason Merrill - - * init.c (build_new): Check new return value if -fcheck-new. - - * lex.c (check_newline): Clear end_of_file when we're done, too. - -Sat Jan 28 10:38:39 1995 Mike Stump - - * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow - vtables whereever they go. - - * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't - right. - -Sat Jan 28 09:10:44 1995 Mike Stump - - * decl2.c (finish_vtable_vardecl): Now set the - interface/implementation of vtables on the first virtual function, - if one exists, otherwise we use the old method. This is a major win - in terms of cutting down the size of objects and executables in - terms of text space and data space. Now most of the savings that - #pragma interface/implementation gives is automatic in a fair number - of cases. - -Sat Jan 28 04:57:33 1995 Jason Merrill - - * decl.c (grokdeclarator): Discard the template parameters in a - template constructor declaration so that the function is always - named constructor_name (ctype). - - * lex.c (check_newline): Use ungetc to put back the character before - calling HANDLE_PRAGMA. - -Fri Jan 27 17:23:47 1995 Mike Stump - - * decl2.c (check_classfn): If the cname is T and fn_name is T, - make sure we still match them. - -Fri Jan 27 16:32:10 1995 Jason Merrill - - * parse.y: Add END_OF_LINE token. - - * lex.c (check_newline): Set linemode when we see a # directive, and - unset it when we're done. Turn all 'return's into 'goto skipline'. - Fix all uses of '\n', since we won't see it anymore. Put back the - character we read before checking for a sysv or target pragma. - (real_yylex): If we see an EOF in linemode, return END_OF_LINE. - (handle_sysv_pragma): Don't look at the input stream; quit when we - see an END_OF_LINE token. - - * input.c (getch): Return EOF if we're in line mode and at the end - of a line. - (put_back): Don't put back an EOF. - -Thu Jan 26 19:26:34 1995 Mike Stump - - * except.c (expand_throw): Do the newing of the exception object - before we load the type descriptor or the address so that we don't - wipe any of the values out. - -Thu Jan 26 19:20:00 1995 Mike Stump - - * except.c (init_exception_processing): Don't use r12 on the rs6000. - -Tue Jan 24 16:36:31 1995 Jason Merrill - - * decl.c (grokparms): Don't try to build up a reference at this point. - - * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR - will suffice to convert from integer_zero_node. - -Wed Jan 25 15:02:09 1995 David S. Miller - - * class.c (instantiate_type): Change error message text. - * typeck2.c (store_init_value): Likewise. - -Mon Jan 23 21:57:14 1995 Mike Stump - - * pt.c (tsubst): When we copy a node, don't forget to copy - TREE_CHAIN, we use it later. - -Mon Jan 23 03:33:47 1995 Jason Merrill - - * typeck.c (convert_for_assignment): Initialize variable before use. - -Fri Jan 20 01:17:59 1995 Jason Merrill - - * g++.c (main): Link with both libstdc++ and libg++ if called as - something ending with "g++", otherwise only libstdc++. Move -lm to - the end of the line. - -Thu Jan 19 15:43:11 1995 Jason Merrill - - * call.c (build_method_call): Don't mess with 'this' before calling - compute_conversion_costs. - -Wed Jan 18 15:40:55 1995 Jason Merrill - - * search.c (get_matching_virtual): Give line number for previous - declaration. - - * call.c (convert_harshness): Handle conversions to references - better. - - * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*. - -Wed Jan 18 15:21:38 1995 Mike Stump - - * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead, - as the TREE_CHAIN for methods will take us to the next differently - named function, DECL_CHAIN won't. - -Wed Jan 18 14:26:59 1995 Jason Merrill - - * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR. - - * decl2.c (lang_decode_option): -Wall implies -Wparentheses. - warn_parentheses defaults to 0. - - * decl.c (grokparms): Put back call to require_instantiated_type. - -Tue Jan 17 19:56:15 1995 Mike Stump - - * except.c (exception_section): Use the data section on the rs6000. - Change calling convention for named_section. - -Wed Jan 17 18:20:57 1994 Fergus Henderson - - * cp-tree.h: Make if (x=0) warn with wall - * parse.y: Make if (x=0) warn with wall - -Tue Jan 17 14:12:00 1995 Jason Merrill - - * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS, - BITS_PER_UNIT otherwise. - - * search.c (get_matching_virtual): Don't check the binfo if the - types are the same. - - * cvt.c (cp_convert): Just call truthvalue_conversion to convert to - bool. - -Mon Jan 16 13:28:48 1995 Jason Merrill - - * various: Use boolean_type_node, boolean_true_node, - boolean_false_node. - - * search.c (get_matching_virtual): Allow covariant returns that - don't require pointer adjustment. - - * typeck.c (build_conditional_expr): Don't call default_conversion - on ifexp. - - * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR. - - * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn. - -Sun Jan 15 22:17:32 1995 David Binderman - - * pt.c (do_function_instantiation): Free targs once we're done. - -Sun Jan 15 22:17:32 1995 Jason Merrill - - * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD. - (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE - for bool. - -Sat Jan 14 05:33:55 1995 Jason Merrill - - * decl2.c (finish_file): We need to mess up if there are any - variables in the list, not just if there is one with a constructor. - -Fri Jan 13 14:42:55 1995 Jason Merrill - - * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR. - (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR. - (finish_function): Trust rest_of_compilation. - - * decl2.c (finish_file): Also call functions designated as static - constructors/destructors. - - * decl.c (grokdeclarator): Allow access decls of operator functions. - (grokparms): Only do convert_for_initialization if the initializer - has a type. - (duplicate_decls): Put back push_obstacks_nochange call. - - * lex.c (real_yylex): Downgrade complaint about the escape sequence - being too large from pedwarn to warning. - - * decl.c (grokdeclarator): Don't complain about long long in system - headers. - - * lex.c (real_yylex): Handle digraphs. - -Thu Jan 12 12:17:24 1995 Jason Merrill - - * decl.c (init_decl_processing): -f{no-,}strict-prototype only - affects C linkage declarations now. - - * typeck.c (comp_target_types): Grok simple contravariant conversions. - (common_type): t1 and t2 are interchangeable. - - * various: Test return value of comp_target_types differently in - different places; it now returns -1 for a contravariant conversion - (which is fine in symmetric cases). - - (common_type): Prefer long double to double even when - they have the same precision. - - * decl.c (grokparms): Call convert_for_initialization to check - default arguments. - - * init.c (build_new): void_type_node has a size (of 0). - - * decl.c (decls_match): Also check for agreement of TREE_READONLY - and TREE_THIS_VOLATILE. - (push_class_level_binding): Properly handle shadowing of - nested tags by fields. - - * search.c (dfs_pushdecls): Likewise. - - * decl2.c (finish_file): Don't second-guess self-initialization. - - * cvt.c (convert_to_reference): Work with expr directly, rather than - a copy. - - * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs. - - * init.c (add_friend): Downgrade duplicate friend message from - pedwarn to warning. - - * decl.c (duplicate_decls): Push obstacks before calling common_type. - -Thu Jan 12 17:15:21 1995 Michael Ben-Gershon - - * except.c (push_eh_entry): Set LABEL_PRESERVE_P flag for - exception table labels. - (expand_start_all_catch): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - * except.c (make_first_label): New function. - (expand_start_all_catch): Add a call to make_first_label() before - using a label as a jump destination. - (expand_end_all_catch): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - (expand_builtin_throw): Likewise. - (expand_throw): Likewise. - * except.c: Add ARM processor support for exception handling. - -Thu Jan 12 12:17:24 1995 Jason Merrill - - (complete_array_type): Copy code from C frontend. - - * lex.c (real_yylex): Don't multiply the length of a wide string - literal by WCHAR_BYTES. - - * decl.c (pushdecl): Check for redeclaration of wchar_t here. - (duplicate_decls): Instead of here. - (define_label): Complain about a label named wchar_t. - (grokdeclarator): Complain about declarations of - operator-function-ids as non-functions. - - * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in - COMPOUND_EXPRs. - (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR. - - * lex.c (real_yylex): Don't skip whitespace when reading the next - character after ->. - -Wed Jan 11 16:32:49 1995 Mike Stump - - * except.c: Allow cc1plus to be built with native compiler on rs6000. - (expand_start_all_catch): Add assemble_external calls for various - routines we call. - (expand_leftover_cleanups): Likewise. - (expand_start_catch_block): Likewise. - (do_unwind): Likewise. - (expand_builtin_throw): Likewise. - -Wed Jan 11 01:05:42 1995 Jason Merrill - - * decl.c (pushtag): Only look for a previous decl in the current - binding level. Use explicit global scope in DECL_NESTED_TYPENAME. - - * gxx.gperf: Add __signature__ and __sigof__ keywords. - - * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It - does set flag_no_gnu_keywords and flag_operator_names. - - * lex.c (init_lex): 'overload' is not a keyword unless -traditional. - Unset extension keywords if -fno-gnu-keywords. - Allow operator names ('bitand') if -foperator-names. - Never unset 'asm'; -fno-asm only affects 'typeof'. - - * decl.c (lookup_name_real): The got_object special lookup only - applies to types. - -Tue Jan 10 18:07:51 1995 Jason Merrill - - * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set. - - * parse.y (primary): Unset got_object after all rules that use the - 'object' nonterminal. - (object): Set got_object. - - * lex.h: Declare got_object. - - * decl.c (lookup_name_real): Also lookup names in the context of an - object specified. - -Tue Jan 10 14:30:30 1995 Mike Stump - - * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node - for things that have to be added to pointers, not size_type. Cures - problems with pointer to members on Alphas. - (build_binary_op_nodefault): Likewise. - (get_delta_difference_: Likewise. - (build_ptrmemfunc): Likewise. - -Tue Jan 10 01:49:25 1995 Jason Merrill - - * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing - it. - - * typeck.c (build_component_ref): Don't build up a COMPONENT_REF - when dealing with overloaded member functions; just act like - build_offset_ref. - (commonparms): Remove misleading comment. - - * decl.c (duplicate_decls): Complain about repeated default - arguments here. - (redeclaration_error_message): Instead of here. - (pushdecl): Complain about missing default arguments here. - (grokparms): Instead of here. - (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME. - (grok_reference_init): Do not complain about missing initializer if - declared 'extern'. - - * search.c (lookup_field): Don't return a TYPE_DECL if there is a - function alternative and want_type is not set. - -Mon Jan 9 18:16:23 1995 Jason Merrill - - * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push - the decl when the type has no TYPE_NAME. - (lookup_nested_type): Don't assume that type has TYPE_NAME set. - (lookup_name_real): Call lookup_field with want_type = - prefer_type. - - * search.c (lookup_field): Handle want_type properly in the presence - of fields with the same name. - - * decl.c (set_nested_typename): Set nested name for file-scope types - to include leading ::. - (pushdecl): Set the nested typename if the decl doesn't have one, - rather than if the type's canonical decl doesn't have one. - -Mon Jan 9 03:44:33 1995 Jason Merrill - - * typeck.c (convert_for_assignment): Complain about contravariance - violation here. - (comp_target_types): Instead of here. - (build_unary_op): resolve_offset_ref before checking for a valid - type. - - * spew.c (yylex): Decrement looking_for_typename after we see a - _DEFN. - - * decl.c (pushdecl): Don't install an artificial TYPE_DECL in - IDENTIFIER_LOCAL_VALUE if we already have a decl with that name. - - * typeck.c (convert_for_assignment): Converting pointers to bool - does not need a cast. - -Sun Jan 8 18:16:45 1995 Jason Merrill - - * class.c (instantiate_type): Initialize nsubsts parm. - - * pt.c (do_function_instantiation): Likewise. - -Sat Jan 7 14:37:05 1995 Jason Merrill - - * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE && - DECL_SAVED_INSNS to determine whether or not we've seen a definition - of this function. - (instantiate_template): Likewise. - - * call.c (convert_harshness): Allow const reference binding when - called from the overloading code, but not when called from - can_convert (since it isn't a conversion). - (convert_harshness): Put back some disabled code. - -Fri Jan 6 14:10:57 1995 Jason Merrill - - * call.c (convert_harshness): There is no implicit conversion from - void* to other pointer types (unless the parameter is (void*)0). - (convert_harshness): Non-lvalues do not convert to reference types. - - * class.c (finish_struct_methods): Still set - TYPE_HAS_{INT,REAL}_CONVERSION. - - * call.c (can_convert): Don't use aggregate initialization. - - * cp-tree.h: Declare lookup_conversions. - -Thu Jan 5 21:08:00 1995 Mike Stump - - * parse.y (simple_stmt): Fix duplicate case value error messages to - be more readable. - -Wed Jan 4 16:44:19 1995 Jason Merrill - - * cvt.c (build_type_conversion): Total rewrite to use - convert_harshness instead of reproducing conversion logic here. Now - much shorter. - - * call.c (convert_harshness): Support conversions to bool. - (can_convert): Checks whether a conversion is less harsh - than USER_CODE, for build_type_conversion. - - * search.c (add_conversions): Function for passing to dfs_walk which - adds all the type conversion operators in the current type to a list. - (lookup_conversions): Calls dfs_walk with add_conversions and return - the list. - (dfs_walk): Don't require a qfn. - - * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery. - (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC. - - * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery. - (grow_method): A separate function for building onto the growing - method vector. - (finish_struct_methods): Use it. Put all type conversion operators - right after the constructors. Perhaps we should sort the methods - alphabetically? - -Mon Jan 2 14:42:58 1995 Jason Merrill - - * call.c (build_method_call): Lose another misleading shortcut. - Fri Dec 30 17:57:30 1994 Mike Stump * gc.c (build_bltn_desc): Handle bool as a built-in type. @@ -8843,609 +5403,3 @@ Mon Jan 3 22:22:32 1994 Gerald Baumgartner * invoke.texi: Added `-fhandle-signatures' in the list of C++ language options. Added explanation for this option. -Tue Dec 28 21:10:03 1993 Mike Stump - - * cp-init.c (expand_vec_init): Remove comptypes test, as it is too - harsh here. - -Tue Dec 28 13:42:22 1993 Mike Stump - - * cp-pt.c (do_pending_expansions): Decide to expand a template - member function, based upon it's class type, not the class type of - the first place it was declared. - -Tue Dec 28 05:42:31 1993 Mike Stump - - * cp-class.c (is_normal): New routine, use to determine when the - given binfo is the normal one. (The one that should have the simple - vtable name.) - * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME - to check if two fndecls are `the same'. Sometimes this routine can - modify the main vtable, and normal should be 1, in that case, so use - is_normal() to determine if this is the main vtable for the class. - Don't recurse down virtual bases, as they are shared, and we take - care of them elsewhere. - * cp-class.c (modify_vtable_entries): If we have already updated the - vtable with the new virtual, don't do it again. - * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as - appropriate. Do virtual function overriding in virtual bases, after - normal overriding, so that the base function list in DECL_VINDEX is - not overridden, before we have a chance to run through the list. - Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'. - Make sure we pass the right address into modify_vtable_entries. - * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which - binfo is the one that has the vtable that we based our vtable on. - -Fri Dec 24 09:40:52 1993 Michael Tiemann - - * cp-typeck.c (c_expand_start_case): Use default_conversion to - convert expression from reference type if necessary. - -Wed Dec 22 17:58:43 1993 Jason Merrill - - * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before - trying to read its TREE_VALUE. - - * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here. - (finish_struct): Instead of here. - -Tue Dec 21 14:34:25 1993 Brendan Kehoe - - * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't - have TYPE_PTRMEMFUNC_P set before we try to build its - CLASSTYPE_ID_AS_LIST. - (get_decl_list): Likewise, when trying to read it. - - * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined. - (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT. - -Mon Dec 20 13:35:03 1993 Brendan Kehoe - - * cp-typeck.c (rationalize_conditional_expr): New function. - (unary_complex_lvalue): Use it. - (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it - with build_unary_op won't cut it. Don't wrap the COND_EXPR with a - SAVE_EXPR either. - - * cp-decl2.c (explicit_warn_return_type): Deleted variable. - (lang_decode_option): Set warn_return_type, not explicit_*, for - -Wreturn-type and -Wall. This is what rest_of_compilation uses to - decide if it should go into jump_optimize or not. - * cp-tree.h (explicit_warn_return_type): Deleted. - * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*. - (finish_function): Also complain about no return in a non-void fn if - we're being pedantic (don't rely on use of -Wreturn-type). - -Fri Dec 17 15:45:46 1993 Brendan Kehoe - - * cp-decl.c (grokdeclarator): Forbid declaration of a function as - static if it's being done inside another function. - - * cp-search.c (compute_visibility): Check for friendship both ways. - -Fri Dec 17 14:28:25 1993 Jason Merrill - - * cp-cvt.c (build_default_binary_type_conversion): Make error - messages more helpful. - - * cp-error.c (op_as_string): New function, returns "operator ==" - given EQ_EXPR or suchlike. - -Fri Dec 17 13:28:11 1993 Brendan Kehoe - - * cp-call.c (print_n_candidates): New function. - (build_overload_call_real): Use it when we complain about a call - being ambiguous. - -Fri Dec 17 12:41:17 1993 Jason Merrill - - * cp-call.c (build_method_call): Fix checking for static call - context. - - * cp-method.c (build_opfncall): Call build_indirect_ref on argument - to operator new. - - * cp-init.c (build_new): Don't mess with rval when building - indirect ref. - -Thu Dec 16 16:48:05 1993 Kung Hsu - - * cp-lex.c (default_assign_ref_body): Add check when TYPE_NESTED_ - NAME(type) may not be exist. It's not a problem for old compiler. - -Thu Dec 16 14:46:06 1993 Brendan Kehoe - - * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's - never used for anything. - (struct lang_type, member type_flags): Delete field - `alters_visibility', and up `dummy' by 1. - * cp-class.c (finish_base_struct): Delete code that copies the - setting of CLASSTYPE_ALTERS_VISIBILITIES_P. - (finish_struct): Delete code that sets it. - -Thu Dec 16 14:44:39 1993 Jason Merrill - - * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to - build_method_call that I messed up before. - - * cp-search.c (get_base_distance): If protect > 1, allow immediate - private base. - - * cp-class.c (finish_base_struct): Set cant_synth_* correctly. - (finish_struct): Likewise. Well, nigh-correctly; it won't deal - properly with the case where a class contains an object of an - ambiguous base class which has a protected op=. Should be fixed - when the access control code gets overhauled. - (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly. - -Thu Dec 16 12:17:06 1993 Brendan Kehoe - - * cp-lex.c (real_yylex): Turn the code back on that deals with - __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to - avoid the ambiguity problems that led to it being turned off in the - first place. - - * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P - to see if something is a method. - -Wed Dec 15 18:35:58 1993 Mike Stump - - * cp-typeck.c (build_modify_expr): Avoid error messages on small - enum bit fields. - * cp-typeck.c (convert_for_assignment): Add missing argument to - cp_warning and cp_pedwarn calls. - -Wed Dec 15 18:25:32 1993 Jason Merrill - - * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base - initializers; it's just anachronistic. - - * cp-decl.c (finish_decl): Don't require external-linkage arrays - to have a complete type at declaration time when pedantic. - -Tue Dec 14 11:37:23 1993 Jason Merrill - - * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set. - - * cp-call.c (build_method_call): Don't dereference pointer given - as instance. - - * cp-decl.c (finish_function): Don't pass pointer to - build_method_call. - (finish_function): Likewise. - - * cp-typeck.c (build_x_function_call): Likewise. - - * cp-method.c (build_component_type_expr): Likewise. - - * cp-init.c (build_member_call): Likewise. - (build_new): Likewise. - -Mon Dec 13 18:04:33 1993 Kung Hsu - - * cp-decl.c (xref_tag): Fix regression created by changes made - in Dec. 7 1993. - * cp-decl.c (xref_defn_tag): Fix parallel nested class problem. - -Fri Dec 10 12:40:25 1993 Brendan Kehoe - - * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print - out the final evaluation of the function, so we can see if ELLIPSIS, - USER, and EVIL were set at the end. - - * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue, - only go for setting TRIVIAL_CODE if we are dealing with types that - are compatible. - -Thu Dec 9 18:27:22 1993 Mike Stump - - * cp-decl.c (flag_huge_objects): New flag to allow large objects. - * toplev.c (lang_options): Likewise. - * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise. - * cp-decl.c (delta_type_node): New type for delta entries. - * cp-tree.h (delta_type_node): Likewise. - * cp-decl.c (init_decl_processing): Setup delta_type_node. - * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use - delta_type_node instead of short_integer_type_node. - * cp-class.c (build_vtable_entry): Likewise. - -Thu Dec 9 16:19:05 1993 Brendan Kehoe - - * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of - NO_{DOLLAR,DOT} macro checks, so it always gets defined. - (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL. - -Wed Dec 8 17:38:06 1993 Mike Stump - - * cp-decl.c (finish_decl): Make sure things that can go into - "common", do go into common, if -fcommon is given. - -Wed Dec 8 13:01:54 1993 Brendan Kehoe - - * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function. - (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out - argument matching diagnostics to make instantly clear what the - compiler is doing. - - * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue, - then check to see if the penalty was increased due to - signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't. - -Tue Dec 7 18:29:14 1993 Kung Hsu - - * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution - problem. - -Tue Dec 7 16:09:34 1993 Jason Merrill - - * cp-class.c (finish_struct): Before synthesizing methods, if no - methods have yet been declared then set nonprivate_method. Don't - set non_private method after synthesizing a method. - - * cp-lex.c (extract_interface_info): If flag_alt_external_templates - is set, tie emitted code to the location of template instantiation, - rather than definition. - - * cp-tree.h: Declare flag_alt_external_templates. - - * cp-decl2.c (lang_decode_option): Support -falt-external-templates. - - * toplev.c (lang_options): Likewise. - -Mon Oct 4 12:50:02 1993 Chip Salzenberg - - [changes propagated from 930810 snapshot] - * cp-decl.c (init_decl_processing): Make long long available for use - as SIZE_TYPE and PTRDIFF_TYPE. - (finish_decl): Allow file-scope static incomplete array. - (grokdeclarator): Don't pass on const and volatile fron function - value type to function type. - Warn here for volatile fn returning non-void type. - * cp-parse.y (attrib): Accept attributes `volatile' with alias - `noreturn', and `const'. - * cp-typeck.c (default_conversion): Don't lose const and volatile. - (build_binary_op_nodefault): Generate pedantic warning for comparison - of complete pointer type with incomplete pointer type. - (build_c_cast): Be careful that null pointer constant be INTEGER_CST. - -Tue Dec 7 10:46:48 1993 Jason Merrill - - * cp-init.c (expand_vec_init): When creating a temporary for copying - arrays, use the type of the source, not the target. - - * cp-cvt.c (convert): Pass an argument for errtype to - convert_to_reference. - - * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with - methods, -> and `this'. - -Mon Dec 6 17:12:33 1993 Jason Merrill - - * cp-error.c (parm_as_string): New function; returns `this' or arg - number. Corresponds to %P. - (dump_expr): Deal with method calls. - - * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment. - * cp-typeck.c (convert_for_assignment): Likewise. - (warn_for_assignment): Lose. - -Mon Dec 6 11:33:35 1993 Brendan Kehoe - - * cp-call.c (ideal_candidate_ansi): Delete code that was never - doing anything useful. Instead, sort once, and DO NOT wipe - out any codes with EVIL_CODE, since that's what we use as a - marker for the end of the list of candidates. - - * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN. - -Mon Dec 6 12:49:17 1993 Jason Merrill - - * cp-init.c (get_aggr_from_typedef): New function, like - is_aggr_typedef but returns the _TYPE. - - * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name. - -Sun Dec 5 18:12:48 1993 Brendan Kehoe - - * cp-lex.c (readescape): Pedwarn when a hex escape is out of range. - -Thu Nov 25 23:50:19 1993 Chip Salzenberg - - Delay language context change until beginning of next decl. - - * cp-lex.h (c_header_level): Removed. - (pending_lang_change): Declared. - * cp-lex.c (c_header_level): Renamed from in_c_header, made static. - (pending_lang_change): Defined. - (check_newline): Rework code that recognizes line number and - filename changes. Instead of pushing and popping lang context, - increment and decrement pending_lang_change. - (do_pending_lang_change): Push and pop lang context according - to value of pending_lang_change. - * cp-parse.y (extdefs): Use lang_extdef instead of extdef. - (extdef): Same as extdef, but call do_pending_lang_change() first. - -Mon Nov 15 15:39:15 1993 Chip Salzenberg - - * cp-typeck.c (build_binary_op_nodefault): Warn for ordered - compare of ptr with 0 only if pedantic in both cases. - -Thu Nov 25 13:31:37 1993 Chip Salzenberg - - Reinstate the below patch, which got lost in the Cygnus merge: - Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no) - * cp-parse.y (maybe_type_qual): Don't fail to set $$. - -Wed Nov 17 19:03:30 1993 Chip Salzenberg - - * cp-parse.y (attrib): Allow "ident(ident)" like the C front end. - -Fri Oct 22 20:43:37 1993 Paul Eggert - - * cp-lex.c (real_yylex): Diagnose floating point constants - that are too large. - -Wed Nov 17 19:10:37 1993 Chip Salzenberg - - * cp-type2.c (build_functional_cast): ARM page 16: When a class - and an object, function or enumerator are declared in the same - scope with the same name, the class name is hidden. - -Wed Nov 17 19:07:18 1993 Chip Salzenberg - - * cp-call.c (convert_harshness_ansi): Distinguish float, double, - and long double from each other when overloading. - (compute_conversion_costs_{ansi,old}, build_method_call, - build_overlay_call_real, convert_to_aggr): Always set and - always use H_LEN member of candidate structure. - -Mon Oct 11 23:10:53 1993 Chip Salzenberg - - * cp-decl.c (duplicate_decls): Note redeclarations of library - functions, and generate distinct warnings for them. - -Mon Oct 4 12:26:49 1993 Chip Salzenberg - - Support format warnings in G++. - - * cp-tree.h: Protect against multiple inclusion. - Declare all public functions in c-common.c (copy from c-tree.h). - (STDIO_PROTO): Define. - (warn_format): Declare. - (record_format_info): Remove declaration. - * cp-decl.c (init_decl_processing): Call init_function_format_info. - * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format. - * cp-typeck.c (build_function_call_real): Call check_function_format. - (record_format_info): Remove -- obsolete stub. - -Sat Jul 24 12:04:29 1993 Chip Salzenberg - - * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl - following an extern one (for -Wredundant-decls). - * cp-parse.y (primary): In statement expression case, if compstmt - returns something other than a BLOCK, return it unchanged. - -Thu Dec 2 20:44:58 1993 Chip Salzenberg - - * cp-decl.c (warn_extern_redeclared_static): New function made - from code extracted from pushdecl. - (duplicate_decls, pushdecl): Call new function. - (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE - to be a TREE_LIST when function is declared in 'extern "C" {}'. - -Fri Dec 3 16:01:10 1993 Jason Merrill - - * cp-class.c (duplicate_tag_error): Use cp_error. - (finish_base_struct): Check for ambiguity with direct base, and don't - generate op= or copy ctor if it exists. - -Fri Dec 3 15:32:34 1993 Kung Hsu - - * cp-init.c (expand_member_init): When initializer name is null, - don't try to build it now because emit_base_init will handle it. - -Fri Dec 3 12:28:59 1993 Jason Merrill - - * cp-lex.c (init_lex): Initialize input_filename to "" for - code such as ExceptionHandler::operator=. - -Fri Dec 3 10:32:08 1993 Jason Merrill - - * cp-decl.c (grokdeclarator): Don't try to print out dname when - complaining about arrays of references if decl_context==TYPENAME, - since it will be null. - - * cp-decl2.c: Default to flag_ansi_overloading. - -Thu Dec 2 18:05:56 1993 Kung Hsu - - * cp-call.c (build_method_call): Use binfo from instance if it's - different from binfo (basetype_path) passed from above. - -Wed Nov 17 19:14:29 1993 Chip Salzenberg - - cp-error.c (dump_expr): Use unsigned chars to output a - TREE_REAL_CST in hex. - -Thu Dec 2 11:05:48 1993 Jason Merrill - - * cp-class.c (finish_struct): Fix typo in setting - cant_synth_asn_ref. - - * cp-tree.h (TYPE_NESTED_NAME): New macro, does - DECL_NESTED_TYPENAME (TYPE_NAME (NODE)). - - * cp-lex.c (default_copy_constructor_body): Change - DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype). - (default_assign_ref_body): Likewise. - (default_copy_constructor_body): Call operator= explicitly for - base classes that have no constructor. - -Thu Dec 2 10:47:15 1993 Michael Tiemann - - * cp-call.c (build_method_call): If the instance variable is - converted to error_mark_node when we're trying to convert it to the - base type of a method we're looking up, return error_mark_node. - -Thu Dec 2 10:41:16 1993 Torbjorn Granlund - - * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR - cases, tests for unsigned operands by peeking inside a NOP_EXPR. - -Wed Dec 1 13:33:34 1993 Brendan Kehoe - - * cp-call.c (compute_conversion_costs_ansi): Use the size of struct - harshness_code, not the size of short, for clearing out the - ansi_harshness. - - * cp-call.c (print_candidates): New function. - (build_method_call): When we had some candidates, but didn't get a - usable match, don't report that we got an error with the first - candidate. Instead, say there were no matches, and list the - candidates with print_candidates. In the second pass, make sure we - clear out ever_seen, so we can accurately count the number of - functions that qualified. - -Wed Dec 1 09:53:59 1993 Torbjorn Granlund - - * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR - only if op1 is known to be != -1. - (build_binary_op_nodefault): Handle *_DIV_EXPR likewise. - -Tue Nov 30 14:07:26 1993 Brendan Kehoe - - * cp-method.c (hack_identifier): If the field itself is private, and - not from a private base class, say so. - -Mon Nov 29 03:00:56 1993 Jason Merrill - - * cp-decl.c (grokdeclarator): Always warn on initialization of - const member. - -Wed Nov 24 00:49:35 1993 Jason Merrill - - * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly. - (finish_base_struct): Set cant_synth_asn_ref properly. - - * cp-lex.c (cons_up_default_function): Add section for operator=. - (default_assign_ref_body): New function, mostly cribbed from - default_copy_constructor_body. - - * cp-class.c (base_info): Add members cant_synth_copy_ctor, - cant_synth_asn_ref, no_const_asn_ref. - (finish_base_struct): Update no_const_asn_ref, note that you should - update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF. - (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and - initialize them properly. Set no_const_asn_ref properly. Set - cant_synth_* in some of the situations where they should be set. - Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call - to cons_up_default_function for operator=. - -Tue Nov 23 20:24:58 1993 Mike Stump - - * cp-cvt.c (convert_force): Add code to perform casting of pointer - to member function types. - * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate - when the conversion should be done, regardless. - * cp-tree.h (build_ptrmemfunc): Likewise. - * cp-type2.c (digest_init): Likewise. - * cp-typeck.c (convert_for_assignment): Likewise. - -Tue Nov 23 18:06:58 1993 Jason Merrill - - * cp-error.c (dump_expr): Do the right thing for variables of - reference type. - - * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF - and its kin properly. - (xref_tag): Propagate TYPE_GETS_ASSIGN_REF. - -Tue Nov 23 12:26:13 1993 Mike Stump - - * cp-method.c (build_opfncall): Don't count pointer to member - functions as aggregates here, as we don't want to look up methods in - them. The compiler would core dump if we did, as they don't have - normal names. - * cp-typeck.c (build_indirect_ref): Improve wording on error - message. - -Mon Nov 22 14:22:23 1993 Jason Merrill - - * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn - (since it's supported in other compiler bits). - - * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name - argument. - - * cp-error.c (dump_function_decl): Don't print return type for - constructors and destructors. - - * cp-cvt.c (cp_convert_to_pointer): Import code from - convert_to_pointer so we can return error_mark_node in the case of an - error, and to allow more meaningful error messages. - (build_type_conversion): Don't go through void* when trying - to convert to a pointer type. - - * cp-decl.c (grokfndecl): Move call to grok_op_properties back - after grokclassfn so that it's dealing with the right decl. - (grok_op_properties): Don't assert !methodp for op new and op delete. - - * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now - no uses of it in the compiler). - - * cp-call.c (build_scoped_method_call): Fix for destructors of simple - types. - (build_method_call): Likewise. - -Fri Nov 19 12:59:38 1993 Jason Merrill - - * cp-tree.c (count_functions): Abstraction function. - - * cp-call.c (build_overload_call_real): Deal with new overloading - properly, remove dead code. - - * gcc.c (default_compilers): Generate and use .ii files in the - intermediate stage of compiling C++ source. - -Fri Nov 19 11:26:09 1993 Jim Wilson - - * cp-expr.c (cplus_expand_expr): Make call_target a valid memory - address before using it, so it can be later safely compared. - -Fri Nov 12 15:30:27 1993 Jason Merrill - - * cp-pt.c (tsubst): Deal with new overloading. - - * cp-typeck.c (fntype_p): Is the arg function type? - (comp_target_parms): pedwarn on conversion from (anything) to (...). - (build_x_function_call): Deal with new overloading. - - * cp-tree.c (decl_list_length): Deal with new overloading. - (decl_value_member): Like value_member, but for DECL_CHAINs. - - * cp-decl.c (duplicate_decls): Deal with new overloading. - (start_decl): Likewise. - - * cp-class.c (instantiate_type): Deal with new overloading. - - * cp-call.c (convert_harshness_ansi): Deal with new overloading. - (convert_harshness_old): Deal with new overloading. - (build_overload_call_real): Likewise. - -Mon Nov 8 13:50:49 1993 Jason Merrill - - * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL - if unambiguous, NULL_TREE otherwise. - (get_first_fn): Returns the first appropriate FUNCTION_DECL. - (is_overloaded_fn): Returns whether or not the passed tree is - a function or list of functions. - - * cp-init.c (init_init_processing): Use `get_first_fn' to find - the FUNCTION_DEFN for new and delete. - - * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut - code size in half (I spit on special cases). - -Tue Sep 7 20:03:33 1993 Jason Merrill - - * cp-decl.c: Allow references and template type parameters as well diff --git a/gcc/cp/ChangeLog-1995 b/gcc/cp/ChangeLog-1995 new file mode 100644 index 0000000..c4f4046 --- /dev/null +++ b/gcc/cp/ChangeLog-1995 @@ -0,0 +1,3791 @@ +Thu Dec 28 11:13:15 1995 Mike Stump + + * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of + NORMAL_RETURN_ADDR_OFFSET. + (end_eh_unwinder): Likewise. + +Wed Dec 27 22:18:16 1995 Mike Stump + + * gc.c (build_dynamic_cast): Make sure we don't cast away const + when dealing with references, and make sure we handle dynamic + casting to a cv qualified reference. + +Thu Dec 21 23:50:35 1995 Mike Stump + + * except.c (struct eh_context): New structure top hold eh context + information. + (push_eh_context): New routine. + (pop_eh_context): Likewise. + * decl.c (push_cp_function_context): Use them. + (pop_cp_function_context): Likewise. + +Wed Dec 20 12:42:51 1995 Jason Merrill + + * decl2.c (finish_file): Also prune uninteresting functions in the + inline emission loop. + +Wed Dec 20 02:32:07 1995 Jeffrey A Law + + * sig.c (build_signature_table_constructor): Mark functions + in the signature as referenced. + +Tue Dec 19 22:36:56 1995 Jason Merrill + + * decl2.c (finish_file): Do all the vtable/synthesis stuff before + the inline emission stuff. + +Mon Dec 18 15:51:33 1995 Jason Merrill + + * cp-tree.h, decl2.c (flag_weak): New flag to control the use of + weak symbols. + * lang-options.h: Add -f{no-,}weak. + * decl.c (init_decl_processing): If the target does not support weak + symbols, don't use them. + * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/. + +Sun Dec 17 21:13:23 1995 Rusty Russell + + * init.c (expand_member_init): warning for base init after members. + +Fri Dec 15 15:32:18 1995 Jason Merrill + + * cvt.c (build_expr_type_conversion): Don't convert to a reference + type. + +Thu Dec 14 16:05:58 1995 Mike Stump + + * method.c (report_type_mismatch): Improve wording for volatile + mismatches. + +Thu Dec 14 14:16:26 1995 Mike Stump + + * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of + expand_assignment, as the later doesn't handle things that have + copy constructors well. The compiler would do bitwise copying, + instead of ctor calling in some cases. + +Wed Dec 13 17:05:54 1995 Paul Eggert + + * g++.c (my_strerror): Return "cannot access" if errno is 0. + (pfatal_with_name, perror_exec): Don't assume that + the returned value from my_strerror contains no '%'s. + (concat): Remove. + (sys_nerror): Declare only if HAVE_STRERROR is not defined. + +Wed Dec 13 16:22:38 1995 Jason Merrill + + Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make + TYPE_METHODS/TREE_CHAIN mean what they used to. + * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC + instead of TYPE_METHODS. + * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD. + * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise. + * cp-tree.h (CLASSTYPE_METHODS): Lose. + (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of + TYPE_METHODS. + (struct lang_decl): Lose next_method field. + (DECL_NEXT_METHOD): Lose. + * class.c (finish_struct_methods): Don't mess with TYPE_METHODS. + (finish_struct): Just use TYPE_METHODS; we don't need fn_fields + anymore. + (finish_struct_methods): Don't mess with the TREE_CHAINs in + fn_fields. + + * search.c (add_conversions): Don't use TREE_CHAIN to traverse method + vector. + + * call.c (build_method_call): Synthesize here even when not inlining. + * typeck.c (build_function_call_real): Likewise. + +Wed Dec 13 15:02:39 1995 Ian Lance Taylor + + * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols + == DBX_DEBUG, call dbxout_start_new_source_file and + dbxout_resume_previous_source_file when appropriate. + +Tue Dec 12 20:38:55 1995 Mike Stump + + * except.c (start_anon_func): Push to the top level. + (end_anon_func): Pop from the top level. + +Mon Dec 11 18:56:14 1995 Mike Stump + + * cp-tree.h (build_cleanup): New routine to build cleanups. + * decl.c (expand_static_init): Use build_cleanup to build a cleanup + call at ctor time and use atexit to run it later. + * decl2.c (build_cleanup): New routine, taken from finish_file. + (finish_file): Use build_cleanup instead, and don't put function + local statics in global dtor list. + +Wed Dec 6 14:34:29 1995 Mike Stump + + * except.c (expand_throw): Ensure that we have cleanups, if we try + and expand cleanups. + +Wed Dec 6 11:48:21 1995 Mike Stump + + * except.c (expand_throw): Add logic to manage dynamic cleanups for + the EH object. + (expand_end_catch_block): Use the magic of expand_goto, instead of + emit_jump so that we get the cleanup for any catch clause parameter + and the cleanup for the exception object. Update to reflect label + changes. + (push_eh_cleanup): New routine to register a cleanup for an + exception object. + (empty_fndecl): Used to default cleanup actions to + nothing. + (init_exception_processing): Setup empty_fndecl. Setup + saved_cleanup. + (expand_start_catch_block): Update to reflect label changes. Call + push_eh_object to register the cleanup for the EH object. + (start_anon_func): New routine to start building lambda expressions + from trees. + (end_anon_func): New routine to end them. + (struct labelNode): Change so that we can use tree labels, or rtx + labels. + (saved_cleanup): Object to check for dynamic cleanups for the + exception handling object. + (push_label_entry): Change so that we can use tree labels, or rtx + labels. + (pop_label_entry): Likewise. + (top_label_entry): Likewise. + (expand_start_all_catch): Use tree label instead of rtx label, so + that we can get the magic of expand_goto. + (expand_end_all_catch): Update to reflect label changes. + + * class.c (build_vfn_ref): Remove building_cleanup logic, as we now + use UNSAVE_EXPRs. + * typeck.c (get_member_function_from_ptrfunc): Remove remnants of + building_cleanup logic, as we now use UNSAVE_EXPRs. + * cp-tree.h (unsave_expr): Declare it. + * decl.c (building_cleanup): Remove. + (maybe_build_cleanup): Remove building_cleanup logic, and use + UNSAVE_EXPR instead. + +Sun Dec 3 01:34:58 1995 Mike Stump + + * gc.c (build_t_desc): Update error message to say . + +Thu Nov 30 12:30:05 1995 Brendan Kehoe + + * decl.c (pushdecl): Only warn about shadowing a local variable if + warn_shadow is true. + +Sun Nov 26 16:06:55 1995 Rusty Russell + + * typeck.c (build_binary_op_nodefault): Added warning about + comparisons between different enum types with -Wall, unless + -fenum-int-equiv set. + +Wed Nov 22 15:44:02 1995 Mike Stump + + * class.c (finish_struct_1): Skip down to the inner type in + multidimensional arrays. Ensures ctors will be made for types that + need constructing. + +Wed Nov 22 14:19:22 1995 Mike Stump + + * decl.c (last_dtor_insn): New to track the last compiler generated + insn in a dtor. + (store_parm_decls): Set it. + (finish_function): Use it to see if the dtor is empty. Avoid doing + vtable setup all the time, if we can. + (struct cp_function): Add last_dtor_insn. + (push_cp_function_context): Save it. + (pop_cp_function_context): Restore it. + +Wed Nov 22 11:52:19 1995 Paul Russell + + * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid + warnings. + +Tue Nov 21 17:15:23 1995 Mike Stump + + * typeck.c (expand_target_expr): Make sure targets get put into the + current temp_slot_level, so that the free_temp_slots call will reuse + them. + +Tue Nov 21 13:32:03 1995 Mike Stump + + * class.c (finish_struct_1): Delay delta fixups for virtual bases + until after we have done the hard virtuals, to avoid a bogus `every + virtual function must have a unique final overrider' for virtual + functions that are only overridden by hard virtuals. + +Thu Nov 9 13:35:30 1995 Jason Merrill + + * pt.c (do_function_instantiation): Don't try to find a file-scope + template for a member function. + +Tue Nov 14 06:20:35 1995 Mike Stump + + * g++.c (main): Add handling of -nodefaultlibs. + +Mon Nov 13 15:45:34 1995 Mike Stump + + * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to + distinguish between direct bindings of reference variables, and + indirect bindings of reference variables. + * cvt.c (build_up_reference): Use it. + * typeck.c (convert_arguments): Use it to indicate this is an + indirect binding. + * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast + as they are unused. + (expand_static_init): Likewise. + (cplus_expand_expr_stmt): Likewise. + * decl2.c (finish_file): Likewise. + * init.c (perform_member_init): Likewise. + (emit_base_init): Likewise. + (expand_aggr_vbase_init_1): Likewise. + +Fri Nov 10 09:18:09 1995 Brendan Kehoe + + * decl.c (push_namespace): Rewrite to use build_lang_decl, so we + get a DECL_LANG_SPECIFIC node. + * cp-tree.h (lang_decl_flags): Add new member `level'. + (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the + decl_flags level member. + +Mon Nov 6 18:36:13 1995 Brendan Kehoe + + * call.c (build_method_call): Make sure instance has a + TYPE_LANG_SPECIFIC node before we dive into it. + +Sat Nov 4 20:01:52 1995 Jason Molenda + + * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code. + +Thu Nov 2 17:56:57 1995 Mike Stump + + * decl.c (duplicate_decls): When smashing decls, smash staticness in + the usual way. + +Thu Nov 2 16:44:02 1995 Mike Stump + + * decl.c (poplevel): Handle the merging of subblocks of cleanups + when finishing blocks that have already been created (usually due to + the fixup goto code). Fixes bad debugging information. + +Wed Nov 1 12:33:53 1995 Jason Merrill + + * method.c (hack_identifier): Don't abort when we get a TREE_LIST + that's not a list of overloaded functions. + +Wed Nov 1 11:38:58 1995 Brendan Kehoe + + * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn + before trying to use DECL_ABSTRACT_VIRTUAL_P. + +Tue Oct 31 11:56:55 1995 Jason Merrill + + * decl2.c (mark_used): New function for hooking into setting of + TREE_USED on decls. + * call.c (build_method_call): Use it. + * class.c (instantiate_type): Likewise. + * init.c (build_offset_ref): Likewise. Don't call assemble_external + for all like-named functions. + * method.c (hack_identifier): Likewise. + (emit_thunk): Don't call assemble_external. + (make_thunk): Create thunk as a FUNCTION_DECL so that it + gets the right mode and ENCODE_SECTION_INFO works. + + * parse.y: Use mark_used. Pass operator names to do_identifier. + * lex.c (do_identifier): Handle operator names. + + * decl2.c (grokclassfn): Tweak __in_chrg attributes. + +Thu Oct 26 16:45:58 1995 Brendan Kehoe + + * errfn.c: Include stdio.h. + (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*. + +Wed Oct 25 18:58:41 1995 Mike Stump + + * typeck2.c (digest_init): Always convert initializers to the + right type. + +Wed Oct 25 13:25:24 1995 Mike Stump + + * init.c (member_init_ok_or_else): Don't allow member initializers + for indirect members, as it is invalid. + +Wed Oct 25 11:35:28 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Don't allow `friend signed ()'. + +Fri Oct 20 10:30:59 1995 Mike Stump + + * parse.y (for.init.statement): Catch compound statements inside for + initializations, if we're being pedantic. + +Fri Oct 20 10:03:42 1995 Mike Stump + + * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are + looking for. + +Thu Oct 19 14:26:10 1995 Mike Stump + + * error.c (dump_expr): Don't core dump when a boolean expression is + used as a default argument. + +Thu Oct 19 10:36:30 1995 Jason Merrill + + * class.c (finish_struct_bits): Check aggregate_value_p instead of + RETURN_IN_MEMORY. + +Wed Oct 18 18:12:32 1995 Jason Merrill + + * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a + BLKmode type that would otherwise be returned in registers. + +Mon Oct 16 12:32:19 1995 Brendan Kehoe + + * g++.c (WITHLIBC): New macro. + (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set + saw_libc and pass it at the end if it was set. + +Wed Oct 11 16:30:34 1995 Brendan Kehoe + + * parse.y (fn.def1): Call split_specs_attrs in + declmods notype_declarator case. + +Sun Nov 26 14:47:42 1995 Richard Kenner + + * Version 2.7.2 released. + +Mon Nov 20 14:05:00 1995 Mike Stump + + * g++.c (pfatal_with_name): Add missing third argument to concat. + +Thu Oct 26 13:59:54 1995 Mike Stump + + * init.c (expand_aggr_init): Handle cv qualifiers on the object's + type. + +Sat Nov 11 08:25:55 1995 Richard Kenner + + * Version 2.7.1 released. + +Thu Nov 2 17:02:47 1995 Jason Merrill + + * call.c (convert_harshness): Handle references to arrays. + +Fri Oct 27 14:20:21 1995 Jason Merrill + + * typeck.c (comp_target_types): Check multi-level pointer + conversions in both directions. + +Tue Oct 17 21:39:05 1995 Jason Merrill + + * parse.y (explicit_instantiation): Fix 'extern template' with no + return type. + +Mon Oct 16 14:35:20 1995 Jason Merrill + + * parse.y (explicit_instantiation): Support automatic instantiation + of constructors. + (named_class_head_*): Support out-of-class definition of nested + types. + +Wed Oct 11 12:20:56 1995 Mike Stump + + * search.c (envelope_add_decl): New routine. Fix so that + methods are hidden in the same way that other members are. + (dfs_pushdecls): Cleanup and move functionality out of line, + into envelope_add_decl. + +Tue Oct 10 15:46:01 1995 Mike Stump + + * typeck.c (mark_addressable): Only call assemble_external if we + have started the output file. + +Tue Oct 10 11:27:18 1995 Jason Merrill + + * decl.c (start_function): Fix earlier cv-quals change. + +Mon Oct 9 23:53:05 1995 Mike Stump + + * parse.y (complex_direct_notype_declarator): Only push the class if + we are not already in the class. + +Mon Oct 9 11:22:03 1995 Doug Evans + + * decl.c (duplicate_decls): Call merge_machine_decl_attributes. + Update olddecl's attributes too. + (grokdeclarator): #if 0 out call to build_decl_attribute_variant. + * typeck.c (common_type): Call merge_machine_type_attributes. + +Fri Oct 6 14:44:27 1995 Mike Stump + + * typeck.c (mark_addressable): Add missing call to + assemble_external. + +Wed Oct 4 15:06:39 1995 Mike Stump + + * decl.c (store_parm_decls): Make sure the unwinder start comes + before the exception specification start. + * except.c (expand_exception_blocks): Make sure the unwinder end + comes after the terminate protected catch clause region and after + the end of the exception specification region. + +Wed Oct 4 12:47:02 1995 Jason Merrill + + * lex.c (real_yylex): Fix identifier case for linemode. + (handle_sysv_pragma): Don't abort when we see a pragma we don't + recognize. + +Tue Oct 3 14:09:46 1995 Mike Stump + + * decl.c (store_parm_decls): Add a call to start_eh_unwinder. + * except.c (init_exception_processing): __throw doesn't take any + arguments. + (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode + for all pointers. Use expand_builtin_return_addr to unwind the + first level off the stack. + (do_unwind): Always use Pmode, instead of SImode for all pointers. + (expand_exception_blocks): Add a call to end_eh_unwinder. + (start_eh_unwinder, end_eh_unwinder): New routines to build machine + independent stack unwinders for function/method calls. + +Mon Oct 2 17:20:42 1995 Mike Stump + + * tree.c (unsave_expr_now): Make sure we process the argument list + of any called functions. Fixes incorrect code generation for + cleanups. + +Mon Oct 2 13:04:16 1995 Mike Stump + + * typeck.c (get_member_function_from_ptrfunc): Save function if it + needs it. Cures core dump on things like (this->*(f()))(). + +Sat Sep 23 22:51:25 1995 Jason Merrill + + * decl.c (start_function): Conform to gcc cv-quals convention (no + expression has a cv-qualified type) in RESULT_DECLs. + * method.c (make_thunk): Likewise. + +Fri Sep 22 10:21:13 1995 Mike Stump + + * decl.c (pushtag): Add in the namespace name for the tag. + +Thu Sep 21 13:11:13 1995 Mike Stump + + * parse.y (maybe_base_class_list, base_class_list, base_class, + base_class_access_list): Make sure we see the typenames for base + classes. + * lex.c (see_typename): Instead of failing to see a typename when + there is no next token, perfer a typename, and get the next token. + +Wed Sep 20 12:35:27 1995 Michael Meissner + + * decl.c (init_decl_processing): Add __builtin_expect. + +Tue Sep 19 16:48:11 1995 Mike Stump + + * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to + or from pointer to member functions, they must all be handled before + this point. + +Fri Sep 15 17:14:47 1995 Brendan Kehoe + + * init.c (resolve_offset_ref): Fix wording of non-static member + being referenced as a static. + +Fri Sep 15 12:39:11 1995 Jason Merrill + + * typeck.c (build_indirect_ref): Only bash pointer if we actually + call build_expr_type_conversion. + +Thu Sep 14 18:24:56 1995 Jason Merrill + + * cvt.c (build_expr_type_conversion): Handle conversion from + reference. + * typeck.c (build_indirect_ref): Avoid infinite recursion. + +Thu Sep 14 17:23:28 1995 Mike Stump + + * decl.c (expand_start_early_try_stmts): New routine to start a try + block at the start of the function, for function-try-blocks. + * cp-tree.h (expand_start_early_try_stmts): Declare it. + * parse.y (function_try_block): Use it, instead of doing it here, as + we don't want to include rtl.h here, as that conflicts with RETURN + in the parser. + +Wed Sep 13 18:32:24 1995 Mike Stump + + * lex.c (reinit_parse_for_block): Support saving inline + function-try-blocks, uses peekyylex. + * parse.y (eat_saved_input): New rule, permit the parser to see that + END_OF_SAVED_INPUT is ok, as it can see this when parsing the + handlers of a function-try-block. + (fndef): Use it. + (component_decl): Make sure TRY and RETURN can come after fn.def2. + * spew.c (peekyylex): New routine to peek at what will come next. + +Wed Sep 13 16:52:06 1995 Jason Merrill + + * typeck.c (comptypes): Tighten up comparisons of template type + parms. + + * decl.c (duplicate_decls): Turn off whining about virtual functions + redeclared inline for now. + +Wed Sep 13 11:13:40 1995 Mike Stump + + * decl.c (store_in_parms): New routine to put things before we + put base inits. + * cp-tree.h (store_in_parms): Declare it. + * decl.c (store_parm_decls): Use it to makr sure the starting of the + eh spec comes before base inits. + (finish_function): Use sequences instead of the obsolete + reorder_insns. + * parse.y (fndef): Enhance readability and maintainability. Update + to include function_try_block syntax. + (function_try_block): Add. + +Tue Sep 12 17:43:07 1995 Brendan Kehoe + + * call.c (convert_harshness): Use comptypes, not ==, to check if + TYPE and PARMTYPE are equivalent on a function type. + +Tue Sep 12 17:31:33 1995 Douglas Rupp + + * Make-lang.in (cc1plus): Removed unnecessary $(exeext). + +Mon Sep 11 23:24:07 1995 Mike Stump + + * except.c (expand_throw): Never allocate storage for thrown pointer + to objects. + +Mon Sep 11 19:36:45 1995 Mike Stump + + * except.c (expand_start_catch_block): Pointers to objects come + back from catch matching already dereferenced, don't dereference + again. + +Mon Sep 11 15:46:28 1995 Mike Stump + + * except.c (expand_throw): Only decay the throw expression, don't do + any default conversions. This is so that one can throw and catch + characters, and not have them match integers. + +Mon Sep 11 13:46:45 1995 Mike Stump + + * error.c (dump_aggr_type): Deal with anonymous unions that don't + have a TYPE_NAME. + +Fri Sep 8 20:40:27 1995 Brendan Kehoe + + * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex. + +Fri Sep 8 15:51:41 1995 Mike Stump + + * except.c (expand_end_eh_spec): Handle empty EH specifications. + +Fri Sep 8 15:27:22 1995 Mike Stump + + * cp-tree.h (expand_start_eh_spec): Declare new routine. + (expand_end_eh_spec): Likewise. + * decl.c (store_parm_decls): Call expand_start_eh_spec to process + exception specifications. + * except.c (expand_leftover_cleanups): Remove unused parameter. + (expand_end_catch_block): Likewise. + (expand_exception_blocks): Likewise. + (expand_start_eh_spec): New routine to mark the start of an + exception specification region. + (expand_end_eh_spec): New routine to mark the end of an exception + specification region. + (expand_exception_blocks): Call expand_end_eh_spec to process + exception specifications. + +Fri Sep 8 14:40:48 1995 Per Bothner + + * lex.c (do_identifier): Use global binding in preference of + dead for local variable. + +Wed Sep 6 19:32:59 1995 Mike Stump + + * cp-tree.h (build_exception_variant): Remove used first argument. + * decl.c (duplicate_decls): Likewise. + (grokfndecl): Likewise. + (revert_static_member_fn): Likewise. + * decl2.c (grok_method_quals): Likewise. + * tree.c (build_exception_variant): Likewise. + * typeck.c (common_type): Likewise. + * decl2.c (grokclassfn): After changing the type, call + build_exception_variant, if necessary. + +Tue Sep 5 15:56:27 1995 Mike Stump + + * except.c (expand_throw): Run cleanups for the throw expression. + +Wed Aug 30 15:24:38 1995 Stephen L. Favor + + * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond + the store_parm_decls call which does initialization in the emit_* + code concerning label numbering. + +Thu Aug 31 09:01:07 1995 Mike Stump + + * except.c (expand_internal_throw): Let the frontend be responsible + for managing all frontend EH parameters, the backend routine only + needs to deal with backend values. type and value are no longer + passed to __throw. + (init_exception_processing): Likewise. + (expand_start_all_catch): Likewise. + (expand_end_all_catch): Likewise. + (expand_leftover_cleanups): Likewise. + (expand_end_catch_block): Likewise. + (expand_builtin_throw): Likewise. + (expand_throw): Likewise. + +Tue Aug 29 15:04:36 1995 Jason Merrill + + * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context + for a decl. + * decl.c (cp_finish_decl): Use it. + +Tue Aug 29 10:30:27 1995 Mike Stump + + * except.c (expand_internal_throw): Oops, almost forgot type and + value are now trees. + +Mon Aug 28 17:57:45 1995 Brendan Kehoe + + Fix the attribute handling to make sure they get noted before we + create the function's RTL, in case they can affect that. + * decl.c (grokfndecl): New arg ATTRLIST. Run + cplus_decl_attributes before creating the decl's rtl. + (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl. + (shadow_tag, groktypename, start_decl, start_method): Pass a + NULL_TREE to grokdeclarator's new last arg. + * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator. + (grokbitfield, grokoptypename): Pass a NULL_TREE to + grokdeclarator's new last arg. + * except.c (expand_start_catch_block): Likewise. + * pt.c (process_template_parm, end_template_decl, + do_function_instantiation): Likewise. + * cp-tree.h (grokfield): Add arg. + (grokdeclarator): Move the prototype from here... + * decl.h: ...to here. + * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield + ATTRLIST argument. + * parse.y: Create a list for the grokfield arg where appropriate, + and pass it down instead of calling cplus_decl_attributes. + +Mon Aug 28 15:07:24 1995 Mike Stump + + * except.c: Always allow turning on exception handling. Allow cross + compilations to use EH. + +Thu Aug 24 17:39:24 1995 Mike Stump + + * except.c (saved_pc, saved_throw_type, saved_throw_value): Use + trees, instead of rtxs, and don't depend on using special machine + dependent registers. + (expand_internal_throw): Likewise. + (init_exception_processing): Likewise. + (expand_start_all_catch): Likewise. + (expand_end_all_catch): Likewise. + (expand_start_catch_block): Likewise. + (expand_leftover_cleanups): Likewise. + (expand_end_catch_block): Likewise. + (expand_builtin_throw): Likewise. + (expand_throw): Likewise. + +Wed Aug 23 17:25:51 1995 Jason Merrill + + * cvt.c (build_expr_type_conversion): Handle conversions to + reference types. + +Wed Aug 23 15:33:59 1995 Mike Stump + + * except.c (do_unwind): Work around backend bug with -fpic. + +Tue Aug 22 17:20:07 1995 Per Bothner + + * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI + for-scoping, but supports (and warns about) old programs. + Make the new mode (with value 1) the default. + (lang_f_options): The on-value for flag_new_for_scope is now 2. + * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros + (DECL_SHADOWED_FOR_VAR): Likewise. + * decl.c (struct binding_level): New fields dead_vars_from_for + and is_for_scope. + (note_level_for_for): New function. + (poplevel): Special processing if is_for_scope. + (pushdecl): Warn if for-scope variable shadows local. + * lex.c (do_identifier): Handle old (non-ANSI) for scoping, + and warn if conflicts. + * parse.y (FOR): Call note_level_for_for. + +Mon Aug 21 10:28:31 1995 Jason Merrill + + * decl2.c (import_export_inline): Class interface hackery does not + apply to synthesized methods. + +Sun Aug 20 16:29:00 1995 Mike Stump + + * search.c (virtual_context): Find the right context more often. + Solves a `recoverable compiler error, fixups for virtual function' + problem. + +Sun Aug 20 13:53:24 1995 Mike Stump + + * except.c (expand_start_all_catch): Ensure that we always transfer + control to the right EH handler, by rethrowing the end label on the + region, instead of hoping we are nested and falling through. + (expand_leftover_cleanups): Likewise. + (end_protect): Since we now rethrow the end label, put a + nop after it, so that outer regions are recognized. + * init.c (build_vec_delete_1): New routine to handle most of vector + deleting, all code moved here from build_vec_delete. + (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real + work. + (expand_vec_init): If the array needs partial destructing, setup an + EH region to handle it. + (build_vec_delete): Move lots of code to build_vec_delete_1, use + build_vec_delete_1 to do the grunt work. + +Sat Aug 19 14:25:33 1995 Brendan Kehoe + + Handle decl attributes properly for function definitions without + previous attribute-loaded declarations. + * decl.c (start_function): New arg ATTRS. Add a call to + cplus_decl_attributes with it before we create the RTL. + * cp-tree.h (start_function): Update prototype. + * parse.y (fn.def1): Pass ATTRS into start_function instead of + trying to call cplus_decl_attributes too late. Pass a NULL_TREE + for other use. + * decl2.c (finish_file): Pass NULL_TREE as fourth arg to + start_function. + * method.c (synthesize_method): Likewise. + * except.c (expand_builtin_throw): Likewise for start on __throw. + +Sat Aug 19 13:36:08 1995 Mike Stump + + * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support. + This changes -fvtable-thunks vtable layout, so a recompile will be + necessary, if you use -fvtable-thunks. + (get_vtable_entry): Use n, instead of i to be consistent with the + rest of the compiler. + (get_vtable_entry_n): Likewise. + (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks + are being used. + (finish_struct_1): Likewise. + (skip_rtti_stuff): New routine to collapse similar code from many + different parts of the compiler. I think I got them all. + (modify_one_vtable): Use it. + (fixup_vtable_deltas1): Likewise. + (override_one_vtable): Likewise. + * decl2.c (mark_vtable_entries): Likewise. + * tree.c (debug_binfo): Likewise. + * search.c (expand_upcast_fixups): Likewise. + (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to + consistent with the rest of the compiler. + (get_abstract_virtuals): Likewise. + * cp-tree.h (skip_rtti_stuff): New routine, declare it. + * gc.c (build_headof): Support -fvtable-thunk and -frtti together. + (build_typeid): Likewise. + (build_classof): Remove old style way of doing rtti. Remove support + for `classof' and `headof'. + * gxx.gperf: Likewise. + * hash.h: Likewise. + * parse.y: Likewise. + +Fri Aug 18 17:31:58 1995 Jason Merrill + + * decl.c (start_function): Clear ctor_label and dtor_label. + + * class.c (finish_struct_1): Fix handling of access decls. + +Tue Aug 15 19:21:54 1995 Jason Merrill + + * class.c (finish_struct): Only do minimal processing here, so it + can be used for class template definitions, as well. + (finish_struct_1): New function with the rest of the code. + +Tue Aug 15 09:46:16 1995 Mike Stump + + * class.c (prepare_fresh_vtable): On second though, always build the + offset (see Aug 10 change), unless -fvtable-thunks is given. It + does this by calling the new routine set_rtti_entry. + (finish_struct): Likewise. + (set_rtti_entry): New routine to update the rtti information at the + start of the vtable. + +Mon Aug 14 12:21:22 1995 Brendan Kehoe + + * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor + if it's declared in the C++ language spec. + (dump_function_decl): Likewise. + (dump_function_name): Likewise. + (ident_fndecl): Make sure we got something back from lookup_name. + * decl.c (start_function): Likewise. + +Fri Aug 11 16:52:15 1995 Jason Merrill + + * call.c (build_method_call): Don't call build_new when calling a + constructor without an instance. + +Thu Aug 10 20:00:17 1995 Mike Stump + + * class.c (prepare_fresh_vtable): Always build the offset to the + complete object, as it doesn't cost much. This allows dynamic_cast + to void * to work when -frtti isn't given. + (finish_struct): Likewise. + +Thu Aug 10 16:31:28 1995 Mike Stump + + * except.c (build_eh_type): Split out some functionality to new + routine named build_eh_type_type. + (build_eh_type_type): New routine. + (expand_start_catch_block): Use build_eh_type_type, as we never want + the dynamic type of the catch parameter, just the static type. + Fixes core dumps when -frtti is used and one catchs pointers to + classes. + +Thu Aug 10 14:55:29 1995 Mike Stump + + * except.c (expand_builtin_throw): Since we now use normal calling + conventions for __throw, we have to remove the first layer off the + stack, so that the next context we search for handlers is the outer + context instead of the context that had the call to __throw, if we + don't immediately find the desired context. + +Tue Aug 8 17:44:23 1995 Jason Merrill + + * tree.c (cp_expand_decl_cleanup): Returns int, not tree. + * cp-tree.h: Update. + + * parse.y (template_type_parm): Add support for `typename'. + +Tue Aug 8 12:06:31 1995 Mike Stump + + * except.c (expand_internal_throw): New internal routine to throw a + value. + (expand_end_all_catch, expand_leftover_cleanups): All throwers + changed to use `expand_internal_throw' instead of jumping to throw + label. + (expand_end_catch_block, expand_throw): Likewise. + (throw_label): Removed. + (expand_builtin_throw): Changed so that EH parameters are passed by + normal function call conventions. Completes Aug 4th work. + +Fri Aug 4 17:17:08 1995 Mike Stump + + * cp-tree.h (expand_builtin_throw): Declare it. + * decl2.c (finish_file): Call expand_builtin_throw. + * except.c (make_first_label): Remove. + (init_exception_processing): Don't use a LABEL_REF for throw_label, + instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in + other functions that don't really appear in those functions. This + solves a problem where cc1plus consumed exponential amounts of + memory when -Wall was used. + (expand_end_all_catch, expand_leftover_cleanups, + expand_end_catch_block, expand_throw): Change all uses of + throw_label to match new style. + (do_unwind): Rename parameter to inner_throw_label, as it is now + different from throw_label. Also, assume that our caller will wrap + the passed label with a LABEL_REF, if needed. + (expand_builtin_throw): Make external, change so that the generated + throw is now a real function. + (expand_exception_blocks): Never generate throw code inside another + function. + +Fri Aug 4 12:20:02 1995 Mike Stump + + * decl.c (grokdeclarator): Move checking of mutable const objects + and mutable static objects down, as we might decide during parsing + to unset staticp or constp (for example, when const is part of the + object being pointed to). + +Thu Aug 3 17:13:43 1995 Mike Stump + + * except.c (output_exception_table_entry): Enhance portability to + weird machines. + (emit_exception_table): Likewise. + +Thu Aug 3 16:41:38 1995 Mike Stump + + * typeck.c (build_ptrmemfunc): Handle casting of pointer to + non-virtual member functions. + +Wed Aug 2 11:58:25 1995 Mike Stump + + * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T + and const T all match. + +Wed Aug 2 11:25:33 1995 Mike Stump + + * except.c (build_eh_type): Strip cv qualifiers so that const T&, + T&, T and const T all match. + +Tue Aug 1 14:20:16 1995 Mike Stump + + * except.c: Fix up comments, cleanup code and eliminate exceptNode, + exceptStack, exceptstack, push_except_stmts, pop_except_stmts, + new_except_stack, push_last_insn, pop_last_insn, insn_save_node and + InsnSave. Also, numerous speed improvements, and correctness + improvements. Double faulting in all situations should now be + handled correctly. + (expand_start_all_catch): Instead of having many terminate protected + regions, just have one. + (expand_start_catch_block): No longer have to protect + false_label_rtx, as it isn't used for EH region marking. + (expand_end_catch_block): Expand out EH cleanups here by using + expand_leftover_cleanups. + (expand_end_all_catch): Use sequences instead of playing with insn + links directly. + (expand_exception_blocks): Likewise. Also protect all catch clauses + with one terminate region. + +Mon Jul 31 13:24:30 1995 Jason Merrill + + * method.c (report_type_mismatch): Don't talk about an object + parameter for non-methods. + +Sun Jul 30 13:13:02 1995 Jason Merrill + + * class.c (finish_struct): Catch private and protected members of + anonymous unions here. + * decl2.c (finish_anon_union): And here. + * parse.y: Instead of here. + + * errfn.c (ARGSLIST): Support passing four args. + * error.c (cv_as_string): New function. + (cp_printers): Add it. + * call.c (build_method_call): Report 'const' at end of pseudo-decl. + + * method.c (report_type_mismatch): Deal with a bad_arg of 0. + + * init.c (expand_aggr_init): Handle volatile objects, too. + +Sat Jul 29 13:42:03 1995 Jason Merrill + + * decl.c (struct binding_level): Keep list of incomplete decls. + (print_binding_level): Use list_length to count them. + (pushdecl): Build up the list. + (hack_incomplete_structures): Walk it and prune completed decls. + +Fri Jul 28 15:26:44 1995 Jason Merrill + + * typeck.c (comp_target_types): Don't check const and volatile for + function types. + (comp_ptr_ttypes_real): Likewise. + +Thu Jul 27 15:40:48 1995 Jason Merrill + + * typeck.c (comp_target_types): Fix. + +Thu Jul 27 15:10:48 1995 Mike Stump + + * cp-tree.h (unsave_expr_now, build_unsave_expr, + cp_expand_decl_cleanup): Declare new routines. + * decl.c (cp_finish_decl, store_parm_decls, + hack_incomplete_structures): Change all cals from + expand_decl_cleanup to cp_expand_decl_cleanup. + * gc.c (protect_value_from_gc): Likewise. + * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs. + * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR. + (unsave_expr_now): Backend routine used by tree expander. + (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to + work around a limitation in the backend. The backend uses the + cleanups multiple times, on disjoint control flows, so we cannot + pass unsaved SAVE_EXPRs to the backend. + * tree.def (UNSAVE_EXPR): New tree code. + * typeck.c (c_expand_return): Move goto/return code up inside + conditional, as we don't always want to do this, we only want to do + this when we don't otherwise finish with this control flow. + +Thu Jul 27 10:38:43 1995 Brendan Kehoe + + * parse.y (typespec): Only complain about typeof if we're not + getting it from a system header. + +Thu Jul 27 10:26:23 1995 Doug Evans + + Clean up prefix attribute handling. + * parse.y (reserved_declspecs): Link prefix attributes with declspecs. + (declmods): Likewise. + (all rules that reference typed_declspecs and declmods): Call + split_specs_attrs or strip_attrs to separate declspecs and attrs. + (lang_extdef): Delete resetting of prefix_attributes. + (template_def, notype_declarator rule): Use NULL_TREE for + prefix_attributes. + (condition): Use NULL_TREE for prefix_attributes. + (setattrs): Deleted. + (nomods_initdcl0): Set prefix_attributes to NULL_TREE. + (component_decl): Delete resetting of prefix_attributes. + (component_decl_1, notype_components rule): Use NULL_TREE for + prefix_attributes. + (simple_stmt): Delete resetting of prefix_attributes. + +Mon Jul 24 13:37:53 1995 Jason Merrill + + * call.c (convert_harshness): Deal with reference conversions before + others. Actually do array->pointer decay. Call comp_target_types + with pointer types rather than their targets. + + * typeck.c (comp_target_types): Avoid assigning D const * to B *. + +Mon Jul 24 08:54:46 1995 Brendan Kehoe + + * pt.c (to_be_restored): Move decl to global scope. + +Sat Jul 22 12:22:11 1995 Jason Merrill + + * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P. + +Fri Jul 21 17:09:02 1995 Jason Merrill + + * decl.c (grokdeclarator): Downgrade error about 'extern int A::i' + to pedwarn. + + * pt.c (instantiate_template): Also avoid instantiation if the + function has already been declared to be a specialization. + + * decl2.c (check_classfn): Ignore cname argument, and return the + matching function. + + * decl.c (start_decl): Handle declarations of member functions + outside of the class (i.e. specialization declarations). + +Thu Jul 20 10:34:48 1995 Jason Merrill + + * class.c (finish_struct): Don't mess with the type of bitfields. + + * various.c: s/TYPE_POINTER_TO/build_pointer_type/. + +Thu Jul 20 01:43:10 1995 Mike Stump + + * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init + is not a parameter list (TREE_LIST). + (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set + LOOKUP_NO_CONVERSION so that we don't allow two-level conversions, + but don't set it otherwise. + +Wed Jul 19 20:32:01 1995 Mike Stump + + * init.c (expand_default_init): Don't allow two-level conversions + during construction. + +Wed Jul 19 18:06:37 1995 Mike Stump + + * gc.c (build_headof): The type of dyncasting to a pointer to cv + void, should be pointer to cv void. + +Wed Jul 19 17:25:43 1995 Mike Stump + + * gc.c (build_dynamic_cast): Allow casting in const. + +Wed Jul 19 16:34:27 1995 Mike Stump + + * typeck.c (build_const_cast): If we are passed error_mark_node, + return it. + +Wed Jul 19 15:24:48 1995 Brendan Kehoe + + * class.c (push_nested_class): Make sure TYPE is non-nil. + + * cvt.c (type_promotes_to): Watch for error_mark_node on the + incoming TYPE. + +Wed Jul 19 13:23:12 1995 Gerald Baumgartner + + * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME. + (SIGTABLE_VB_OFF_NAME): New macro. + (vt_off_identifier): Renamed from offset_identifier. + (vb_off_identifier): Added extern declaration. + + * decl.c (vt_off_identifier): Renamed from offset identifier. + (vb_off_identifier): New variable to hold the identifier for the + sigtable field vb_off. + (init_decl_processing): Initialize vb_off_identifier. + Renamed vt_off_identifier from offset_identifier. + * sig.c (build_signature_method_call): Renamed offset_identifier and + local variable offset to vt_off_identifier and vt_off, respectively. + * sig.c (build_signature_table_constructor): Renamed offset to vt_off. + + * decl.c (init_decl_processing): Add vb_off field to + sigtable_entry_type. Reorder fields so that pfn gets properly + aligned at a 64 bit boundary on the Alpha. + * sig.c (build_signature_table_constructor): Build the constructor + according to the new layout. Set the vb_off field to -1 for now. + + * decl.c (init_decl_processing): Align sigtable_entry_type on word + boundaries instead of double word boundaries to save space. + +Tue Jul 18 16:58:37 1995 Mike Stump + + * cvt.c (cp_convert): Always call build_cplus_new for a ctor. + +Tue Jul 18 14:24:53 1995 Brendan Kehoe + + * parse.y (opt.component_decl_list): Only forbid private/protected + in anonymous unions. We need to make this know when the type is + defined for an object, to not give the error. + +Mon Jul 17 14:22:44 1995 Brendan Kehoe + + * parse.y (opt.component_decl_list): Don't allow access control + as private or protected for union members. + +Sun Jul 16 14:01:00 1995 Jim Wilson + + * lex.c (check_newline): For 'p' case, move goto skipline line to + before end brace for 'pragma'. + +Fri Jul 7 13:55:58 1995 Mike Stump + + * g++.1: Tiny updates. + +Fri Jul 7 13:05:20 1995 Mike Stump + + * decl.c (cp_finish_decl): Only destruct local static variables if + they are constructed, and only construct the first time control + passes completely through its declaration (if not initialized with a + constant-expression). + (expand_static_init): Likewise. + +Wed Jul 5 14:05:04 1995 Brendan Kehoe + + * typeck.c (comptypes, case OFFSET_REF): If either offset basetype + is a TEMPLATE_TYPE_PARM, give a match. + +Fri Jun 30 15:42:57 1995 Mike Stump + + * method.c (build_overload_value): Handle encoding of null pointer + constants (or any pointer with a constant numeric value) for + templates. + +Fri Jun 30 13:45:51 1995 Brendan Kehoe + + * call.c (convert_harshness): Add QUAL_CODE when we're faced with + const vs non-const for void conversions. + +Fri Jun 30 10:19:52 1995 Mike Stump + + * except.c (expand_start_all_catch): Fix problem with finding an + outer nested try block when there is no code to separate it from an + inner try block. + +Fri Jun 30 02:22:26 1995 Mike Stump + + * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less + memory please when virtual bases are used. + +Thu Jun 29 19:03:47 1995 Mike Stump + + * class.c (build_vbase_path): Avoid testing things that cannot be + null to see if they are null. + * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work. + * decl.c (finish_function): Pass a type into the new + convert_pointer_to_vbase instead of a binfo. + * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase + and convert_pointer_to_real. + (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead + of the more cryptic call to get_vbase. + +Thu Jun 29 09:35:05 1995 Mike Stump + + * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check. + +Thu Jun 29 03:43:55 1995 Jason Merrill + + * pt.c (instantiate_template): Don't strip 'this' twice. + + * pt.c (coerce_template_parms): Allow null pointer constants. + + * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is + set. + +Wed Jun 28 18:39:03 1995 Jason Merrill + + * decl.c (revert_static_member_fn): Also remove 'this' from + DECL_ARGUMENTS. + * decl2.c (check_classfn): Don't revert this function until we get a + match. + +Wed Jun 28 14:07:27 1995 Brendan Kehoe + + * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here. + +Wed Jun 28 11:05:13 1995 Mike Stump + + * decl2.c (finish_file): Handle global vector news. + * init.c (build_new): Encode vector news so that later we will know + how many elements there are. + +Mon Jun 26 13:38:06 1995 Jason Merrill + + * expr.c (cplus_expand_expr): Don't mess with temp slots. + + * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl + returns null. + + * decl2.c (check_classfn): Use revert_static_member_fn. + * decl.c (revert_static_member_fn): Diagnose static member functions + declared const or volatile. + + * decl2.c (grokfield): Check for missing default args here, too. + (check_default_args): Function to do the checking. + * decl.c (pushdecl): Use it. + + * decl.c (pushdecl): Don't warn about shadowing a member of `this' + if there is no `this'. + +Sun Jun 25 11:34:25 1995 Jason Merrill + + * call.c (build_method_call): Downgrade 'called before definition' + to a warning, as it ought to go away after Monterey. + +Sat Jun 24 14:18:42 1995 Jason Merrill + + * pt.c (coerce_template_parms): Don't do extra checking on pointer + to member arguments. + + * class.c (finish_struct): const and reference members don't prevent + a class from being an aggregate. + + * class.c (finish_struct): Signatures are always aggregates. + +Fri Jun 23 17:20:29 1995 Jason Merrill + + * decl2.c (check_classfn): Improve error message. + + * pt.c (tsubst): Handle PROMOTE_PROTOTYPES. + +Thu Jun 22 01:50:42 1995 Jason Merrill + + * typeck.c (comptypes): Don't ignore method quals. + + * class.c (finish_struct): Non-abstract virtuals are always USED. + + * decl.c (build_ptrmemfunc_type): The underlying union type isn't + IS_AGGR_TYPE, either. + * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead. + * cp-tree.h: Likewise. + + * cp-tree.h (lang_type): Add aggregate. + (CLASSTYPE_AGGREGATE): New macro. + (TYPE_NON_AGGREGATE_CLASS): Likewise. + * class.c (finish_struct): Determine whether a class is an + aggregate. + * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of + TYPE_NEEDS_CONSTRUCTING. + * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for + subobjects, too. + + * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL. + + * decl.c (start_function): For pre-parsed functions, layout all of + the parm decls again. + (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not + DECL_EXTERNAL. + + * pt.c (coerce_template_parms): Improve checking for invalid + template parms. + +Wed Jun 21 12:01:16 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Forbid declaration of a static member + with the same name as its enclosing class. + +Mon Jun 19 10:28:14 1995 Jason Merrill + + * decl.c (finish_function): Clear current_class_decl. + + * typeck.c (build_conditional_expr): Use convert (boolean_type_node + instead of truthvalue_conversion. + + * class.c (finish_struct): A data member with the same name as the + class doesn't suppress constructors. + +Fri Jun 16 18:11:39 1995 Gerald Baumgartner + + * decl.c (start_function): If current_class_decl is a signature + pointer, don't dereference it but set C_C_D to current_class_decl. + +Fri Jun 16 17:06:28 1995 Jason Merrill + + * decl.c (duplicate_decls): Complain about virtual functions + redeclared to be inline. + +Fri Jun 16 13:20:38 1995 Mike Stump + + * decl.c (get_unique_name): New routine to name unnamed namespaces. + (push_namespace): Use get_unique_name for naming unnamed namespaces. + +Thu Jun 15 15:00:41 1995 Jason Merrill + + * parse.y: Call cplus_decl_attributes with prefix_attributes where + appropriate. + +Wed Jun 14 19:24:49 1995 Mike Stump + + * search.c (get_vbase): New routine to switch hierarchies from the + CLASSTYPE_VBASECLASSES to the normal one. + (expand_indirect_vtbls_init): Use get_vbase to figure out how we + want to convert to a vbase pointer. + +Mon Jun 12 17:50:30 1995 Jason Merrill + + * pt.c (instantiate_class_template): Add the new instantiation to + template_classes. + (do_pending_expansions): Call instantiate_member_templates on all of + the classes in template_classes. + +Mon Jun 12 12:36:59 1995 Mike Stump + + * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our + TYPE_MAIN_VARIANT if it is not filled in. + * init.c (build_delete): If the TYPE_DOMAIN is not set, give an + error instead of core dumping. + +Mon Jun 12 10:41:40 1995 Jason Merrill + + * call.c (can_convert): Also check for distance > 0. + (can_convert_arg): Likewise. + (user_harshness): Likewise. + +Fri Jun 9 19:17:21 1995 Jason Merrill + + * g++.c (MATH_LIBRARY): Provide default. + (main): Always link with the math library if we link with libstdc++. + + * decl.c (start_function): Complain about redefinition of a function + even when the pending_inline version is compiled after the other + version. + +Thu Jun 8 15:44:38 1995 Jason Merrill + + * gc.c (build_dynamic_cast): Build up a reference to a parameter of + aggregate type. + +Wed Jun 7 15:31:57 1995 Brendan Kehoe + + * init.c (build_vec_delete): Resolve an offset ref before we try to + use it. + +Wed Jun 7 14:19:32 1995 Jason Merrill + + * typeck.c (build_modify_expr): If the class lacks a constructor or + assignment operator, return error_mark_node. + (common_type): Use build_cplus_array_type. + +Tue Jun 6 09:41:27 1995 Mike Stump + + * class.c (dont_allow_type_definitions): New variable set when types + cannot be defined. + (finish_struct): Use it. + * cp-tree.h (dont_allow_type_definitions): Define it. + * parse.y (primary, handler_seq): Set it. + +Mon Jun 5 18:49:38 1995 Mike Stump + + * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for + results from lookup_fnfields. Always give warning/error on bad + code. + +Mon Jun 5 11:39:37 1995 Brendan Kehoe + + * init.c (member_init_ok_or_else): Don't allow initialization of + an ancestor's member from within a constructor. + +Mon Jun 5 11:20:34 1995 Gerald Baumgartner + + * sig.c (build_signature_table_constructor): Use DECL_CONTEXT + instead of DECL_CLASS_CONTEXT for calculating the vfield offset so + abstract virtual functions are handled correctly. + + * sig.c (build_signature_table_constructor): Store the correct + delta in signature table entries. It does not yet work for + classes with virtual base classes as implementations of signatures. + (build_signature_method_call): Add the delta to the object_ptr + before generating the function call. + + * call.c (build_method_call): Make instance_ptr the signature + pointer itself instead of dereferencing the optr. + * sig.c (build_signature_method_call): Dereference the optr for the + direct and virtual calls. + + * sig.c (build_signature_table_constructor): Make the tag for + default implementations -1 instead of 2. + (build_signature_method_call): Change the generated conditional + expression correspondingly. + + * sig.c (build_signature_pointer_constructor): Deleted the sorry + message that said we can't handle multiple inheritance for + implementations of signatures + (build_signature_method_call): Use the offset from the sigtable + entry instead of the vptr field from the signature pointer for + building a virtual function call. + + * class.c (build_vfn_ref): Deleted signature specific code, we don't + call this function anymore from build_signature_method_call. + + * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr + field in the object now instead of in the signature pointer/ref. + (build_vptr_ref): Deleted extern declaration. + * sig.c (build_vptr_ref): Deleted. + (build_signature_pointer_or_reference_type): Deleted construction of + the vptr field. + (build_signature_pointer_constructor): Deleted initialization of/ + assignment to the vptr field. + + * sig.c (build_signature_table_constructor): Convert the signature + table entry fields to their correct types. + + * sig.c (build_signature_table_constructor): Don't call digest_init + for the fields of a sigtable entry, it's wasted time. + + * sig.c (build_signature_table_constructor): Correctly set the + offset and index fields of a sigtable entry. Build the constructor + the way digest_init does, digest_init can't handle initializing an + anonymous union inside a struct. + (build_signature_method_call): Use the index field instead of the + delta field to get the vtable index. + + * decl.c (init_decl_processing): Fix number of fields for building + sigtable_entry_type. + + * cp-tree.h (tag_identifier, offset_identifier): Added extern decls. + (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME. + (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead. + * decl.c (tag_identifier, offset_identifier): New variables to + hold the identifiers for the sigtable fields tag and offset. + (init_decl_processing): Initialize these variables. + (init_decl_processing): Use these variables to build the + sigtable_entry_type structure. Rename the code and offset fields + to tag and delta, respectively; add offset and index fields. Changed + types of fields from short_integer_type_node to delta_type_node. + * sig.c (build_signature_table_constructor): Rename code and offset + to tag and delta, respectively. + (build_signature_method_call): Likewise. Use above variables. + +Thu Jun 1 17:03:51 1995 Jason Merrill + + * decl.c (lookup_name_real): Don't try to look anything up in an + erroneous object. + +Fri Jun 2 10:30:14 1995 Mike Stump + + * method.c (build_overload_int): New routine. Break out + functionality from build_overload_value so we can reuse it. + (build_overload_value): Handle pointer to member functions as value + parameters for templates. + (build_overload_identifier): Since template parameters are shared + among all instantiations, we have to substitute in the real types + in TREE_TYPE (parm). + pt.c (coerce_template_parms): Likewise. + (push_template_decls): Likewise. + (grok_template_type): Deleted as template parameters are shared + among all instantiations. + +Wed May 31 19:10:32 1995 Mike Stump + + * decl.c (grokdeclarator): Always give errors on constant overflow + for array indices. + +Wed May 31 11:39:43 1995 Jason Merrill + + * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0. + (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to + reference type. + (build_indirect_ref): Fix check for *&. + +Fri Jun 16 06:54:03 1995 Mike Stump + + * Version 2.7.0 released. + +Fri Jun 16 15:07:29 1995 Richard Kenner + + * Make-lang.in (DEMANGLER_PROG): Add LIBS. + +Thu Jun 15 15:00:41 1995 Jason Merrill + + * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN. + +Wed Jun 7 20:00:31 1995 Mike Stump + + * *.[chy]: Change all callers of finish_decl to cp_finish_decl. + * decl.c (finish_decl): New routine to handle call backs from the + mid end (declare_hidden_char_array). + +Wed Jun 7 19:02:50 1995 Jason Merrill + + * decl.c (start_function): Handle setting C_C_D here. + (set_C_C_D): Removed. + (struct saved_scope): Remove class_decl. + (push_to_top_level): Don't save current_class_decl. + (pop_from_top_level): Don't restore current_class_decl or C_C_D. + (struct cp_function): Add C_C_D. + (push_cp_function_context): Save C_C_D. + (pop_cp_function_context): Restore C_C_D. + +Fri Jun 2 11:05:58 1995 Jason Merrill + + * decl.c (set_C_C_D): New function. suspend_momentary before + building C_C_D. + (pop_from_top_level): Call it. + (start_function): Likewise. + (pop_cp_function_context): Likewise. + + * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references + to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR. + + * decl.c (push_cp_function_context): Save current_class_decl. + (pop_cp_function_context): Restore current_class_decl and set C_C_D. + (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D. + (start_function): Likewise. + + * class.c (popclass): Don't mess with current_class_decl, + current_vtable_decl, or C_C_D. + +Mon May 29 12:45:10 1995 Paul Eggert + + * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG). + +Wed May 24 15:55:18 1995 Richard Kenner + + * decl.c (duplicate_decls): Check simple_cst_equal result against 0. + * decl2.c (finish_anon_union): Likewise. + * method.c (largest_union_member): Likewise. + +Wed May 24 14:41:11 1995 H.J. Lu + + * Make-lang.in (cxxmain.o): Replace single quotes with backslashes. + +Mon May 22 17:38:48 1995 Richard Kenner + + * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG): + Use $@ instead of output name so works even if have .exe. + (cxxmain.o): Use cp if ln -s fails. + (c++.install-man): Use $(exeext) in executable names. + (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names. + * Makefile.in (../cc1plus): Use $(exeext) in name of executable. + +Wed May 24 01:39:03 1995 Jason Merrill + + * call.c (build_method_call): Parms can be null, duh. + +Tue May 23 01:32:09 1995 Jason Merrill + + * call.c (build_method_call): If convert_arguments failed, just bail. + +Fri May 19 10:31:11 1995 Jason Merrill + + * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert. + + * tree.c (copy_to_permanent): Oops. + +Fri May 19 10:01:07 1995 Brendan Kehoe + + * cp-tree.h (break_out_target_exprs): Add decl. + +Thu May 18 13:02:30 1995 Jason Merrill + + * decl.c (start_function): Move *all* interface handling stuff after + the pushdecl. + + * tree.c (mapcar): Renamed from make_deep_copy and generalized. + (perm_manip): Return t if permanent, otherwise 0. + (copy_to_permanent): Use them. + (bot_manip): Helper for break_out_target_exprs. + (break_out_target_exprs): New function. Uses mapcar. + + * typeck.c (convert_arguments): Use it. + + * method.c (hack_identifier): Use convert_from_reference to + dereference a reference. + +Wed May 17 17:54:54 1995 Mike Stump + + * call.c (convert_harshness): Move reference bashing before pointer + to member bashing. + +Wed May 17 16:57:53 1995 Mike Stump + + * cvt.c (convert_to_reference): Only complain, if complaints are + wanted. + * typeck.c (build_function_call_real): Likewise. If + LOOKUP_SPECULATIVELY is set and something won't work, return + NULL_TREE. + * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call. + (convert): Pass LOOKUP_NORMAL to cp_convert. + * typeck.c (convert_for_assignment): Likewise. + (convert_force): Pass LOOKUP_COMPLAIN to cp_convert. + (convert_arguments): Get out early if we get an error_mark_node. + (convert_for_initialization): Use cp_convert instead of convert so + that we can pass flags down. + * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation. + +Wed May 17 01:43:58 1995 Jason Merrill + + * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the + decl type. + + * class.c (finish_struct): Don't complain about a class with no + user-defined constructors but with a member that has no default + constructor, as this is OK for aggregates. + + * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit + constructor call, mark slot addressable. + +Tue May 16 18:37:51 1995 Douglas Rupp + + * g++.c: Changed WINNT to _WIN32. + +Tue May 16 12:40:16 1995 Jason Merrill + + * lex.c (handle_sysv_pragma): Don't use token_buffer. + +Tue May 16 12:05:26 1995 Mike Stump + + * call.c (resolve_scope_to_name): Add initial semantic support for + namespaces. + * class.c (finish_struct): Likewise. + * cp-tree.h (NAMESPACE_LEVEL): Likewise. + * cvt.c (build_up_reference, convert_to_reference): Likewise. + * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise. + (resume_binding_level, toplevel_bindings_p): Likewise + (namespace_bindings_p, declare_namespace_level): Likewise. + (resume_level, push_namespace, pop_namespace): Likewise. + (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise. + (implicitly_declare, lookup_namespace_name): Likewise. + (lookup_name_real, start_decl, make_temporary_for_reference): Likewise. + (obscure_complex_init, finish_decl, expand_static_init): Likewise. + (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise. + (store_parm_decls, hack_incomplete_structures): Likewise. + * decl2.c (get_temp_name, finish_anon_union): Likewise. + (current_namespace, push_namespace, pop_namespace): Likewise. + (do_namespace_alias, do_toplevel_using_decl): Likewise. + (do_class_using_decl): Likewise. + * error.c (dump_decl): Likewise. + * init.c (build_member_call, build_offset_ref): Likewise. + * lex.c (identifier_type): Likewise. + * parse.y (lang_extdef, using_decl, extdef): Likewise. + (component_decl_1, nested_name_specifier_1): Likewise. + * spew.c (yylex): Likewise. + * tree.def (NAMESPACE_DECL): Likewise. + +Tue May 16 11:55:35 1995 Jason Merrill + + * decl.c (push_overloaded_decl): Return the new decl even if it + can't be pushed. + +Tue May 16 11:00:37 1995 Jason Merrill + + * typeck.c (decay_conversion): Split out from default_conversion. + (default_conversion): Call it. + (build_binary_op): Likewise. + (build_binary_op_nodefault): Use decay_conversion for truth ops. + +Mon May 15 12:47:56 1995 Jason Merrill + + * decl.c (warn_extern_redeclared_static): This is a pedwarn. + (duplicate_decls): Always use the old decl's linkage info. Don't + play with linkage of consts. + (pushdecl): Don't play with linkage of consts. + (redeclaration_error_message): Don't complain about an old public + decl and a new non-public decl here. + (grokvardecl): Handle linkage of consts here. + (grokdeclarator): An 'extern inline' is public. Pass constp to + grokvardecl. + (start_function): Wait until after the pushdecl to do some linkage + stuff. + + * decl2.c (import_export_vtable): Make duplicates weak rather than + static if supported. + (import_export_inline): Likewise. + * pt.c (do_pending_expansions): Likewise. + + * class.c (build_vbase_path): flag_assume_nonnull_objects only + affects reference conversion. + + * init.c (emit_base_init): Build up an RTL_EXPR and add it to + rtl_expr_chain. + * decl.c, decl2.c: s/base_init_insns/base_init_expr/. + +Tue May 16 07:06:28 1995 Paul Eggert + + * method.c (numeric_output_need_bar): Renamed from misspelling. + + * typeck.c (build_ptrmemfunc): Fix misspellings in messages. + +Sun May 14 10:26:22 1995 Richard Kenner + + * lang-options.h, lang-specs.h: New files. + +Thu May 11 00:31:48 1995 Jason Merrill + + * typeck.c (default_conversion): Don't check for BLKmode before + pulling out the decl_constant_value. + + * decl.c (start_function): Clear named_labels and shadowed_labels. + + * typeck.c (build_function_call_real): Also synthesize methods here. + +Wed May 10 00:55:59 1995 Jason Merrill + + * decl2.c (finish_file): Synthesize exported methods before the + reconsider loop. + + * parse.y: Move declaration of flag_new_for_scope to file scope. + +Tue May 9 19:10:33 1995 Mike Stump + + * decl2.c: Add flag_new_for_scope for new -ffor-scope flag. + * parse.y (FOR): Conditionalize the pushing and popping of scope for + the for-init-statement upon the new flag_new_for_scope. + * parse.y (try_block): Simplify and use compstmt. + +Mon May 8 12:41:52 1995 Jason Merrill + + * decl.c (define_function): Mark function decl artificial. + +Sun May 7 00:51:28 1995 Jason Merrill + + * parse.y (simple_stmt, FOR): Put back push/pop for condition scope. + + * decl2.c (grokclassfn): DECLs don't have cv-qualified types. + * tree.c (build_cplus_method_type): Likewise. + + * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1. + + * typeck.c (build_function_call_real): If convert_arguments failed, + just bail. + (convert_arguments): If one of the arguments is error_mark_node, + just bail. + +Sat May 6 02:39:41 1995 Jason Merrill + + * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for + decls that don't include it. + +Fri May 5 14:23:30 1995 Jason Merrill + + * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or + DECL_NOT_REALLY_EXTERN set aren't extern decls. + + * typeck.c (build_indirect_ref): Don't call default_conversion for a + parameter of reference_type. + * cvt.c (convert_from_reference): Just use build_indirect_ref. + + * pt.c (do_type_instantiation): Only instantiate member functions + that actually come from templates. + +Fri May 5 09:46:05 1995 Mike Stump + + * parse.y: Generalized cleanup of poplevels, and compound statements + and compound statements in try blocks. Rewritten `for' rule so that + the scope of variables declared in the for clause is shortened to + span just to the end of the statement, instead of the whole + containing block. + +Fri May 5 00:37:14 1995 Jason Merrill + + * call.c (convert_harshness): Handle pointers to members better. + +Thu May 4 16:00:26 1995 Jason Merrill + + * decl2.c (delete_sanity): Do access control here. + * init.c (build_delete): Instead of here. + + * Make-lang.in: Build c++filt. + +Wed May 3 02:59:53 1995 Jason Merrill + + * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL, + update our IDENTIFIER_TYPE_VALUE. + +Fri Apr 28 07:58:41 1995 Jason Merrill + + * lex.c (cons_up_default_function): Fix linkage of #pragma + implemented functions. + +Thu Apr 27 16:56:24 1995 Jason Merrill + + * method.c (build_overload_name): Simplify and fix repeated type + folding. + + * decl.c (grokdeclarator): Prohibit pointers to void or reference + members. + +Thu Apr 27 09:49:07 1995 Mike Stump + + * typeck2.c (process_init_constructor): Make sure initializers are + fully digested. + +Thu Apr 27 01:11:55 1995 Jason Merrill + + * lex.c (cons_up_default_function): Always defer synthesis. + +Thu Apr 27 00:20:37 1995 Jason Merrill + + * decl2.c (mark_inline_for_output): Don't play with pending_inline + stuff. + +Wed Apr 26 17:48:24 1995 Jason Merrill + + * call.c (user_harshness): New function; like build_type_conversion, + but doesn't actually build anything. + (compute_conversion_costs): Use it instead of build_type_conversion. + +Wed Apr 26 17:11:25 1995 Jason Merrill + + * typeck.c (build_function_call_real): Improve error message for + calling a non-function. + + * method.c (hack_identifier): Lose check for calling a data member. + +Wed Apr 26 16:59:13 1995 Mike Stump + + * typeck2.c (build_functional_cast): Remove very old cruft. + Seems like good code is generated without it. + +Wed Apr 26 00:47:16 1995 Jason Merrill + + * method.c (do_build_assign_ref): Fix handling of anonymous unions. + (do_build_copy_constructor): Likewise. + + * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch. + + * decl.c (push_switch): New function. + (pop_switch): Likewise. + (define_case_label): Check for jumping over initialization. + + * call.c (build_method_call): Check for an inline function being + called before its definition has been seen. + * typeck.c (build_function_call_real): Likewise. + + * decl.c (duplicate_decls): Check for a function being redeclared + inline after its address has been taken. + + * typeck.c (build_conditional_expr): Handle related class lvalues. + +Tue Apr 25 13:20:45 1995 Jason Merrill + + * pt.c (do_pending_expansions): Don't expand unused templates. + + * parse.y (component_decl): Accept a lone semicolon. + +Tue Apr 25 00:25:56 1995 Jason Merrill + + * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the + object parameter anymore. + + * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns. + +Mon Apr 24 12:35:48 1995 Jason Merrill + + * parse.y (simple_stmt, decl case): Clear prefix_attributes. + (lang_extdef): Likewise. + + * parse.y (maybe_parmlist): New rule for use in declarators where + this could either be a list of expressions or parameters. Calls + suspend_momentary before deciding which. + (direct_after_type_declarator): Use it. + (complex_direct_notype_declarator): Use it. + + * pt.c (tsubst): Propagate attributes const and noreturn. + + * typeck.c (build_modify_expr): If warn_synth, call build_opfncall + before doing the default thing. + +Thu Apr 27 21:49:36 1995 Doug Evans + + * typeck.c (common_type): Call lookup_attribute instead of + value_member. + +Tue Apr 25 18:07:43 1995 Richard Kenner + + * Make-lang.in: Change "realclean" to "maintainer-clean". + +Sun Apr 23 12:32:38 1995 Mike Stump + + * decl2.c (finish_file): Fix broken linked list handling. + +Fri Apr 21 18:08:43 1995 Jason Merrill + + * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF + as often. + (finish_struct): Likewise. + + * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*. + + * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro. + (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro. + +Fri Apr 21 15:52:22 1995 Jason Merrill + + * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if + it is of the same type as the return value. + +Fri Apr 21 03:01:46 1995 Jason Merrill + + * decl2.c (finish_file): Reconsider if synthesizing a method wrote + out its assembly. + + * typeck.c (convert_for_initialization): Don't call a trivial copy + constructor. + + * typeck2.c (store_init_value): Only abort if the type has a + non-trivial copy constructor. + + * typeck.c (c_expand_return): If we're returning in a register and + the return value is a TARGET_EXPR, expand it. Only do + expand_aggr_init if we're returning in memory. + (expand_target_expr): Function to expand a TARGET_EXPR. + (build_modify_expr): Use it. + + * tree.c (build_cplus_new): Layout the slot. + + * expr.c (cplus_expand_expr): Use expand_call to expand the call + under a NEW_EXPR, so the target is not discarded. + +Thu Apr 20 14:59:31 1995 Mike Stump + + * gc.c (build_dynamic_cast): Tighten error checking. + +Thu Apr 20 11:23:54 1995 Jason Merrill + + * expr.c (cplus_expand_expr): Only abort if the returned target is + different from what we expected if the type has a non-trivial copy + constructor. + + * decl2.c (cplus_decl_attributes): Attributes applied to a template + really apply to the template's result. + + * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE + to decide whether to consider a CALL_EXPR an lvalue. + + * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the + type has a non-trivial copy constructor. + + * decl.c (start_function): If interface_known, unset + DECL_NOT_REALLY_EXTERN on the function. + +Wed Apr 19 16:53:13 1995 Jason Merrill + + * pt.c (do_function_instantiation): Handle explicit instantiation of + member functions. + (do_type_instantiation): Handle 'inline template class foo', + meaning just spit out the vtable. + + * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on + the consed functions. + + * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN. + +Wed Apr 19 16:28:17 1995 Brendan Kehoe + + * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c, + typeck.c: Include output.h. + +Wed Apr 19 14:57:21 1995 Gerald Baumgartner + + * call.c (build_method_call): Allow a signature member functions to + be called from a default implementation. + +Wed Apr 19 10:21:17 1995 Jason Merrill + + * repo.c (finish_repo): Remember what directory we are in. + + * search.c (expand_upcast_fixups): Don't mess with abort_fndecl. + + * repo.c: Use obstacks instead of fixed-size buffers. Don't spit + out the second copy of the symbol name. Don't remember COLLECT_GCC. + +Wed Apr 19 02:32:40 1995 Mike Stump + + * search.c (virtual_context): New function to get the virtual + context of a function. + (expand_upcast_fixups): New function to generate runtime vtables. + (fixup_virtual_upcast_offsets): Likewise. + (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to + ensure that the this offsets for upcasts from virtual bases into + other virtual bases or non-virtual bases are correct at construction + time and destruction time. + * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all + vtables in all virtual bases, instead of just one vtable in each + virtual base. + (fixup_vtable_deltas1): Likewise. + +Tue Apr 18 03:57:35 1995 Michael Meissner + + * Makefile.in (lex.o): Add dependency on c-pragma.h. + + * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as + appropriate, instead of 0. + +Mon Apr 17 12:28:42 1995 Jason Merrill + + * decl.c (pushdecl): Use decls_match, not duplicate_decls, for + comparing local and global decls. + +Fri Apr 14 01:46:52 1995 Jason Merrill + + * typeck.c (convert_arguments): Only prohibit passing to ... of + types with non-trivial copy constructors. + + * repo.c (repo_template_used): Don't try to mess with no id. + +Fri Apr 14 23:32:50 1995 Per Bothner + + * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls. + +Thu Apr 13 15:37:42 1995 Brendan Kehoe + + * cp-tree.h (current_tinst_level): Delete declaration, since it's + static inside pt.c. + + * typeck.c (build_modify_expr): Catch incompatible array assignment. + + * parse.y (attribute_list, attrib): Rewrite actions to feed the + right stuff to decl_attributes. + +Thu Apr 13 11:24:10 1995 Jason Merrill + + * search.c (dfs_debug_mark): Check for magic virtual like + import_export_vtable. + + * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with + four args. + +Wed Apr 12 12:02:57 1995 Jason Merrill + + * decl2.c (finish_file): Move prevtable pass before needs_messing_up + decision. + +Tue Apr 11 11:20:27 1995 Jason Merrill + + * decl.c (finish_decl): If we're writing out a static data member of + a class, we want the debug info for that class. + + * gc.c (build_t_desc): Check linkage of a class properly. + + * class.c (finish_struct): Set the 'headof' offset for the main + vtable properly. + (prepare_fresh_vtable): Fix typeinfo pointer here. + (modify_one_vtable): Instead of here. + +Mon Apr 10 12:15:59 1995 Jason Merrill + + * repo.c (repo_get_id): New function to return the interesting + identifier for a repo entity. + (repo_template_used): Use it. + (repo_template_instantiated): Mark the id as chosen. + (init_repo): Record whether or not the id was chosen. + (finish_repo): Note if an id was newly chosen. + + * pt.c (do_function_instantiation): Call repo_template_instantiated. + (do_type_instantiation): Likewise. Don't diagnose multiple + instantiation. + + * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding + whether or not to synthesize a method. + + Undo these changes: + * class.c (finish_vtbls): Build more vtables if flag_rtti is on. + * class.c (modify_all_direct_vtables): Likewise. + * init.c (expand_direct_vtbls_init): Expand more vtables if + flag_rtti is on. + +Sat Apr 8 17:45:41 1995 Mike Stump + + * gc.c (build_headof): Use ptrdiff_type_node instead of + integer_type_node on pointer arithmetic. + +Sat Apr 8 11:57:04 1995 Jason Merrill + + * typeck.c (build_modify_expr): Undo previous change. + +Thu Apr 6 01:23:50 1995 Jason Merrill + + * Makefile.in (compiler): Remove ../cc1plus before rebuilding it. + + * repo.c (get_base_filename): Put the .rpo file in the directory + with the object file, not the source. + + * typeck.c (build_conditional_expr): Handle pmf's better. + + * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out + the name of the symbol. + +Wed Apr 5 15:24:12 1995 Jason Merrill + + * repo.c (open_repo_file): Make repo filename DOS-compliant. + (*): Also write a new repo file if some previously-used + templates are no longer used. Only remember the identifier. + + * lex.c (cons_up_default_function): If this function belongs to a + template class, call repo_template_used for it. + + * repo.c (repo_template_used): Using a class means using its vtable, + if any. + (finish_repo): Likewise. + + * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs + if the type has a complex copy constructor. + + * decl2.c (lang_decode_option): -frepo implies + -fno-implicit-templates. + + * decl.c (start_function): Clear current_{base,member}_init_list. + + * lex.c (init_lex): Also unset *_eq if ! flag_operator_names. + +Tue Apr 4 16:11:08 1995 Jason Merrill + + * decl.c (struct cp_function): Add {base,member}_init_list. + (push_cp_function_context): Save current_{base,member}_init_list. + (pop_cp_function_context): Restore them. + +Mon Apr 3 16:55:08 1995 Jason Merrill + + * repo.c (get_base_filename): Take filename parm, fix logic bug. + + * typeck.c (build_compound_expr): Do not warn about a compound expr + in which the first expression has no side effects. + (build_x_compound_expr): Warn here instead. + (build_conditional_expr): Don't warn about a conditional expression + between an enum and the type it promotes to. + + * init.c (build_new): Handle initialization of arrays of builtins + properly. + +Mon Apr 3 15:08:04 1995 Brendan Kehoe + + * repo.c: Include config.h to get definitions of bcopy and rindex + on systems that don't have them (e.g., SVR4). + +Mon Apr 3 14:41:55 1995 Mike Stump + + * decl2.c (finish_table): Pass NULL_TREE instead of init to + finish_decl so that it won't try and do error checking on the + initializer. + +Mon Apr 3 10:45:50 1995 Jason Merrill + + * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to + determine whether this compile used -c -o. + (open_repo_file): Use get_base_filename. Remove the extension. + (finish_repo): Spit out the values of main_input_filename, + COLLECT_GCC and COLLECT_GCC_OPTIONS. + + * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name. + +Sun Apr 2 23:43:51 1995 Jason Merrill + + * search.c (compute_access): Don't try to do access control on + nested types. + +Fri Mar 31 10:14:23 1995 Jason Merrill + + * repo.c: New file to handle things repo. + + * pt.c (instantiate_template): Call repo_template_used if the + definition is accessible. + (mark_function_instantiated): Split out from + do_function_instantiation. + (mark_class_instantiated): Split out from do_type_instantiation. + + * parse.y (template_instantiate_once): Call repo_template_used. + + * lex.c (lang_init): Call init_repo. + + * decl2.c: Handle flag_use_repository. + (finish_file): Call finish_repo. + + * decl.c (start_method): Call repo_template_used if this is a + template method. + + * Makefile.in (CXX_OBJS): Add repo.o. + (repo.o): Add dependencies. + + * Make-lang.in (CXX_SRCS): Add repo.c. + + * decl.c (start_function): If DECL_INTERFACE_KNOWN and + DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL. + + * typeck.c (build_binary_op_nodefault): Identify the invalid operand + types used. + + * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN. + +Thu Mar 30 17:54:42 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Tidy up use of build_type + and result_type. When checking for comparison between signed + and unsigned, use result_type rather than the (possibly shortened) + type of op0. Also, don't warn about equality comparison of a + signed operand to an unsigned constant that fits in the signed + type. + + * method.c (do_build_copy_constructor): Reverse + current_base_init_list after we've built it up. + +Thu Mar 30 14:35:18 1995 Mike Stump + + * except.c (build_throw): Never warn about the value of throw not + being used. + +Thu Mar 30 13:16:54 1995 Mike Stump + + * except.c (expand_start_catch_block): Check for bad catch parameter + declarations. + +Thu Mar 30 13:06:11 1995 Jason Merrill + + * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if + DECL_EXTERNAL is not already set. + +Thu Mar 30 11:26:24 1995 Mike Stump + + * method.c (emit_thunk): Let poplevel know that the last level is + for a function so it can create a BLOCK_NODE and set DECL_INITIAL. + +Thu Mar 30 11:15:06 1995 Jason Merrill + + * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN + here. + + * decl.c (grokdeclarator): OK, don't abort if we see a decl with + METHOD_TYPE. + (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on + all deferred inlines. + +Wed Mar 29 19:35:02 1995 Jason Merrill + + * cp-tree.h (DECL_THIS_INLINE): New macro. + (DECL_NOT_REALLY_EXTERN): New macro. + (DECL_THIS_STATIC): New macro. + + * decl.c: Lose all references to current_extern_inline. Break + inline semantics into DECL_INLINE for actual inlining and + DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC. + * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to + emit an inline here. Associated changes. + * lex.c: Likewise. + * pt.c: Likewise. + * typeck.c: Likewise. + + * call.c (build_method_call): Don't bother trying to handle inlines + specially. + * cvt.c (convert_to_aggr): Likewise. + + * pt.c (do_function_instantiation): Handle instantiation of + public inlines, too. + +Wed Mar 29 16:04:25 1995 Mike Stump + + * except.c (init_exception_processing): Change the interface for + __throw_type_match and add decl for new rtti matching routine + __throw_type_match_rtti. + (build_eh_type): New routine to build a run time descriptor for the + expression given. + (expand_start_catch_block): Update to use new calling convention for + the matcher. + (expand_throw): Update to use build_eh_type. + +Mon Mar 27 07:14:33 1995 Warner Losh + + * g++.c: Removed __NetBSD__ from conditional. + Declare strerror if HAVE_STRERROR is defined; otherwise + declare sys_errlist and sys_nerr. + (my_strerror): New function. + +Tue Mar 28 14:16:35 1995 Jason Merrill + + * search.c (get_binfo): Don't try to be so clever. + + * tree.c (copy_to_permanent): Also suspend_momentary(). + + * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even + if the types are the same. + + * decl.c (start_function): Handle extern inlines more like C++ says + we should. + + * init.c (build_member_call): Hand constructor calls off to + build_functional_cast. + + * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get + the name of the type. + +Tue Mar 28 13:13:56 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Check for the decl returned by + grokfndecl to be null before using build_decl_attribute_variant. + +Mon Mar 27 18:04:41 1995 Brendan Kehoe + + * init.c (build_new): Use build_pointer_type instead of + TYPE_POINTER_TO. + +Fri Mar 24 12:11:24 1995 Jason Merrill + + * typeck.c (build_conditional_expr): Handle pmfs. + (convert_for_assignment): Fix pmf support. + + * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks. + (cp_convert_to_pointer): Handle pmfs. + (cp_convert): Pass pmfs to cp_convert_to_pointer. + + * typeck.c (common_type): Handle inheritance for pmfs. + + * typeck2.c (build_m_component_ref): Do access control. + + * typeck.c (comp_target_types): Check for conversion to void * + before checking trickier conversions. + + * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P. + + * pt.c (push_tinst_level): Complain if template instantiation depth + is greater than max_tinst_depth. + + * typeck.c (common_type): Assume that we can call common_type to + unify the target type of a pointer. + +Thu Mar 23 00:48:44 1995 Jason Merrill + + * decl2.c (finish_file): Don't synthesize methods at + finish_vtable_prevardecl time. Do synthesize methods that are not + used, but are public and not external. + + * cvt.c (build_type_conversion): Only give an error if for_sure. + + * typeck.c (comp_target_types): Only support pointer conversions if + nptrs > 0. + +Wed Mar 22 19:30:15 1995 Brendan Kehoe + + * init.c (build_new): Catch use of an initializer list where it + shouldn't be. + +Wed Mar 22 16:21:07 1995 Jason Merrill + + * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is + non-constant. + + * decl2.c: temp_name_counter is now public. + + * decl.c (struct cp_function): Add temp_name_counter field. + (push_cp_function_context): Save it. + (pop_cp_function_context): Restore it. + + * typeck.c (common_type): Handle unifying function types, and unify + unmatched things to void* with a compiler_error, rather than + silently like before. + +Wed Mar 22 15:10:34 1995 Mike Stump + + * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert + Brendan's last change and fix latent problem that causes TD entries + to not come out when the things that need them has yet to be + expanded. + +Wed Mar 22 15:12:00 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault, comparison ops): Update type0 + and type1, since we might have changed op0 or op1. + +Wed Mar 22 13:33:45 1995 Jason Merrill + + * typeck.c (common_type): Don't mess up templates. + +Wed Mar 22 04:56:00 1995 Jason Merrill + + * typeck.c (common_type): Handle ptms properly. Also handle + T* -> void*. + (build_binary_op_nodefault): New variable build_type controls what + type is given to the expression when it is created. Set this to + boolean_type_node for comparison ops instead of using result_type. + (comp_target_types): Allow T * -> void *. + + * cvt.c (cp_convert_to_pointer): Do access control when converting + ptms, too. + +Tue Mar 21 17:25:06 1995 Brendan Kehoe + + * parse.y (extern_lang_string): Catch use of linkage specs that + aren't all naming the same language. + + * class.c (finish_struct): Delete accidental duplicate code. + +Tue Mar 21 14:00:57 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Disable pedwarns about + comparing functions and incomplete types. + + * decl.c (finish_function): Only unset current_function_decl if + !nested. + (duplicate_decls): Last change went too far; we only want to stop + checking for value/reference ambiguity. + +Tue Mar 21 01:26:39 1995 Mike Stump + + * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it + out fresh, as the new type may be larger. + +Mon Mar 20 19:01:10 1995 Jason Merrill + + * expr.c (extract_init): Try to expand the RTL for the + initialization and figure out what it will look like so we can avoid + run-time initialization. Disabled for now. + (extract_scalar_init): Helper for scalar initialization. + (extract_aggr_init): Helper for aggregate initialization. + + * decl.c (duplicate_decls): Don't complain about ambiguous + declarations. + (obscure_complex_init): Now returns a tree. Call extract_init if + we're optimizing and this is a toplevel decl. + (finish_decl): Update accordingly. + + * lex.c (check_newline): If we're just changing files (not pushing + or popping), update input_file_stack->name. + +Mon Mar 20 17:55:04 1995 Mike Stump + + * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now + in the transitive unification code. + +Mon Mar 20 16:07:50 1995 Brendan Kehoe + + * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on + non-functions. + (grokdeclarator): Don't allow friends to be defined in local classes. + +Sat Mar 18 04:03:33 1995 Jason Merrill + + * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC + rather than DECL_SAVED_INSNS to decide whether or not this method + was declared inline. + + * method.c (synthesize_method): Turn off DECL_INLINE if + function_cannot_inline_p thinks we're too large. + + * typeck.c (build_indirect_ref): Use build_expr_type_conversion. + +Fri Mar 17 17:47:36 1995 Jason Merrill + + * class.c (instantiate_type): Handle pmfs. + + * typeck.c (convert_for_assignment): Check types when assigning one + pmf to another. + + * decl.c (define_label): Fix logic for printing out the name of the + label in an error message. + + * error.c (dump_expr): Support ARRAY_REF. + +Fri Mar 17 17:43:02 1995 Brendan Kehoe + + * decl2.c (finish_vtable_vardecl): Call build_t_desc here. + (finish_prevtable_vardecl): Instead of here. + +Fri Mar 17 14:40:45 1995 Jason Merrill + + * decl.c (expand_static_init): Also use expand_aggr_init if the + initializer is a TREE_LIST. + (grokdeclarator): Only pedwarn about extra qualification if -pedantic. + + * pt.c (unify): Fix unification of return type. + + * expr.c (fixup_result_decl): Use store_expr, rather than + emit_move_insn, to move the return value into the place where + callers will expect it. + +Thu Mar 16 22:05:25 1995 Jason Merrill + + * init.c (build_offset_ref): Call assmble_external on functions. + * typeck.c (build_component_ref): Likewise. + +Thu Mar 16 20:28:16 1995 Brendan Kehoe + + * decl.c (struct saved_scope): Add members base_init_list and + member_init_list. + (push_to_top_level): Save current_base_init_list and + current_member_init_list to them. + (pop_from_top_level): Put it back. + +Thu Mar 16 19:21:14 1995 Jason Merrill + + * pt.c (instantiate_template): Call assemble_external. + +Thu Mar 16 18:07:54 1995 Brendan Kehoe + + * class.c: Include rtl.h, to get NULL_RTX. + (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems + on hosts with different sizes for each part of the union. + * tree.c: Also include rtl.h. + (layout_basetypes): Same change for DECL_SAVED_INSNS. + +Thu Mar 16 13:57:36 1995 Jason Merrill + + * pt.c (unify): Fix array domain unification for 64-bit targets. + + * decl2.c (finish_file): Push bizarre type decl before walking the + vtables the first time. + (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed + with TREE_CHAIN (prev). + + * init.c (emit_base_init): Use convert_pointer_to_real instead of + convert_pointer_to when converting to a direct base. + +Wed Mar 15 20:26:29 1995 Mike Stump + + * pt.c (type_unification): Handle transitive unification better. + +Wed Mar 15 13:56:16 1995 Jason Merrill + + * decl2.c (walk_vtables): Always set prev to vars. + (mark_vtable_entries): Call assemble_external on the vtable entries. + + * class.c (finish_struct): Set the vtable's size to NULL_TREE before + calling layout_decl, so that it gets updated properly. + + Finally re-enable dynamic synthesis. This time it works. + * method.c (synthesize_method): Pass decl_function_context (fndecl) + to {push,pop}_cp_function_context. + * decl.c (push_cp_function_context): Now takes a tree argument. + (pop_cp_function_context): Likewise. + * call.c (build_method_call): Enable synthesis. + * lex.c (cons_up_default_function): Likewise. + +Tue Mar 14 19:14:19 1995 Doug Evans + + * parse.y (setattrs): Chain onto prefix_attributes rather than + setting it. + +Wed Mar 15 13:00:00 1995 Brendan Kehoe + + * decl.c (pushdecl): Check if the type of the VAR_DECL is an + error_mark_node before trying to read TYPE_LANG_SPECIFIC. + +Mon Mar 13 21:00:28 1995 Brendan Kehoe + + * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold, + and convert the size and integer_one_node to the index type. + +Mon Mar 13 08:01:02 1995 Jason Merrill + + * typeck.c (get_member_function_from_ptrfunc): Save the instance + argument, and tack it onto the front of the COND_EXPR to make the + semantics come out right. Grab the instance argument from + '*instance_ptrptr', rather than having it passed in separately. + + * various: Change various consed-up comparison operations to have + boolean type. Remove the instance argument in calls to + get_member_function_from_ptrfunc. + + * error.c (dump_expr): Dump true and false as "true" and "false". + + * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the + global init function. + + * decl.c (finish_function): Only set DECL_EXTERNAL here if the + inline function is public. + +Sat Mar 11 00:58:03 1995 Jason Merrill + + * init.c (is_friend): Be more careful about checking + DECL_CLASS_CONTEXT on non-member functions. + + * decl2.c (finish_vtable_vardecl): Don't bother calling + assemble_external here. + (prune_vtable_vardecl): New function that just splices out the + vtable decl from the top-level decls. + (import_export_inline): Unset DECL_EXTERNAL at first. + (finish_file): Don't bother calling assemble_external here. Do + splice out all of the vtables. + +Fri Mar 10 14:42:29 1995 Jason Merrill + + * decl.c (finish_function): If we're not emitting the function yet, + call assemble_external for it. + + * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries + here. + (finish_vtable_vardecl): Don't do the linkage deduction thing here. + Also don't splice out the current vtable if it is unused. + (finish_file): Move the second walk_vtables and the synthesis check + inside the 'reconsider' loop. Move thunk emission after the + 'reconsider' loop. + +Thu Mar 9 16:28:16 1995 Brendan Kehoe + + * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it + was passing bogus values for readonly and volatile from the original + template decl, not the resultant type of the tsubst call. + + * class.c (duplicate_tag_error): Use cp_error_at to point out the + previous definition of the tag. + +Thu Mar 9 10:46:17 1995 Jason Merrill + + * decl.c (start_function): Clear base_init_insns and protect_list. + (struct cp_function): Add base_init_insns field. + (push_cp_function_context): Also save base_init_insns. + (pop_cp_function_context): Also restore base_init_insns. + +Wed Mar 8 13:31:44 1995 Jason Merrill + + * init.c (member_init_ok_or_else): Check for initializing a static + member here. + (emit_base_init): Instead of here. + +Tue Mar 7 16:03:26 1995 Jason Merrill + + * call.c (build_method_call): Disable synthesis as needed. + * lex.c (cons_up_default_function): Likewise. + +Tue Mar 7 10:14:29 1995 Brendan Kehoe + + * parse.y: New rules to allow attributes in a prefix position. + (prefix_attributes): New variable. Pass it into cplus_decl_attributes. + (setattr): New rule. + (reserved_declspecs, declmods): Catch attributes here. + * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument. + * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to + descendent typedef. + (grokdeclarator): Added code to support machine attributes. + * Makefile.in (stamp-parse): Expect 5 shift/reduce failures. + +Mon Mar 6 15:07:02 1995 Jason Merrill + + * call.c (build_method_call): Don't synthesize methods outside of a + function. + + Make base initialization more re-entrant so that synthesis on the + fly will work (and, eventually, template instantiation on the fly). + * init.c (sort_member_init): Don't bother with members that can't be + initialized. Reorganize a bit. Don't initialize base members here. + (sort_base_init): New function, like sort_member_init, but for base + classes. Steals some code from emit_base_init. + (emit_base_init): Simplify. Call sort_{member,base}_init before + doing any initialization, so we don't have to save + current_{member,base}_init_list in push_cp_function_context. + (expand_aggr_vbase_init_1): Adjust for sort_base_init. + (expand_aggr_vbase_init): Simplify. + * decl.c (struct cp_function): Add protect_list field. + (push_cp_function_context): Also save protect_list. + (pop_cp_function_context): Also restore protect_list. + * call.c (build_method_call): Enable synthesis at point of call. + * lex.c (cons_up_default_function): Likewise. + + * parse.y: Turn -ansi checks back into -pedantic checks. + + * init.c (build_new): Fix -fcheck-new for array new. + +Sat Mar 4 15:55:42 1995 Fergus Henderson + + * typeck.c (build_compound_expr): warn if left-hand operand of + comma expression has no side-effects. + +Fri Mar 3 15:16:45 1995 Jason Merrill + + * parse.y (primary): Change 'object qualified_id *' rules to 'object + overqualified_id *'. + +Fri Mar 3 12:48:17 1995 Brendan Kehoe + + * parse.y (unary_expr): Catch doing sizeof an overloaded function. + Make the error look the same as the one we issue in c_sizeof. + + * typeck.c (build_binary_op_nodefault): Give an error for trying + to compare a pointer-to-member to `void *'. + +Fri Mar 3 11:28:50 1995 Jason Merrill + + * typeck.c (build_unary_op): Handle bool increment with smoke and + mirrors here, rather than in expand_increment where it belongs, + because Kenner doesn't agree with me. + +Fri Mar 3 00:08:10 1995 Brendan Kehoe + + * decl.c (grokparms): Catch a PARM_DECL being used for a default + argument as well. + +Thu Mar 2 20:05:54 1995 Brendan Kehoe + + * init.c (build_new): Don't allow new on a function type. + + * parse.y (primary): Avoid a crash when seeing if the arg is of + the same type as that given for the typespec in an explicit dtor call. + +Thu Mar 2 00:49:38 1995 Jason Merrill + + * decl.c (finish_function): Change test for calling + mark_inline_for_output. + +Wed Mar 1 11:23:46 1995 Jason Merrill + + * typeck.c (build_modify_expr): Complain if + build_default_binary_type_conversion fails. + + * init.c (expand_default_init): Handle arguments of unknown type + properly. + + * cvt.c (build_expr_type_conversion): Only complain about ambiguity + if 'complain'. + * various: Pass 'complain'. + + * typeck.c (comptypes): Be more picky about comparing UPTs. + +Wed Mar 1 11:03:41 1995 Brendan Kehoe + + * decl.c (grokdeclarator): If declarator is null, say that the + type used has an incomplete type. + +Wed Mar 1 10:06:20 1995 Jason Merrill + + * pt.c (instantiate_template): Copy the template arguments to the + permanent_obstack. Also use simple_cst_equal to compare them when + looking for a previous instantiation. + + * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming + they are array domain types). + +Tue Feb 28 23:24:55 1995 Jason Merrill + + * cp-tree.h: Define WANT_* constants for passing to + build_expr_type_conversion. + * cvt.c (build_expr_type_conversion): New function to build + conversion to one of a group of suitable types. + (build_default_binary_type_conversion): Use it. + * decl2.c (grok_array_decl): Likewise. + * typeck.c (build_unary_op): Likewise. + (build_array_ref): Tidy up a bit. + (build_binary_op): Likewise. + +Tue Feb 28 19:57:31 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Don't allow decl of an argument as `void'. + +Tue Feb 28 17:23:36 1995 Jason Merrill + + * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals + reserved_declspecs' rule. + + * parse.y (expr_or_declarator): Remove notype_qualified_id rule. + (direct_notype_declarator): Likewise. + (complex_direct_notype_declarator): Add notype_qualified_id rule. + + * lex.c (real_yylex): Handle :> digraph properly. + +Tue Feb 28 12:26:29 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Check if it's a friend, not if it's + non-virtual, that's being initialized. Move the check up to + before FRIENDP would get cleared. Catch an unnamed var/field + being declared void. Say just `field' instead of `structure field' + in the error message. Only go for the operator name if DECLARATOR + is non-null. + +Tue Feb 28 00:08:01 1995 Jason Merrill + + * decl.c (start_function): Complain about abstract return type. + (grokdeclarator): Complain about declaring constructors and + destructors to be const or volatile. Complain about declaring + destructors to be static. + + * pt.c (uses_template_parms): Handle pmfs. + + * decl.c (grokdeclarator): Don't call variable_size for array bounds + that only depend on template constant parameters. + +Mon Feb 27 15:38:16 1995 Brendan Kehoe + + * error.c (dump_decl): Only look to see if it's a vtable if we + actually have a name to check out. + +Mon Feb 27 13:37:53 1995 Jason Merrill + + * cvt.c (convert_to_aggr): Lose misleading shortcut. + +Sun Feb 26 17:27:32 1995 Doug Evans + + * decl.c (set_nested_typename): Always set DECL_IGNORED_P, + not just for dwarf. + +Sun Feb 26 00:10:18 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Don't allow a static member to be + declared `register'. + + * init.c (make_friend_class): Move up to a pedwarn for the warning + about a class declaring friends with itself. + + * decl.c (grokdeclarator): You can't do `volatile friend class foo' + or `inline friend class foo'. Only try to make a friend out of + TYPE if we didn't already reset it to integer_type_node. + +Sat Feb 25 22:32:03 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Don't allow initialization of a + non-virtual function. + + * decl.c (start_function): Do a pedwarn if we're changing `main' + to have an int return type. + +Sat Feb 25 00:02:05 1995 Jason Merrill + + * typeck.c (build_modify_expr): Handle simple assignment from + TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew. + +Fri Feb 24 18:27:14 1995 Brendan Kehoe + + * decl.c (grokdeclarator): Also don't allow virtual outside of a + class decl for a scope method definition performed at global binding. + + * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF + of a bitfield. + + * decl.c (grokdeclarator): Don't allow a const to be declared mutable. + + * typeck.c (build_binary_op): Return an error_mark_node if either + one of the args turned into an error_mark_node when we tried to + use default_conversion. + + * typeck.c (build_unary_op): Forbid using postfix -- on a bool. + + * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be + used on `__wchar_t'. + +Fri Feb 24 13:59:53 1995 Mike Stump + + * except.c (end_protect_partials): Do it the right way. + +Wed Feb 22 15:42:56 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Upgrade warning about + comparing distinct pointer types to pedwarn. + + * typeck2.c (digest_init): Cope with extra braces. + + * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead + of INT_CST_LT (..., interger_zero_node). + +Wed Feb 22 14:45:52 1995 Brendan Kehoe + + * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy + function for systems that don't have EH. + +Tue Feb 21 19:18:31 1995 Jason Merrill + + * call.c (can_convert_arg): Like can_convert, but takes an arg as + well. + + * pt.c (type_unification): Allow implicit conversions for parameters + that do not depend on template parameters. + +Tue Feb 21 18:43:48 1995 Douglas Rupp + + * Make-lang.in, config-lang.in: ($exeext): New macro. + * Make-lang.in: Try a "cp" if "ln" fails. + * cp-tree.h (decl_attributes): Added argument. + * decl2.c (cplus_decl_attribute): Add arg to decl_attributes. + * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT. + Modified spawnvp to have to correct number of arguments for OS/2, NT. + +Tue Feb 21 18:36:55 1995 Mike Stump + + * decl.c (finish_function): Add calls to end_protect_partials to end + the exception region that protects constructors so that partially + constructed objects can be partially destructed when the constructor + throws an exception. + * init.c (perform_member_init, sort_member_init, emit_base_init): + Added support for partially constructed objects. + * init.c (build_partial_cleanup_for): New routine to do partial + cleanups of a base class. + * decl2.c (finish_file): Move the emitting of the exception table + down, after we emit all code that might have exception regions in + them. + * except.c (end_protect_partials, might_have_exceptions_p): New + routines. + (emit_exception_table): Always output table if called. + * cp-tree.h (protect_list, end_protect_partials, + might_have_exceptions_p, emit_exception_table): Added. + +Tue Feb 21 16:05:59 1995 Brendan Kehoe + + * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused + address of a local variable. + * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we + were given a non-null PTR_TO_INSTPTR. + +Tue Feb 21 01:53:18 1995 Jason Merrill + + * decl.c (duplicate_decls): Always lay out the merged decl. + + * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates. + (finish_prevtable_vardecl): Likewise. + + * method.c (synthesize_method): Set interface_{unknown,only} + according to the settings for our class, not the file where it comes + from. + +Sat Feb 18 12:26:48 1995 Mike Stump + + * except.c: Handle systems that define __i386__ but not __i386. + +Fri Feb 17 15:31:31 1995 Jason Merrill + + * decl2.c (reparse_decl_as_expr): Support being called without a + type argument. + + * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r + conflicts. Sigh. + +Fri Feb 17 12:02:06 1995 Mike Stump + + * parse.y (template_def, fndef, fn.def1, return_init, condition, + initdcl0, initdcl, notype_initdcl0, nomods_initdcl0, + component_decl_1, after_type_component_declarator0, + notype_component_declarator0, after_type_component_declarator, + notype_component_declarator, after_type_component_declarator, + full_parm, maybe_raises, exception_specification_opt): Fix up, + include exception_specification_opt maybeasm maybe_attribute and + maybe_init if missing. Rename maybe_raises to + exception_specification_opt to match draft wording. Use maybe_init + to simplify rules. + +Fri Feb 17 01:54:46 1995 Jason Merrill + + * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs + built for news of scalar types. + +Thu Feb 16 17:48:28 1995 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Update code for warning + about signed/unsigned comparisons from C frontend. Realize that the + code in the C frontend is, if anything, even more bogus. Fix it. + (build_binary_op): Undo default_conversion if it wasn't useful. + + * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for + PRE*CREMENT_EXPR. + + * decl2.c (import_export_vtable): Don't try the vtable hack + if the class doesn't have any real non-inline virtual functions. + (finish_vtable_vardecl): Don't bother trying to find a non-inline + virtual function in a non-polymorphic class. + (finish_prevtable_vardecl): Likewise. + + * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN. + + * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5. + + * init.c (expand_virtual_init): Always call assemble_external. + + * class.c (build_vfn_ref): Always call assemble_external. + (build_vtable): Always call import_export_vtable. + (prepare_fresh_vtable): Likewise. + (add_virtual_function): Don't bother setting TREE_ADDRESSABLE. + +Thu Feb 16 03:28:49 1995 Jason Merrill + + * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine + whether an enumerated type fits in a bitfield. + +Wed Feb 15 15:38:12 1995 Jason Merrill + + * class.c (grow_method): Update method_vec after growing the class + obstack. + +Wed Feb 15 13:42:59 1995 Mike Stump + + * parse.y (handler_seq): Push a level for the catch parameters. + +Wed Feb 15 12:42:57 1995 Jason Merrill + + * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my + bases, in case they've been clobbered. + +Wed Feb 15 12:07:29 1995 Mike Stump + + * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here, + so that one day it will always be valid. + * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise. + + * cp-tree.h (copy_binfo): Removed, unused. + * tree.c (copy_binfo): Likewise. + +Wed Feb 15 00:05:30 1995 Jason Merrill + + * init.c (build_new): Save the allocation before calling + expand_vec_init on it. + + * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush + match the TYPE_PRECISION of the underlying type for constant folding + to work. + +Tue Feb 14 15:31:25 1995 Mike Stump + + * except.c (push_eh_entry, expand_start_all_catch, + expand_leftover_cleanups, expand_end_catch_block): Keep track of + the context in which the exception region occurs. + (build_exception_table): If the region was not output, don't output + the entry in the eh table for it. + +Tue Feb 14 02:15:43 1995 Jason Merrill + + * init.c (expand_default_init): Only use a previous constructor call + if it's a call to our constructor. Does the word "Duh" mean + anything to you? + + * decl.c (grokparms): Fine, just don't call + convert_for_initialization at all. OK? Happy now? + +Mon Feb 13 02:23:44 1995 Jason Merrill + + * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class + method vector has a second element before returning it. + + * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling + convert_for_initialization. + +Sun Feb 12 03:57:06 1995 Jason Merrill + + * typeck.c (build_modify_expr): Compare function name to + constructor_name (current_class_type) instead of current_class_name. + + * decl.c (grokparms): Don't do anything with the return value of + convert_for_initialization. + + * error.c (dump_decl): Also dump_readonly_or_volatile on the decl. + + * decl.c (duplicate_decls): Tweak error message. + + * typeck.c (build_const_cast): Implement checking. + (build_reinterpret_cast): Implement some checking. + + * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when + converting to the same aggregate type. + (CONV_STATIC_CAST): Include it. + (CONV_C_CAST): Likewise. + * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT. + (cp_convert): Only force a new temporary if CONV_FORCE_TEMP. + +Fri Feb 10 16:18:52 1995 Jason Merrill + + * typeck.c (build_c_cast): Use non_lvalue to tack something on + where necessary. + + * decl.c (auto_function): Now a function. + * except.c (init_exception_processing): terminate, unexpected, + set_terminate, and set_unexpected have C++ linkage. + + * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of + truthvalue_conversion for converting to bool, as it handles + user-defined conversions properly. + (condition_conversion): Likewise. + + * except.c (expand_throw): Don't call convert_to_reference. + Pass the correct parameters to build_new. + + * method.c (do_build_assign_ref): Don't use access control when + converting to a base reference here. + (do_build_copy_constructor): Or here. + + * init.c (build_new): Unset TREE_READONLY on the dereferenced + pointer before assigning to it. + + * decl.c (maybe_build_cleanup): Don't bother stripping const here. + + * decl2.c (delete_sanity): You can now delete pointer to const. + +Fri Feb 10 13:28:38 1995 Jason Merrill + + * decl.c (finish_function): Don't rely on actual parameters being + evaluated left-to-right. + * except.c (expand_end_catch_block): Likewise. + +Fri Feb 10 00:52:04 1995 Jason Merrill + + * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't + considered lvalues. + * cvt.c (convert_to_reference): Use real_lvalue_p instead of + lvalue_p. + + * cvt.c (build_type_conversion_1): Don't call convert on aggregate + types. + (convert_to_reference): Fix erroneous text substitution. + + * typeck2.c (initializer_constant_valid_p): Update from C frontend. + Add new argument to all callers. + + * typeck.c (convert_arguments): Check for error_mark_node before + trying to do anything with the actual parameter. + + * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and + fold it. + (bool_truthvalue_conversion): Remove. Fix all callers to call + truthvalue_conversion instead. + (various): Fold CLEANUP_POINT_EXPRs. + + * parse.y (conditions): Call condition_conversion rather than + building up a CLEANUP_POINT_EXPR. + + * pt.c (end_template_decl): Don't warn_if_unknown_interface here + under -falt-external-templates. + +Thu Feb 9 05:24:10 1995 Jason Merrill + + * init.c (build_new): Complain about new of const type without + initializer. Other cleanup. + + * call.c (compute_conversion_costs): Don't call + build_type_conversion with a reference type; convert to the target + type and check its lvaluetude. + * cvt.c (convert_to_reference): Likewise. + + * cvt.c (build_type_conversion_1): There will never be any need to + dereference references here now. + +Thu Feb 9 00:37:47 1995 Mike Stump + + * except.c (expand_builtin_throw): Make sure we only `use' the + value of return_val_rtx. + +Wed Feb 8 15:45:55 1995 Jason Merrill + + * parse.y (structsp): Don't complain about declaring a type being + defined to be a friend. + + * decl2.c (warn_if_unknown_interface): Note the template in question + and the point of instantiation, for -falt-external-templates. + * lex.c (reinit_parse_for_method): Pass the decl to + warn_if_unknown_interface. + * pt.c (instantiate_template): Likewise. + (end_template_decl): Likewise. + + * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the + nested name again, to make local classes work a bit better. + + * typeck.c (build_function_call_real): Dereference reference after + checking for incomplete type. + + * init.c (build_new): Accept new of const and volatile types. + +Wed Feb 8 14:04:16 1995 Jason Merrill + + * decl.c (grokdeclarator): Fix error message. + +Wed Feb 8 03:16:15 1995 Jason Merrill + + * typeck.c (convert_for_initialization): Do bash arrays when + converting to a reference to non-array. + +Tue Feb 7 15:50:33 1995 Jason Merrill + + * cvt.c (cp_convert): Don't call convert_to_reference, or + automatically dereference references. Do pass reference conversions + to cp_convert_to_pointer. + (cp_convert_to_pointer): Support references. + + * call.c (build_method_call): Don't build up a reference to the + parameter here; let build_overload_call handle that. + + * typeck.c (build_c_cast): Call convert_to_reference directly if + converting to a reference type. + * method.c (do_build_copy_constructor): Likewise. + * method.c (do_build_copy_constructor): Likewise. + (do_build_assign_ref): Likewise. + + * call.c (build_method_call): Dereference a returned reference. + * typeck.c (build_function_call_real): Likewise. + + * decl.c (xref_basetypes): Check for unions with basetypes here. + (xref_tag): Instead of here. + + * pt.c (process_template_parm): Template type parm decls are + artificial. + +Mon Feb 6 04:32:09 1995 Jason Merrill + + * parse.y (typed_declspecs): Add missing semicolon. + (do_xref_defn): Resurrect. + (named_class_head_sans_basetype): Move template specialization + definition cases to named_class_head_sans_basetype_defn. + + * decl2.c (grokfield): Call pushdecl_class_level after setting the + TYPE_NAME, not before. + +Sun Feb 5 02:50:45 1995 Jason Merrill + + * call.c (convert_harshness): Don't call sorry here. Don't allow + conversions between function pointer types if pedantic. + + * pt.c (overload_template_name): Pass globalize=1 to xref_tag. + + * lex.c (cons_up_default_function): Use the full name for the return + type of op=. + + * decl.c (set_nested_typename): Don't worry about anonymous types, + as they already have a unique name. + (pushdecl): Remove redundant set_nested_typename + (xref_tag): Split out base handling into xref_basetypes. + + * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are + not considered incomplete even though their definition is unknown. + + * decl.c (xref_defn_tag): Lose. + (xref_tag): xref_next_defn = ! globalize. + (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The + ones that should have it set will have it set by pushtag. + (pushdecl_class_level): Likewise. + (pushtag): Tidy up a bit. + (set_nested_typename): Push a decl for the nested typename from + here, rather than from xref_defn_tag. + + * parse.y (do_xref): Lose. + (named_class_head): If we see 'class foo:' we know it's a + definition, so don't worry about base lists for non-definitions. + + * pt.c (push_template_decls): Template parm decls are artificial. + + * decl.c (duplicate_decls): Restore check for qualifier + disagreement for non-functions. + (decls_match): Remove check for qualifier disagreement. + +Fri Feb 3 14:58:58 1995 Jason Merrill + + * decl.c (grok_reference_init): Convert initializer from + reference. + * typeck.c (convert_for_initialization): Likewise. + + * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME. + + * cvt.c (cp_convert): Don't convert to the same class type by just + tacking on a NOP_EXPR. + (convert_to_reference): Use comp_target_types instead of comptypes + so that we don't allow conversions two levels down. + +Thu Feb 2 15:07:58 1995 Jason Merrill + + * class.c (build_vbase_path): Bash types to make the backend happy. + * cvt.c (build_up_reference): Bash the types bashed by + build_vbase_path to be reference types instead of pointer types. + (convert_to_reference): Likewise. + + * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a + reference type. + + * parse.y (structsp): Put back error for 'struct B: public A;'. + +Wed Feb 1 23:02:06 1995 Mike Stump + + * except.c: Add support for mips systems that don't define __mips + but do define mips, like Ultrix. + +Wed Feb 1 22:39:07 1995 Mike Stump + + * except.c: Add support for exception handling on the Alpha. + +Wed Feb 1 10:12:14 1995 Mike Stump + + * decl2.c (finish_file): Fix bug in Jan 31st change. + +Tue Jan 31 16:59:15 1995 Gerald Baumgartner + + * sig.c (build_signature_pointer_or_reference_type): Don't set + IS_AGGR_TYPE for signature pointers/reference so expand_default_init + doesn't expect to find a copy constructor. + * call.c (build_method_call): Treat signature pointers/reference + as if IS_AGGR_TYPE were set. + +Tue Jan 31 13:28:56 1995 Mike Stump + + * gc.c (get_typeid): Pawn off error messages to build_t_desc. + (build_t_desc): Inform the user here if they try and build + with -frtti and don't include . + + * decl2.c (finish_prevtable_vardecl): Support rescanning. + (finish_file): Move finish_prevtable_vardecl up to before the global + initializers are done as tdecls are initialized in the global + initializer. Also Pick up any new tdecls or vtables needed by + synthesized methods. + + * class.c (finish_struct): Simplify. We have to do rtti scanning at + end, so we might as well do all of it there. + +Tue Jan 31 05:35:02 1995 Jason Merrill + + * call.c (build_method_call): Fix -fthis-is-variable for 32-bit + targets, too. + +Tue Jan 31 00:11:04 1995 Mike Stump + + * decl2.c (finish_prevtable_vardecl): New routine, mostly split from + finish_vtable_vardecl. It has the first half functionality from + that routine. + * decl2.c (finish_vtable_vardecl): Update to not include stuff not + in finish_prevtable_vardecl. + * decl2.c (finish_file): Call finish_prevtable_vardecl. + * gc.c (build_generic_desc): Allow it to be called when not at the + global binding layer, but behave as if we were. + (build_t_desc): Rearrange a bit so that it really works and is + easier to follow. + * class.c (finish_struct): Don't decide on tdecls here, as we have + to wait until the end of the file in general to decide whether or + not they come out. + +Mon Jan 30 01:00:40 1995 Jason Merrill + + * init.c (build_delete): Check access to operator delete before + calling the destructor. + * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to + return error_mark_node. + * call.c (build_method_call): Use the one-argument op delete even if + it's an error. + + * init.c (build_new): Fix -fthis-is-variable support. + * call.c (build_method_call): Likewise. + + * call.c (convert_harshness): Make conversion from a pointer to bool + worse than conversion to another pointer. + +Sat Jan 28 16:46:10 1995 Jason Merrill + + * init.c (build_new): Check new return value if -fcheck-new. + + * lex.c (check_newline): Clear end_of_file when we're done, too. + +Sat Jan 28 10:38:39 1995 Mike Stump + + * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow + vtables whereever they go. + + * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't + right. + +Sat Jan 28 09:10:44 1995 Mike Stump + + * decl2.c (finish_vtable_vardecl): Now set the + interface/implementation of vtables on the first virtual function, + if one exists, otherwise we use the old method. This is a major win + in terms of cutting down the size of objects and executables in + terms of text space and data space. Now most of the savings that + #pragma interface/implementation gives is automatic in a fair number + of cases. + +Sat Jan 28 04:57:33 1995 Jason Merrill + + * decl.c (grokdeclarator): Discard the template parameters in a + template constructor declaration so that the function is always + named constructor_name (ctype). + + * lex.c (check_newline): Use ungetc to put back the character before + calling HANDLE_PRAGMA. + +Fri Jan 27 17:23:47 1995 Mike Stump + + * decl2.c (check_classfn): If the cname is T and fn_name is T, + make sure we still match them. + +Fri Jan 27 16:32:10 1995 Jason Merrill + + * parse.y: Add END_OF_LINE token. + + * lex.c (check_newline): Set linemode when we see a # directive, and + unset it when we're done. Turn all 'return's into 'goto skipline'. + Fix all uses of '\n', since we won't see it anymore. Put back the + character we read before checking for a sysv or target pragma. + (real_yylex): If we see an EOF in linemode, return END_OF_LINE. + (handle_sysv_pragma): Don't look at the input stream; quit when we + see an END_OF_LINE token. + + * input.c (getch): Return EOF if we're in line mode and at the end + of a line. + (put_back): Don't put back an EOF. + +Thu Jan 26 19:26:34 1995 Mike Stump + + * except.c (expand_throw): Do the newing of the exception object + before we load the type descriptor or the address so that we don't + wipe any of the values out. + +Thu Jan 26 19:20:00 1995 Mike Stump + + * except.c (init_exception_processing): Don't use r12 on the rs6000. + +Tue Jan 24 16:36:31 1995 Jason Merrill + + * decl.c (grokparms): Don't try to build up a reference at this point. + + * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR + will suffice to convert from integer_zero_node. + +Wed Jan 25 15:02:09 1995 David S. Miller + + * class.c (instantiate_type): Change error message text. + * typeck2.c (store_init_value): Likewise. + +Mon Jan 23 21:57:14 1995 Mike Stump + + * pt.c (tsubst): When we copy a node, don't forget to copy + TREE_CHAIN, we use it later. + +Mon Jan 23 03:33:47 1995 Jason Merrill + + * typeck.c (convert_for_assignment): Initialize variable before use. + +Fri Jan 20 01:17:59 1995 Jason Merrill + + * g++.c (main): Link with both libstdc++ and libg++ if called as + something ending with "g++", otherwise only libstdc++. Move -lm to + the end of the line. + +Thu Jan 19 15:43:11 1995 Jason Merrill + + * call.c (build_method_call): Don't mess with 'this' before calling + compute_conversion_costs. + +Wed Jan 18 15:40:55 1995 Jason Merrill + + * search.c (get_matching_virtual): Give line number for previous + declaration. + + * call.c (convert_harshness): Handle conversions to references + better. + + * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*. + +Wed Jan 18 15:21:38 1995 Mike Stump + + * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead, + as the TREE_CHAIN for methods will take us to the next differently + named function, DECL_CHAIN won't. + +Wed Jan 18 14:26:59 1995 Jason Merrill + + * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR. + + * decl2.c (lang_decode_option): -Wall implies -Wparentheses. + warn_parentheses defaults to 0. + + * decl.c (grokparms): Put back call to require_instantiated_type. + +Tue Jan 17 19:56:15 1995 Mike Stump + + * except.c (exception_section): Use the data section on the rs6000. + Change calling convention for named_section. + +Wed Jan 17 18:20:57 1994 Fergus Henderson + + * cp-tree.h: Make if (x=0) warn with wall + * parse.y: Make if (x=0) warn with wall + +Tue Jan 17 14:12:00 1995 Jason Merrill + + * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS, + BITS_PER_UNIT otherwise. + + * search.c (get_matching_virtual): Don't check the binfo if the + types are the same. + + * cvt.c (cp_convert): Just call truthvalue_conversion to convert to + bool. + +Mon Jan 16 13:28:48 1995 Jason Merrill + + * various: Use boolean_type_node, boolean_true_node, + boolean_false_node. + + * search.c (get_matching_virtual): Allow covariant returns that + don't require pointer adjustment. + + * typeck.c (build_conditional_expr): Don't call default_conversion + on ifexp. + + * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR. + + * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn. + +Sun Jan 15 22:17:32 1995 David Binderman + + * pt.c (do_function_instantiation): Free targs once we're done. + +Sun Jan 15 22:17:32 1995 Jason Merrill + + * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD. + (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE + for bool. + +Sat Jan 14 05:33:55 1995 Jason Merrill + + * decl2.c (finish_file): We need to mess up if there are any + variables in the list, not just if there is one with a constructor. + +Fri Jan 13 14:42:55 1995 Jason Merrill + + * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR. + (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR. + (finish_function): Trust rest_of_compilation. + + * decl2.c (finish_file): Also call functions designated as static + constructors/destructors. + + * decl.c (grokdeclarator): Allow access decls of operator functions. + (grokparms): Only do convert_for_initialization if the initializer + has a type. + (duplicate_decls): Put back push_obstacks_nochange call. + + * lex.c (real_yylex): Downgrade complaint about the escape sequence + being too large from pedwarn to warning. + + * decl.c (grokdeclarator): Don't complain about long long in system + headers. + + * lex.c (real_yylex): Handle digraphs. + +Thu Jan 12 12:17:24 1995 Jason Merrill + + * decl.c (init_decl_processing): -f{no-,}strict-prototype only + affects C linkage declarations now. + + * typeck.c (comp_target_types): Grok simple contravariant conversions. + (common_type): t1 and t2 are interchangeable. + + * various: Test return value of comp_target_types differently in + different places; it now returns -1 for a contravariant conversion + (which is fine in symmetric cases). + + (common_type): Prefer long double to double even when + they have the same precision. + + * decl.c (grokparms): Call convert_for_initialization to check + default arguments. + + * init.c (build_new): void_type_node has a size (of 0). + + * decl.c (decls_match): Also check for agreement of TREE_READONLY + and TREE_THIS_VOLATILE. + (push_class_level_binding): Properly handle shadowing of + nested tags by fields. + + * search.c (dfs_pushdecls): Likewise. + + * decl2.c (finish_file): Don't second-guess self-initialization. + + * cvt.c (convert_to_reference): Work with expr directly, rather than + a copy. + + * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs. + + * init.c (add_friend): Downgrade duplicate friend message from + pedwarn to warning. + + * decl.c (duplicate_decls): Push obstacks before calling common_type. + +Thu Jan 12 17:15:21 1995 Michael Ben-Gershon + + * except.c (push_eh_entry): Set LABEL_PRESERVE_P flag for + exception table labels. + (expand_start_all_catch): Likewise. + (expand_leftover_cleanups): Likewise. + (expand_end_catch_block): Likewise. + * except.c (make_first_label): New function. + (expand_start_all_catch): Add a call to make_first_label() before + using a label as a jump destination. + (expand_end_all_catch): Likewise. + (expand_leftover_cleanups): Likewise. + (expand_end_catch_block): Likewise. + (expand_builtin_throw): Likewise. + (expand_throw): Likewise. + * except.c: Add ARM processor support for exception handling. + +Thu Jan 12 12:17:24 1995 Jason Merrill + + (complete_array_type): Copy code from C frontend. + + * lex.c (real_yylex): Don't multiply the length of a wide string + literal by WCHAR_BYTES. + + * decl.c (pushdecl): Check for redeclaration of wchar_t here. + (duplicate_decls): Instead of here. + (define_label): Complain about a label named wchar_t. + (grokdeclarator): Complain about declarations of + operator-function-ids as non-functions. + + * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in + COMPOUND_EXPRs. + (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR. + + * lex.c (real_yylex): Don't skip whitespace when reading the next + character after ->. + +Wed Jan 11 16:32:49 1995 Mike Stump + + * except.c: Allow cc1plus to be built with native compiler on rs6000. + (expand_start_all_catch): Add assemble_external calls for various + routines we call. + (expand_leftover_cleanups): Likewise. + (expand_start_catch_block): Likewise. + (do_unwind): Likewise. + (expand_builtin_throw): Likewise. + +Wed Jan 11 01:05:42 1995 Jason Merrill + + * decl.c (pushtag): Only look for a previous decl in the current + binding level. Use explicit global scope in DECL_NESTED_TYPENAME. + + * gxx.gperf: Add __signature__ and __sigof__ keywords. + + * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It + does set flag_no_gnu_keywords and flag_operator_names. + + * lex.c (init_lex): 'overload' is not a keyword unless -traditional. + Unset extension keywords if -fno-gnu-keywords. + Allow operator names ('bitand') if -foperator-names. + Never unset 'asm'; -fno-asm only affects 'typeof'. + + * decl.c (lookup_name_real): The got_object special lookup only + applies to types. + +Tue Jan 10 18:07:51 1995 Jason Merrill + + * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set. + + * parse.y (primary): Unset got_object after all rules that use the + 'object' nonterminal. + (object): Set got_object. + + * lex.h: Declare got_object. + + * decl.c (lookup_name_real): Also lookup names in the context of an + object specified. + +Tue Jan 10 14:30:30 1995 Mike Stump + + * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node + for things that have to be added to pointers, not size_type. Cures + problems with pointer to members on Alphas. + (build_binary_op_nodefault): Likewise. + (get_delta_difference_: Likewise. + (build_ptrmemfunc): Likewise. + +Tue Jan 10 01:49:25 1995 Jason Merrill + + * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing + it. + + * typeck.c (build_component_ref): Don't build up a COMPONENT_REF + when dealing with overloaded member functions; just act like + build_offset_ref. + (commonparms): Remove misleading comment. + + * decl.c (duplicate_decls): Complain about repeated default + arguments here. + (redeclaration_error_message): Instead of here. + (pushdecl): Complain about missing default arguments here. + (grokparms): Instead of here. + (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME. + (grok_reference_init): Do not complain about missing initializer if + declared 'extern'. + + * search.c (lookup_field): Don't return a TYPE_DECL if there is a + function alternative and want_type is not set. + +Mon Jan 9 18:16:23 1995 Jason Merrill + + * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push + the decl when the type has no TYPE_NAME. + (lookup_nested_type): Don't assume that type has TYPE_NAME set. + (lookup_name_real): Call lookup_field with want_type = + prefer_type. + + * search.c (lookup_field): Handle want_type properly in the presence + of fields with the same name. + + * decl.c (set_nested_typename): Set nested name for file-scope types + to include leading ::. + (pushdecl): Set the nested typename if the decl doesn't have one, + rather than if the type's canonical decl doesn't have one. + +Mon Jan 9 03:44:33 1995 Jason Merrill + + * typeck.c (convert_for_assignment): Complain about contravariance + violation here. + (comp_target_types): Instead of here. + (build_unary_op): resolve_offset_ref before checking for a valid + type. + + * spew.c (yylex): Decrement looking_for_typename after we see a + _DEFN. + + * decl.c (pushdecl): Don't install an artificial TYPE_DECL in + IDENTIFIER_LOCAL_VALUE if we already have a decl with that name. + + * typeck.c (convert_for_assignment): Converting pointers to bool + does not need a cast. + +Sun Jan 8 18:16:45 1995 Jason Merrill + + * class.c (instantiate_type): Initialize nsubsts parm. + + * pt.c (do_function_instantiation): Likewise. + +Sat Jan 7 14:37:05 1995 Jason Merrill + + * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE && + DECL_SAVED_INSNS to determine whether or not we've seen a definition + of this function. + (instantiate_template): Likewise. + + * call.c (convert_harshness): Allow const reference binding when + called from the overloading code, but not when called from + can_convert (since it isn't a conversion). + (convert_harshness): Put back some disabled code. + +Fri Jan 6 14:10:57 1995 Jason Merrill + + * call.c (convert_harshness): There is no implicit conversion from + void* to other pointer types (unless the parameter is (void*)0). + (convert_harshness): Non-lvalues do not convert to reference types. + + * class.c (finish_struct_methods): Still set + TYPE_HAS_{INT,REAL}_CONVERSION. + + * call.c (can_convert): Don't use aggregate initialization. + + * cp-tree.h: Declare lookup_conversions. + +Thu Jan 5 21:08:00 1995 Mike Stump + + * parse.y (simple_stmt): Fix duplicate case value error messages to + be more readable. + +Wed Jan 4 16:44:19 1995 Jason Merrill + + * cvt.c (build_type_conversion): Total rewrite to use + convert_harshness instead of reproducing conversion logic here. Now + much shorter. + + * call.c (convert_harshness): Support conversions to bool. + (can_convert): Checks whether a conversion is less harsh + than USER_CODE, for build_type_conversion. + + * search.c (add_conversions): Function for passing to dfs_walk which + adds all the type conversion operators in the current type to a list. + (lookup_conversions): Calls dfs_walk with add_conversions and return + the list. + (dfs_walk): Don't require a qfn. + + * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery. + (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC. + + * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery. + (grow_method): A separate function for building onto the growing + method vector. + (finish_struct_methods): Use it. Put all type conversion operators + right after the constructors. Perhaps we should sort the methods + alphabetically? + +Mon Jan 2 14:42:58 1995 Jason Merrill + + * call.c (build_method_call): Lose another misleading shortcut. + diff --git a/gcc/cp/ChangeLog-1996 b/gcc/cp/ChangeLog-1996 new file mode 100644 index 0000000..348378b --- /dev/null +++ b/gcc/cp/ChangeLog-1996 @@ -0,0 +1,4047 @@ +Tue Dec 31 20:25:50 1996 Mike Stump + + * search.c (expand_upcast_fixups): Fix bogus code generation + problem where the generated code uses the wrong index into the + runtime built vtable on the stack. Old code could clobber random + stack values. + +Tue Dec 31 15:16:56 1996 Mike Stump + + * init.c (perform_member_init): Make sure the partial EH cleanups + live on the function_obstack. + +Fri Dec 27 10:31:40 1996 Paul Eggert + + * Make-lang.in (g++spec.o): Don't use $< with an explicit target; + this isn't portable to some versions of `make' (e.g. Solaris 2.5.1). + +Tue Dec 24 10:24:03 1996 Jeffrey A Law + + * decl.c (grokvardecl): Avoid ANSI style initialization. + +Sun Dec 22 04:22:06 1996 Jason Merrill + + * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE. + +Fri Dec 20 17:09:25 1996 Jason Merrill + + * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties. + +Fri Dec 20 12:17:12 1996 Brendan Kehoe + + * g++spec.c (lang_specific_driver): Put missing hyphen in front of + arguments we compare against. Start the count of I at 1, not 0, + since argv[0] is still the command. + +Thu Dec 19 11:53:57 1996 Stan Shebs + + * lang-specs.h: Accept .cp as an C++ extension. + +Mon Dec 16 22:43:31 1996 Brendan Kehoe + + * cp-tree.h (ptr_reasonably_similar): Add decl. + +Thu Dec 12 15:00:35 1996 Brendan Kehoe + + * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN + pointer. New local SPECBITS with the parm's value. + (grokdeclarator): Pass &specbits down. + + * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node + before we try to do C_SET_EXP_ORIGINAL_CODE on it. + + * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of + CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM. + + * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is + not an error_mark_node. + +Sat Dec 7 17:20:22 1996 Jason Merrill + + * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL. + * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate. + +Fri Dec 6 14:40:09 1996 Jason Merrill + + * decl.c (grokdeclarator): When giving an anonymous struct a name, + replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is + not affected). + + * typeck2.c (build_m_component_ref): If component is a pointer + to data member, resolve the OFFSET_REF now. + + * call.c (convert_like): Don't go into infinite recursion. + + * pt.c (coerce_template_parms): Use tsubst_expr for non-type args. + + * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr. + * tree.c (layout_basetypes): And on the vbase ptr. + +Thu Dec 5 02:11:28 1996 Jason Merrill + + * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or + CHAR_TYPE_SIZE so bool is always the same size as another type. + + * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too. + +Tue Dec 3 23:18:37 1996 Jason Merrill + + * decl2.c (grok_x_components): Remove synthesized methods from + TYPE_METHODS of an anonymous union, complain about member + functions. + * decl.c (shadow_tag): Wipe out memory of synthesized methods in + anonymous unions. + (finish_function): Just clear the DECL_RTL of our arguments. + +Fri Nov 29 21:54:17 1996 Jason Merrill + + * decl2.c (finish_file): Emit DWARF debugging info for static data + members. + + * pt.c (tsubst): If t is a stub decl, return the stub decl for type. + +Wed Nov 27 14:47:15 1996 Bob Manson + + * typeck.c (build_component_ref): Don't die if COMPONENT isn't a + IDENTIFIER_NODE. + +Wed Nov 27 16:05:19 1996 Michael Meissner + + * Make-lang.in (g++-cross$(exeext)): Fix typo. + +Wed Nov 27 08:14:00 1996 Brendan Kehoe + + Make the g++ driver now be a standalone program, rather than one + that tries to run the gcc driver after munging up the options. + * Make-lang.in (g++.c, g++spec.o): New rules. + (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER + added. + (g++$(exeext)): New rule, based on xgcc rule. + (g++-cross$(exeext)): Now just copies g++$(exeext) over. + * g++spec.c: New file. + * g++.c: Removed file. + +Tue Nov 26 19:01:09 1996 Mike Stump + + * cvt.c (build_up_reference): Arrange for any temporary values + that have been keep in registers until now to be put into memory. + +Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi + + * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so + that make -j3 bootstrap works better. + +Sun Nov 24 02:09:39 1996 Jason Merrill + + * decl.c (pushtag): Do pushdecl for anon tags. + +Thu Nov 21 16:30:24 1996 Jason Merrill + + * typeck.c (c_expand_return): Fix logic. + (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR. + +Wed Nov 20 18:47:31 1996 Bob Manson + + * g++.c (main): Make sure arglist has a final NULL entry. Add + PEXECUTE_LAST to the flags passed to pexecute, as otherwise + stdin/stdout of the invoked program are redirected to + nowheresville. + +Tue Nov 19 16:12:44 1996 Jason Merrill + + * decl.c (implicitly_declare): Set DECL_ARTIFICIAL. + +Tue Nov 19 15:48:19 1996 Mike Stump + + * init.c (resolve_offset_ref): Handle obj.vfn better. + * typeck.c (build_component_ref): Set TREE_TYPE on result from + build_vfn_ref. + +Tue Nov 19 13:14:33 1996 Mike Stump + + * typeck.c (convert_for_assignment): Also handle anachronistic + implicit conversions from (::*)() to cv void*. + * cvt.c (cp_convert_to_pointer): Likewise. + +Mon Nov 18 17:05:26 1996 Jason Merrill + + * lex.c (handle_cp_pragma): Fix bogus warning. + +Mon Nov 18 16:10:43 1996 Mike Stump + + * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE + (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P. + +Thu Nov 14 23:18:17 1996 Jason Merrill + + * class.c (finish_struct_1): Support DWARF2_DEBUG. + * search.c (dfs_debug_mark): Likewise. + * decl2.c (finish_vtable_vardecl): Likewise. + * decl.c (pushtag, finish_enum): Likewise. + * lex.c (check_newline): Use debug_* instead of calling *out + functions directly. + +Thu Nov 14 15:21:46 1996 Brendan Kehoe + + * Make-lang.in (cplib2.ready): Add else clause to avoid problems + on some picky hosts. + +Wed Nov 13 12:32:07 1996 Jason Merrill + + * class.c (finish_struct_1): A class has a non-trivial copy + constructor if it has virtual functions. + + * cvt.c (cp_convert): Always call a constructor. + + * call.c (reference_binding): Still tack on a REF_BIND + for bad conversions. + (build_user_type_conversion_1): Propagate ICS_BAD_FLAG. + + * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING. + (c_expand_return): Likewise. + * typeck2.c (digest_init): Likewise for { }. + * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling. + * cvt.c (cp_convert): Handle failure better. + +Wed Nov 13 11:51:20 1996 Brendan Kehoe + + * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation + of GCC be path-relative. + +Wed Nov 13 11:27:16 1996 Michael Meissner + + * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but + it does need choose-temp.o and pexecute.o. + +Wed Nov 13 07:53:38 1996 Brendan Kehoe + + * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time + that we still use it. + (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros. + +Wed Nov 13 02:00:26 1996 Jason Merrill + + * init.c (expand_default_init): Avoid calling constructors to + initialize reference temps. + + * cvt.c (convert_to_reference): Fix. + +Tue Nov 12 19:10:07 1996 Jason Merrill + + * cvt.c (cp_convert): Simplify for flag_ansi_overloading. + (convert_to_reference): Likewise. + * typeck.c (convert_for_initialization): Likewise. + * init.c (expand_default_init): Likewise. + (expand_aggr_init_1): Likewise. + * cp-tree.h (CONV_NONCONVERTING): Lose. + * typeck.c (build_c_cast): Lose allow_nonconverting parm. + * *.c: Adjust. + * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING. + +Tue Nov 12 16:29:04 1996 Brendan Kehoe + + * pt.c (tsubst_expr): Reverse args to expand_start_catch_block. + +Tue Nov 12 15:26:17 1996 Jason Merrill + + * init.c (expand_aggr_init_1): Don't crash on non-constructor + TARGET_EXPR. + +Tue Nov 12 14:00:50 1996 Brendan Kehoe + + * g++.c: Include gansidecl.h. + (VPROTO, PVPROTO, VA_START): Delete. + (choose_temp_base_try, choose_temp_base, perror_exec, + run_dos) [__MSDOS__]: Delete fns. + (pfatal_with_name): Delete fn. + (temp_filename): Declare like in gcc.c. + (pexecute, pwait, choose_temp_base): Declare from gcc.c. + (error_count, signal_count): Define. + (error): Delete both definitions. + (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c. + (pfatal_pexecute): Add fn from gcc.c. + (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the + code to use the pexecute stuff also used by gcc.c. + (MIN_FATAL_STATUS): Define. + * Make-lang.in (g++): Add dependency on and linking with + choose-temp.o and pexecute.o. + + * cp-tree.h: Include gansidecl.h. + (STDIO_PROTO): Delete #undef/#define. + * cvt.c (NULL): Delete #undef/#define. + * expr.c (NULL): Likewise. + * init.c (NULL): Likewise. + * rtti.c (NULL): Likewise. + * xref.c (NULL): Likewise. + + * cp-tree.h (build_user_type_conversion): Add prototype. + * call.c (build_user_type_conversion): Delete prototype. Correct + decl of FLAGS arg to be an int. + * cvt.c (build_user_type_conversion): Likewise. + +Tue Nov 12 12:16:20 1996 Jason Merrill + + * cp-tree.def: Add TRY_BLOCK and HANDLER. + * except.c (expand_start_catch_block): Support templates. + * parse.y (try_block, handler_seq): Likewise. + * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER. + +Mon Nov 11 13:57:31 1996 Jason Merrill + + * pt.c (current_template_args): New fn. + (push_template_decl): Use it. + * decl.c (grokdeclarator): Use it. + + * decl2.c (build_expr_from_tree): Dereference ref vars. + + * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in + the decl-specifier-seq. + + * decl.c (grok_op_properties): Don't force the type of a conversion + op to be complete. Don't warn about converting to the same type + for template instantiations. + + * decl2.c (finish_file): Don't call instantiate_decl on synthesized + methods. + +Mon Nov 11 13:20:34 1996 Bob Manson + + * typeck.c (get_delta_difference): Remove previous bogusness. + Don't give errors if force is set. + +Fri Nov 8 17:38:44 1996 Jason Merrill + + * decl2.c (finish_file): Don't emit debug info. + * decl.c (pushdecl): Lose obsolete code. + (grokdeclarator): Still do the long long thing after complaining. + * search.c (note_debug_info_needed): Don't do anything if we're in a + template. + * method.c (synthesize_method): For non-local classes, + push_to_top_level first. + +Fri Nov 8 11:52:28 1996 Bob Manson + + * typeck.c (get_delta_difference): Add no_error parameter. + (build_ptrmemfunc): Call get_delta_difference with no_error set; + we don't want error messages when converting unrelated + pointer-to-member functions. + +Thu Nov 7 11:16:24 1996 Mike Stump + + * error.c (dump_expr): Improve the wording on error messages that + involve pointer to member functions. + +Tue Nov 5 17:12:05 1996 Mike Stump + + * cvt.c (cp_convert_to_pointer): Move code for conversions from + (::*)() to void* or (*)() up a bit, so that we can convert from + METHOD_TYPEs as well. + +Tue Nov 5 14:54:17 1996 Jason Merrill + + * rtti.c (get_tinfo_fn): Make sure 'type' is permanent. + There are no 'member' types. + (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn. + (build_x_typeid): Handle errors. + +Mon Nov 4 17:43:12 1996 Mike Stump + + * typeck.c (convert_for_assignment): Handle anachronistic implicit + conversions from (::*)() to void* or (*)(). + * cvt.c (cp_convert_to_pointer): Likewise. + (cp_convert_to_pointer_force): Remove cp_convert_to_pointer + conversions from here. + * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions. + * lang-options.h: Likewise. + * decl2.c (warn_pmf2ptr): Define. + * cp-tree.h: Declare it. + * typeck2.c (digest_init): Allow pmfs down into + convert_for_initialization. + +Sun Nov 3 09:43:00 1996 Jason Merrill + + * typeck.c (c_expand_return): Fix for returning overloaded fn. + +Fri Nov 1 08:53:17 1996 Jason Merrill + + * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND. + * decl.c (grok_reference_init): Pass DIRECT_BIND. + * cvt.c (build_up_reference): Don't mark 'this' addressable. Use + DIRECT_BIND. + * call.c (convert_like): Don't pass INDIRECT_BIND. + * typeck.c (convert_arguments): Likewise. + * typeck.c (mark_addressable): Allow &this if flag_this_is_variable. + +Thu Oct 31 17:08:49 1996 Jason Merrill + + * typeck.c (mark_addressable): Support TARGET_EXPR, unify with + similar code in build_up_ref. + * cvt.c (build_up_reference): Drastically simplify. + +Mon Oct 28 12:45:05 1996 Jeffrey A Law + + * typeck.c (signed_or_unsigned_type): If the given type already + as the correct signedness, then just return it. + + * typeck.c ({un,}signed_type): If can't do anything, call + signed_or_unsigned_type. + +Thu Oct 24 14:21:59 1996 Bob Manson + + * decl2.c (copy_assignment_arg_p): Don't buy the farm if + current_class_type is NULL. + +Wed Oct 23 00:43:10 1996 Jason Merrill + + * class.c (finish_struct_1): Avoid empty structs by adding a field + so layout_type gets the mode right. + + * typeck.c (c_expand_return): Drastically simplify. + +Mon Oct 21 22:34:02 1996 Jason Merrill + + * typeck.c (decay_conversion): Handle overloaded methods. + +Fri Oct 18 16:03:48 1996 Jason Merrill + + * call.c (build_over_call): A TARGET_EXPR has side-effects. + +Thu Oct 17 11:31:59 1996 Mike Stump + + * cvt.c (convert_to_pointer_force): Add code to support pointer to + member function to pointer to function conversions. + * init.c (resolve_offset_ref): Add code to allow faked up objects, + ignoring them if they are not used, and giving an error, if they + are needed. + * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve + code, and so that we can give an error, if we needed an object, + and one was not provided. + (build_c_cast): Don't call default_conversion when we want to + convert to pointer to function from a METHOD_TYPE. + +Mon Oct 14 00:28:51 1996 Jason Merrill + + * Make-lang.in (cplib2.ready): Fix logic. + + * decl.c (shadow_tag): Only complain about non-artificial function + members. + + * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS. + +Fri Oct 11 16:12:40 1996 Jason Merrill + + * expr.c (cplus_expand_expr): Pre-tweak call_target like + expand_inline_function would. + + * pt.c (mark_decl_instantiated): If extern_p, call + mark_inline_for_output. + +Thu Oct 10 15:58:08 1996 Mike Stump + + * typeck.c (unary_complex_lvalue): Add code to handle intermediate + pmd conversions. + + * typeck.c (get_delta_difference): Fix wording, as we can be used + for pointer to data members. + +Tue Oct 8 12:43:51 1996 Bob Manson + + * pt.c (tsubst): If the function decl isn't a member of this + template, return a copy of the decl (including copying the + lang-specific part) so we don't hose ourselves later. + +Thu Oct 3 16:24:28 1996 Jason Merrill + + * class.c (finish_struct): Remove DWARF-specific tag handling. + * decl.c (pushtag): Likewise. + (finish_function): Always clear DECL_ARGUMENTS on function decls with + no saved RTX. + * decl2.c (finish_file): Emit DWARF debugging info for static data + members. + +Wed Oct 2 21:58:01 1996 Bob Manson + + * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC + isn't the same as the new one before we whack it. + +Mon Sep 30 13:38:24 1996 Jason Merrill + + * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h, + lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove + warn_traditional and warn_strict_prototypes; remove ancient + 'overload' code; remove references to flag_traditional. + +Mon Sep 30 12:58:40 1996 Mike Stump + + * input.c (sub_getch): Handle 8-bit characters in string literals. + +Sun Sep 29 03:12:01 1996 Jason Merrill + + * tree.c (mapcar): Handle CONSTRUCTORs. + (copy_to_permanent): Handle expression_obstack properly. + + * Make-lang.in (cplib2.txt): Also depend on the headers. + + * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE == + INT_TYPE_SIZE. + (expand_class_desc): Use USItype for offset field. + * tinfo.h (struct __class_type_info): Likewise. + + * method.c (build_overload_int): TYPE_PRECISION should be applied + to types. + +Sat Sep 28 14:44:50 1996 Jason Merrill + + * call.c (build_new_op): A COND_EXPR involving void must be a + builtin. + +Fri Sep 27 16:40:30 1996 Jason Merrill + + * typeck.c (build_x_component_ref): New fn. + (build_object_ref): Use it. + * parse.y (primary): Use it. + * decl2.c (build_expr_from_tree): Use it. + * cp-tree.h: Declare it. + + * decl.c (start_decl): Variable-sized arrays cannot be initialized. + * error.c (dump_type_suffix): Handle variable arrays. + +Fri Sep 27 13:14:05 1996 Brendan Kehoe + + * Make-lang.in (exception.o): Put back compiling it with -fPIC. + +Fri Sep 27 03:00:09 1996 Jason Merrill + + * decl.c (lookup_name_real): Don't try to look up anything in a + TYPENAME_TYPE. + + * tinfo2.cc (__throw_type_match_rtti): Oops. + +Thu Sep 26 22:11:05 1996 Brendan Kehoe + + * Make-lang.in (exception.o): Use -fno-PIC for now. + +Thu Sep 26 10:59:00 1996 Jason Merrill + + * rtti.c (build_dynamic_cast): Pass tinfo fns rather than + calling them. + (get_tinfo_fn_dynamic): Extracted from build_typeid. + * tinfo2.cc (__dynamic_cast): Adjust. + + * rtti.c (build_typeid): Use resolves_to_fixed_type_p. + (build_x_typeid): Likewise. + + * parse.y: Call build_x_typeid instead of build_typeid. + * cp-tree.def: Add TYPEID_EXPR. + * pt.c (tsubst_copy): Handle typeid. + * decl2.c (build_expr_from_tree): Likewise. + * rtti.c (build_x_typeid): Throw bad_typeid from here. + (build_typeid): Not here. + * cp-tree.h: Declare build_x_typeid. + +Wed Sep 25 17:26:16 1996 Jason Merrill + + * call.c (convert_like): Pull out constant values. + + * tree.c (mapcar): Use build_cplus_array_type, not build_array_type. + +Wed Sep 25 17:28:53 1996 Michael Meissner + + * decl.c (init_decl_processing): Create short int types before + creating size_t in case a machine description needs to use + unsigned short for size_t. + +Tue Sep 24 18:18:44 1996 Jason Merrill + + * Make-lang.in (exception.o): Turn off pic. + + * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same + type, multi-level ptr conversions. + + * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast. + (throw_bad_cast): Use it. + (throw_bad_typeid): New fn. + (build_typeid): Throw bad_typeid as needed. + Use build_call. + (synthesize_tinfo_fn): Handle functions and arrays before checking + for cv-quals. + + * Remove .h from standard C++ headers, add new.h, move into inc + subdirectory. + + * exception*: Remove pointer from object, constructors. Add + default exception::what that uses type_info::name. Add + __throw_bad_typeid. + + * init.c (build_new): Don't add a cookie to new (void *) T[2]. + +Mon Sep 23 15:21:53 1996 Jason Merrill + + * Make-lang.in: Building C++ code depends on cc1plus. + +Mon Sep 23 12:38:40 1996 Brendan Kehoe + + * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as + a HOST_WIDE_INT, not a tree. + +Mon Sep 23 12:36:02 1996 Jason Merrill + + * exception.cc: Don't include . + + * Make-lang.in (c++.clean): Remove cplib2.*. + +Mon Sep 23 09:42:19 1996 Doug Evans + + * parse.y (component_decl_1, component_costructor_declarator case): + Pass attributes/prefix_attributes in tree list. + +Mon Sep 23 01:18:50 1996 Jason Merrill + + * tinfo{,2}.cc: #include instead of . + +Sun Sep 22 05:31:22 1996 Jason Merrill + + * lex.c (do_identifier): Don't do deferred lookup in a template + header. + + * typeck2.c (store_init_value): Oops. + + * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}: + New files for C++ lang-support library. + * Make-lang.in (CXX_EXTRA_HEADERS): Define. + (CXX_LIB2FUNCS): Define. + And rules for building the C++ lang-support code. + * config-lang.in (headers): Define. + (lib2funcs): Define. + +Sat Sep 21 19:17:28 1996 Jason Merrill + + * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call + digest_init. + * pt.c (tsubst_copy): Compute type for CONSTRUCTOR. + * typeck2.c (store_init_value): Check for initializing pmf with { } + here. + (process_init_constructor): Not here. + +Thu Sep 19 16:41:07 1996 Jason Merrill + + * pt.c (begin_template_parm_list): Increment + processing_template_decl here. + (end_template_parm_list): Not here. + (process_template_parm): No need to add 1 to it now. + * *.c: Use processing_template_decl instead of current_template_parms + to check for being in a template. + + * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR. + (tsubst_copy): Handle CONSTRUCTOR. + (instantiate_decl): Set up context properly for variables. + * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR. + * class.c (finish_struct): Reverse CLASSTYPE_TAGS. + +Wed Sep 18 13:30:20 1996 Brendan Kehoe + + * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back. + +Wed Sep 18 04:24:07 1996 Jason Merrill + + * method.c (make_thunk): Call comdat_linkage before setting the + TREE_CODE. + + * decl2.c (comdat_linkage): Use make_decl_one_only. + (import_export_decl): Likewise. + * decl.c (init_decl_processing): Check supports_one_only instead of + SUPPORTS_WEAK. + +Sat Sep 14 08:34:41 1996 Jason Merrill + + * decl2.c (grokfield): Tighten checking for access decls. + + * decl.c (make_typename_type): Resolve references to + current_class_type. Set CLASSTYPE_GOT_SEMICOLON. + (lookup_name_real): Types that depend on a template parameter get + an implicit 'typename' unless they're in the current scope. + (start_decl_1): We don't care about incomplete types that depend + on a template parm. + (grokdeclarator): Resolve 'typename's in the type specifier that + refer to members of the current scope. + + * call.c (build_over_call): Remove 'inline called before + definition' diagnostic. + (build_method_call): Likewise. + * decl.c (duplicate_decls): Downgrade 'used before declared + inline' to a warning, only with -Winline. + +Fri Sep 13 17:31:40 1996 Stan Shebs + + * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile. + +Wed Sep 11 22:38:13 1996 Gerald Baumgartner + + * call.c (build_method_call): When calling a signature + default implementation, as in other cases, let instance_ptr simply + be instance. + +Wed Sep 11 22:14:44 1996 Mike Stump + + * parse.y (simple_stmt): Cleanup and use do_poplevel (). + +Wed Sep 11 22:10:48 1996 Mike Stump + + * except.c (expand_start_catch_block): Add a pushlevel so that -g + works on hppa and SPARC. + +Wed Sep 11 10:18:06 1996 Brendan Kehoe + + * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node. + +Mon Sep 9 19:51:14 1996 Gerald Baumgartner + + * call.c (build_over_call): Check first whether DECL_CONTEXT exists + before testing whether it's a signature. + +Sun Sep 8 16:06:57 1996 Gerald Baumgartner + + * call.c (build_new_method_call): Don't complain about signature + pointers and references not being an aggr type. + (build_this): If a signature pointer or reference was passed in, + just return it. + (build_new_method_call): If instance is a signature pointer, set + basetype to the signature type of instance. + * sig.c (build_signature_method_call): Deleted basetype and + instance parameters, they can be found as the DECL_CONTEXT of + function and as the first argument passed in. + * cp-tree.h: Changed declaration of build_signature_method_call. + * call.c (build_method_call): Deleted first two arguments in call + of build_signature_method_call. + (build_over_call): Added call to build_signature_method_call. + +Thu Sep 5 16:51:28 1996 Jason Merrill + + * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a + target_expr. + +Thu Sep 5 10:05:38 1996 Brendan Kehoe + + * cvt.c (convert_to_reference): Use %#T, not %#D, for error. + +Wed Sep 4 17:16:09 1996 Bob Manson + + * except.c (expand_start_try_stmts): Move to except.c in the backend. + (expand_end_try_stmts): Remove. + + * init.c (perform_member_init): Use add_partial_entry () instead + of directly manipulating lists. + (emit_base_init): Likewise. + +Wed Sep 4 12:14:36 1996 Mike Stump + + * except.c (expand_exception_blocks): Always make sure USE and + CLOBBER insns that came at the end still do, the backend relies + upon this. + +Wed Sep 4 07:44:48 1996 Jason Merrill + + * call.c (build_over_call): We can only use a TARGET_EXPR of the + right type. + +Tue Sep 3 19:26:05 1996 Jason Merrill + + * cvt.c (convert_to_reference): Revert last change, don't complain + about temp without target decl. + +Tue Sep 3 10:22:56 1996 Mike Stump + + * decl.c (grokdeclarator): Don't core dump when void() is given. + +Tue Sep 3 02:38:56 1996 Jason Merrill + + * decl.c (copy_args_p): Don't crash. + +Fri Aug 30 14:26:57 1996 Mike Stump + + * pt.c (tsubst): And support template args inside the exception + specification. + + * pt.c (tsubst): Add support for exception specifications in + template functions. + +Fri Aug 30 10:01:55 1996 Mike Stump + + * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3 + fields now. + * cp-tree.h (start_decl): Eliminate the throw spec parameter. + (start_function): Likewise. + (start_method): Likewise. + (grokfield): Likewise. + (make_call_declarator): Add throw spec parameter. + (set_quals_and_spec): Add routine. + * lex.c (set_quals_and_spec): Likewise. + * decl.h (grokdeclarator): Eliminate the throw spec parameter. + * decl.c (shadow_tag): Eliminate the throw spec parameter to + grokdeclarator. + (groktypename): Likewise. + (start_decl): Eliminate the throw spec parameter. Eliminate the + throw spec parameter to grokdeclarator. Eliminate the throw spec + field in DECL_STMT. + (cp_finish_decl): Eliminate the throw spec field in DECL_STMT. + (grokfndecl): Remove useless set of raises. + (grokdeclarator): Eliminate the throw spec parameter. Eliminate + the throw spec parameter to start_decl. Pull the throw spec out + of the call declarator. + (grokparms): Eliminate the throw spec parameter to grokdeclarator. + (start_function): Eliminate the throw spec parameter. Eliminate + the throw spec parameter to grokdeclarator. + (start_method): Likewise. + * decl2.c (grokfield): Likewise. + (grokbitfield): Eliminate the throw spec parameter to grokdeclarator. + (grokoptypename): Likewise. + (finish_file): Eliminate the throw spec parameter to + start_function. Add throw spec to make_call_declarator. + * except.c (init_exception_processing): Add throw spec to + make_call_declarator. Eliminate the throw spec parameter to + start_decl. + (expand_start_catch_block): Eliminate the throw spec parameter to + grokdeclarator. + (expand_builtin_throw): Add throw spec to make_call_declarator. + Eliminate the throw spec parameter to start_function. + (start_anon_func): Likewise. + * lex.c (make_call_declarator): Add throw spec parameter. + (set_quals_and_spec): New routine. + (cons_up_default_function): Add throw spec to make_call_declarator. + Eliminate the throw spec parameter to grokfield. + * method.c (synthesize_method): Eliminate the throw spec parameter + to start_function. + * pt.c (process_template_parm): Eliminate the throw spec parameter + to grokdeclarator. + (tsubst): Add throw spec to make_call_declarator. + (tsubst_expr): Eliminate the throw spec parameter to start_decl. + (do_function_instantiation): Eliminate the throw spec parameter to + grokdeclarator. Eliminate the throw spec parameter to + start_function. + * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter + to start_function. + * parse.y (datadef): Remove non-winning optimization. + (decl): Likewise. + (fndef): Remove ambiguous error productions uncovered by grammar + fixing. + (constructor_declarator): Add exception_specification_opt here. + (component_constructor_declarator): Likewise. + (direct_after_type_declarator): Likewise. + (complex_direct_notype_declarator): Likewise. + (direct_abstract_declarator): Likewise. + (fn.def1): Remove exception_specification_opt. + (fn.def2): Likewise. + (condition): Likewise. + (initdcl0): Likewise. + (initdcl): Likewise. + (notype_initdcl0): Likewise. + (nomods_initdcl0): Likewise. + (component_decl_1): Likewise. + (component_declarator): Likewise. + (after_type_component_declarator0): Likewise. + (after_type_component_declarator): Likewise. + (notype_component_declarator): Likewise. + +Wed Aug 28 01:40:30 1996 Jason Merrill + + * call.c (build_over_call): Also use an INIT_EXPR when + initializing anything from an rvalue. + + * call.c (build_over_call): Call stabilize_reference when building + an INIT_EXPR instead of calling the copy ctor. + + * call.c (joust): Extend the previous change to all comparisons. + + * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and + NO_LINKAGE_HEURISTICS. + + * decl2.c (finish_file): Emit any statics that weren't already. + + * typeck.c (build_static_cast): Implement. + * tree.c (build_cplus_new): Handle getting a TARGET_EXPR. + * decl.c (grokparms): Use can_convert_arg instead of + implicit_conversion directly. + (copy_args_p): New fn. + * cvt.c (convert_to_reference): Don't complain about temp with + static_cast. + (build_up_reference): Handle TARGET_EXPRs. + * call.c (build_over_call): Elide unnecessary temps. + (can_convert*): Use new overloading code. + +Tue Aug 27 13:12:21 1996 Jason Merrill + + * call.c: Move TYPE_PTR*_MACROS ... + * cp-tree.h: To here. + * typeck.c (build_reinterpret_cast): Implement. + + * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of + ptr_complete_ob. + (joust): If we're comparing a function to a builtin and the worst + conversion for the builtin is worse than the worst conversion for the + function, take the function. + + * typeck.c (build_const_cast): Implement. + (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast. + (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast. + +Tue Aug 27 13:14:58 1996 Bob Manson + + * rtti.c (build_dynamic_cast): Don't try to dereference exprtype + too early. Make sure we explode if exprtype turns out to be a + NULL_TREE when it shouldn't be. + +Tue Aug 27 10:56:21 1996 Mike Stump + + * cp-tree.h: New routine make_call_declarator. + * lex.c (make_call_declarator): Define it. + * except.c (init_exception_processing): Use it. + (expand_builtin_throw): Likewise. + (start_anon_func): Likewise. + * decl2.c (finish_file): Likewise. + * lex.c (cons_up_default_function): Likewise. + * parse.y: Likewise. + * pt.c (tsubst): Likewise. + +Mon Aug 26 17:40:03 1996 Mike Stump + + * decl2.c (groktypefield): Remove unused code. + +Mon Aug 26 17:00:33 1996 Mike Stump + + * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER. + * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier. + Change type_quals into cv_qualifiers. Change nonempty_type_quals into + nonempty_cv_qualifiers. + * hash.h: Rebuild. + + * lex.c (make_pointer_declarator): Change type_quals into + cv_qualifiers. + (make_reference_declarator): Likewise. + +Thu Aug 22 01:09:22 1996 Jason Merrill + + * decl.c (start_function): Only check interface_* for templates + with flag_alt_external_templates. + + * call.c (build_new_op): Check for comparison of different enum types. + (build_over_call): Fix arg # output. + + * typeck.c (build_component_ref): Handle pre-found TYPE_DECL. + +Wed Aug 21 00:13:15 1996 Jason Merrill + + * call.c (build_new_op): Check for erroneous args. + + * call.c (build_new_method_call): Add missing args to cp_error. + + * tree.c (error_type): Don't print reference-to-array. + + * typeck.c (convert_for_assignment): Don't say contravariance for + removing const. + +Tue Aug 20 13:23:00 1996 Jason Merrill + + * call.c (build_over_call): Diagnose bad convs for `this'. + + * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL + on _ctor_arg. + + * call.c (convert_like): Handle bad convs. + (build_over_call): Handle bad convs better. + + * decl2.c: -fansi-overloading is now the default. + + * call.c (build_new_method_call): Check for erroneous args. + + * pt.c (instantiate_class_template): Propagate + TYPE_USES_MULTIPLE_INHERITANCE. + +Tue Aug 20 13:09:57 1996 Mike Stump + + * call.c (enforce_access): Add static to routine. + +Sun Aug 18 14:35:54 1996 Jason Merrill + + * call.c (build_user_type_conversion_1): Fix bad handling. + (compare_ics): Likewise. + +Sat Aug 17 21:54:11 1996 Jason Merrill + + * call.c (standard_conversion): Oops. + +Sat Aug 17 16:28:11 1996 Geoffrey Noer + + * g++.c: Update test for win32 (&& ! cygwin32). + +Sat Aug 17 03:45:31 1996 Jason Merrill + + * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly. + (ptr_reasonably_similar): New fn. + * call.c (BAD_RANK): New rank. + (ICS_BAD_FLAG): New macro. + (standard_conversion): Handle almost-right pointer conversions. + (reference_binding): Handle bad rvalue bindings. + (add_*_candidate): Stuff. + (build_over_call): Pass bad conversions to convert_for_initialization. + (compare_ics): Handle bad convs. + (joust): Likewise. + +Fri Aug 16 15:02:19 1996 Bob Manson + + * init.c (expand_vec_init): Use ptrdiff_type_node instead of + integer_type_node when computing pointer offsets. + +Fri Aug 16 01:28:32 1996 Jason Merrill + + * tree.c (lvalue_type): New fn. + (error_type): New fn. + * call.c (op_error): Use error_type. + (add_conv_candidate): Use lvalue_type. + (add_builtin_candidates): Likewise. + * error.c (args_as_string): Use error_type. + +Thu Aug 15 17:27:13 1996 Jason Merrill + + * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here. + (tsubst): Not here. + + * decl.c (init_decl_processing): With -ansi, __null's type is the + signed integral type with the same number of bits as a pointer. + Introduce a new variable null_node for it. + * cp-tree.h: Adjust. + * call.c (null_ptr_cst_p): Adjust. + +Thu Aug 15 17:09:54 1996 Mike Stump + + * except.c (do_unwind): Mark %i7 as used on the SPARC so we can + optimize. + +Thu Aug 15 01:36:49 1996 Jason Merrill + + * decl2.c (import_export_decl): Ignore #pragma interface for tinfo + fns of classes without virtual functions. + + * call.c (add_function_candidate): Handle `this' specially. + (compare_ics): Likewise. + +Tue Aug 13 12:16:10 1996 Jason Merrill + + * typeck.c (build_conditional_expr): Fix handling of __null. + + * decl2.c (comdat_linkage): New fn. + (import_export_vtable): Use it. + (import_export_decl): Use it. + * method.c (make_thunk): Use it. + +Mon Aug 12 00:09:18 1996 Jason Merrill + + * pt.c (end_template_decl): If we don't actually have parms, return. + * parse.y (template_header): Accept 'template <>'. + + * errfn.c: Allow 5 args. + +Sun Aug 11 15:20:58 1996 Jason Merrill + + * tree.c (make_temp_vec): New fn. + * pt.c (push_template_decl): Handle partial specs. + (instantiate_class_template): Likewise. + (more_specialized): Use get_bindings. + (more_specialized_class): New fn. + (get_class_bindings): New fn. + (most_specialized_class): New fn. + (do_function_instantiation): List candidates for ambiguous case. + * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS. + (shadow_tag): Call push_template_decl for partial specializations. + * parse.y: Likewise. + * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces + DECL_TEMPLATE_MEMBERS. + * call.c (print_z_candidates): Reduce duplication. + +Fri Aug 9 14:36:08 1996 Jason Merrill + + * decl2.c (lang_decode_option): Allow -fansi-overloading. + +Thu Aug 8 17:04:18 1996 Jason Merrill + + * pt.c (get_bindings): New fn. + (most_specialized): Likewise. + (do_function_instantiation): Use them. + (add_maybe_template): New fn. + * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro. + * call.c (build_new_op): Handle guiding decls. + (build_new_function_call): Likewise. + * decl2.c (finish_file): Likewise. + + * decl2.c (mark_used): Do synthesis here. + * call.c (build_method_call): Not here. + (build_over_call): Or here. + * typeck.c (build_function_call_real): Or here. + * tree.c (bot_manip): Call mark_used on functions used in default + args. + +Thu Aug 8 17:48:16 1996 Michael Meissner + + * decl2.c (import_export_vtable): Delete code that disabled vtable + heuristic on systems with ASM_OUTPUT_EXTERNAL. + +Wed Aug 7 12:44:11 1996 Jason Merrill + + * typeck.c (build_x_function_call): Handle static call context + better. + + * decl.c (finish_function): Set the DECL_CONTEXT of the result to + the function, not its outer block. + + * call.c (build_field_call): Pass fields on to build_opfncall + regardless of TYPE_OVERLOADS_CALL_EXPR. + (build_method_call): Pass on to build_new_method_call sooner. + + * typeck.c (build_ptrmemfunc): Just return what instantiate_type + gives us. + * class.c (instantiate_type): Don't put a POINTER_TYPE to + METHOD_TYPE on an expression. Also make a copy of rhs instead of + modifying it. + +Tue Aug 6 12:58:46 1996 Jason Merrill + + * call.c (compare_ics): Handle qual_conv after lvalue_conv. + (add_builtin_candidate): Don't take enums for ++. + (build_new_method_call): Handle non-aggregates and field calls. + Move new overloading code from... + * cvt.c: Here. + + * decl.c (grokparms): Don't check default args in templates. + +Mon Aug 5 17:17:06 1996 Jason Merrill + + * cvt.c (build_new_op): Fix args to build_unary_op. + (add_builtin_candidates): Don't call type_promotes_to on float. + + * decl.c (grokparms): Check the type of the default arg. + + * cvt.c (build_new_op): Pass non-overloaded cases on rather than + returning NULL_TREE. + + * typeck.c (build_x_binary_op): Avoid doing extra work. + (build_x_unary_op): Likewise. + (build_x_conditional_expr): Likewise. + * cvt.c (build_over_call): Return. + (add_builtin_candidate): Fix MEMBER_REF. + (build_new_op): Likewise. + +Mon Aug 5 17:07:47 1996 Mike Stump + + * method.c (build_overload_name): Put bug fix into code but leave + disabled for now so we can be bug compatible with older releases + that do repeats incorrectly. In the future, we can enable it. + +Mon Aug 5 13:46:28 1996 Jason Merrill + + * cvt.c (convert_like): Don't call build_cplus_new twice. + + * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c: + Control new overloading code with -fansi-overloading. + +Sun Aug 4 15:29:11 1996 Jason Merrill + + * cvt.c (build_over_call): Call build_cplus_new. + * call.c (build_method_call): Likewise. + * typeck.c (build_function_call_real): Likewise. + (build_conditional_expr): If both operands are TARGET_EXPRs, wrap + the COND_EXPR in a TARGET_EXPR so they use the same slot. + + * cvt.c (build_up_reference): Propagate INDIRECT_BIND to + recursive calls. + * typeck.c (complete_type): Propagate + TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}. + +Sat Aug 3 14:05:07 1996 Jason Merrill + + * cvt.c (joust): More ?: kludging. Sigh. + (build_over_call): Don't try to synthesize global fns. + + * search.c (lookup_conversions): Use binfo marking. + +Sat Aug 3 12:33:42 1996 Bob Manson + + * search.c (build_mi_matrix): Use the correct value of cid + when determining the new mi_size. + +Sat Aug 3 01:27:41 1996 Jason Merrill + + * cvt.c (add_builtin_candidates): Do consider type conversion ops + for the first parms of += et al. + (strip_top_quals): New fn. + (reference_binding): Use it instead of TYPE_MAIN_VARIANT. + (implicit_conversion): Likewise. + (add_builtin_candidates): Be careful about arrays. + (build_new_method_call): Handle vtable optimization. + +Fri Aug 2 01:26:59 1996 Jason Merrill + + * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag. + * cvt.c (reference_binding): Use it. + (implicit_conversion): Use it. + (add_builtin_candidate, COND_EXPR): Use it. + + * cvt.c (build_new_function_call): Check for error args. + + * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY. + + * gxx.gperf: Add __null. + * hash.h: Regenerate. + * lex.h: Add RID_NULL. + * lex.c (init_lex): Create null_pointer_node here, stick it in + RID_NULL. + * decl.c (init_decl_processing): Still set its type here. + * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node. + (convert_to_pointer_force): Likewise. + (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0 + if (! pedantic). + * call.c (convert_harshness): Use null_ptr_cst_p. + * typeck.c (convert_for_assignment): Likewise. Don't produce + null_pointer_node. + + * error.c (args_as_string): Handle lists of actual args, too. + * cvt.c (null_ptr_cst): Support (void*)0 for now. + (build_user_type_conversion_1): Improve diagnostics. + (build_new_function_call): Likewise. + (build_object_call): Likewise. + (build_new_method_call): Likewise. Move call before def diagnostic... + (build_over_call): Here. + + * cvt.c (build_new_method_call): Don't complain about no match if + LOOKUP_SPECULATIVELY. + (build_over_call): Fix 'this' for virtual fn. + (build_new_method_call): Add diagnostic. + +Thu Aug 1 16:45:09 1996 Jason Merrill + + * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for + constructors to be passed in. + (build_over_call): Likewise. + (build_user_type_conversion_1): Pass them in. + (convert_like): Likewise. + (build_object_call): Handle overloaded conversions. + (build_over_call): Pass the right args to build_vfn_ref. + (standard_conversion): Fix pmf convs. + (joust): Handle comparing statics and non-statics. + (build_new_method_call): New fn. + * call.c (build_method_call): Call it if NEW_OVER. + +Thu Aug 1 16:06:14 1996 Mike Stump + + * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use + %D instead. + +Thu Aug 1 15:24:02 1996 Mike Stump + + * except.c (expand_throw): Use maybe_build_cleanup_and_delete + instead of just maybe_build_cleanup so that we deallocate the + thrown object. + +Thu Aug 1 15:18:00 1996 Brendan Kehoe + + * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use. + * cp-tree.h (finish_prevtable_vardecl): Add decl. + +Thu Aug 1 11:53:51 1996 Bob Manson + + * pt.c (instantiate_class_template): Call complete_type. Also, if + we're at the end of the file and we just instantiated a template + class with a vtable, call finish_prevtable_vardecl. + + * error.c (dump_decl): Don't explode (or explode more gracefully + as appropriate) if the object being dumped has a null type. + (dump_expr): Likewise. + + * search.c (build_mi_matrix): Ensure that mi_size is large enough, + by counting the number of nodes that we'll need before allocating + the array. + (lookup_fnfields): Fix comment. + (breadth_first_search): Fix comment. + +Wed Jul 31 09:57:05 1996 Jason Merrill + + * pt.c (instantiate_class_template): Propagate TYPE_PACKED and + TYPE_ALIGN. + * class.c (finish_struct): Call cplus_decl_attributes here. + (finish_struct_1): Not here. + * cp-tree.h: Adjust. + + * pt.c (type_unification): New parameter STRICT. + (unify): If STRICT, don't allow cv addition or base deduction. + * call.c, class.c, cvt.c, cp-tree.h: Adjust. + +Tue Jul 30 13:06:13 1996 Jason Merrill + + * search.c (get_template_base{_recursive}): New fns. + * pt.c (more_specialized): New fn. + (do_function_instantiation): Use it. + (unify): Handle base deduction. + * cvt.c (joust): Use more_specialized. + Don't arbitrarily choose between non-builtin candidates. + (build_over_call): Call require_complete_type. + + * decl.c (start_function): Statics are static even in a #pragma + interface file. + + * decl2.c (import_export_vtable): Disable vtable heuristic on + systems with ASM_OUTPUT_EXTERNAL. + + * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV. + (standard_conversion): No std conv to enum type. + + * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P + for ptm's. + + * cvt.c (reference_binding): Bind directly to a base subobject of + a class rvalue. + + * cvt.c (build_new_op): Enforce access control. + +Tue Jul 30 09:22:53 1996 Bob Manson + + * typeck2.c (process_init_constructor): When scanning the + union for a named field, skip things that aren't FIELD_DECLs. + + * method.c (synthesize_method): Don't scan fndecl's rtl if + we're at the end of the file; just assume the function can't + be inlined. + +Mon Jul 29 15:48:30 1996 Jason Merrill + + * cvt.c (build_builtin_candidate): Stick a dummy conversion in if + it failed. + + * cvt.c (build_user_type_conversion_1): Handle overloaded + conversion ops. + + * cvt.c (add_builtin_candidates): Don't consider type conversion + operators for the first parameter of operator=. + +Mon Jul 29 15:33:55 1996 Bob Manson + + * typeck.c (complete_type): Only call layout_type if we're not + expanding a template. + +Mon Jul 29 14:40:38 1996 Jason Merrill + + * cvt.c (compare_ics): Oops. + + * cvt.c (op_error): Oops. + + * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV. + * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p. + (build_conv): Use them. + (implicit_conversion): Use them. + (convert_like): Handle them. + (build_new_op): Handle builtin COND_EXPR again. + (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums + in lists of types for COND_EXPR. + (add_builtin_candidate): Add enum candidates for COND_EXPR. + +Mon Jul 29 12:05:40 1996 Bob Manson + + * typeck.c (build_modify_expr): Always attempt to build a call to + the assignment operator, even if we're using a default one. + (convert_for_initialization): Call complete_type. + +Mon Jul 29 11:25:08 1996 Jason Merrill + + * cvt.c (reference_binding): A REF_BIND gets the reference type. + (implicit_conversion): Likewise. + (convert_like): Likewise. + (compare_ics): Likewise. + (compare_qual): Likewise. + (print_z_candidates): Handle no candidates. + (build_new_op): Don't handle builtin COND_EXPR for now. + +Sat Jul 27 11:27:47 1996 Stan Shebs + + * cvt.c (build_builtin_candidate): Init local var in an ANSI way. + +Fri Jul 26 01:07:22 1996 Jason Merrill + + * cvt.c (joust): If the candidates are the same, arbitrarily pick one. + + * cvt.c (build_builtin_candidate): Oops. + (build_new_op): Oops. + + * method.c (build_opfncall): Pass COND_EXPR on. + * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR. + (add_builtin_candidate{,s}): Likewise. + (add_builtin_candidates): Likewise. + (print_z_candidates, op_error, build_new_op): Likewise. + (type_decays_to): New fn. + * lex.c (init_lex): Just say ?: for COND_EXPR. + +Thu Jul 25 09:33:33 1996 Jason Merrill + + * typeck.c (complete_type): Call layout_type rather than building + a new array type. + + * cvt.c (add_builtin_candidate): Pointer arithmetic candidates + only use ptrdiff_t. + +Wed Jul 24 12:45:08 1996 Jason Merrill + + * cvt.c: Always compile the new overloading code (but don't use it). + (implicit_conversion): Add a BASE_CONV when converting to + the same class type. + (convert_like): Handle BASE_CONV. + +Tue Jul 23 12:46:30 1996 Jason Merrill + + * cvt.c (build_new_op): Support {MAX,MIN}_EXPR. + (add_builtin_candidate): Likewise. + + NEW_OVER changes: + * typeck.c (build_x_function_call): Try an operator function + whenever we call an object of class type. + * method.c (build_opfncall): Pass CALL_EXPRs through. + * cvt.c (implicit_conversion): Do const-ref case first. + (add_conv_candidate, build_object_call, op_error): New fns. + (ptr_complete_ob, TYPE_PTROB_P): void is not an object type. + ({add,build}_builtin_candidate{,s}, print_z_candidates): Display + builtin candidates. + (build_new_op): Handle CALL_EXPR. Don't try to decay void. + Fall back on preincrement handling. Use op_error. + Handle warn_synth. + (convert_like): Pass INDIRECT_BIND. Don't try to do anything with + an error_mark_node. + (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions + properly. + +Mon Jul 22 16:21:55 1996 Bob Manson + + * pt.c (tsubst_expr): Handle CONTINUE_STMT. + +Mon Jul 22 15:38:58 1996 Mike Stump + + * typeck.c (build_component_ref_1): Use build_component_ref + instead of open coding it here. + +Mon Jul 22 12:18:54 1996 Jason Merrill + + * g++.c (main): Don't link with -lg++. + + NEW_OVER changes: + * cvt.c (convert_to_reference): Don't use convert_from_reference on + result of build_type_conversion. + (cp_convert): Only call build_method_call for ctors if + build_type_conversion failed. + (ptr_complete_ob): New function. + (TYPE_PTR{,OB,MEM}_P): New macros. + ({add,build}_builtin_candidate{,s}): New functions. + (print_z_candidates): Handle builtins. + (build_user_type_conversion_1): Don't use conversion fns for + converting to a base type. + (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs. + (build_user_type_conversion): Use convert_from_reference. + (build_new_op): New function. + (build_over_call): Fix handling of methods. + (compare_ics): Handle AMBIG_CONV properly. + * typeck2.c: Increment abort count. + * method.c (build_opfncall): Forward most requests to build_new_op. + * cp-tree.h (IS_OVERLOAD_TYPE): Tweak. + +Fri Jul 19 17:59:29 1996 Brendan Kehoe + + * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out + invalid second argument to dump_expr_list. + +Fri Jul 19 14:04:05 1996 Mike Stump + + * decl.c (lookup_name_real): Make sure we do obj->X::i correctly. + +Thu Jul 18 14:48:23 1996 Bob Manson + + * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not + ASSEMBLE_EXTERNAL. + +Mon Jul 15 17:48:43 1996 Mike Stump + + * typeck2.c (process_init_constructor): New pedwarn for using { } + to initialize a pointer to member function. + * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that + we can avoid the new error. + +Mon Jul 15 15:42:03 1996 Mike Stump + + * typeck.c (build_ptrmemfunc1): New function to hide details of + pointer to member functions better. + +Mon Jul 15 14:23:02 1996 Mike Stump + + * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are + methods into the actual method, as we know the implied object is + not used. + +Mon Jul 15 13:08:29 1996 Brendan Kehoe + + * parse.y (maybecomma_warn): Only emit the pedwarn if we're not + inside a system header. + +Fri Jul 12 16:30:05 1996 Bob Manson + + * call.c (build_method_call): Call complete_type on the + instance type. + +Thu Jul 11 17:16:40 1996 Mike Stump + + * typeck.c (build_component_ref): Always build up an OFFSET_REF + for obj_ptr->func so that we can know which object to use in a + method call. + +Wed Jul 10 19:36:37 1996 Mike Stump + + * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast + around things. Also improve maintainability. + +Wed Jul 10 18:20:11 1996 Bob Manson + + * decl.c (grokdeclarator): Check for overflow when evaluating an + array dimension. + +Wed Jul 10 17:26:19 1996 Jason Merrill + + * cvt.c (cp_convert): Don't check for ambiguity with constructor + if NEW_OVER. + + * typeck.c (build_x_function_call): Pass function overload + questions to new overloading code if NEW_OVER. + * init.c (expand_aggr_init_1): Only check for type conversion ops + if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING). + Don't check for ambiguity with constructor if NEW_OVER. + * cvt.c (convert_to_reference): Dereference the result of a type + conversion operator. + (build_conv): Propagate ICS_USER_FLAG. + (implicit_conversion): Call instantiate_type. + Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL. + (add_function_candidate): Fix cv-quals on argtype. + (print_z_candidates): New function. + (build_new_function_call): Call it. + (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't + consider non-converting constructors. + Call print_z_candidates. + Return an AMBIG_CONV for an ambiguous conversion. + (build_user_type_conversion): Handle AMBIG_CONV. + (convert_like): Fix test for building TARGET_EXPR. + Call instantiate_type. + Handle AMBIG_CONV and LVALUE_CONV. + (build_over_call): Handle 0 args and ellipsis. + * cp-tree.def: Add AMBIG_CONV. + +Tue Jul 9 17:48:48 1996 Mike Stump + + * decl.c (lookup_name_real): If we find mem in obj when parsing + `obj->mem', make sure we return the right value. + +Tue Jul 9 16:11:28 1996 Bob Manson + + * search.c (get_base_distance): Call complete_type. + +Tue Jul 9 12:46:34 1996 Mike Stump + + * decl.c (store_bindings): Make static. + +Mon Jul 8 16:42:31 1996 Jason Merrill + + * init.c (expand_aggr_init_1): Don't check type conversions if + NEW_OVER. + + * cvt.c (z_candidate): Put back template field. + (add_function_candidate): Set it. + (add_template_candidate): Likewise. + (joust): Use it. + (compare_qual): Handle references and pointers to members. + (compare_ics): Handle reference bindings. + + * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY. + +Mon Jul 8 16:18:56 1996 Bob Manson + + * call.c (compute_conversion_costs): Call complete_type. + + * tree.c (vec_binfo_member): Use comptypes instead of comparing + pointers, so we can handle template parameters. + +Fri Jul 5 16:51:53 1996 Bob Manson + + * cvt.c (cp_convert_to_pointer): We have to call complete_type + here; let's make it explicit instead of a side effect of an + error check. + +Wed Jul 3 16:29:51 1996 Jason Merrill + + * cvt.c (z_candidate): Remove template field. + (reference_binding): Handle binding to temporary. + (implicit_conversion): Likewise. + (add_function_candidate): Handle artificial constructor parms. + Handle functions with too few parms. + (add_template_candidate): New function. + (build_user_type_conversion_1): Handle constructors. + (convert_like): Likewise. + (build_over_call): Likewise. + (build_new_function_call): Support templates. + (compare_ics): Fix reference, inheritance handling. + +Mon Jul 1 22:58:18 1996 Bob Manson + + * decl.c: Add signed_size_zero_node. + (init_decl_processing): Build it. + * class.c (prepare_fresh_vtable): Use it instead of size_zero_node + when we're trying to make a negative delta. + +Mon Jul 1 17:56:19 1996 Brendan Kehoe + + Stop doing this damn index==strchr variable name confusion. + * class.c (add_virtual_function): Change local var INDEX to be + named IDX. + (add_method): Likewise. + * lex.c (print_parse_statistics): Likewise. + * search.c (make_memoized_table_entry): Likewise. + (lookup_fnfields_here): Likewise. + (lookup_field): Likewise. + (lookup_fnfields): Likewise. + (get_baselinks): Likewise. + * sig.c (build_signature_table_constructor): Likewise. + (build_signature_method_call): Likewise. + * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX. + (get_member_function_from_ptrfunc): Likewise. + (build_ptrmemfunc): Change local var INDEX to be IDX. + (c_expand_start_case): Likewise. + +Sat Jun 29 14:05:46 1996 Jason Merrill + + * cvt.c (cp_convert_to_pointer): Move user-defined type conversion + handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE. + (convert_to_reference): Use build_type_conversion to convert to + the reference type directly. + (standard_conversion): Fix void* case, non-conversions. + (reference_binding): Fix expr == 0 case, non-conversions. + (convert_like): Support REF_BIND. + (compare_qual): Split out from compare_ics. + (compare_ics): Use it, handle icses with only a qual_conv. + + * init.c (expand_vec_init): Don't crash if decl is NULL. + +Fri Jun 28 11:52:51 1996 Stan Shebs + + * mpw-config.in: New file, configury for Mac MPW. + * mpw-make.sed: New file, makefile editing for MPW. + +Thu Jun 27 15:18:30 1996 Jason Merrill + + * pt.c (instantiate_class_template): Call repo_template_used. + + * search.c (lookup_conversions): Only lookup conversions in + complete types. + +Thu Jun 27 12:59:53 1996 Brendan Kehoe + + * cp-tree.def: Renamed from tree.def, to avoid confusion with + gcc's tree.def. + * cp-tree.h, lex.c: Include cp-tree.def. + * Makefile.in (CXX_TREE_H): Reference cp-tree.def. + +Wed Jun 26 18:29:47 1996 Bob Manson + + * init.c (build_vec_delete_1): Call complete_type. + +Mon Jun 24 17:17:32 1996 Mike Stump + + * except.c (start_anon_func): Make sure anonymous functions are + never external. + +Fri Jun 21 15:10:58 1996 Jason Merrill + + * decl.c (finish_function): If function_depth > 1, set nested. + + * decl2.c (grokbitfield): Revert Bob's change. + * class.c (finish_struct_1): Fix handling of named bitfield widths. + +Thu Jun 20 23:35:38 1996 Jason Merrill + + * pt.c (add_pending_template): Handle types. + (lookup_template_class): With -fexternal-templates, just add the class + to pending_templates instead of instantiating it now. + * decl2.c (finish_file): Handle types in pending_templates. + +Thu Jun 20 14:08:40 1996 Bob Manson + + * decl2.c (grokbitfield): Handle constant decls appropriately. + Give an appropriate error message now instead of spewing core + later. + +Thu Jun 20 13:01:51 1996 Jason Merrill + + * decl2.c: Don't turn on thunks by default for now. + +Wed Jun 19 11:37:04 1996 Jason Merrill + + * typeck.c (complete_type): Handle error_mark_node. + (common_type, OFFSET_TYPE): Handle template_type_parms. + +Tue Jun 18 10:02:15 1996 Jason Merrill + + * pt.c (instantiate_decl): If at_eof, call import_export_decl + regardless of DECL_INLINE. + + * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs. + + * class.c (finish_struct_bits): Copy TYPE_SIZE. + + * rtti.c (build_dynamic_cast): Support templates. + * tree.def: Support DYNAMIC_CAST_EXPR. + * pt.c (tsubst_copy): Likewise. + * decl2.c (build_expr_from_tree): Likewise. + +Mon Jun 17 15:23:36 1996 Jason Merrill + + * typeck.c (build_static_cast): Support templates. + (build_const_cast): Likewise. + * tree.def: Support CONST/STATIC_CAST_EXPR. + * pt.c (tsubst_copy): Likewise. + * decl2.c (build_expr_from_tree): Likewise. + +Sun Jun 16 12:33:57 1996 Jason Merrill + + * decl2.c (finish_vtable_vardecl): Don't trust + TREE_SYMBOL_REFERENCED for vtables of local classes. + +Fri Jun 14 18:13:36 1996 Jason Merrill + + * pt.c (tsubst_copy): Handle operator T. + +Wed Jun 12 17:52:40 1996 Brendan Kehoe + + * init.c (build_delete): Move creation of PARMS inside test of + TYPE_HAS_DESTRUCTOR, since it's never used outside of that block. + +Tue Jun 11 15:09:18 1996 Bob Manson + + * typeck.c (build_conditional_expr): Don't assume that + the arguments to ?: are always pointers or records. + +Tue Jun 11 13:56:23 1996 Jason Merrill + + * decl2.c (import_export_decl): Still emit static/weak/comdat + copies of inline template functions with -fno-implicit-templates. + +Tue Jun 11 11:42:13 1996 Bob Manson + + * init.c (build_delete): Determine the complete basetype + path to the destructor we're calling. + +Fri Jun 7 15:30:10 1996 Bob Manson + + * decl.c (build_enumerator): Always copy the INTEGER_CST used to + initialize the enum, because we really and truly don't know where + it came from. + (start_enum): Don't copy integer_zero_node because + build_enumerator will do it. + +Fri Jun 7 11:11:09 1996 Jason Merrill + + * decl.c (finish_function): Do access control on base destructors. + + * pt.c (tsubst, case FUNCTION_DECL): Set up + IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't + hose us. + +Fri Jun 7 10:37:33 1996 Mike Stump + + * cvt.c (build_up_reference): If we have already extended the + lifetime of the temporary, don't try it again. + * typeck.c (c_expand_return): Don't try and convert the return + value twice when we want a reference, once is enough. + +Tue Jun 4 15:41:45 1996 Jason Merrill + + * pt.c (tsubst_expr, case DECL_STMT): Don't pass + LOOKUP_ONLYCONVERTING at all for now. + + * search.c (add_conversions): Put the conversion function in + TREE_VALUE, the basetype in TREE_PURPOSE. + * cvt.c (build_type_conversion): Adjust. + * cvt.c (build_expr_type_conversion): Adjust. + * call.c (user_harshness): Adjust. + +Mon Jun 3 15:30:52 1996 Jason Merrill + + * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the + backend's benefit. + +Mon Jun 10 18:58:19 1996 Mike Stump + + * except.c (expand_start_catch_block): Add a dummy region, if we + get an error, so that we can avoid core dumping later. + +Fri May 31 14:56:13 1996 Mike Stump + + * cp-tree.h (OFFSET_REF): Remove. + * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF. + * expr.c (cplus_expand_expr): Cleanup callers of expand_expr. + * init.c (expand_aggr_init_1): Likewise. + (build_new): Likewise. + * typeck.c (expand_target_expr): Likewise. + +Fri May 31 14:22:08 1996 Jason Merrill + + * typeck.c (build_modify_expr): Don't use TREE_VALUE on a + TARGET_EXPR. + +Wed May 29 17:04:33 1996 Mike Stump + + * cvt.c (build_up_reference): Redo how and when temporaries are + created. + * decl.c (grok_reference_init): Don't try and be smart about + running cleanups. + +Wed May 29 16:02:08 1996 Mike Stump + + * cvt.c (build_up_reference): Add NULL_TREE to all calls to build + (TARGET_EXPR...), now that it has 4 arguments. + * tree.c (build_cplus_new): Likewise. + +Thu May 23 16:40:30 1996 Jason Merrill + + * error.c (dump_expr, case CAST_EXPR): Handle T() properly. + + * pt.c (instantiate_decl): Don't call push/pop_cp_function_context. + * decl.c (struct saved_scope): Remove named_labels, + {base,member}_init_list. + (maybe_push_to_top_level): Don't set them. Call + push_cp_function_context if appropriate. + (pop_from_top_level): Likewise. + + * method.c (do_build_assign_ref): Remove obsolete check of + TYPE_HAS_ASSIGN_REF (basetype). + + * decl.c (grokfndecl): Diagnose user definition of + implicitly-declared methods. + +Thu May 23 12:13:08 1996 Bob Manson + + * method.c (do_build_copy_constructor): Add code to give + meaningful error messages instead of crashing. + (do_build_assign_ref): Don't synthesize assignment operators for + classes containing reference or const members. + + * class.c (struct base_info): Remove cant_synth_copy_ctor + and cant_synth_asn_ref. + (finish_base_struct): Remove the code that tries to conditionalize + synthesis of copy constructors & assignment operators based on + access permissions. Instead, let it fail when it tries to + synthesize the copy constructor. This will give meaningful error + messages instead of silently generating code to perform a bitcopy. + +Wed May 22 11:45:19 1996 Bob Manson + + * lex.c (real_yylex): Remove old-n-crufty #if 0 code for + determining types for constant values. + + * decl.c (struct named_label_list): Use instead of stuffing + random items into a TREE_LIST node. + (named_label_uses): Use the new struct. + (poplevel): Likewise. + (lookup_label): Likewise. + (define_label): Add an error message to tell the user the line + where the goto is located in addition to the destination of the + goto. + (init_decl_processing): Use NULL instead of NULL_TREE to initialize + named_label_uses. + (finish_function): Likewise. + + (start_decl): Complain about defining a static data member + in a different type from which it was declared. + +Wed May 22 09:33:23 1996 Jason Merrill + + * cvt.c (build_expr_type_conversion): Adjust. + +Tue May 21 11:21:56 1996 Jason Merrill + + * call.c (build_method_call): Always convert 'this' to the + appropriate type. + + * search.c (add_conversions): Put the conversion function in + TREE_VALUE, the type in TREE_PURPOSE. + * cvt.c (build_type_conversion): Adjust. + * call.c (user_harshness): Adjust. + + * method.c (emit_thunk): Call temporary_allocation and + permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too. + + * tree.c (build_cplus_array_type): Handle tweaking of + TYPE_MAIN_VARIANT here. + * typeck.c (common_type): Not here. + + * typeck.c (complete_type): Only try to complete an array type if + it has a domain. + +Mon May 20 14:55:59 1996 Jason Merrill + + * decl.c (grokvardecl): Call complete_type. + (grokdeclarator): Call complete_type for PARM_DECLs. + +Fri May 17 16:41:17 1996 Jason Merrill + + * pt.c (instantiate_class_template): Re-set + CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1. + +Fri May 17 14:56:55 1996 Mike Stump + + * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now + smart enough to do it right. + * tree.c (cp_expand_decl_cleanup): Likewise. + * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of + cp_expand_decl_cleanup. + (store_parm_decls): Likewise. + (hack_incomplete_structures): Likewise. + * except.c (push_eh_cleanup): Likewise. + +Fri May 17 13:13:51 1996 Mike Stump + + * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++ + frontend to the backend where it belongs. + * tree.c (unsave_expr): Likewise. + (unsave_expr_now): Likewise. + * tree.def (UNSAVE_EXPR): Likewise. + * cp-tree.h (unsave_expr): Likewise. + (unsave_expr_now): Likewise. + +Fri May 17 11:02:41 1996 Mike Stump + + * init.c (emit_base_init): Make sure the partial EH cleanups live + on the function_obstack. + +Thu May 16 15:29:33 1996 Bob Manson + + * expr.c (do_case): Don't try to dereference null TREE_TYPEs + when checking for pointer types. + +Thu May 16 13:38:58 1996 Jason Merrill + + * pt.c (instantiate_class_template): Remove obsolete check for + access declarations. + +Thu May 16 13:34:15 1996 Mike Stump + + * call.c (build_overload_call): Simplify calls to + build_overload_call by removing last parameter. + (build_method_call): Likewise. + * cp-tree.h: Likewise. + * method.c (build_opfncall): Likewise. + * typeck.c (build_x_function_call): Likewise. + +Thu May 16 13:15:43 1996 Mike Stump + + * call.c (default_parm_conversions): Factor out common code. + (build_method_call): Use it. + (build_overload_call_real): Use it. + +Wed May 15 14:46:14 1996 Mike Stump + + * call.c (build_method_call): Allow implicit & on METHOD_TYPEs, + but pedwarn as the code is bogus. + * typeck.c (decay_conversion): Likewise. + (build_function_call_real): Use build_addr_func instead of + default_conversion. Don't allow pointer-to-method functions down + here. + (build_unary_op): Use real pointer-to-member functions instead of + fake ones. + (build_ptrmemfunc): Use build_addr_func instead of build_unary_op. + (convert_for_assignment): Removed some obsolete code. + * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to + build_x_function_call instead of current_class_ptr. Only call + digest_init once on an initializer, we do this just checking + TREE_TYPE. + (build_expr_from_tree): Pass current_class_ref to + build_x_function_call instead of current_class_ptr. + * init.c (build_member_call): Likewise. + * pase.y: Likewise. + * error.c (dump_expr): Handle OFFSET_REFs better. + * pt.c (unify): Handle pointer-to-member functions better. + * decl.c (finish_function): Clear out current_class_ref just like + we do for current_class_ptr. + + * typeck.c (get_delta_difference): Handle virtual bases better. + +Tue May 14 16:37:37 1996 Jason Merrill + + * sig.c (build_signature_table_constructor): Use the delta for + the original basetype for this virtual function with thunks. + (build_signature_method_call): We still need to adjust 'this' + with thunks. + +Tue May 14 16:27:25 1996 Mike Stump + + * call.c (build_addr_func): New routine. Used to get the `real' + address of a function or a method. Needed to avoid getting a + pointer-to-member function. + (build_call): New routine to build CALL_EXPRs. + (build_method_call): Use it. + * cvt.c (convert_to_aggr): Likewise. + * typeck.c (build_function_call_real): Likewise. + * sig.c (build_signature_table_constructor): Use build_addr_func. + * cp-tree.h (build_call, build_addr_func): Declare them. + +Tue May 14 12:47:47 1996 Mike Stump + + * cp-tree.h (LOOKUP_AGGR): Remove, unused. + * parse.y: Remove uses of LOOKUP_AGGR. + +Tue May 14 12:07:51 1996 Mike Stump + + * *.[chy]: Rename current_class_decl to current_class_ptr, and + C_C_D to current_class_ref. + +Mon May 13 16:55:23 1996 Jason Merrill + + * call.c (convert_harshness): Tighten up pointer conversions. + +Sat May 11 04:33:50 1996 Doug Evans + + * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef. + (finish_file): Likewise. + +Fri May 10 11:09:57 1996 Jason Merrill + + * cvt.c (convert_fn_ptr): We don't use thunks for pmfs. + + * method.c (emit_thunk): Set flag_omit_frame_pointer in default + code. + +Thu May 9 18:18:30 1996 Jason Merrill + + * decl2.c: Turn on thunks by default where supported. + +Tue May 7 20:39:57 1996 Mike Stump + + * cp-tree.h (build_overload_call_maybe): Removed. + * call.c (build_overload_call_real): Invert meaning of last arg to + be require_complete. + (build_overload_call): Likewise. + * typeck.c (build_x_function_call): Use build_overload_call_real + instead of build_overload_call_maybe. + +Mon May 6 01:23:32 1996 Jason Merrill + + * decl2.c (finish_file): Don't try to emit functions that haven't + been compiled. + +Fri May 3 09:30:13 1996 Jason Merrill + + * decl2.c (finish_vtable_vardecl): Oops. + + * decl.c (maybe_push_to_top_level): Do save previous_class_*. + Also store the bindings from previous_class_values. + (pop_from_top_level): Restore them. + +Thu May 2 21:56:49 1996 Jason Merrill + + * decl2.c (finish_vtable_vardecl): Only write out vtable if its + symbol has been referenced. + (finish_file): Re-join synthesis/vtable loop with inline emission + loop, disable inlining when an inline is output. + +Thu May 2 17:20:02 1996 Mike Stump + + * except.c (init_exception_processing): Setup saved_in_catch. + (push_eh_cleanup): Reset __eh_in_catch. + (expand_start_catch_block): Set __eh_in_catch. + +Thu May 2 16:21:17 1996 Mike Stump + + * except.c (push_eh_cleanup): Add tracking for whether or not we + have an active exception object. + (expand_builtin_throw): Use it to make sure a rethrow without an + exception object is caught. + +Thu May 2 11:26:41 1996 Jason Merrill + + * decl.c (maybe_push_to_top_level): Clear out class-level bindings + cache. + +Wed May 1 11:26:52 1996 Jason Merrill + + * decl2.c (finish_file): Also use sentries for vars with + DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be + created). + + * lex.c (handle_cp_pragma): Disable #pragma + interface/implementation if SUPPORTS_ONE_ONLY > 1. + +Tue Apr 30 11:25:46 1996 Jason Merrill + + * method.c (emit_thunk): Wrap default case in + temporary/permanent_allocation. + + * method.c (make_thunk): Use DECL_ONE_ONLY. + (emit_thunk): Call assemble_end_function. + +Mon Apr 29 15:38:29 1996 Jason Merrill + + * decl2.c (import_export_vtable): Use DECL_ONE_ONLY. + (import_export_decl): Likewise. + (finish_prevtable_vardecl): Disable vtable hack if + SUPPORTS_ONE_ONLY > 1. + +Mon Apr 29 14:32:47 1996 Mike Stump + + * typeck.c (build_modify_expr): PREINCREMENT_EXPR and + PREDECREMENT_EXPRs take two arguments, not one. + +Mon Apr 29 00:27:53 1996 Jason Merrill + + * class.c (build_vtable_entry): Don't build thunks for abstract + virtuals. + + * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C + frontend. + +Sat Apr 27 16:45:35 1996 Jason Merrill + + * class.c (set_rtti_entry): Use size_zero_node. + (build_vtable): Likewise. + +Sat Apr 27 14:48:57 1996 Jason Merrill + + * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry. + (prepare_fresh_vtable): Likewise. + +Fri Apr 26 13:14:14 1996 Jason Merrill + + * method.c (emit_thunk): Call mark_used on the target function. + + * call.c (build_method_call): Don't warn about pending templates. + +Thu Apr 25 14:55:44 1996 Jason Merrill + + * decl2.c (finish_file): Fix list walking logic. + + * typeck2.c (check_for_new_type): Only warn if -pedantic. + +Wed Apr 24 15:41:15 1996 Bob Manson + + * class.c (finish_struct_1): Remove old code for + dont_allow_type_definitions. + * cp-tree.h: Likewise. + * spew.c: Make sure cp-tree.h is included before parse.h, so the + definition of flagged_type_tree is found before it is used. + * lex.c: Likewise. + * parse.y: Added the ftype member to the type union, and changed a + number of rules to use it instead of ttype. Added calls to + check_for_new_type() as appropriate. + * typeck2.c (check_for_new_type): New function for checking + if a newly defined type appears in the specified tree. + * cp-tree.h: Add new type flagged_type_tree. Add a prototype + for check_for_new_type(). + +Wed Apr 24 00:36:21 1996 Jason Merrill + + * decl2.c (finish_file): Only use a sentry if the decl is public. + + * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer, + don't pass LOOKUP_ONLYCONVERTING. + +Tue Apr 23 17:18:47 1996 Bob Manson + + * typeck.c (common_type): Fix the ARRAY_TYPE case so it + properly keeps track of const and volatile type modifiers. + +Tue Apr 23 10:52:56 1996 Jason Merrill + + * tree.c (cp_tree_equal): C++ version of simple_cst_equal. + * pt.c (comp_template_args): Use it. + + * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call + assemble_external for artificial function decls. + + * decl.c (cp_finish_decl): Oops. + +Mon Apr 22 17:28:27 1996 Jason Merrill + + * decl2.c (import_export_decl): Put static data member templates + into common storage, or make them weak, depending on whether they + are dynamically or statically initialized. + (get_sentry): New function. + (finish_file): Do import_export_decl for static data members before + building the init/fini functions. Don't init/fini a variable that's + EXTERNAL. Use a sentry for variables in common. Fix mismatching + push/pop_temp_slots. + * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the + expand_static_init thang. + * method.c (get_id_2): New function. + +Mon Apr 22 15:32:45 1996 Bob Manson + + * parse.y (empty_parms): Make sure we use C++-style prototypes + when we're declaring member functions. + +Sun Apr 21 10:08:22 1996 Jason Merrill + + * Makefile.in (CONFLICTS): 16 s/r conflicts. + * parse.y (self_template_type): New nonterminal. + +Thu Apr 18 08:56:54 1996 Jason Merrill + + * decl.c (make_typename_type): Handle getting a TYPE_DECL for a + name. + * parse.y (base_class.1): Allow 'typename foo::bar'. + + * lex.c (check_newline): Remove #pragma code that plays with the + input stream, since we now deal with tokens. Clear nextchar when + we're done. + (handle_cp_pragma): Use real_yylex. + (handle_sysv_pragma): Don't do skipline here. Only call real_yylex + in one place. + + * lex.c (check_for_missing_semicolon): Handle SELFNAME. + + * lex.c (handle_cp_pragma): Fix "#pragma implementation". + +Wed Apr 17 16:51:33 1996 Jason Merrill + + * parse.y: New token SELFNAME for potential constructor. + * spew.c (yylex): Handle it. + * lex.c (identifier_type): Produce it. + + * parse.y (complete_type_name): In :: case, don't push class binding. + (complex_type_name): Likewise. + +Wed Apr 17 15:02:40 1996 Mike Stump + + * typeck.c (build_reinterpret_cast): Handle pointer to member + functions. + +Wed Apr 17 12:28:26 1996 Brendan Kehoe + + * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus + pragmas. + (check_newline): Put the vtable/unit/implementation/interface pragma + code into handle_cp_pragma, replacing it with a call. + (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN + args. Get the next token after handling the pragma token. + +Wed Apr 17 10:28:34 1996 Jason Merrill + + * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs. + (convert_to_pointer_force): Likewise. + + * init.c (build_new): Fix array new without -fcheck-new. + +Tue Apr 16 13:44:58 1996 Jason Merrill + + * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c, + tree.c: Lose TYPE_NESTED_NAME. + + * parse.y (nested_name_specifier_1): Don't treat non-identifiers + as identifiers. + + * tree.def: Add VEC_INIT_EXPR. + * expr.c (cplus_expand_expr): Handle it. + * init.c (build_new): Use it instead of the RTL_EXPR nastiness and + the extra file-scope symbol nastiness. + +Mon Apr 15 16:21:29 1996 Jason Merrill + + * method.c (make_thunk): Thunks are static. + (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined. + + * decl2.c (mark_vtable_entries): Emit thunks as needed. + (finish_file): Don't emit them here. + +Sun Apr 14 11:34:39 1996 Jason Merrill + + * rtti.c (build_dynamic_cast): Handle null pointers. + (ifnonnull): New function. + +Fri Apr 12 09:08:27 1996 Bob Manson + + * call.c (build_method_call): Remember the original basetype we + were called with. Give an error message instead of trying + (incorrectly) to call a non-static member function through a + non-inherited class. + + * search.c (expand_upcast_fixups): Mark the new fixup as + DECL_ARTIFICIAL. + +Thu Apr 11 03:57:09 1996 Jason Merrill + + * init.c (build_new): Use a TARGET_EXPR for alloc_expr. + + * class.c (set_rtti_entry): Fix for thunks. + + * decl2.c (import_export_decl): Still emit typeinfo fns for + cv-variants of builtin types. + + * rtti.c (expand_class_desc): Set up base_info_type_node here. + (init_rtti_processing): Instead of here. + +Wed Apr 10 14:17:13 1996 Jason Merrill + + * rtti.c (init_rtti_processing): Do init regardless of -frtti. + (build_typeid): Only complain about taking dynamic typeid without + -frtti. + + * decl2.c: flag_rtti defaults to 1. + + * rtti.c (get_tinfo_var): The general class case is now smaller. + (init_rtti_processing): Pack the latter three fields of base_info + into 32 bits. + +Wed Apr 10 13:50:14 1996 Mike Stump + + * init.c (expand_member_init): Don't dump if name is NULL_TREE. + +Wed Apr 10 12:56:02 1996 Mike Stump + + * search.c (make_memoized_table_entry): Undefer the pop, if necessary. + (push_memoized_context): Split out code to undefer pop_type_level to + (clear_memoized_cache): here. + (pop_memoized_context): We can only handle one layer of deferral of + pop_type_level so clear the cache, if there was a previous level. + +Tue Apr 9 23:06:09 1996 Jason Merrill + + * rtti.c (init_rtti_processing): Build up base_info_type_node. + (expand_class_desc): Use one pointer to an array of base_info + structs, passed using a CONSTRUCTOR. + +Tue Apr 9 14:20:57 1996 Mike Stump + + * class.c (build_vbase_path): Remove block extern for + flag_assume_nonnull_objects here. + (build_vfn_ref): Split out functionality into build_vtbl_ref. + (build_vtbl_ref): New routine. + (build_vtable): Set up rtti info here. + (add_virtual_function): Note in CLASSTYPE_RTTI the best + place where we can get the rtti pointers from to avoid having to + search around for a place. + (finish_base_struct): Likewise. + (finish_struct_1): Likewise. Never create totally new vtables + with totally new vtable pointers for rtti. Disable code to layout + vtable pointers better until we want to break binary + compatibility. + * rtti.c (build_headof_sub): New routine to convert down to a + sub-object that has an rtti pointer in the vtable. + (build_headof): Use it. Also, use build_vtbl_ref now to be more + maintainable. + (build_dynamic_cast): Make sure we have saved it, if we need to. + * search.c (dfs_init_vbase_pointers): Disable code that deals with + a more efficient vtable layout, enable later. + * call.c (flag_assume_nonnull_objects): Moved declaration to + * cp-tree.h: here. Declare build_vtbl_ref. + * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in + function calls that want a tree. + +Tue Apr 9 12:10:26 1996 Jason Merrill + + * rtti.c (build_dynamic_cast): Handle downcasting to X* given + other X subobjects in the most derived type. Ack. + + * rtti.c (build_dynamic_cast): No need to strip cv-quals here, + get_typeid will do it for us. + (get_typeid_1): Break out call-building for expand_*_desc to use. + (get_typeid): Call it. + (expand_*_desc): Likewise. + * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char * + and void *. + (init_decl_processing): Lose builtin_type_tdescs lossage. + * decl2.c (finish_vtable_vardecl): Remove obsolete code. + +Mon Apr 8 17:23:23 1996 Bob Manson + + * pt.c (tsubst): When calling set_nested_typename, use + TYPE_NESTED_NAME (current_class_type) instead of + current_class_name. + + * decl.c (pushdecl): Likewise. + (pushdecl_class_level): Likewise. + (grokdeclarator): Use NULL_TREE instead of 0 in the call to + set_nested_typename. + +Sun Apr 7 10:44:31 1996 Jason Merrill + + * rtti.c (synthesize_tinfo_fn): Handle arrays. + + * cp-tree.h (DECL_REALLY_EXTERN): New macro. + +Sat Apr 6 13:56:27 1996 Jason Merrill + + * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast. + (init_rtti_processing): Lose bad_cast_type. + (build_dynamic_cast): Use throw_bad_cast. + + * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs. + + * decl2.c (finish_file): Don't synthesize artificial functions + that are external and not inline. + + * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl. + + * decl2.c (finish_file): Handle having new inlines added to + saved_inlines by synthesis. + + * rtti.c (get_bad_cast_node): Don't require . + +Fri Apr 5 17:02:09 1996 Jason Merrill + + RTTI rewrite to initialize nodes as needed, not require that + users #include , complete functionality and reduce wasted + space. + * rtti.c (init_rtti_processing): New fn. + (build_typeid): The vtable entry is now a function. + (get_tinfo_var): New fn. + (get_tinfo_fn): Likewise. + (get_typeid): Use it. + (build_dynamic_cast): Declare and use entry point __dynamic_cast. + (build_*_desc): Rename to expand_*_desc and rewrite to use entry + points __rtti_*. + (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose. + (synthesize_tinfo_fn): New fn. + * method.c (build_t_desc_overload): Lose. + (build_overload_with_type): More generic. + * decl.c (init_decl_processing): Call init_rtti_processing. + * class.c (set_rtti_entry): Use get_tinfo_fn. + * decl2.c (mark_vtable_entries): Mark the rtti function. + (finish_prevtable_vardecl): Don't build_t_desc. + (import_export_decl): Handle tinfo functions. + (finish_file): Likewise. + * typeck.c (inline_conversion): New fn. + (build_function_call_real): Use it. + * cp-tree.h: Add decls. + + * method.c (hack_identifier): Also convert component_refs from + references. + + * lex.c (cons_up_default_function): Use the type, not the name, in + declspecs. + + * decl2.c (import_export_vtable): Fix weak vtables. + +Fri Apr 5 13:30:17 1996 Bob Manson + + * search.c (get_base_distance_recursive): Fix access checks for + protected bases. + +Fri Apr 5 11:02:06 1996 Brendan Kehoe + + * call.c (unary_complex_lvalue): Delete unneeded decl, it's in + cp-tree.h. + (convert_harshness): Add prototypes wrapped by PROTO. + * decl2.c (grok_function_init): Likewise. + (do_toplevel_using_decl): Change to void return type. + * class.c (build_vtable_entry): Remove decl of make_thunk. + (merge_overrides): Fix order of arg definitions. + (finish_vtbls): Likewise. + (fixup_vtable_deltas): Likewise. + (modify_all_direct_vtables): Likewise. + (modify_all_indirect_vtables): Likewise. + * search.c (get_base_distance_recursive): Likewise. + (get_abstract_virtuals_1): Likewise. + (fixup_virtual_upcast_offsets): Likewise. + (lookup_fnfields_1): Add prototypes wrapped by PROTO. + * init.c (perform_member_init): Fix order of arg definitions. + (expand_aggr_init_1): Add prototypes wrapped by PROTO. + * cp-tree.h (make_thunk): Add decl. + (overload_template_name, push_template_decl): Add decls. + (do_toplevel_using_decl): Change to void return type. + (vec_binfo_member): Add decl. + +Thu Apr 4 13:33:10 1996 Brendan Kehoe + + * typeck.c (mark_addressable, convert_for_assignment, + convert_for_initialization, pointer_int_sum, pointer_diff, + unary_complex_lvalue): Add prototypes wrapped by PROTO. + (convert_sequence): #if 0 fn decl, since definition also is. + +Thu Apr 4 11:00:53 1996 Mike Stump + + * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on + cast to pointer types for type searching. + +Wed Apr 3 17:10:57 1996 Brendan Kehoe + + * typeck.c (get_delta_difference): Use cp_error, not error, in the + case where BINFO == 0. + +Wed Apr 3 12:01:02 1996 Mike Stump + + * call.c (build_method_call): Fix wording of error messages so + constructors come out right. + +Tue Apr 2 16:06:59 1996 Bob Manson + + * decl.c (push_overloaded_decl): Don't warn about hidden + constructors when both the type and the function are declared + in a system header file. + +Mon Apr 1 09:03:13 1996 Bob Manson + + * class.c (finish_struct_1): Propagate the TYPE_PACKED + flag for the type to the type's fields. + +Sat Mar 30 12:14:33 1996 Brendan Kehoe + + * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning. + +Fri Mar 29 15:51:36 1996 Bob Manson + + * class.c (base_info, finish_base_struct): Replace + needs_virtual_dtor with base_has_virtual. + + (finish_struct_1): Remove the old code that tried to make default + destructors virtual. Use base_has_virtual when checking if we need + to add a vtable entry for the rtti code. + +Fri Mar 29 14:02:36 1996 Jason Merrill + + * pt.c (push_template_decl): Complain about template decl with + inappropriate declaration. + +Fri Mar 29 12:15:35 1996 Bob Manson + + * typeck.c (build_x_unary_op): Remove bogus check for taking + the address of a member function. + +Fri Mar 29 11:56:02 1996 Jason Merrill + + * parse.y (constructor_declarator): Only push the class if + we are not already in the class. + +Fri Mar 29 09:41:02 1996 Jeffrey A. Law + + * method.c (emit_thunk): Remove current_call_is_indirect nonsense. + Add additional argument to INIT_CUMULATIVE_ARGS. + +Thu Mar 28 16:41:39 1996 Jason Merrill + + * decl.c (shadow_tag): Fix error about anon union with methods. + + * parse.y (self_reference): Only generate a self-reference if this + is a non-template class. + (opt.component_decl_list): Only use it if it was generated. + + * parse.y (component_decl_1): Use constructor_declarator. + (fn.def2): Likewise. + (notype_component_declarator0): Likewise. + +Thu Mar 28 15:11:35 1996 Bob Manson + + * typeck.c (build_x_unary_op): Add checks for taking the address + of a TARGET_EXPR or of a member function, and give appropriate + warnings. + +Thu Mar 28 14:49:26 1996 Jason Merrill + + * pt.c (process_template_parm): Allow template type parms to be + used as types for template const parms. + +Wed Mar 27 15:51:19 1996 Mike Stump + + * init.c (expand_vec_init): Ensure the eh cleanups are on the + function_obstack. + +Wed Mar 27 10:14:30 1996 Jason Merrill + + * decl.c (lookup_name_real): Be even more picky about the + ambiguous lookup warning. + (grokdeclarator): Tweak SCOPE_REF constructor declarators here. + * parse.y (constructor_declarator): Rather than here. + + * parse.y (constructor_declarator): New nonterminal. + (fn.def1): Use it. + (explicit_instantiation): Likewise. + +Tue Mar 26 13:41:33 1996 Jason Merrill + + Add implicit declaration of class name at class scope. + * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup. + * parse.y (self_reference): New nonterminal. + (opt.component_decl_list): Use it. + (fn.def1): Add nested_name_specifier type_name cases. + * class.c (build_self_reference): New function. + (finish_struct): Handle access_default later, move self-reference + decl to the end. + * pt.c (lookup_template_class): Handle getting a TYPE_DECL. + * cp-tree.h: Adjust. + + * pt.c (do_function_instantiation): Separate handling of member + functions and non-member functions properly. + +Mon Mar 25 14:23:22 1996 Jason Merrill + + * pt.c (process_template_parm): Improve error for 'volatile class K'. + + * class.c (finish_struct_1): Check the right slot for destructors. + + * decl.c (start_enum): Complain about enum templates. + +Mon Mar 25 13:25:31 1996 Mike Stump + + * init.c (resolve_offset_ref): Offset pointers to member data by one. + * typeck.c (unary_complex_lvalue): Likewise. + +Mon Mar 25 13:30:42 1996 Bob Manson + + * typeck.c (c_expand_return): Check for a returned local + array name, similar to the check for an ADDR_EXPR. + +Mon Mar 25 13:07:19 1996 Jason Merrill + + * decl.c (cp_finish_decl): Don't build cleanups for static + variables here. + +Fri Mar 22 17:57:55 1996 Mike Stump + + * typeck.c (build_modify_expr): Fix error messages to be more + accurate. + * cp-tree.h (assop_as_string): Parallel to op_as_string, but for + assignment operators. + * error.c (assop_as_string): Likewise. Add support for `%Q' for + assignment operators. + +Fri Mar 22 13:48:29 1996 Jason Merrill + + * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also + give an error if initialized. pedwarn about nested type with the + same name as its enclosing class. + + * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT. + + * typeck.c (require_complete_type): Be sure to instantiate the + MAIN_VARIANT of the type. + + * decl2.c (finish_file): Instantiate pending templates before + processing static constructors and destructors. + + * pt.c (instantiate_decl): Don't instantiate functions at toplevel + unless at_eof. + +Fri Mar 22 09:30:17 1996 Bob Manson + + * decl2.c (delete_sanity): If error_mark_node is passed + in as an expression, quit while we're ahead. + + * decl.c (grokdeclarator): Give an error message if `friend' + is combined with any storage class specifiers. + +Wed Mar 20 14:51:55 1996 Jason Merrill + + * parse.y (named_complex_class_head_sans_basetype): Don't crash on + definition of nonexistent nested type. + + * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or + not to say 'typedef'. + +Wed Mar 20 00:11:47 1996 Brendan Kehoe + + * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*. + * search.c (dfs_walk, dfs_init_vbase_pointers, + expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT. + (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init. + +Tue Mar 19 17:56:03 1996 Jason Merrill + + * except.c (build_throw): Support minimal parse. + * pt.c (tsubst_copy): Support THROW_EXPR. + * decl2.c (build_expr_from_tree): Likewise. + + * pt.c (mangle_class_name_for_template): Always allocate + scratch_firstobj. + +Tue Mar 19 16:34:31 1996 Bob Manson + + * cvt.c (cp_convert_to_pointer): Give an appropriate error + when trying to cast from an incomplete type. + +Tue Mar 19 16:00:33 1996 Jason Merrill + + * pt.c (instantiate_class_template): Don't bother setting up + CLASSTYPE_TAGS explicitly, as the nested types will add + themselves. + +Tue Mar 19 15:48:43 1996 Bob Manson + + * decl.c (shadow_tag): Remove old error check for usage of + an enum without a previous declaration. + (xref_tag): Add error message about usage of enums without a + previous declaration. + +Tue Mar 19 09:21:35 1996 Jason Merrill + + * lex.c (do_identifier): Only do name consistency check if we're + parsing. + + * pt.c (push_template_decl): Don't crash if we get a member defn + that doesn't match. + + * decl.c (xref_tag_from_type): New function to do an xref without + always having to figure out code_type_node. + * cp-tree.h: Declare it. + * pt.c (instantiate_class_template): Use it for friend classes. + (lookup_template_class): Use it. + + * typeck2.c (build_functional_cast): Pull out a single parm before + passing it to build_c_cast. + +Tue Mar 19 09:07:15 1996 Bob Manson + + * expr.c (do_case): Give an error message if a pointer is + given as a case value. + +Mon Mar 18 21:57:54 1996 Jason Merrill + + * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of + an overload list. + + * lex.c (cons_up_default_function): Really, now, interface hackery + does not apply to synthesized methods. + +Mon Mar 18 18:20:57 1996 Mike Stump + + * call.c (build_method_call): Ctors and dtors now have special names + with respect to lookups. + * class.c (add_method): Likewise. + (grow_method): Likewise. + (finish_struct_methods): Likewise. + (warn_hidden): Likewise. + (finish_struct_1): Likewise. + * cvt.c (convert_to_reference): Likewise. + (convert_to_aggr): Likewise. + (cp_convert): Likewise. + * decl2.c (check_classfn): Likewise. + * init.c (expand_member_init): Likewise. + (expand_default_init): Likewise. + (expand_aggr_init_1): Likewise. + (build_offset_ref): Likewise. + (build_new): Likewise. + (build_delete): Likewise. + * lex.c (do_inline_function_hair): Likewise. + * search.c (lookup_field_1): Likewise. + (lookup_fnfields_here): Likewise. + (lookup_field): Likewise. + (lookup_fnfields): Likewise. + (get_virtual_destructor): Likewise. + (dfs_debug_mark): Likewise. + (dfs_pushdecls): Likewise. + (dfs_compress_decls): Likewise. + * tree.c (layout_basetypes): Likewise. + * typeck.c (build_component_ref): Likewise. + (build_x_function_call): Likewise. + (build_modify_expr): Likewise. + (convert_for_initialization): Likewise. + (build_functional_cast): Likewise. + * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise. + (CTOR_NAME): New. + (DTOR_NAME): New. + * decl.c (ctor_identifier): New. + (dtor_identifier): New. + (init_decl_processing): Set them. + +Mon Mar 18 18:00:51 1996 Mike Stump + + * typeck.c (build_component_ref): Don't get confused by fields whose + context has no type name, like pointer to member functions. + +Mon Mar 18 13:19:03 1996 Jason Merrill + + * decl.c (grokdeclarator): Handle typedef without declarator. + + * pt.c (tsubst): Handle SCOPE_REF in declarator. + + * parse.y (bad_parm): Catch another case of missing `typename'. + + * lex.c (yyprint): Handle TYPE_DECLs. + + * decl.c (start_function): Don't try to be clever. + + * lex.c: Lose compiler_error_with_decl. + * typeck2.c: Lose error_with_aggr_type. + (incomplete_type_error): Use cp_* instead of old functions. + (readonly_error): Likewise. + * typeck.c (convert_arguments): Likewise. + * search.c (lookup_nested_field): Likewise. + * method.c (make_thunk): Likewise. + * decl.c (grokparms): Likewise. + * cp-tree.h: Update. + + * tree.c (min_tree_cons): Call copy_to_permanent for the purpose + and value. + +Mon Mar 18 11:25:52 1996 Bob Manson + + * method.c (build_opfncall): When deleting a pointer to an + array, build a new pointer to the tree past any ARRAY_TYPE + nodes. + +Mon Mar 18 10:11:46 1996 Brendan Kehoe + + * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE. + +Fri Mar 15 11:03:57 1996 Jason Merrill + + * pt.c (instantiate_decl): Only call import_export_decl if at_eof + and ! DECL_INLINE. + + * decl.c (finish_function): Don't set nested based on + hack_decl_function_context. + * parse.y (function_try_block): Check for nested function. + (pending_inlines): Likewise. + + * decl2.c (build_expr_from_tree): If a unary op already has a + type, just return it. + + * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE. + + * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does. + (finish_file): Check the return value of walk_vtables. + (finish_prevtable_vardecl): Return int. + (finish_vtable_vardecl): Likewise. + (prune_vtable_vardecl): Likewise. + * lex.c (set_vardecl_interface_info): Likewise. + * cp-tree.h: Adjust return types. + + * class.c (delete_duplicate_fields_1): Don't complain about + duplicate nested types if they're the same type. + (finish_struct): Remove check for duplicate. + * decl2.c (grokfield): Don't check for typedef of anonymous type. + +Thu Mar 14 10:00:19 1996 Jason Merrill + + * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF. + + * decl.c (grokdeclarator): Lose special handling of class-level + typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set + SIGNATURE_HAS_OPAQUE_TYPEDECLS later. + + * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion. + + * pt.c (tsubst_copy): Strip cv-quals from destructor name types. + + * search.c (compute_access): Fix handling of anonymous union + members. + * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED} + from anonymous unions to their members. + + * typeck.c (build_x_function_call): For static member functions, + hand off to build_member_call. + +Wed Mar 13 14:03:34 1996 Jason Merrill + + * typeck.c (build_component_ref): Handle OFFSET_REFs. + + * init.c (expand_vec_init): Fix init == 0 case. + +Tue Mar 12 14:36:02 1996 Jason Merrill + + * init.c (build_new): pedwarn about init and array new. + (expand_vec_init): Handle lists, use convert_for_initialization. + + * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION + when converting to an aggregate type. + * cvt.c (cp_convert): Pass it through. + + * typeck.c (build_conditional_expr): Handle user-defined + conversions to slightly different types. + + * decl.c (grokdeclarator): Force an array type in a parm to be + permanent. + + * decl2.c (do_using_directive): Sorry. + (do_namespace_alias): Likewise. + * lex.c (real_yylex): Warn about using the `namespace' keyword. + +Sun Mar 10 22:26:09 1996 Jason Merrill + + * parse.y (datadef): Move call to note_list_got_semicolon up. + +Fri Mar 8 11:47:26 1996 Mike Stump + + * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs. + +Fri Mar 8 11:29:06 1996 Mike Stump + + * decl.c (cp_finish_decl): The exception regions have to be + nested, not overlapping. We start the exception region for a + decl, after it has been fully built, and all temporaries for it + have been cleaned up. + +Thu Mar 7 17:46:06 1996 Mike Stump + + * tree.c (vec_binfo_member): Don't core dump if we have no bases. + +Thu Mar 7 14:11:49 1996 Jason Merrill + + * tree.def: Add RETURN_INIT. + * pt.c (instantiate_decl): Handle RETURN_INIT. + * decl.c (store_return_init): Handle minimal_parse_mode. + + * tree.c (cp_build_type_variant): Just return an error_mark_node. + * decl.c (make_typename_type): Don't try to get the file and line + of an identifier. + * typeck.c (comptypes): Handle TYPENAME_TYPE. + +Wed Mar 6 18:47:50 1996 Per Bothner + + * decl.c (poplevel): Make sure we clear out and restore old local + non-VAR_DECL values by default when they go out of scope. + +Wed Mar 6 09:57:36 1996 Jason Merrill + + * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in + referring to addresses of variables and functions. + + * error.c (dump_expr): Support SIZEOF_EXPR. + + * init.c (do_friend): Use the return value of check_classfn. + + * typeck.c (convert_arguments): Call complete_type. + + * method.c (hack_identifier): After giving an error, set value to + error_mark_node. + +Tue Mar 5 16:00:15 1996 Jason Merrill + + * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT + lossage for local classes. + * cp-tree.h: Declare it. + * decl.c (lookup_name_real): Evil, painful hack for local classes. + (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here. + Use hack_decl_function_context. + (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here. + (start_function): Use hack_decl_function_context. + (finish_function): Likewise. + * method.c (synthesize_method): Likewise. + * lex.c (process_next_inline): Likewise. + (do_pending_inlines): Likewise. + * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're + done with it. + +Mon Mar 4 22:38:39 1996 Gerald Baumgartner + + * sig.c (build_signature_pointer_or_reference_type): Align + signature pointers/references on 8-byte boundaries so they can be + grabbed 2 words at a time on a SPARC. + +Tue Mar 5 10:21:01 1996 Jason Merrill + + * method.c (hack_identifier): Requiring a static chain is now a + hard error. + * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested + functions. + +Mon Mar 4 20:03:33 1996 Jason Merrill + + * init.c (build_offset_ref): Call complete_type. + + * decl.c (pop_from_top_level): Always pop previous_class_type. + + * parse.y: Handle multiple decls in a for-init-statement. + * pt.c (tsubst_expr): Likewise. + + * pt.c (tsubst): Use tsubst_expr for the second operand of an + ARRAY_REF. + + * decl.c (maybe_push_to_top_level): Don't save previous_class_type. + (poplevel_class): Set it here. + (pop_from_top_level): Pop it here if we're returning to class scope. + * class.c (pushclass): Don't set it here. + + * decl.c (maybe_push_to_top_level): Save current_template_parms, + and clear it if !pseudo. + (pop_from_top_level): Restore it. + + * decl2.c (finish_file): Push the dummy each time we walk the list + of vtables. + + * error.c (dump_expr): Support LOOKUP_EXPR and actually do + something for CAST_EXPR. + +Mon Feb 19 14:49:18 1996 Rusty Russell + + * cvt.c (cp_convert): Warn about implicit conversion of the + address of a function to bool, as it is always true. + +Fri Feb 23 23:06:01 1996 Rusty Russell + + * typeck.c (c_expand_return): Fix warning for local externs returned. + +Mon Mar 4 15:03:11 1996 Jason Merrill + + * tree.c (mapcar): Propagate const and volatile properly. + + * typeck.c (complete_type): Be sure to instantiate the + MAIN_VARIANT of the type. + + * method.c (synthesize_method): Class interface hackery does not + apply to synthesized methods. + +Mon Mar 4 14:05:23 1996 Jason Merrill + + * pt.c (comp_template_args): Use comptypes rather than just + checking for TEMPLATE_TYPE_PARM equivalence. + + * typeck.c (build_x_function_call): Call complete_type before + checking TYPE_OVERLOADS_CALL_EXPR. + +Mon Mar 4 18:48:30 1996 Manfred Hollstein + + * g++.c (main): Check also for new define ALT_LIBM. + +Fri Mar 1 13:09:33 1996 Jason Merrill + + * pt.c (instantiate_class_template): If we don't have a pattern + yet, that's OK. + (coerce_template_parms): If we see a local class, bail. + + * decl.c (grok_reference_init): Make sure there's a type before + checking its code. + + * pt.c (do_function_instantiation): Avoid crashing on invalid decls. + (push_template_decl): Likewise. + + * parse.y (named_class_head): Set + CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes. + + * decl.c (xref_tag): Diagnose redeclaration of template + type-parameter name. + + * error.c (dump_type): Handle anonymous template type parms. + + * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of + TYPE_STUB_DECL. + (coerce_template_parms): Likewise. + +Thu Feb 29 16:26:01 1996 Mike Stump + + * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF, + case ADDR_EXPR): Don't modify rhs if a subinstantiation fails. + +Thu Feb 29 08:20:25 1996 Jason Merrill + + * pt.c (instantiate_template): Take the MAIN_VARIANT of the type + before trying to get its STUB_DECL. + (coerce_template_parms): Likewise. + + * parse.y (template_type_parm): If they didn't use 'class', + pretend they did after giving an error. + + * pt.c (coerce_template_parms): Diagnose use of local class. + + * decl.c (grok_reference_init): Use instantiate_type. + + * error.c (dump_expr): Handle TEMPLATE_DECLs. + + * parse.y (named_class_head): Diagnose mismatching types and tags. + + * decl.c (pushdecl): Type decls and class templates clash with + artificial type decls, not hide them. + + * decl.c (redeclaration_error_message): Diagnose redefinition of + templates properly. + (duplicate_decls): Diagnose disallowed overloads for template + functions, too. + + * decl.c (start_decl): Call complete_type before checking for a + destructor. + + * pt.c (tsubst): Use tsubst_expr on the elts of a VEC. + + * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match. + +Wed Feb 28 09:28:44 1996 Jason Merrill + + * decl.c (grok_op_properties): Don't check for operator++(int) in + a template. + + * tree.c (perm_manip): Return a copy of variable and function + decls with external linkage. + + * tree.def: Change some of the min tree codes to type "1". + * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs. + * method.c (build_overload_int): Emit something arbitrary for + anything but an INTEGER_CST if we're in a template. + + * decl.c (cp_finish_decl): Call complete_type before deciding + whether or not to lay out the decl. + + * lex.c (do_identifier): Check for DECL_INITIAL before using it. + +Tue Feb 27 16:35:32 1996 Jason Merrill + + * typeck2.c (build_x_arrow): Call complete_type. + + * pt.c (add_pending_template): Broken out. + (lookup_template_class): If -fexternal-templates, call it for all + the methods of implemented types. + (instantiate_class_template): Instead of instantiating them here. + (instantiate_decl): Handle -fexternal-templates earlier. + +Tue Feb 27 15:51:32 1996 Brendan Kehoe + + * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the + memoized lookup stuff inside GATHER_STATISTICS. + +Tue Feb 27 10:38:08 1996 Jason Merrill + + * decl.c (start_decl): Complain about array of incomplete type + here. + (grokdeclarator): Not here. + + * parse.y (template_parm): Expand full_parm inline so we can set + the rule's precedence. + + * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy. + (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs. + * decl2.c (grokbitfield): Don't check for integer constant here. + * class.c (finish_struct_1): Check here. + + * decl.c (define_label): Make the min decl go on permanent_obstack. + + * pt.c (unify): Don't handle CONST_DECLs. + (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL. + (tsubst_copy): Likewise. + + * lex.c (do_identifier): Do pull the DECL_INITIAL out of a + CONST_DECL for a template parm. + +Mon Feb 26 12:48:18 1996 Jason Merrill + + * decl.c (grokdeclarator): Complain about array of incomplete type + here. + (start_decl_1): Not here. + + * pt.c (tsubst): Handle pointer-to-function declarators. + + * method.c (hack_identifier): If pedantic, diagnose local class + methods that require a static chain. + + * decl.c (grok_op_properties): No longer static. + * cp-tree.h: Declare it. + * pt.c (tsubst): Call it for operators. + Use tsubst_copy for TREE_VECs. + + * parse.y (template_arg): The expr has precedence like '>'. + +Fri Feb 23 14:51:52 1996 Jason Merrill + + * pt.c (coerce_template_parms): Don't coerce an expression using + template parms. + (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs. + (tsubst): Don't use build_index_2_type if the max_value uses template + parms. + * method.c (build_overload_int): Emit something arbitrary for an + expression using template parms. + + * parse.y (template_close_bracket): New non-terminal to catch use + of '>>' instead of '> >' in template class names. + (template_type): Use it. + * Makefile.in (CONFLICTS): Causes one more r/r conflict. + + * tree.def: Add CAST_EXPR. + * typeck2.c (build_functional_cast): Use CAST_EXPR instead of + CONVERT_EXPR for minimal_parse_mode. + * typeck.c (build_c_cast): Likewise. + * pt.c (tsubst_copy): Likewise. + * decl2.c (build_expr_from_tree): Likewise. + * error.c (dump_expr): Likewise. + +Fri Feb 23 10:36:46 1996 Brendan Kehoe + + * except.c (SetTerminate, SetUnexpected): Put back global vars. + (init_exception_processing): Put back decl/init of + set_unexpected_fndecl and set_terminate_fndecl, needed to get the + fns from libstdc++. + + * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield. + (declare_uninstantiated_type_level, uninstantiated_type_level_p): + Delete unused fns. + * cp-tree.h (declare_uninstantiated_type_level, + uninstantiated_type_level_p): Delete prototypes. + +Thu Feb 22 19:36:15 1996 Jason Merrill + + * pt.c (tsubst_expr): Add default return. + +Thu Feb 22 16:47:24 1996 Brendan Kehoe + + * error.c (fndecl_as_string): Delete unused arg CNAME. + * sig.c (build_signature_table_constructor, + build_signature_method_call): Fix calls. + + * class.c (the_null_vtable_entry): Delete var definition. + (init_class_processing): Delete tree the_null_vtable_entry init. + * decl.c (no_print_{functions, builtins}): Declare as static. + (__tp_desc_type_node): #if 0 var definition. + (init_type_desc): #if 0 init of __tp_desc_type_node. + (vb_off_identifier): Move var decl into init_decl_processing. + (current_function_assigns_this): Declare as static. + (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls. + (init_decl_processing): Delete init of void_ftype_ptr_ptr_int. + Move decls of string_ftype_ptr_ptr and int_ftype_string_string here. + * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE. + * init.c (BI_header_type, BI_header_size): Declare as static. + * pt.c (template_classes): Delete unused var. + (add_pending_template): Delete decl for non-existent fn. + (lookup_template_class): Delete vars CODE and TAG_CODE. + (instantiate_template): Delete unused var TARGS. + * cp-tree.h (vb_off_identifier, current_function_assigns_this): + Delete decls. + (__tp_desc_type_node): #if 0 var decl. + (fndecl_as_string): Fix prototype. + +Thu Feb 22 15:56:19 1996 Jason Merrill + + * tree.def: Add GOTO_STMT. + * pt.c (tsubst_expr): Support goto and labels. + * decl.c (define_label): Support minimal parsing. + * parse.y (simple_stmt): Likewise. + +Thu Feb 22 15:30:12 1996 Brendan Kehoe + + * xref.c (GNU_xref_member): Only define/set var I if + XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually + used. + (GNU_xref_end_scope): Delete unused fifth arg TRNS. + (GNU_xref_end): Fix call. + * decl.c (poplevel, poplevel_class, finish_method): Fix calls. + * cp-tree.h (GNU_xref_end_scope): Fix prototype. + + * tree.c (build_exception_variant): Delete unused vars I, A, T, + T2, and CNAME. + (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE. + (mapcar): Delete unused var CODE. + (build_cplus_new): Delete unused arg WITH_CLEANUP_P. + (break_out_cleanups): Fix call. + (bot_manip): Likewise. + * call.c (build_method_call): Likewise. + * cvt.c (build_up_reference, convert_to_reference, cp_convert): + Likewise. + * typeck.c (unary_complex_lvalue, build_modify_expr, + convert_for_initialization): Likewise. + * typeck2.c (build_functional_cast): Likewise. + * cp-tree.h (build_cplus_new): Fix prototype. + + * repo.c (open_repo_file): Delete unused var Q. + (repo_compile_flags, repo_template_declared, + repo_template_defined, repo_class_defined, repo_inline_used, + repo_vtable_used, repo_tinfo_used): #if 0 unused fns. + (repo_get_id, repo_vtable_used): Declare as static. + * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add + prototypes. + +Thu Feb 22 14:53:35 1996 Jason Merrill + + * parse.y (pending_inlines): Add function_try_block case. + + * pt.c (unify): Fix for template const parms. + +Thu Feb 22 13:24:15 1996 Brendan Kehoe + + * lex.c (extract_interface_info): Delete forward decl. + (default_copy_constructor_body, default_assign_ref_body): Delete + decls for non-existent functions. + (synth_firstobj, inline_text_firstobjs): Delete unused vars. + (init_lex): Delete setting them. + (cons_up_default_function): Delete unused vars FUNC_BUF, + FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old + #if 0'd synth code. + (toplevel, expression_obstack): Delete unused extern decls. + (tree_node_kind): Delete unused enum. + (tree_node_counts, tree_node_sizes): Wrap with #ifdef + GATHER_STATISTICS. + (tree_node_kind_names): Delete unused extern decl. + (synth_obstack): Delete unused var. + (init_lex): Don't set it. + (init_parse): Add decl before use. + (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH. + (current_unit_{name, language}): Delete unused vars. + (check_newline): Don't bother setting them, just accept the #pragma. + * cp-tree.h (init_repo, peek_yylex): Add prototypes. + (current_unit_{name, language}): Delete decls. + + * search.c: Wrap all of the memoized functions, macros, and + variables inside #ifdef GATHER_STATISTICS. + (lookup_field, lookup_fnfields): Likewise. + (init_search_processing): Likewise. + (reinit_search_statistics): Wrap whole function. + * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics. + + * decl.c (finish_function): Only call pop_memoized_context if + GATHER_STATISTICS is defined. + (start_function): Likewise for push_memoized_context. + * class.c (pushclass, popclass): Likewise. + + * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here... + * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here. + + * cvt.c (cp_convert): Delete unused local var FORM. + * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add + prototypes. + +Thu Feb 22 13:19:44 1996 Jason Merrill + + * pt.c (do_poplevel): Oops; really return what we get from + poplevel this time. + +Thu Feb 22 11:41:44 1996 Brendan Kehoe + + * cp-tree.h (is_aggr_type): Add prototype. + + * cp-tree.h ({push,pop}_cp_function_context): Add decls. + * method.c ({push,pop}_cp_function_context): Delete decls. + * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void. + (SetUnexpected, SetTerminate): Delete unused vars. + (init_exception_processing): Don't set SetUnexpected or + SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL. + (output_exception_table_entry): Delete unused array LABEL. + (expand_internal_throw): Delete unused var PARAMS. + (expand_start_catch_block): Delete unused var CLEANUP. + (emit_exception_table): Delete unused var EH_NODE_DECL. + (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and + GOTO_UNWIND_AND_THROW. Don't set them. + (end_eh_unwinder): Add top decl. + (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK. + (exception_section, push_rtl_perm, do_function_call, + lang_interim_eh, push_eh_cleanup, eh_outer_context, + expand_end_eh_spec, end_eh_unwinder): Declare as static. + (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup, + throw_used): Likewise. + * cp-tree.h (expand_end_eh_spec): Delete prototype. + + * search.c (dfs_mark, dfs_mark_vtable_path, + dfs_unmark_vtable_path, dfs_mark_new_vtable, + dfs_unmark_new_vtable, dfs_clear_search_slot, + dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp, + bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp, + bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused + functions. + (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1, + n_calls_lookup_fnfields, n_calls_lookup_fnfields_1, + n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved): + Only define #ifdef GATHER_STATISTICS. + (reinit_search_statistics): Only init some vars if GATHER_STATISTICS + is defined. + (vbase_decl): Delete var definition. + (init_search): Delete old decl. + (init_vbase_pointers): Delete building of VBASE_DECL, since it's + never actually used. + (expand_indirect_vtbls_init): Delete init of VBASE_DECL. + (get_base_distance_recursive): Delete unused fourth arg + BASETYPE_PATH. Fix call . + (get_base_distance): Fix call. + (push_class_decls): Delete unused var ID. + (make_memoized_table_entry): Declare as static. + (breadth_first_search): Declare as static. + (tree_has_any_destructor_p): Declare as static. + (pop_class_decls): Delete unused arg pop_class_decls. + * class.c (popclass): Fix call to pop_class_decls. + * cp-tree.h (make_memoized_table_entry, breadth_first_search, + tree_has_any_destructor_p): Delete prototypes. + + * rtti.c (build_ptmf_desc): Delete unused arg TYPE. + (build_t_desc): Fix call. Delete unused vars ELEMS and TT. + (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL. + (build_user_desc): Delete unused var T. + (build_class_desc): Delete unused vars T and OFF. + (build_t_desc): Delete unused var NAME_STRING. + (build_headof): Make static. + (get_bad_cast_node): Likewise. + (get_def_to_follow): Likewise. + * cp-tree.h (init_type_desc): Add prototype. + (build_headof): Remove prototype. + +Thu Feb 22 00:54:22 1996 Jason Merrill + + * pt.c (tsubst): Only look for matching decls at file scope for + non-member functions. + + * call.c (build_scoped_method_call): Handle scoped destructor + calls in templates. + + * decl.c (*_top_level): Also save previous_class_values. + + * pt.c (tsubst_expr): Support do {} while loops. + * parse.y (simple_stmt): Likewise. + * tree.def: Likewise. + + * method.c (build_overload_identifier): For a class nested in a + template class, don't mangle in the template parms from our + context. + + * lex.c, cp-tree.h: Remove support for template instantiations in + the pending_inlines code. + * pt.c: Remove dead functions and unused arguments. + (uses_template_parms): TYPENAME_TYPEs always use template parms. + * parse.y: Stop passing anything to end_template_decl. + * tree.c (print_lang_statistics): Only print tinst info #ifdef + GATHER_STATISTICS. + +Wed Feb 21 16:57:33 1996 Brendan Kehoe + + * init.c (expand_recursive_init{,_1}): Delete decls. + (sort_member_init): Delete unused var INIT. + (emit_base_init): Delete unused var X. + (build_offset_ref): Delete unused var CNAME. + (sort_member_init): Delete unused var FIELDS_TO_UNMARK. + (emit_base_init): Delete unused local var BASE. Delete extern + decl of IN_CHARGE_IDENTIFIER. + (build_delete): Delete unused local var VIRTUAL_SIZE. + + * init.c (build_vec_delete): Delete unused third arg ELT_SIZE. + (build_delete): Fix call. + * decl2.c (delete_sanity): Likewise. + * cp-tree.h (build_vec_delete): Update prototype. + + * typeck.c (common_base_type): Delete unused var TMP. + (build_binary_op): Delete local var ARGS_SAVE. + (build_array_ref): Delete unused var ITYPE. + (c_expand_return): Delete unused var USE_TEMP. + + * typeck.c (compexcepttypes): Delete unused arg STRICT. + (comptypes): Fix calls. + * decl.c (duplicate_decls): Likewise. + * cp-tree.h (compexcepttypes): Delete extra arg. + + * decl2.c (check_classfn): Delete unused second arg CNAME. + * decl.c (start_decl, grokfndecl): Fix calls. + * init.c (do_friend): Likewise. + * cp-tree.h (check_classfn): Update prototype. + + * cp-tree.h (signature_error, import_export_vtable, + append_signature_fields, id_in_current_class, mark_used, + copy_assignment_arg_p): Add decls. + * decl2.c (mark_used): Delete decl. + + * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS. + + * class.c (get_vtable_entry): Disable unused function. + (doing_hard_virtuals): Delete unused static global var. + (finish_struct_1): Don't init DOING_HARD_VIRTUALS. + (prepare_fresh_vtable): Delete unused vars PATH and RESULT. + (overrides): Delete unused vars RETTYPE and BASE_RETTYPE. + (modify_one_vtable): Delete unused var OLD_RTTI. + (finish_struct_anon): Delete unused vars OFFSET and X. + (finish_struct_bits): Delete unused var METHOD_VEC. + (get_basefndecls): Delete unused var PURPOSE. Delete unused + for-scope local variable METHODS. + + * call.c (user_harshness): Delete unused/unneeded arg PARM. + (ideal_candidate): Delete unused args BASETYPE and PARMS. + (build_method_call): Delete unused args passed into ideal_candidate. + (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME. + * cp-tree.h (synthesize_method): Add decl. + + * decl.c (note_level_for_for): Give void return type. + (pushdecl_nonclass_level): Likewise. + (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS. + (poplevel): Delete unused var IMPLICIT_TRY_BLOCK. + (suspend_binding_level): Delete unused var LEVEL. + (duplicate_decls): Delete unused var CTYPE. + (duplicate_decls): Delete unused var PREVIOUS_C_DECL. + (init_decl_processing): Delete unused vars FLOAT_ENDLINK and + PTR_ENDLINK. + (grokdeclarator): Delete unused var C. + (grokdeclarator): Delete unused var SIZE_VARIES. + (grokparms): Delete unused var SAW_VOID. + (start_function): Delete unused var OLDDECL. + (cplus_expand_expr_stmt): Delete unused var + REMOVE_IMPLICIT_IMMEDIATELY. + + * cp-tree.h (pushdecl_nonclass_level): Fix prototype. + + * Makefile.in (CONFLICTS): Update to 12 shift/reduce. + +Wed Feb 21 00:06:17 1996 Jason Merrill + + * tree.c (build_min): Set TREE_COMPLEXITY to lineno. + (build_min_nt): Likewise. + * pt.c (do_pushlevel): Emit line note. + (do_poplevel): Return what we get from poplevel. + (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes. + * parse.y: Use do_pushlevel and do_poplevel. + * cp-tree.h: Declare do_poplevel. + + * cp-tree.h: Declare at_eof. + * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation. + * decl2.c (import_export_decl): Renamed from import_export_inline. + (finish_file): Call it to do interface handling for statics. + * pt.c (tsubst_copy): Call mark_used on variables and functions + used here. + + * decl2.c (finish_file): Don't emit statics we can't generate. + * pt.c (instantiate_decl): Don't set interface on instantiations + we can't generate. + + * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'. + * tree.c (print_lang_statistics): Print max template depth. + * pt.c (push_tinst_level): Dump entire instantiation context. + (instantiate_class_template): Use it and pop_tinst_level. + (instantiate_decl): Likewise. + + * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c + pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE. + +Tue Feb 20 18:21:51 1996 Jason Merrill + + * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c + init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c + tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for + the new template implementation. + +Tue Feb 20 17:14:29 1996 Brendan Kehoe + + * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS. + +Thu Feb 15 18:44:42 1996 Mike Stump + + * decl.c (cp_finish_decl): Delay emitting the debug information for + a typedef that has been installed as the canonical typedef, if the + type has not yet been defined. + +Thu Feb 15 09:39:08 1996 Jason Merrill + + * decl2.c (grokfield): Still call pop_nested_class for access decls. + +Wed Feb 14 17:30:04 1996 Brendan Kehoe + + * decl.c (lookup_label): Call label_rtx. + + * decl.c (make_binding_level): New function. + (pushlevel, pushlevel_class): Call it instead of explicit + duplicate calls to xmalloc. + + * decl.c (init_decl_processing): Delete useless build_pointer_type + call. + + * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions. + (sizet_ftype_string): Delete variable. + (init_decl_processing): Add built-in functions fabsf, fabsl, + sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local + variable strlen_ftype, used for strlen. + +Wed Feb 14 16:21:25 1996 Jason Merrill + + * decl.c (push_to_top_level): Start from current_binding_level + again for now; the stl hacks depend on g++ being broken in this + way, and it'll be fixed in the template rewrite. + + * tree.def: Add USING_DECL. + * decl2.c (do_class_using_decl): Implement. + (grokfield): Pass access decls off to do_class_using_decl instead of + grokdeclarator. + * error.c (dump_decl): Handle USING_DECLs. + * decl.c (grokdeclarator): Remove code for handling access decls. + * class.c (finish_struct_1): Adjust accordingly, treat using-decls + as access decls for now. + (finish_struct): Don't check USING_DECLs for other uses of the name. + + * search.c (get_matching_virtual): Use cp_error_at. + +Wed Feb 14 10:36:58 1996 Brendan Kehoe + + * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to + match c-typeck.c. + (self_promoting_args_p): Move the check that TYPE is non-nil + before trying to look at its main variant. + (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes. + + * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS): + Delete macros. + * init.c (xref_friend, embrace_waiting_friends): Delete functions. + (do_friend): Delete call to xref_friend. + * class.c (finish_struct_1): Delete call to embrace_waiting_friends. + + * typeck.c (convert_sequence): #if 0 unused function. + + * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to + be in decl_in_memory_p. + (decl_in_memory_p): Delete decl. + * expr.c (decl_in_memory_p): Delete fn. + * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P. + + * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P. + +Tue Feb 13 12:51:21 1996 Jason Merrill + + * class.c (finish_struct_1): Check for a pure-specifier on a + non-virtual function here. + + * decl2.c (grok_function_init): Don't check whether the function + is virtual here. + (grokfield): Don't call check_for_override here. + + * decl.c (push_to_top_level): Start from inner_binding_level, + check class_shadowed in class levels. + +Mon Feb 12 17:46:59 1996 Mike Stump + + * decl.c (resume_level): Ignore things that don't have names, instead + of core dumping. + +Mon Feb 12 15:47:44 1996 Brendan Kehoe + + * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs. + +Sat Feb 10 17:59:45 1996 Jason Merrill + + * class.c (finish_struct_1): Set DECL_VINDEX properly on a + synthesized dtor. + + * parse.y (complete_type_name): Bind global_scope earlier. + (complex_type_name): Likewise. + (qualified_type_name): Remove. + +Thu Feb 8 15:15:14 1996 Jason Merrill + + * decl.c (grokfndecl): Move code that looks for virtuals in base + classes... + * class.c (check_for_override): ... to a new function. + (finish_struct_1): Call it. + + * cp-tree.h: Declare warn_sign_compare. + + * typeck.c (build_binary_op_nodefault): Check warn_sign_compare + rather than extra_warnings to decide whether to warn about + comparison of signed and unsigned. + + * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall + implies -Wsign-compare. -Wall doesn't imply -W. + +Wed Feb 7 15:27:57 1996 Mike Stump + + * typeck.c (build_component_ref): Fix to handle anon unions in base + classes as well. + +Wed Feb 7 14:29:12 1996 Brendan Kehoe + + * class.c (resolves_to_fixed_type_p): Delete code dealing with + a WITH_CLEANUP_EXPR, since we don't generate them any more. + * cvt.c (build_up_reference): Likewise. + * decl.c (grok_reference_init): Likewise. + (cp_finish_decl): Likewise. + * error.c (dump_expr): Likewise. + * tree.c (real_lvalue_p): Likewise. + (lvalue_p): Likewise. + (build_cplus_new): Likewise. + (unsave_expr_now): Likewise. + * typeck.c (unary_complex_lvalue, build_modify_expr, + c_expand_return): Likewise. + +Tue Feb 6 13:39:22 1996 Brendan Kehoe + + Make the C++ front-end pay attention to attributes for structures. + * class.c (finish_struct): New argument ATTRIBUTES, passed down into + finish_struct_1. + (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes. + Take out old round_up_size use and setting the DECL_ALIGN possibly + using it. Take out setting of TYPE_ALIGN to round_up_size, which + can override what the attribute set. + * cp-tree.h (finish_struct): Update prototype. + * parse.y (template_instantiate_once): Pass a NULL_TREE for the + attributes to finish_struct. + (structsp): For a CLASS decl, add maybe_attribute to rule and pass that + value down into finish_struct. + * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts. + +Tue Feb 6 13:12:15 1996 Per Bothner + + * decl.c (poplevel): Re-word dead for local handling. + (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test. + (cp_finish_decl): If is_for_scope, check for duplicates so + we can disable is_for_scope. Otherwise, preserve_temp_slots. + + * lex.c (do_identifier): Use global binding in preference of + dead for local variable. + +Mon Feb 5 17:46:46 1996 Mike Stump + + * init.c (initializing_context): Handle anon union changes, the + context where fields of anon unions can be initialized now has to be + found by walking up the TYPE_CONTEXT chain. + +Fri Feb 2 14:54:04 1996 Doug Evans + + * decl.c (start_decl): #ifdef out code to set DECL_COMMON + if ASM_OUTPUT{,_ALIGNED}_BSS is defined. + (obscure_complex_init): If bss is supported, always set + DECL_INITIAL to error_mark_node. + +Thu Feb 1 16:19:56 1996 Brendan Kehoe + + * init.c (is_friend): Make sure there's a context before we see if + it's an aggr type. + +Thu Feb 1 15:44:53 1996 Mike Stump + + * init.c (is_friend): Classes are not friendly with nested classes. + +Thu Feb 1 15:27:37 1996 Doug Evans + + * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA, + and record its result. + +Thu Feb 1 09:27:01 1996 Mike Stump + + * class.c (finish_struct_anon): Switch around code to not move anon + union elements around, nor mess up their contexts, nor offsets, + instead we now build up the right number of COMPONENT_REFs for all + the anon unions that may be present at build_component_ref time. + * typeck.c (lookup_anon_field): New routine to handle field lookup + on fields without names. We find them, based upon their unique type + instead. + * typeck.c (build_component_ref): Allow FIELD_DECL components. + Handle finding components in anonymous unions, and ensure that a + COMPONENT_REF is built for each level as necessary. + +Tue Jan 30 18:18:23 1996 Mike Stump + + * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after + code that ensures that copy ctors are used if appropriate. + +Tue Jan 30 17:35:14 1996 Brendan Kehoe + + * init.c (build_vec_delete): Only give an error if base isn't an + error_mark_node. + +Mon Jan 29 17:09:06 1996 Mike Stump + + * spew.c (do_aggr): `new struct S;' isn't a forward declaration. + (yylex): If we see `new', keep slurping. + +Thu Jan 25 18:31:36 1996 Mike Stump + + * class.c (finish_struct_1): Move code for handling anon unions... + (finish_struct_anon): to here. Fixup so that we do the offset + calculations right, and so that the fields are physically moved to + the containers's chain. + +Thu Jan 25 18:27:37 1996 Brendan Kehoe + + * decl.c (grokdeclarator): Avoid trying to get an operand off an + identifier node. + +Wed Jan 24 11:25:30 1996 Jim Wilson + + * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not + POINTER_SIZE to agree with expr.c. + +Thu Jan 25 13:01:23 1996 Mike Stump + + * search.c (lookup_field): Don't report ambiguities if protect is 0, + instead return NULL_TREE. + +Wed Jan 24 13:01:26 1996 Mike Stump + + * class.c (finish_struct_1): Call warn_hidden if we want warnings + about overloaded virtual functions. + (warn_hidden): New routine to warn of virtual functions that are + hidden by other virtual functions, that are not overridden. + (get_basefndecls): New routine, used by warn_hidden. + (mark_overriders): New routine, used by warn_hidden. + * search.c (get_matching_virtual): Remove old warning that just + isn't very useful. + +Tue Jan 23 12:26:10 1996 Brendan Kehoe + + * decl.c (output_builtin_tdesc_entries): #if 0 the function definition. + + * typeck.c (null_ptr_cst_p): Delete unused fn. + (build_function_call_maybe): Delete unused fn. + + * expr.c (extract_init): #if 0 the code after unconditional return 0 + for now. + + Delete old cadillac code. + * edsel.c: Remove file. + * Make-lang.in (CXX_SRCS): Take edsel.c off the list. + * Makefile.in (CXX_OBJS): Delete edsel.o. + (edsel.o): Delete rule. + * cp-tree.h (flag_cadillac): Delete var decl. + * lang-options.h: Delete "-fcadillac" and "-fno-cadillac". + * decl2.c (flag_cadillac): Delete var definition. + (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac. + (grokfield): Delete code depending on flag_cadillac. + (finish_anon_union): Likewise. + * class.c (finish_struct_1): Likewise. + (pushclass): Likewise. + (popclass): Likewise. + (push_lang_context): Likewise. + (pop_lang_context): Likewise. + * decl.c (init_decl_processing): Likewise. + (start_decl): Likewise. + (cp_finish_decl): Likewise. + (xref_tag): Likewise. + (finish_enum): Likewise. + (start_function): Likewise. + (finish_function): Likewise. + (finish_stmt): Likewise. + * lex.c (lang_init): Likewise. + (check_newline): Likewise. + + * lex.c (do_pending_inlines): Delete synthesized method kludge. + + Delete defunct, ancient garbage collection implementation. + * rtti.c: New file with the RTTI stuff from gc.c. + * gc.c: Removed file (moved the remaining stuff into rtti.c). + * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o. + (rtti.o): New rule, replacing gc.o. + * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c. + * cp-tree.h: Delete gc-related fn decls. + (DECL_GC_OFFSET): Delete macro. + (flag_gc): Delete extern decl. + * decl.c (current_function_obstack_index): Delete var decl. + (current_function_obstack_usage): Delete var decl. + (start_function): Delete clearing of current_function_obstack_index + and current_function_obstack_usage. + (init_decl_processing): Delete code relying on -fgc. + Delete call to init_gc_processing. + (cp_finish_decl): Delete calls to build_static_gc_entry and + type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET. + (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup + and to expand_expr of a __gc_main call. + (maybe_gc_cleanup): Delete var decl. + (finish_function): Delete call to expand_gc_prologue_and_epilogue. + * decl2.c (flag_gc): Delete var decl. + (lang_f_options): Delete offering of -fgc. + (lang_decode_option): Delete -fgc and -fno-gc handling. + (get_temp_regvar): Delete gc code. + * init.c (build_new): Delete gc code. + * lex.c (init_lex): Delete checking of flag_gc. + + * typeck.c (convert_arguments): Delete gc code. + (build_component_addr): Delete -fgc warning. + (build_modify_expr): Delete gc code. + + * decl2.c (build_push_scope): Delete fn. + * cp-tree.h (build_push_scope): Delete decl. + + * search.c (clear_search_slots): Delete fn. + * cp-tree.h (clear_search_slots): Delete decl. + + * search.c (tree_needs_constructor_p): Delete fn. + * cp-tree.h (tree_needs_constructor_p): Delete decl. + + * tree.c (id_cmp): Delete fn. + + * tree.c (set_fnaddr_from_vtable_entry): Delete fn. + * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl. + + * tree.c (decl_value_member): Delete fn. + * cp-tree.h (decl_value_member): Delete decl. + + * tree.c (list_hash_lookup_or_cons): Delete fn. + * cp-tree.h (list_hash_lookup_or_cons): Delete decl. + + * method.c (cplus_exception_name): Delete fn. + (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros. + + * spew.c (shift_tokens): Delete fn. + +Mon Jan 22 17:49:33 1996 Jason Merrill + + * except.c (init_exception_processing): Pass 1 to needs_pop in calls + to cp_finish_decl. + * parse.y: Likewise. + +Mon Jan 22 17:34:29 1996 Brendan Kehoe + + * tree.c (build_cplus_staticfn_type): Delete function definition; + never used. + * cp-tree.h (build_cplus_staticfn_type): Delete decl. + + * tree.c (virtual_member): Delete function definition; never used. + * cp-tree.h (virtual_member): Delete decl. + +Fri Jan 19 18:03:14 1996 Mike Stump + + * typeck.c (build_component_ref): Handle getting vbase pointers + out of complex multiple inheritance better. + +Fri Jan 19 16:27:40 1996 Mike Stump + + * typeck.c (build_object_ref): Make sure we use the real type, not + any reference type. + +Fri Jan 19 16:01:47 1996 Mike Stump + + * tree.c (build_exception_variant): Don't create new types if we + don't have to, also build new types on the right obstack. + +Fri Jan 19 14:09:44 1996 Jason Merrill + + * decl.c (store_bindings): Split out from push_to_top_level. + (push_to_top_level): Call it for b->type_shadowed on class binding + levels. + +Fri Jan 19 13:53:14 1996 Mike Stump + + * search.c (expand_upcast_fixups): Fix so that offsets stored in + vbase_offsets are always right. Fixes a problem where virtual base + upcasting and downcasting could be wrong during conversions on this + during virtual function dispatch at ctor/dtor time when dynamic + vtable fixups for deltas are needed. This only sounds easier than + it is. :-) + (fixup_virtual_upcast_offsets): Change to reflect new calling + convention for expand_upcast_fixups. + +Fri Jan 19 12:23:08 1996 Brendan Kehoe + + * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we + check that it's usable as the bitfield width. + +Wed Jan 17 21:22:40 1996 Brendan Kehoe + + * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist. + Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's + only ever used for functions in it. + +Wed Jan 17 12:10:38 1996 Jason Merrill + + * parse.y (qualified_type_name): Use the TYPE_DECL, not the type. + (nested_type): Likewise. + (nested_name_specifier): Use lastiddecl. + + * decl.c (grokdeclarator): Adjust accordingly. + * init.c (expand_member_init): Likewise. + * parse.y (base_class): Likewise. + * typeck2.c (build_functional_cast): Likewise. + + * typeck2.c (build_functional_cast): Fill in name after we've + checked for non-aggr type. + +Wed Jan 17 10:18:01 1996 Mike Stump + + * decl2.c (warn_pointer_arith): Default to on. + +Tue Jan 16 12:45:38 1996 Jason Merrill + + * lex.c (is_rid): New function. + * decl.c (grokdeclarator): Diagnose reserved words used as + declarator-ids. + +Tue Jan 16 11:39:40 1996 Jason Merrill + + * tree.c (get_decl_list): Don't lose cv-quals. + + * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose + typespecs used as declarator-ids. + +Tue Jan 16 11:09:42 1996 Mike Stump + + * decl.c (poplevel): When popping a level, don't give a warning for + any subblocks that already exist. + +Tue Jan 16 00:25:33 1996 Jason Merrill + + * typeck.c (build_object_ref): Finish what I started. + + * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN. + + * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs. + + * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a + scope. + +Mon Jan 15 16:19:32 1996 Jason Merrill + + * decl.c (xref_tag): Handle passing a type in directly. + + * parse.y (qualified_type_name): Pull out the type. + (nested_type): Likewise. + Take types directly instead of as identifiers. + * call.c (build_scoped_method_call): Take types directly instead of + as identifiers. + * decl.c (xref_basetypes): Likewise. + * init.c (expand_member_init): Likewise. + (build_member_call): Likewise. + (build_offset_ref): Likewise. + * typeck2.c (build_scoped_ref): Likewise, remove bogus code. + * method.c (do_build_assign_ref): Likewise. + * decl.c (grokdeclarator): Handle a type appearing as the + declarator-id for constructors. + * method.c (do_build_copy_constructor): current_base_init_list now + uses the types directly, not their names. + * init.c (sort_base_init): Likewise. + (expand_member_init): Likewise. + * init.c (is_aggr_type): New function, like is_aggr_typedef. + +Mon Jan 15 08:45:01 1996 Jeffrey A Law + + * tree.c (layout_basetypes): Call build_lang_field_decl instead + of build_lang_decl if first arg is a FIELD_DECL. + +Thu Jan 11 14:55:07 1996 Brendan Kehoe + + * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is + non-empty. + * except.c (expand_start_catch_block): Set TREE_USED to avoid + warnings about the catch handler. + +Mon Jan 8 17:35:12 1996 Jason Merrill + + * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of + expand_target_expr. + +Thu Jan 4 12:30:32 1996 Brendan Kehoe + + Fix access control to use trees rather than integers. + * class.c (access_{default, public, protected, private, + default_virtual, public_virtual, private_virtual}_node): Add + definitions. + (init_class_processing): Do creation of those nodes. + * cp-tree.h (access_type): Delete enum decl. + (access_{default, public, protected, private, default_virtual, + public_virtual, private_virtual}_node): Add decls. + (compute_access): Change return type. + * search.c (compute_access): Have tree return type, instead of enum. + (lookup_field): Declare THIS_V and NEW_V to be tree nodes. + * lex.c (real_yylex): Use yylval.ttype for giving the value of the + access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}. + * parse.y (VISSPEC): Make ttype rather than itype. + (base_class_access_list): Likewise. + * *.[cy]: Change all refs of `access_public' to `access_public_node', + etc. + * call.c (build_method_call): Make ACCESS be a tree. + * class.c (alter_access, finish_struct_1, filter_struct): Likewise. + * cvt.c (convert_to_aggr): Likewise. + * init.c (build_offset_ref, resolve_offset_ref, build_delete): + Likewise. + * method.c (hack_identifier): Likewise. + * typeck.c (build_component_ref_1, build_component_ref): ): Likewise. + +Thu Jan 4 11:02:20 1996 Mike Stump + + * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C + frontend, and make it more consistent with respect to + warn_pointer_arith. + +Tue Jan 2 00:13:38 1996 Rusty Russell + + * decl.c (pushdecl): Check for duplicate parameter names. + +Wed Jan 3 09:25:48 1996 Mike Stump + + * decl.c (expand_static_init): Call assemble_external for atexit. + +Wed Jan 3 07:55:19 1996 Mike Stump + + * except.c (do_unwind): Remove some generated dead code. + (eh_outer_context): New routine, factor out some common code from + expand_builtin_throw and end_eh_unwinder. Add code to do return + address masking for the PA. + (expand_builtin_throw): Use eh_outer_context instead of open coding + it here. + (end_eh_unwinder): Likewise. + +Tue Jan 2 17:00:56 1996 Mike Stump + + * except.c (expand_throw): Call assemble_external for __empty, if we + use it. + diff --git a/gcc/cp/ChangeLog-1997 b/gcc/cp/ChangeLog-1997 new file mode 100644 index 0000000..8e2c734 --- /dev/null +++ b/gcc/cp/ChangeLog-1997 @@ -0,0 +1,2607 @@ +Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi + + * call.c (add_builtin_candidate): Add default case in enumeration + switch. + (build_new_op): Likewise. + (convert_like): Likewise. + * cvt.c (build_expr_type_conversion): Likewise. + * tree.c (real_lvalue_p): Likewise. + (lvalue_p): Likewise. + (cp_tree_equal): Likewise. + * typeck.c (comptypes): Likewise. + (build_component_ref): Likewise. + (build_function_call_real): Likewise. + (build_binary_op_nodefault): Likewise. + (build_unary_op): Likewise. + (build_modify_expr): Likewise. + * typeck2.c (initializer_constant_valid_p): Likewise. + +Sun Dec 21 15:59:00 1997 Nick Clifton + + * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas. + +Thu Dec 18 14:51:50 1997 Mark Mitchell + + * pt.c (coerce_template_parms): Make sure to digest_init if + possible. + + * decl.c (duplicate_decls): Make the newdecl virtual if the + olddecl was, just as is done with other attributes of olddecl. + +Thu Dec 18 14:43:19 1997 Jason Merrill + + * typeck.c (unary_complex_lvalue): Ignore op0 when taking the + address of an OFFSET_REF. + + * cp-tree.def: Add AGGR_INIT_EXPR. + * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with + AGGR_INIT_EXPR where appropriate. + * expr.c (cplus_expand_expr): Likewise. Simplify. + + * decl2.c (finish_file): Remove call to register_exception_table. + +Wed Dec 17 17:08:52 1997 Benjamin Kosnik + + * pt.c (instantiate_class_template): Don't do injection when + processing_template_decl is true, as pollutes current_binding_level + for base classes. + +Wed Dec 17 21:17:39 1997 Peter Schmid + + * pt.c (maybe_fold_nontype_arg): Add prototype. + +Tue Dec 16 10:31:20 1997 Jason Merrill + + * tree.c (mapcar): Handle TRY_CATCH_EXPR et al. + * error.c (dump_expr): Likewise. + +Mon Dec 15 12:22:04 1997 Jason Merrill + + * typeck.c (build_function_call_real): Remove "inline called before + definition" pedwarn. + + * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg. + +Sun Dec 14 22:34:20 1997 Jason Merrill + + * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's. + + * pt.c (type_unification_real): Change __null to type void* with + a warning. + +Sun Dec 14 20:38:35 1997 Mark Mitchell + + * call.c (implicit_conversion): Don't call + build_user_type_conversion_1 with a NULL expr, since it will + crash. + + * pt.c (unify): Don't try to unify array bounds if either array is + unbounded. + +Fri Dec 12 16:09:14 1997 Jason Merrill + + * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at): + Replace extern decls with casts. + + * decl.c (expand_start_early_try_stmts): Don't mess with a sequence. + Update last_parm_cleanup_insn. + (store_after_parms): Remove. + * cp-tree.h: Adjust. + +Thu Dec 11 22:18:37 1997 Jason Merrill + + * decl2.c (comdat_linkage): Also set DECL_COMDAT. + (finish_file): Check DECL_COMDAT instead of weak|one_only. + (import_export_vtable): Use make_decl_one_only instead of + comdat_linkage for win32 tweak. + (import_export_decl): Likewise. + * pt.c (mark_decl_instantiated): Likewise. + + * decl2.c (finish_file): Lose handling of templates in pending_statics. + +Thu Dec 11 21:12:09 1997 Jason Merrill + + * decl2.c (finish_file): Lose call to expand_builtin_throw. + * except.c (expand_builtin_throw): Remove. + * cp-tree.h: Remove ptr_ptr_type_node. + * decl.c: Likewise. + +Thu Dec 11 20:43:33 1997 Teemu Torma + + * decl.c (ptr_ptr_type_node): Define. + (init_decl_processing): Initialize it. + * cp-tree.h: Declare it. + * exception.cc (__cp_exception_info): Use __get_eh_info. + (__cp_push_exception): Likewise. + (__cp_pop_exception): Likewise. + + From Scott Snyder : + * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of + saved_pc. + (init_exception_processing): Removed saved_pc initialization. + +Wed Dec 10 11:04:45 1997 Jason Merrill + + * pt.c (instantiate_decl): Defer all templates but inline functions. + +Mon Dec 8 23:17:13 1997 Jason Merrill + + * init.c (expand_vec_init): Don't fold a list of parameters. + + * decl.c (copy_args_p): Handle copy elision for types with virtual + bases. + * call.c (build_over_call): Likewise. + +Sun Dec 7 22:38:12 1997 Mark Mitchell + + * pt.c (lookup_template_function): Copy the template arguments, + not just the list containing them, to the permanent obstack. + +Sun Dec 7 15:53:06 1997 Jason Merrill + + * except.c (expand_start_catch_block): suspend_momentary for the + terminate handler. + + * error.c (dump_decl): Handle LOOKUP_EXPR. + +Sun Dec 7 15:45:07 1997 Mark Mitchell + + * rtti.c (build_dynamic_cast): Copy the cast-to type to the + permanent obstack if we are processing a template decl. + * typeck.c (build_static_cast): Likewise. + (build_const_cast): Likewise. + (build_reinterpret_cast): Likewise. + + * pt.c (coerce_template_parms): Coerce some expressions, even + when processing_template_decl. + +Sun Dec 7 01:46:33 1997 Bruno Haible + + * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric + handling of pointer difference expressions. + + * typeck.c (comp_target_types): Comparison of function/method types + is independent of nptrs. + +Sun Dec 7 01:40:27 1997 Mark Mitchell + + * pt.c (tsubst): Avoid creating pointer to reference and + reference to reference types. + +Sat Dec 6 01:29:37 1997 Jason Merrill + + * parse.y (do_id): New nonterminal. + (template_id): Use it. + +Fri Dec 5 01:17:34 1997 Jason Merrill + + * parse.y (template_id): do_identifier for PFUNCNAMEs, too. + * spew.c (yylex): Don't do_identifier here. + * decl2.c (build_expr_from_tree): Revert last change. + + * decl2.c (build_expr_from_tree): Expand the name for a method call. + * parse.y (object_template_id): Don't try to take the DECL_NAME. + +Wed Dec 3 20:02:39 1997 Jason Merrill + + * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for + alloc_expr. + * call.c (build_op_delete_call): Adjust. + + * except.c (expand_end_catch_block): Lose rethrow region. + (expand_start_catch_block): Likewise. + (expand_end_catch_block): Don't expand_leftover_cleanups. + +Wed Dec 3 13:24:04 1997 Benjamin Kosnik + + * pt.c (tsubst): Remove tree_cons call (places redundant info into + DECL_TEMPLATE_INSTANTIATION). + +Wed Dec 3 11:44:52 1997 Jason Merrill + + * tree.c (is_overloaded_fn): Handle getting a fn template. + (really_overloaded_fn): Likewise. + * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better. + * pt.c (check_explicit_specialization): Tweak. + (determine_explicit_specialization): Tweak. + + * tree.c, cp-tree.h (get_target_expr): New fn. + +Wed Dec 3 08:47:27 1997 Paul Eggert + + * pt.c (check_explicit_specialization): Fix misspelling in + diagnostic: `preceeded'. + * typeck.c (get_delta_difference): Fix misspelling in diagnostic: + `conversiona'. + +1997-12-02 Mark Mitchell + + * pt.c (determine_explicit_specialization): Avoid an internal + error for bad specializations. + + * method.c (build_overload_value): Handle SCOPE_REF. + +Tue Dec 2 19:18:50 1997 Mike Stump + + * class.c (prepare_fresh_vtable): Enable even more complex MI + vtable names. + +Tue Dec 2 01:37:19 1997 Jason Merrill + + * exception.cc (__check_eh_spec): Optimize a bit. + + * exception.cc (__cp_pop_exception): Lose handler arg. + * except.c (do_pop_exception): Likewise. + (push_eh_cleanup): Let the cleanup mechanism supply the handler. + (expand_end_catch_block): Likewise. + +Fri Nov 28 01:58:14 1997 Jason Merrill + + * pt.c (check_explicit_specialization): Complain about using a + template-id for a non-specialization. + +Fri Nov 28 12:35:19 1997 Scott Christley + + * repo.c: Prototype rindex only if needed. + * xref.c: Likewise. + +Fri Nov 28 01:56:35 1997 Bruno Haible + + * error.c (dump_decl): Handle TEMPLATE_ID_EXPR. + +Thu Nov 27 00:59:46 1997 Jason Merrill + + * typeck.c (build_const_cast): Handle references here instead of + handing off to convert_to_reference. + + * except.c: Lose Unexpected, SetTerminate, SetUnexpected, + TerminateFunctionCall. + (init_exception_processing): Likewise. Terminate et al are now + the fns, not ADDR_EXPRs. + (various): Lose redundant assemble_external calls. + (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/. + + * cp-tree.h (struct lang_decl_flags): Add comdat. + (DECL_COMDAT): New macro. + * decl.c (duplicate_decls): Propagate it. + (cp_finish_decl): Handle it. + * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs. + + * class.c: Remove static pending_hard_virtuals. + (add_virtual_function): Take pointers to pending_virtuals + and pending_hard_virtuals. + (finish_struct_1): Pass them. Declare pending_hard_virtuals. + +Wed Nov 26 20:28:49 1997 Jason Merrill + + * decl2.c (import_export_vtable): If we support one_only but not + weak symbols, mark instantiated template vtables one_only. + (import_export_decl): Likewise for tinfo functions. + (finish_vtable_vardecl): Also write out vtables from explicitly + instantiated template classes. + * pt.c (mark_class_instantiated): Revert last change. + + * except.c (expand_throw): Call mark_used on the destructor. + +Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com) + + * lex.c (lang_init): Enable flag_exceptions by default if no + command line switch was specified. + +1997-11-26 Mark Mitchell + + * pt.c (unify): Handle `void' template parameters in + specializations. + +Wed Nov 26 01:11:24 1997 Jason Merrill + + * rtti.c (build_dynamic_cast): Handle template case here. + (build_dynamic_cast_1): Not here. + + * typeck2.c (digest_init): Make copies where appropriate. + + * decl2.c (delete_sanity): resolve_offset_ref. + + * except.c: Call terminate without caching so many bits. + + * except.c (expand_start_catch_block): Fix catching a reference + to pointer. + +Tue Nov 25 11:28:21 1997 Jason Merrill + + * init.c (build_new): Copy size to the saveable obstack. + + * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the + TRY_CATCH_EXPR for now. + +Mon Nov 24 12:15:55 1997 Jason Merrill + + * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL + has DECL_LANG_SPECIFIC. + + * exception.cc (struct cp_eh_info): Add handlers field. + (__cp_push_exception): Initialize it. + (__cp_pop_exception): Decrement it. Don't pop unless it's 0. + (__throw_bad_exception): Remove. + * except.c (call_eh_info): Add handlers field. + (get_eh_handlers): New fn. + (push_eh_cleanup): Increment handlers. + +Fri Nov 21 12:22:07 1997 Jason Merrill + + * except.c (expand_start_eh_spec): Use the try/catch code. + (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of + doing everything inline. + (init_exception_processing): throw_type_match now takes + const void pointers. + * exception.cc (__check_eh_spec): New fn. + * inc/exception: Neither terminate nor unexpected return. + * decl.c: Make const_ptr_type_node public. + * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly. + + * except.c (expand_start_catch_block): We only need the rethrow + region for non-sjlj exceptions. + (expand_end_catch_block): Likewise. Use outer_context_label_stack. + +Thu Nov 20 14:40:17 1997 Jason Merrill + + * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs. + (various.o): Likewise. + * inc/new: Add placement deletes. Add throw specs for default new. + * new.cc (set_new_handler): Move here from libgcc2. + * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler. + (new): Move from libgcc2. Throw bad_alloc. + * new2.cc: Move the rest of the op news and op deletes from libgcc2. + * decl.c (init_decl_processing): Update exception specs on new and + delete. + + * method.c (build_decl_overload_real): Don't mess with global + placement delete. + + * init.c (build_new): Check for null throw spec, not nothrow_t. + + * decl.c (duplicate_decls): Don't complain about different exceptions + from an internal declaration. + + * call.c (build_op_delete_call): Fix check for member fns again. + + * decl2.c (import_export_decl): Interface hackery affects + virtual synthesized methods. + +Wed Nov 19 18:24:14 1997 Jason Merrill + + * decl.c (start_decl): Don't just complain about a mismatched + scope, fix it. + + * decl.c (make_implicit_typename): Handle case where t is not + actually from context. + * tree.c (get_type_decl): Lose identifier case. + * spew.c (yylex): Lose useless call to identifier_typedecl_value. + * parse.y (nonnested_type): Just use lookup_name. + (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE. + +Wed Nov 19 11:45:07 1997 Michael Tiemann + + * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case + T was built in C language context (for example, by + output_func_start_profiler). + +Wed Nov 19 10:39:27 1997 Jason Merrill + + * decl.c (make_implicit_typename): New fn. + (lookup_name_real): Use it. Use current_class_type as the context. + +Mon Nov 17 23:42:03 1997 Bruno Haible + + * pt.c (do_poplevel): Don't prohibit jumps into this contour. + +Mon Nov 17 02:01:28 1997 Jason Merrill + + * friend.c (do_friend): Warn about non-template friends in templates. + + * call.c (build_op_delete_call): Fix handling of inherited delete. + + * search.c (dfs_record_inheritance): Ignore template type parms. + +Sat Nov 15 00:30:51 1997 Jason Merrill + + * call.c (build_new_op): Fix copy error. + (build_op_new_call): New fn. + (build_op_delete_call): New fn. + * cp-tree.h: Declare them. + * init.c (build_new): Use them. Support placement delete. + (build_x_delete): Use build_op_delete_call. + (build_delete): Likewise. + * decl2.c (delete_sanity): Likewise. + (coerce_delete_type): Don't complain about placement delete. + +Thu Nov 13 01:52:36 1997 Jason Merrill + + * call.c (build_new_function_call): Remove unused 'obj' parm. + * cp-tree.h, typeck.c: Adjust. + + * init.c (build_new): Make the cleanup last longer. + (expand_vec_init): Call do_pending_stack_adjust. + +Wed Nov 12 11:04:33 1997 Jason Merrill + + * pt.c (do_type_instantiation): Fix typo. + (mark_class_instantiated): If we support one_only but not weak + symbols, don't mark this as known. + + * init.c (build_new): Handle vec delete in EH cleanup. + +Wed Nov 12 08:11:55 1997 Benjamin Kosnik + + * call.c (build_method_call): Call complete_type before checking + for destructor. + +Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com) + + * decl.c (add_block_current_level): Delete. + * init.c (build_vec_delete_1): Delete build_block and + add_block_current_level calls. + +Wed Nov 12 00:48:16 1997 Jason Merrill + + * init.c (build_new): Handle freeing allocated memory when the + constructor throws. + + * call.c (build_new_method_call): Fix flags arg. + + * pt.c (do_type_instantiation): Don't try to instantiate + member templates. + (mark_decl_instantiated): If we support one_only but not + weak symbols, mark this one_only. + * decl2.c (import_export_vtable): Don't defer handling of vtables + if MULTIPLE_SYMBOL_SPACES. + +Tue Nov 11 12:02:12 1997 Jason Merrill + + * except.c (expand_end_catch_block): Lose call to __sjpopnthrow. + +Tue Nov 11 02:53:44 1997 Jason Merrill + + * except.c (do_pop_exception): Return a value. + +Mon Nov 10 20:25:31 1997 Jason Merrill + + * call.c (build_new_method_call): Handle getting a + TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field + if we got template parms. + * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR, + not just the args. + * decl2.c (build_expr_from_tree): Tweak last change. + * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE. + (maybe_fold_nontype_arg): Split out from tsubst_copy. + * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR. + +Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij + + * pt.c (tsubst_copy): Handle explicit template arguments in + function calls. + * typeck.c (build_x_function_call): Likewise. + * decl2.c (build_expr_from_tree): Lookup function name if it + hasn't been done. + + * pt.c (tsubst): Instantiate template functions properly when + template parameter does not appear in function arguments and return + type. + (comp_template_args): Handle member templates required by tsubst. + +Mon Nov 10 20:08:38 1997 Jason Merrill + + * decl.c (grokdeclarator): Tweak conditions for pedwarn in + previous change. + +Mon Nov 10 20:08:29 1997 Bruno Haible + + * pt.c (coerce_template_parms): Tweak error message. + + * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a + return type defaults to `int', even if there are storage-class + specifiers. + +Mon Nov 10 03:04:20 1997 Jason Merrill + + Complete nested exception support. + * except.c (do_pop_exception): Split out... + (push_eh_cleanup): From here. Handle the EH region by hand. + (expand_start_catch_block): Add a new level for the catch parm. + Move the rethrow region outside the two cleanup regions. + Protect the initializer for the catch parm with terminate. + (expand_end_catch_block): Likewise. End the region for the eh_cleanup. + * exception.cc (__cp_pop_exception): Now takes two parms. Handle + popping off the middle of the stack. + * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, + WITH_CLEANUP_EXPR, and UNSAVE_EXPR. + (build_cplus_new): Only wrap CALL_EXPRs. + * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around + the constructor call. + +Sun Nov 9 18:00:26 1997 Richard Kenner + + * Make-lang.in (c++.distdir): Make inc subdirectory. + +Fri Nov 7 11:57:28 1997 Jason Merrill + + * decl2.c (finish_file): Put back some code. + +Thu Nov 6 11:28:14 1997 Jason Merrill + + * decl2.c (finish_file): Remove redundant code. + * method.c (emit_thunk): Don't let the backend defer generic thunks. + +Wed Nov 5 23:52:50 1997 Jason Merrill + + * except.c (call_eh_info): Split out... + (push_eh_info): From here. + (expand_builtin_throw): Use it. + (expand_start_catch_block): Move region start back. + +Tue Nov 4 13:45:10 1997 Doug Evans + + * lex.c (MULTIBYTE_CHARS): #undef if cross compiling. + (real_yylex): Record wide strings using target endianness, not host. + +1997-11-03 Brendan Kehoe + + * repo.c (rindex): Add decl unconditionally. + (get_base_filename, open_repo_file): Don't cast rindex. + * xref.c (rindex): Add decl unconditionally. + (index): Remove unused decl. + (open_xref_file): Don't cast rindex. + +Sun Nov 2 15:04:12 1997 Jason Merrill + + * class.c (build_vbase_path): Propagate the result type properly. + +1997-11-01 Brendan Kehoe + + * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace + remaining use of saved_throw_type with a call to get_eh_type. + +1997-10-31 Brendan Kehoe + + * lex.c (FILE_NAME_NONDIRECTORY): Delete macro. + (file_name_nondirectory): New function, doing the same as the macro. + (set_typedecl_interface_info): Use it instead of the macro. + (check_newline): Likewise. + (handle_cp_pragma): Likewise. + + * repo.c (get_base_filename): Cast result of rindex to char*. + (open_repo_file): Likewise. + * xref.c (open_xref_file): Likewise. + * error.c (dump_char): Make its arg int, not char. + + * except.c (push_eh_info): Pass the number of fields - 1 down, not + the exact number of fields. + +Fri Oct 31 01:47:57 1997 Jason Merrill + + Support for nested exceptions. + * tinfo2.cc (__is_pointer): New fn. + * exception.cc (struct cp_eh_info): Define. + (__cp_exception_info, __uncatch_exception): New fns. + (__cp_push_exception, __cp_pop_exception): New fns. + * except.c: Lose saved_throw_{type,value,cleanup,in_catch}. + Lose empty_fndecl. + (init_exception_processing): Likewise. __eh_pc is now external. + (push_eh_info): New fn. + (get_eh_{info,value,type,caught}): New fns. + (push_eh_cleanup): Just call __cp_pop_exception. + (expand_start_catch_block): Use push_eh_info. Start the eh region + sooner. + (expand_end_eh_spec): Use push_eh_info. + (expand_throw): Call __cp_push_exception to set up the exception info. + Just pass the destructor or 0 as the cleanup. Call __uncatch_exception + when we rethrow. + (expand_builtin_throw): Don't refer to empty_fndecl. + +Thu Oct 23 02:01:30 1997 Jason Merrill + + * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl. + +1997-10-22 Brendan Kehoe + + * method.c (build_template_parm_names, build_decl_overload_real): + Add static to definitions. + * pt.c (add_to_template_args, note_template_header, + processing_explicit_specialization, type_unification_real): Likewise. + ({determine,check}_explicit_specialization): Use a single string for + error messages. + +Mon Oct 20 12:06:34 1997 Jason Merrill + + * except.c (expand_exception_blocks): Call do_pending_stack_adjust. + (expand_end_catch_block): Likewise. + (expand_end_eh_spec): Likewise. + +Mon Oct 20 11:44:20 1997 Mark Mitchell + + * decl.c (duplicate_decls): Handle template specializations + correctly. + * error.c (dump_function_name): Fix printing of specializations of + member functions that are not member templates. + * cp-tree.h (processing_specialization): Make global. + * pt.c (processing_specialization): Likewise. + * lex.c (cons_up_default_function): Save and restore + processing_specialization to avoid confusion. + +Mon Oct 20 10:52:22 1997 Jason Merrill + + * decl.c (init_decl_processing): Give null_node unknown* type. + * typeck.c (comp_target_types): Handle UNKNOWN_TYPE. + (common_type): Likewise. + * error.c (args_as_string): Recognize null_node. + +Sun Oct 19 09:13:01 1997 Richard Kenner + + * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR. + (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR. + + * decl.c (init_decl_processing): Call using_eh_for_cleanups. + + * Make-lang.in (g++): Include prefix.o. + +Thu Oct 16 15:31:09 1997 Judy Goldberg + + * pt.c (determine_explicit_specialization): Initialize "dummy" + to keep Purify quiet. + +Thu Oct 16 00:14:48 1997 Jason Merrill + + * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here. + (build_overload_int): Not here. + +Wed Oct 15 00:35:28 1997 Mike Stump + + * class.c (build_type_pathname): Remove. + (prepare_fresh_vtable): Fix problem with complex MI vtable names. + +1997-10-14 Brendan Kehoe + + * parse.y (unary_expr): Give a pedwarn if someone tries to use the + &&label GNU extension. + +Tue Oct 14 12:01:00 1997 Mark Mitchell + + * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, + so as to avoid incorrect manglings. + * method.c (build_decl_overload_real): Don't mangle return types + for constructors. + +Tue Oct 14 11:46:14 1997 Jason Merrill + + * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec, + scratch_tree_cons): Define as macros for now. + * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, + lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c, + typeck2.c: Use them and the expression_obstack variants. + +Mon Oct 13 17:41:26 1997 Benjamin Kosnik + + * decl.c (store_return_init): Allow classes with explicit ctors to + be used with the named return values extension. + +Fri Oct 10 12:21:11 1997 Jason Merrill + + * pt.c (instantiate_decl): Fix previous change. + +Thu Oct 9 12:08:21 1997 Jason Merrill + + * pt.c (tsubst): Fix thinko. + (instantiate_decl): Really use the original template. + + * call.c (build_new_method_call): Use simple constructor_name for + error messages. + +Wed Oct 8 22:44:42 1997 Jeffrey A Law + + * method.c (build_underscore_int): Don't use ANSI specific + features. + +Wed Oct 8 00:18:22 1997 Jason Merrill + + * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN + for our key method; it might have been inlined by -O3. + +Tue Oct 7 23:00:12 1997 Mark Mitchell + + * decl.c (make_typename_type): Do not try to call lookup_field for + non-aggregate types. + +Tue Oct 7 22:52:10 1997 Jason Merrill + + * typeck.c (build_reinterpret_cast): Tweak. + +Tue Oct 7 22:45:31 1997 Alexandre Oliva + + * typeck.c (build_reinterpret_cast): Converting a void pointer + to function pointer with a reinterpret_cast produces a warning + if -pedantic is issued. + +Tue Oct 7 22:43:43 1997 Bruno Haible + + * typeck.c (c_expand_return): Don't warn about returning a + reference-type variable as a reference. + +Tue Oct 7 21:11:22 1997 Jason Merrill + + * method.c (build_static_name): Fix typo. + +1997-10-07 Brendan Kehoe + + * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on + OLDDECL before we try to do DECL_USE_TEMPLATE. + +Tue Oct 7 00:48:36 1997 Jason Merrill + + * decl.c (duplicate_decls): Don't warn about template instances. + + * typeck.c (mark_addressable): Lose ancient code that unsets + DECL_EXTERNAL. + + * pt.c (do_decl_instantiation): Lose support for instantiating + non-templates. + + * call.c (build_new_function_call): Fix handling of null explicit + template args. + (build_new_method_call): Likewise. + +Mon Oct 6 23:44:34 1997 Mark Mitchell + + * method.c (build_underscore_int): Fix typo. + +1997-10-06 Brendan Kehoe + + * tree.c (print_lang_statistics): #if 0 call to + print_inline_obstack_statistics until its definition is checked in. + +Mon Oct 6 09:27:29 1997 Jason Merrill + + * decl2.c (finish_file): Move dump_tree_statistics to end. + + * pt.c (instantiate_decl): Look for the original template. + (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations + of member templates. + +Wed Oct 1 08:41:38 1997 Jason Merrill + + * Makefile.in (g++FAQ.*): New rules. + (CONFLICTS): Update. + * g++FAQ.texi: Moved from libg++. + + * parse.y (PFUNCNAME): Only specify the type once. + +1997-10-01 Brendan Kehoe + + * lex.c (real_yylex): Clean up the code to fully behave the way + the c-lex.c parser does for complex and real numbers. + +Tue Sep 30 08:51:36 1997 Jason Merrill + + * method.c (build_decl_overload_real): Reformat. + +Tue Sep 30 00:18:26 1997 Jason Merrill + + * method.c (synthesize_method): If at_eof, determine our linkage. + +1997-09-29 Paul Eggert + + * lex.c (real_yylex): Treat `$' just like `_', except issue a + diagnostic if !dollars_in_ident or if pedantic. + + * lang-specs.h (@c++): -ansi no longer implies -$. + + * decl2.c (lang_decode_option): + -traditional and -ansi now do not mess with + dollars_in_ident. + +Mon Sep 29 19:57:51 1997 H.J. Lu + + * Makefile.in (parse.o, decl.o): Also depend on + $(srcdir)/../except.h $(srcdir)/../output.h. + (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h + $(srcdir)/../except.h $(srcdir)/../output.h. + (typeck.o, init.o): Also depend on $(srcdir)/../expr.h + ../insn-codes.h. + + * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping. + + * expr.c (cplus_expand_expr): Make it static. + + * decl2.c, init.c, typeck.c: Include "expr.h". + (expand_expr): Use proper values when calling the function. + +Mon Sep 29 11:05:54 1997 Alexandre Oliva + + * lang-options.h: New -Wold-style-cast flag. + * cp-tree.h (warn_old_style_cast): New variable. + * decl2.c (warn_old_style_cast): Likewise. + (lang_decode_option): Support -Wold-style-cast. + (reparse_absdcl_as_casts): Produce old-style-cast warning. + +Mon Sep 29 09:20:53 1997 Benjamin Kosnik + + * decl.c (cp_finish_decl): Allow expand_aggr_init to set + TREE_USED, reset value based on already_used. + + * init.c (expand_member_init): Revert change. + +Mon Sep 29 08:57:53 1997 Jason Merrill + + * cp-tree.h, decl.c, decl2.c, pt.c: + Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public. + + * decl2.c (lang_decode_option): Add missing ;. + +Sat Sep 27 16:22:48 1997 Jason Merrill + + * friend.c (do_friend): Disable injection for all template-derived + decls. + * decl2.c (lang_decode_option): Handle -fguiding-decls. + * parse.y (notype_template_declarator): New nonterminal. + (direct_notype_declarator): Use it. + (complex_direct_notype_declarator): Likewise. + (object_template_id): Accept any kind of identifier after TEMPLATE. + (notype_qualified_id): Don't add template declarators here. + +Sat Sep 27 16:21:58 1997 Mark Mitchell + + * call.c (add_template_candidate): Add explicit_targs parameter. + (build_scoped_method_call): Use it. + (build_overload_call_real): Likewise. + (build_user_type_conversion_1): Likewise. + (build_new_function_call): Likewise. + (build_object_call): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + (build_new_function_call): Handle TEMPLATE_ID_EXPR. + (build_new_method_call): Likewise. + + * class.c (finish_struct_methods): Add specialization pass to + determine which methods were specializing which other methods. + (instantiate_type): Handle TEMPLATE_ID_EXPR. + + * cp-tree.def (TEMPLATE_ID_EXPR): New tree code. + + * cp-tree.h (name_mangling_version): New variable. + (flag_guiding_decls): Likewise. + (build_template_decl_overload): New function. + (begin_specialization): Likewise. + (reset_specialization): Likewise. + (end_specialization): Likewise. + (determine_explicit_specialization): Likewise. + (check_explicit_specialization): Likewise. + (lookup_template_function): Likewise. + (fn_type_unification): Add explicit_targs parameter. + (type_unification): Likewise. + + * decl.c (duplicate_decls): Add smarts for explicit + specializations. + (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function + specializations. + (grokfndecl): Call check_explicit_specialization. + + * decl2.c (lang_decode_option): Handle -fname-mangling-version. + (build_expr_from_tree): Handle TEMPLATE_ID_EXPR. + (check_classfn): Handle specializations. + + * error.c (dump_function_name): Print specialization arguments. + + * friend.c (do_friend): Don't call pushdecl for template + instantiations. + + * init.c (build_member_call): Handle TEMPLATE_ID_EXPR. + + * lang-options.h: Add -fname-mangling-version, -fguiding-decls, + and -fno-guiding-decls. + + * lex.c (identifier_type): Return PFUNCNAME for template function + names. + + * method.c (build_decl_overload_real): New function. + (build_template_parm_names): New function. + (build_overload_identifier): Use it. + (build_underscore_int): New function. + (build_overload_int): Use it. Add levels for template + parameters. + (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs. + (build_overload_nested_names): Handle template type parameters. + (build_template_decl_overload): New function. + + * parse.y (YYSTYPE): New ntype member. + (nested_name_specifier): Use it. + (nested_name_specifier_1): Likewise. + (PFUNCNAME): New token. + (template_id, object_template_id): New non-terminals. + (template_parm_list): Note specializations. + (template_def): Likewise. + (structsp): Likewise. + (fn.def2): Handle member template specializations. + (component_decl_1): Likewise. + (direct_notype_declarator): Handle template-ids. + (component_decl_1): Likewise. + (direct_notype_declarator): Handle template-ids. + (primary): Handle TEMPLATE_ID_EXPR, and template-ids. + + * pt.c (processing_specializations): New variable. + (template_header_count): Likewise. + (type_unification_real): New function. + (processing_explicit_specialization): Likewise. + (note_template_header): Likewise. + (is_member_template): Handle specializations. + (end_template_decl): Call reset_specialization. + (push_template_decl): Handle member template specializations. + (tsubst): Likewise. + (tsubst_copy): Handle TEMPLATE_ID_EXPR. + (instantiate_template): Handle specializations. + (instantiate_decl): Likewise. + (fn_type_unification): Handle explicit_targs. + (type_unification): Likewise. Allow incomplete unification + without an error message, if allow_incomplete. + (get_bindings): Use new calling sequence for fn_type_unification. + + * spew.c (yylex): Handle PFUNCNAME. + + * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR. + (really_overloaded_fn): Likewise. + (get_first_fn): Handle function templates. + + * typeck.c (build_x_function_call): Use really_overloaded_fn. + Handle TEMPLATE_ID_EXPR. + (build_x_unary_op): Likewise. + (build_unary_op): Likewise. + (mark_addressable): Templates whose address is taken are marked + as used. + +1997-09-25 Andreas Schwab + + * decl.c (init_decl_processing): Declare __builtin_constant_p as + accepting any kind of type, not only int. + +Fri Sep 26 00:22:56 1997 Jason Merrill + + * search.c (get_matching_virtual): Notice virtual bases when sorrying + about covariant returns. + + * parse.y (member_init): Also imply typename here. Remove ancient + extension for initializing base members. + +Thu Sep 25 11:11:13 1997 Jason Merrill + + Handle multi-level typenames and implicit typename in base list. + * parse.y (typename_sub{,[0-2]}): New rules. + (structsp, rule TYPENAME_KEYWORD): Use typename_sub. + (nonnested_type): New rule. + (complete_type_name): Use it. + (base_class.1): Use typename_sub and nonnested_type. + (nested_name_specifier): Don't elide std:: here. + * decl.c (make_typename_type): Handle getting a type for NAME. + (lookup_name_real): Turn std:: into :: here. + + Rvalue conversions were removed in London. + * call.c (is_subseq): Don't consider lvalue transformations. + (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK. + (joust): Re-enable ?: kludge. + +1997-09-22 Brendan Kehoe + + * decl.c (start_function): Up warning of no return type to be a + pedwarn. + +Mon Sep 22 14:15:34 1997 Benjamin Kosnik + + * init.c (expand_member_init): Don't set TREE_USED. + * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED + set,don't clear TREE_USED wholesale. + +Sat Sep 20 15:31:00 1997 Jason Merrill + + * call.c (build_over_call): Do require_complete_type before + build_cplus_new. + +Thu Sep 18 16:47:52 1997 Jason Merrill + + * search.c (lookup_field): Call complete_type in all cases. + + * decl.c (finish_function): Just warn about flowing off the end. + +Wed Sep 17 10:31:25 1997 Jason Merrill + + * decl.c (grokparms): Don't bash a permanent list node if we're + in a function. + +1997-09-17 Brendan Kehoe + + * Makefile.in (CONFLICTS): Fix s/r conflict count to 18. + +Tue Sep 16 14:06:56 1997 Jason Merrill + + * call.c (build_new_op): Give better error for syntactically + correct, but semantically invalid, use of undeclared template. + + * call.c (compare_qual): Handle pmfs. + + * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn + after the exception spec. + +Mon Sep 15 11:52:13 1997 Jason Merrill + + * call.c (null_ptr_cst_p): Integer type, not integral type. + + * call.c (joust): Disable warnings until they can be moved to the + right place. + +Fri Sep 12 16:11:13 1997 Per Bothner + + * Makefile.in, config-lang.in: Convert to autoconf. + +Thu Sep 11 17:14:55 1997 Jason Merrill + + * decl.c (lookup_name_real): Add implicit 'typename' to types from + base classes. + + * pt.c (most_specialized_class): Fix typo. + (tsubst): Move constant folding to TREE_VEC case. + +Thu Sep 11 10:08:45 1997 Mark Mitchell + + * pt.c (do_poplevel): Don't warn about unused local variables + while processing_template_decl since we don't always know whether + or not they will need constructing/destructing. + + * pt.c (uses_template_parms): Check the values of an enumeration + type to make sure they don't depend on template parms. + + * decl.c (make_typename_type): Don't lookup the field if the + context uses template parms, even if we're not + processing_template_decl at the moment. + + * pt.c (coerce_template_parms): Avoid looking at the + TYPE_LANG_DECL portion of a typename type, since there won't be + one. + (tsubst): Do constant folding as necessary to make sure that + arguments passed to lookup_template_class really are constants. + +Wed Sep 10 16:39:26 1997 Jim Wilson + + * Make-lang.in (LN, LN_S): New macros, use where appropriate. + +Wed Sep 10 11:21:55 1997 Jason Merrill + + * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO. + * decl2.c (finish_file): Only register exception tables if we + need to. + + * decl.c (init_decl_processing): Add __builtin_[fs]p. + +Tue Sep 9 19:49:38 1997 Jason Merrill + + * pt.c (unify): Just return 0 for a TYPENAME_TYPE. + +Tue Sep 9 17:57:25 1997 Mark Mitchell + + * error.c (dump_decl): Avoid crashing when presented with a + uninitialized constant, as can occur with a template parameter. + (dump_expr): Make sure that there are enough levels of + current_template_parms before we start diving through them. + +1997-09-09 Brendan Kehoe + + * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to + c-typeck.c. + +Tue Sep 9 09:36:39 1997 Benjamin Kosnik + + * except.c (expand_throw): Call build_delete for all + exception types, not just objects with destructors. + +Mon Sep 8 02:33:20 1997 Jody Goldberg + + * decl.c (current_local_enum): Remove static. + * pt.c (tsubst_enum): Save and restore value of current_local_enum + in case template is expanded in enum decl. + (instantiate_class_template): Use new tsubst_enum signature. + (tsubst_expr): Likewise. + +Mon Sep 8 01:21:43 1997 Mark Mitchell + + * pt.c (begin_member_template_processing): Take a function as + argument, not a set of template arguments. Use the template + parameters, rather than the arguments. Handle non-type parameters + correctly. Push a binding level for the parameters so that multiple + member templates using the same parameter names can be declared. + (end_member_template_processing): Pop the binding level. + (push_template_decl): Mark member templates as static when + appropriate. + + * lex.c (do_pending_inlines): Pass the function, not its template + arguments, to begin_member_template_processing. + (process_next_inline): Likewise. + (do_pending_defargs): Likewise. + + * error.c (dump_expr): Obtain the correct declaration for a + TEMPLATE_CONST_PARM. + + * call.c (add_template_conv_candidate): New function. + (build_object_call): Handle member templates, as done in the other + build_ functions. + +Sat Sep 6 10:20:27 1997 Mark Mitchell + + * decl.c (replace_defag): Undo previous change. + * lex.c (do_pending_defargs): Deal with member templates. + + * pt.c (is_member_template): Avoid crashing when passed a + non-function argument. + +Fri Sep 5 17:27:38 1997 Jason Merrill + + * class.c (grow_method): Remove check for redeclaration. + +Fri Sep 5 01:37:17 1997 Mark Mitchell + + * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro. + (DECL_INNERMOST_TEMPLATE_PARMS): Likewise. + (PRIMARY_TEMPLATE_P): Use it. + * call.c (build_overload_call_real): Use it. + * class.c (instantiate_type): Likewise. + * decl.c (decls_match): Likewise. + * method.c (build_overload_identifier): Likewise. + * pt.c (push_template_decl): Likewise. + (classtype_mangled_name): Likewise. + (lookup_template_class): Likewise. + + * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to + DECL_NTPARMS to conform to usage elsewhere. + * call.c (add_template_candidate): Likewise. + * class.c (instantiate_type): Likewise. + * pt.c (instantiate_template): Likewise. + (get_bindings): Likewise. + + * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of + is_member_template. + + * pt.c (unify): Undo changes to allow multiple levels of template + parameters. + (type_unification): Likewise. + (fn_type_unification): Likewise. + (get_class_bindings): Likewise. + * cp-tree.h (Likewise). + + * decl.c (replace_defarg): Check that the type of the default + parameter does not invlove a template type before complaining + about the initialization. + + * error.c (dump_expr): Deal with template constant parameters in + member templates correctly. + + * pt.c (is_member_template): Deal with class specializations + correctly. + (tsubst): Handle "partial instantiation" of member templates + correctly. + +Wed Sep 3 12:30:24 1997 Mark Mitchell + + * pt.c (type_unification): Change calling sequence to allow for + multiple levels of template parameters. + (tsubst_expr): Likewise. + (tsubst): Likewise. + (tsubst_copy): Likewise. + (instantiate_template): Likewise. + (unify): Likewise. + * call.c (build_overload_call_real): Use it. + (add_builtin_candidate): Use it. + (build_new_method_call): Use it. + * class.c (instantiate_type): Use it. + * decl.c (grokdeclarator): Use it. + * decl2.c (finish_file): Use it. + * method.c (build_overload_identifier): Use it. + + * call.c (add_template_candidate): Add additional parameter for + the function return type. Call fn_type_unification istead of + type_unification. + (build_user_type_conversion_1): Handle member templates. + (build_new_function_call): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + + * class.c (grow_method): Don't give an error message indicating + that two member templates with the same name are ambiguous. + (finish_struct): Treat member template functions just like member + functions. + + * cp-tree.h (check_member_template): Add declaration. + (begin_member_template_processing): Likewise. + (end_member_template_processing): Likewise. + (fn_type_unification): Likewise. + (is_member_template): Likewise. + (tsubst): Change prototype. + (tsubst_expr): Likewise. + (tsubst_copy): Likewise. + (instantiate_template): Likewise. + (get_bindings): Likewise. + + * decl.c (decls_match): Handle multiple levels of template + parameters. + (pushdecl): Handle template type params just like other type + declarations. + (push_class_level_binding): Return immediately if the + class_binding_level is NULL. + (grokfndecl): If check_classfn() returns a member_template, use + the result of the template, not the template itself. + + * decl2.c (check_member_template): New function. Check to see + that the entity declared to be a member template can be one. + (check_classfn): Allow redeclaration of member template functions + with different types; the new functions can be specializations or + explicit instantiations. + + * error.c (dump_decl): Handle multiple levels of template + parameters. + (dump_function_decl): Update to handle function templates. + + * lex.c (do_pending_inlines): Set up template parameter context + for member templates. + (process_next_inline): Likewise. + + * method.c (build_overload_identifier): Adjust for multiple levels + of template parameters. + + * parse.y (fn.def2): Add member templates. + (component_decl_1): Likewise. + + * pt.c (begin_member_template_processing): New function. + (end_member_template_processing): Likewise. + (is_member_template): Likewise. + (fn_type_unification): Likewise. + (current_template_parms): Return a vector of all the template + parms, not just the innermost level of parms. + (push_template_decl): Deal with the possibility of member + templates. + (lookup_template_class): Likewise. + (uses_template_parms): Likewise. + (tsubst): Modify processing to TEMPLATE_TYPE_PARM and + TEMPLATE_CONST_PARM to deal with multiple levels of template + arguments. Add processing of TEMPLATE_DECL to produce new + TEMPLATE_DECLs from old ones. + (do_decl_instantiation): Handle member templates. + + * search.c (lookup_fnfields_1): Handle member template conversion + operators. + + * tree.c (cp_tree_equal): Check the levels, as well as the + indices, of TEMPLATE_CONST_PARMs. + + * typeck.c (comptypes): Check the levels, as well as the indices, + fo TEMPLATE_TYPE_PARMs. + (build_x_function_call): Treat member templates like member + functions. + +Wed Sep 3 11:09:25 1997 Jason Merrill + + * typeck.c (c_expand_return): Always convert_for_initialization + before checking for returning a pointer to local. + + * pt.c (type_unification): If strict and the function parm doesn't + use template parms, just compare types. + +Wed Sep 3 10:35:49 1997 Klaus Espenlaub + + * method.c (build_overloaded_value): Replace direct call + to the floating point emulator with REAL_VALUE_TO_DECIMAL macro. + +Wed Sep 3 00:02:53 1997 Jason Merrill + + * typeck.c (convert_arguments): Don't arbitrarily choose the first + of a set of overloaded functions. + +Tue Sep 2 12:09:13 1997 Jason Merrill + + * lex.c (real_yylex): Don't elide __FUNCTION__. + + * method.c (build_overload_value): Add in_template parm. + (build_overload_int): Likewise. + (build_overload_identifier): Pass it. + + * decl.c (duplicate_decls): Don't bash a previous template + definition with a redeclaration. + + * pt.c (unify): float doesn't match double. + + * pt.c (do_type_instantiation): Handle getting a _TYPE or a + TYPE_DECL. Handle getting non-template types. + * parse.y (explicit_instantiation): Use typespec instead of + aggr template_type. + +Tue Sep 2 10:27:08 1997 Richard Henderson + + * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings. + +Mon Sep 1 13:19:04 1997 Eugene Mamchits + + * call.c (add_builtin_candidate): Add missing TREE_TYPE. + (compare_ics): Likewise. + +Mon Sep 1 13:19:04 1997 Jason Merrill + + * call.c (joust): Warn about choosing one conversion op over + another because of 'this' argument when the other return type is + better. + (source_type): New fn. + + * call.c (build_new_op): Strip leading REF_BIND from first operand + to builtin operator. + + * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we + use its RTL. + +Thu Aug 28 09:45:23 1997 Jason Merrill + + * call.c (null_ptr_cst_p): Remove support for (void*)0. + +Wed Aug 27 02:03:34 1997 Jeffrey A Law + + * typeck.c (expand_target_expr): Make definition match declaration. + + * class.c (get_basefndecls): Make definition match declaration. + +Mon Aug 25 14:30:02 1997 Jason Merrill + + * input.c (sub_getch): Eventually give up and release the input file. + + * decl.c (cp_finish_decl): If #p i/i, put inline statics in the + right place. + + * call.c (joust): Tweak message. + +Sat Aug 23 18:02:59 1997 Mark Mitchell + + * error.c (type_as_string): Put const/volatile on template type + parameters where appropriate. + +Sat Aug 23 17:47:22 1997 Jeffrey A Law + + * call.c (strictly_better): Make arguments unsigned ints. + +Thu Aug 21 18:48:44 1997 Jason Merrill + + * lex.c (real_yylex): Refer to __complex instead of complex. + +Thu Aug 21 22:25:46 1997 J"orn Rennecke + + * lex.c (real_yylex): Don't use getc directly. + +Wed Aug 20 17:25:08 1997 Jason Merrill + + * call.c (is_subseq): Don't try to be clever. + +Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * parse.y, pt.c: Include "except.h". + * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c, + error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c, + lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c, + sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish + prototyping. + +Wed Aug 20 01:34:40 1997 Jason Merrill + + * decl2.c (mark_vtable_entries): Instead of replacing pure + virtuals with a reference to __pure_virtual, copy the decl and + change the RTL. + +Tue Aug 19 02:26:07 1997 Jason Merrill + + * pt.c (lookup_nested_type_by_name): Handle typedef wierdness. + + * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com. + + * pt.c (instantiate_class_template): Call repo_template_used + before finish_prevtable_vardecl. + + * call.c (is_subseq): New fn. + (compare_ics): Use it. + + * repo.c (finish_repo): Don't crash on no args. + + * parse.y (named_complex_class_head_sans_basetype): Handle + explicit global scope. + * decl2.c (handle_class_head): New fn. + + * pt.c (unify): Add CONST_DECL case. + +Thu Aug 14 10:05:13 1997 Brendan Kehoe + + * rtti.c (permanent_obstack): Fix decl to not be a pointer. + + * cp-tree.h (report_type_mismatch): Add prototype. + * call.c (build_overload_call_real): Remove erroneous fourth + argument to report_type_mismatch. + (build_user_type_conversion_1): Remove erroneous second arg to + tourney. + (build_new_function_call): Likewise. + (build_object_call): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + +Wed Aug 13 19:19:25 1997 Jason Merrill + + * error.c (dump_decl): Don't bother processing a function with no + DECL_LANG_SPECIFIC. + + * method.c (emit_thunk): Call init_function_start in the macro case. + +Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not + defined and used to set flag_vtable_thunks. + +Tue Aug 12 20:13:57 1997 Jason Merrill + + * parse.y: Don't clear the inlines from their obstack until they've + all been processed. + + * decl.c (duplicate_decls): Don't complain about exception + specification mismatch if flag_exceptions is off. + +Mon Aug 11 15:01:56 1997 Marc Lehmann + + * Make-lang.in (c++.distclean): Remove g++.c on make distclean. + +Sun Aug 10 12:06:09 1997 Paul Eggert + + * cp-tree.h: Replace STDIO_PROTO with PROTO in include files. + * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c: + Include before include files that formerly used STDIO_PROTO. + + * decl.c, g++spec.c, lex.c, method.c, repo.c: + Include "config.h" first, as per autoconf manual. + +Fri Aug 8 11:47:48 1997 Jason Merrill + + * decl.c (duplicate_decls): Tweak wording. + * lex.c (do_pending_defargs): Don't die if we see a default arg + that isn't a DEFAULT_ARG. + * error.c (dump_expr): Handle DEFAULT_ARG. + + * decl2.c (lang_decode_option): Handle -fhandle-exceptions. + * lang-options.h: Add -fhandle-exceptions. + + * class.c (build_vtable): Vtables are artificial. + (prepare_fresh_vtable): Likewise. + +Wed Aug 6 11:02:36 1997 Jason Merrill + + * cvt.c (ocp_convert): After converting to the target type, set + LOOKUP_NO_CONVERSION. + + * call.c (joust): Warn about potentially confusing promotion rules + with -Wsign-promo. + * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo. + +Tue Aug 5 15:15:07 1997 Michael Meissner + + * exception.cc: Declare __terminate_func with noreturn attribute. + +Fri Aug 1 03:18:15 1997 Jason Merrill + + * parse.y: Break out eat_saved_input, handle errors. + (function_try_block): Use compstmt instead of compstmt_or_error. + +Thu Jul 31 17:14:04 1997 Jason Merrill + + * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE. + +Fri Jul 4 01:45:16 1997 Andreas Schwab + + * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for + existence of cc1plus check whether $(LANGUAGES) contains C++. + +Wed Jul 30 13:04:21 1997 Andreas Schwab + + * method.c (do_build_copy_constructor): When copying an anonymous + union member loop around to handle nested anonymous unions. Use + the offset of the member relative to the outer structure, not the + union. + +Tue Jul 29 21:17:29 1997 Jason Merrill + + * call.c (resolve_args): New fn. + (build_new_function_call): Use it. + (build_object_call): Likewise. + (build_new_method_call): Likewise. + +Mon Jul 28 16:02:36 1997 Jason Merrill + + * call.c (build_over_call): tsubst all default parms from templates. + +Wed Jul 23 13:36:25 1997 Jason Merrill + + * decl.c (struct cp_function): Add static_labelno. + (push_cp_function_context): Save it. + (pop_cp_function_context): Restore it. + +Tue Jul 22 14:43:29 1997 Jason Merrill + + * typeck.c (build_component_ref_1): Convert from reference. + +Tue Jul 22 11:06:23 1997 Brendan Kehoe + + * parse.y (current_declspecs, prefix_attributes): Initialize to + NULL_TREE. + + * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil + before we try to force it to be a TREE_LIST. + (decl): Make sure $1.t is non-nil. + +Sun Jul 20 11:53:07 1997 Jason Merrill + + * pt.c (uses_template_parms): Handle template first-parse codes. + + * decl.c (cp_finish_decl): Only warn about user-defined statics. + +Fri Jul 18 17:56:08 1997 Jason Merrill + + * pt.c (unify): Handle BOOLEAN_TYPE. + + * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE. + * pt.c (tsubst): Don't set it. + * call.c (build_over_call): Use uses_template_parms. + +Thu Jul 17 18:06:30 1997 Jason Merrill + + * method.c (build_overload_nested_name): Use static_labelno + instead of var_labelno. + (build_qualified_name): New fn. + (build_overload_name): Split out from here. + (build_static_name): Use build_qualified_name. + * decl.c (cp_finish_decl): Statics in extern inline functions + have comdat linkage. + (start_function): Initialize static_labelno. + +Thu Jul 17 11:20:17 1997 Benjamin Kosnik + + * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy + before "all member functions in class [] are private". + +Wed Jul 16 23:47:08 1997 Jason Merrill + + * lex.c (do_scoped_id): convert_from_reference. + * init.c (build_offset_ref): Likewise. + +Wed Jul 16 12:34:29 1997 Benjamin Kosnik + + * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list. + +Mon Jul 14 03:23:46 1997 Jason Merrill + + * typeck.c (get_member_function_from_ptrfunc): Promote index + before saving it. + +Sun Jul 13 00:11:52 1997 Jason Merrill + + * tree.c (layout_basetypes): Move non-virtual destructor warning. + * decl.c (xref_basetypes): Remove non-virtual destructor warning. + +Sat Jul 12 12:47:12 1997 Jason Merrill + + * decl.c (grokdeclarator): Call add_defarg_fn for the function + type, too. + * lex.c (add_defarg_fn): Adjust. + (do_pending_defargs): Adjust. Don't skip the first parm. + +Fri Jul 11 01:39:50 1997 Jason Merrill + + * decl.c (build_enumerator): Global enumerators are also readonly. + + * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast. + (build_dynamic_cast): Call it and convert_from_reference. + + * lex.c (add_defarg_fn): New fn. + (snarf_defarg): Don't add to defarg_types. + (do_pending_defargs): Lose defarg_types. All fns we process now + have defargs. + * decl.c (grokfndecl): Call add_defarg_fn. + + * Makefile.in (CONFLICTS): Expect 18 s/r conflicts. + * cp-tree.def: Add DEFAULT_ARG. + * spew.c (yylex): Call snarf_defarg as appropriate. + * parse.y: New tokens DEFARG and DEFARG_MARKER. + (defarg_again, pending_defargs, defarg, defarg1): New rules. + (structsp): Use pending_defargs. + (parms, full_parm): Use defarg. + * lex.c (init_lex): Initialize inline_text_firstobj. + (do_pending_inlines): Never pass the obstack to feed_input. + (process_next_inline): Call end_input instead of restore_pending_input. + (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs, + finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns. + * input.c (end_input): New fn. + (sub_getch): At the end of some fed input, just keep returning EOF + until someone calls end_input. + Remove 'obstack' field from struct input_source. + * decl.c (grokparms): Handle DEFAULT_ARG. + (replace_defarg): New fn. + * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros. + +Wed Jul 9 13:44:12 1997 Jason Merrill + + * call.c (implicit_conversion): If nothing else works, try binding + an rvalue to a reference. + +Wed Jul 9 13:04:38 1997 Geoffrey Noer + + * decl.c (init_decl_processing): Fix Jun 30 patch -- move + ifndef for Cygwin32 to include SIGSEGV. + +Thu Jul 3 01:44:05 1997 Jason Merrill + + * class.c (finish_struct_1): Only complain about pointers without + copy stuff if there are any constructors. + + * rtti.c (build_dynamic_cast): Call complete_type on the types. + + * decl.c (grokfndecl): If the function we chose doesn't actually + match, die. + + * decl2.c (grokclassfn): Don't specify 'const int' for the + artificial destructor parm. + + * pt.c (type_unification): If we are called recursively, nothing + decays. + +Mon Jun 30 17:53:21 1997 Geoffrey Noer + + * decl.c (init_decl_processing): Stop trying to catch signals + other than SIGABRT since the Cygwin32 library doesn't support + them correctly yet. This fixes a situation in which g++ causes + a hang on SIGSEGVs and other such signals in our Win32-hosted + tools. + +Mon Jun 30 14:50:01 1997 Jason Merrill + + * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data. + +Fri Jun 27 15:18:49 1997 Jason Merrill + + * typeck2.c (store_init_value): Always return the value if our + type needs constructing. + + * method.c (hack_identifier): Convert class statics from + reference, too. + +Thu Jun 26 11:44:46 1997 Jason Merrill + + * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency. + +Thu Jun 19 16:49:28 1997 Mike Stump + + * typeck.c (c_expand_return): Make sure we clean up temporaries at + the end of return x; + +Thu Jun 19 12:28:43 1997 Brendan Kehoe + + * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER. + +Tue Jun 17 18:35:57 1997 Mike Stump + + * except.c (expand_builtin_throw): Add support + -fno-sjlj-exceptions -fPIC exception handling on the SPARC. + +Mon Jun 16 01:24:37 1997 Jason Merrill + + * repo.c (extract_string): Null-terminate. + + * cp-tree.h (TI_SPEC_INFO): New macro. + (CLASSTYPE_TI_SPEC_INFO): New macro. + * pt.c (push_template_decl): Correctly determine # of template parms + for partial specs. + + * call.c (compare_ics): Really fix 'this' conversions. + + * pt.c (do_decl_instantiation): Don't crash on explicit inst of + non-template fn. + + * pt.c (push_template_decl): Complain about mismatch in # of + template parms between a class template and a member template. + +Sun Jun 15 02:38:20 1997 Jason Merrill + + * method.c (synthesize_method): You can't call + function_cannot_inline_p after finish_function. + * decl.c (finish_function): Turn on flag_inline_functions and turn + off DECL_INLINE before handing a synthesized method to the + backend. + +Thu Jun 12 17:35:28 1997 Jason Merrill + + * method.c (synthesize_method): Remove July 30 change to never set + DECL_INLINE if at_eof. + +Thu Jun 12 15:25:08 1997 Mike Stump + + * xref.c (GNU_xref_member): Ensure that the node has a + decl_lang_specific part before checking DECL_FRIEND_P. + +Thu Jun 12 12:36:05 1997 Jason Merrill + + * pt.c (instantiate_class_template): Diagnose non-class types used + as bases. + +Wed Jun 11 17:33:40 1997 Jason Merrill + + * typeck.c (build_conditional_expr): Use convert_for_initialization + instead of convert_and_check. + +Wed Jun 11 12:31:33 1997 Brendan Kehoe + + * parse.y (typespec): Don't pedwarn for typeof. + +Tue Jun 10 00:22:09 1997 Jason Merrill + + * repo.c (finish_repo): Only check changes if we would write a + repo file. + + * call.c (compare_ics): Fix handling of 'this' conversions. + + * pt.c (do_decl_instantiation): Support static data too. Rename + from do_function_instantiation. + * cp-tree.h: Adjust. + * parse.y: Adjust. + + * repo.c (extract_string): New fn. + (get_base_filename): Use it. + (init_repo): Compare old args with current args. + +Mon Jun 9 14:25:30 1997 Mike Stump + + * Makefile.in, Make-lang.in: Protect C-ls with a comment + character, idea from Paul Eggert . + +Mon Jun 9 01:52:03 1997 Jason Merrill + + * typeck.c (c_expand_return): Be more persistent in looking for + returned temps. + + * cvt.c (build_up_reference): Use NOP_EXPR for switching from + pointer to reference. + + * class.c (build_vbase_path): Don't do anything if PATH has no steps. + +Sun Jun 8 03:07:05 1997 Jason Merrill + + * init.c (build_member_call, build_offset_ref): + Use do_scoped_id instead of do_identifier. + + * cvt.c (convert): Remove bogosity. + +Sat Jun 7 20:50:17 1997 Brendan Kehoe + + * cvt.c (build_up_reference): Do checks of ARGTYPE and + TARGET_TYPE before trying to use get_binfo. + +Fri Jun 6 17:36:39 1997 Jason Merrill + + * cvt.c (build_up_reference): Call get_binfo to get access control. + + * decl2.c (import_export_decl): If we don't support weaks, leave + statics undefined. + +Fri Jun 6 15:55:49 1997 Mike Stump + + * except.c (expand_builtin_throw): Add support for machines that + cannot access globals after throw's epilogue when + -fno-sjlj-exceptions is used. + +Thu Jun 5 16:28:43 1997 Jason Merrill + + * parse.y: 'std::' becomes '::'. + * lex.c (real_yylex): Remove 'namespace' warning. + * init.c (build_member_call): Ignore 'std::'. + (build_offset_ref): Likewise. + * decl2.c (do_using_directive): Ignore 'using namespace std;'. + (do_toplevel_using_decl): Ignore 'using std::whatever'. + * decl.c (push_namespace): Just sorry. + (pop_namespace): Nop. + (init_decl_processing): Declare std namespace. + +Tue Jun 3 18:08:23 1997 Jason Merrill + + * search.c (push_class_decls): A name which ambiguously refers to + several instantiations of the same template just refers to the + template. + +Tue Jun 3 12:30:40 1997 Benjamin Kosnik + + * decl.c (build_enumerator): Fix problem with unsigned long + enumerated values being smashed to ints, causing overflow + when computing next enumerated value (for enum values around + MAX_VAL). + +Mon Jun 2 17:40:56 1997 Jason Merrill + + * typeck.c (build_component_ref): Only call mark_used on a decl. + +Thu May 29 15:54:17 1997 Brendan Kehoe + + * typeck.c (build_c_cast): Make the check for a ptr to function + more specific before possible default_conversion call. + +Thu May 29 13:02:06 1997 Mike Stump + + * except.c (expand_exception_blocks): Simplify and fix and make + sure we don't end a region in a sequence, as expand_end_bindings + doesn't like it. + +Wed May 28 17:08:03 1997 Mike Stump + + * except.c (init_exception_processing): Mark terminate as not + returning so that the optimizer can optimize better. + +Tue May 27 19:49:19 1997 Mike Stump + + * cvt.c (convert): Don't do any extra work, if we can avoid it + easily. + +Tue May 27 18:21:47 1997 Mike Stump + + * *.[chy]: Change cp_convert to ocp_convert, change convert to + cp_convert. convert is now reserved for the backend, and doesn't + have the semantics a frontend person should ever want. + +Fri May 23 10:58:31 1997 Jason Merrill + + * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled. + Lose -traditional support. + +Thu May 22 15:41:28 1997 Jason Merrill + + * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype). + + * parse.y (self_reference): Do it for templates, too. + * class.c (pushclass): Don't overload_template_name; the alias + generated by build_self_reference serves the same purpose. + + * tree.c (list_hash): Make static, take more args. + (list_hash_lookup): Likewise. + (list_hash_add): Make static. + (list_hash_canon): Lose. + (hash_tree_cons): Only build a new node if one isn't already in the + hashtable. + (hash_tree_chain): Use hash_tree_cons. + * cp-tree.h: Adjust. + * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead + of calling lookup_name. + +Wed May 21 18:24:19 1997 Jason Merrill + + * pt.c (instantiate_class_template): TYPE_VALUES for an enum + doesn't refer to the CONST_DECLs. + +Tue May 20 21:09:32 1997 Bob Manson + + * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever + is bigger. + (expand_class_desc): Convert the last argument to a sizetype. + +Tue May 20 13:55:57 1997 Brendan Kehoe + + * gxx.gperf (__complex, __complex__, __imag, __imag__, __real, + __real__): Add reswords. + * hash.h: Regenerate. + * lex.h (rid): Add RID_COMPLEX. + (RID_LAST_MODIFIER): Set to RID_COMPLEX. + * lex.c (init_lex): Add building of RID_COMPLEX. + (real_yylex): General cleanup in line with what c-lex.c also has, + sans the cruft for traditional; add handling of SPEC_IMAG, complex + types, and imaginary numeric constants. + * parse.y (REALPART, IMAGPART): Add tokens. + (unary_expr): Add REALPART and IMAGPART rules. + * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare. + * decl.c (complex_{integer,float,double,long}_type_node): Define + types. + (init_decl_processing): Set up the types. + (grokdeclarator): Add handling of RID_COMPLEX. Set and use + DEFAULTED_INT instead of EXPLICIT_INT when we default to int type. + * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases. + * cvt.c (cp_convert): Handle COMPLEX_TYPE. + * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add + COMPLEX_TYPE case. + * method.c (build_overload_name): Add handling of the different + COMPLEX_TYPEs, prefixing them with `J'. + * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE + as a template parm. + (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case. + * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases. + (mapcar): Handle COMPLEX_CST. + * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE. + (common_type): Add code for complex types. + (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases. + (convert_for_assignment): Likewise. + (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases. + +Mon May 19 12:26:27 1997 Jason Merrill + + * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to + tsubst_expr, as it might try to do overload resolution. + +Sat May 17 10:48:31 1997 Jason Merrill + + * pt.c (instantiate_class_template): Oops. + +Fri May 16 14:23:57 1997 Jason Merrill + + * cp-tree.def: Add TAG_DEFN. + * pt.c (tsubst_enum): New fn. + (instantiate_class_template): Use it. + (tsubst_expr): Support TAG_DEFN. + (tsubst): Support local enums. + (tsubst_copy): Likewise. + * decl.c (finish_enum): Likewise. + (start_enum): If this is a local enum, switch to permanent_obstack. + +Wed May 14 19:08:28 1997 Mike Stump + + * decl.c (store_parm_decls): Set last_parm_cleanup_insn here. + (finish_function): Put the base init code for constructors just + after the parm cleanup insns. + (struct cp_function): Add last_parm_cleanup_insn. + (push_cp_function_context): Likewise. + (pop_cp_function_context): Likewise. + +Tue May 13 15:51:20 1997 Jason Merrill + + * pt.c (tsubst_copy): Handle BIT_NOT_EXPR. + +Wed May 7 11:17:59 1997 Brendan Kehoe + + * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL + for THUNK_FNDECL before we switch to temporary allocation. + +Mon May 5 14:46:53 1997 Jason Merrill + + * call.c (build_new_op): Handle null arg2 for ?:. + +Thu May 1 18:26:37 1997 Mike Stump + + * except.c (expand_exception_blocks): Ensure that we flow through + the end of the exception region for the exception specification. + Move exception region for the exception specification in, so that + it doesn't protect the parm cleanup. Remove some obsolete code. + * decl.c (store_parm_decls): Likewise. + (finish_function): Likewise. + +Tue Apr 29 15:38:54 1997 Jason Merrill + + * init.c (build_new): Fix nothrow handling. + +Tue Apr 29 14:29:50 1997 Brendan Kehoe + + * init.c (emit_base_init): Don't warn about the initialization + list for an artificial member. + +Fri Apr 25 17:47:59 1997 Brendan Kehoe + + * expr.c (do_case): Handle !START case for the error msg. + +Fri Apr 25 11:55:23 1997 Jason Merrill + + * decl2.c, lang-options.h: New option -Weffc++. + * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings + to -Weffc++. + + * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS + to MULTIPLE_SYMBOL_SPACES. + +Wed Apr 23 18:06:50 1997 Jason Merrill + + * method.c (emit_thunk, generic case): Set current_function_is_thunk. + + * method.c (emit_thunk, macro case): Set up DECL_RESULT. + + * typeck.c (c_expand_return): Don't complain about returning void + to void in an artificial function. + * method.c (make_thunk): Change settings of READONLY/VOLATILE, + don't set DECL_RESULT, set DECL_ARTIFICIAL. + (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC. + +Wed Apr 23 14:43:06 1997 Mike Stump + + * init.c (init_decl_processing): Add support for setjmp/longjmp based + exception handling. + * except.c (init_exception_processing): Likewise. + (expand_end_catch_block): Likewise. + (expand_exception_blocks): Likewise. + (expand_throw): Likewise. + * exception.cc (__default_terminate): Likewise. + + * init.c (perform_member_init): Use new method of expr level + cleanups, instead of cleanups_this_call and friends. + (emit_base_init): Likewise. + (expand_aggr_vbase_init_1): Likewise. + (expand_vec_init): Likewise. + * decl.c (cp_finish_decl): Likewise. + (expand_static_init): Likewise. + (store_parm_decls): Likewise. + (cplus_expand_expr_stmt): Likewise. + * decl2.c (finish_file): Likewise. + + * Make-lang.in (exception.o): Ok to compile with -O now. + + * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as + we know it will be done later by the backend. + + * decl2.c (lang_f_options): Remove support for short temps. + * lang-options.h: Likewise. + +Wed Apr 23 04:12:06 1997 Jason Merrill + + * tree.c (varargs_function_p): New fn. + * method.c (emit_thunk): Replace broken generic code with code to + generate a heavyweight thunk function. + +Tue Apr 22 02:45:18 1997 Jason Merrill + + * pt.c (process_template_parm): pedwarn about floating-point parms. + + * decl.c (grokdeclarator): inline no longer implies static. + + * spew.c (yylex): Always return the TYPE_DECL if we got a scope. + +Mon Apr 21 15:42:27 1997 Jason Merrill + + * class.c (check_for_override): The signature of an overriding + function is not changed. + + * call.c (build_over_call): Move setting of conv into the loop. + Note: this change, along with the related changes of the 18th thru + the 20th of April, fix an infinite loop problem in conversions. + +Sun Apr 20 16:24:29 1997 Jason Merrill + + * call.c (build_user_type_conversion_1): Really ignore rvalue + conversions when looking for a REFERENCE_TYPE. + + * cvt.c (build_up_reference): Eviscerate, use build_unary_op. + * cp-tree.h (TREE_REFERENCE_EXPR): #if 0. + * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR. + (build_unary_op): Likewise. + * call.c (build_over_call): See through a CONVERT_EXPR around the + ADDR_EXPR for on a temporary. + * typeck.c (c_expand_return): See through a CONVERT_EXPR around + the ADDR_EXPR for a local variable. + +Fri Apr 18 12:11:33 1997 Jason Merrill + + * call.c (build_user_type_conversion_1): If we're trying to + convert to a REFERENCE_TYPE, only consider lvalue conversions. + (build_new_function_call): Print candidates. + (implicit_conversion): Try a temp binding if the lvalue conv is BAD. + (reference_binding): Binding a temporary of a reference-related type + is BAD. + +Thu Apr 17 14:37:22 1997 Brendan Kehoe + + * inc/typeinfo (type_info::before): Add cv-qualifier-seq. + * tinfo2.cc (type_info::before): Likewise. + +Mon Apr 14 12:38:17 1997 Jason Merrill + + * call.c (implicit_conversion): Oops. + +Fri Apr 11 02:18:30 1997 Jason Merrill + + * call.c (implicit_conversion): Try to find a reference conversion + before binding a const reference to a temporary. + +Wed Apr 2 12:51:36 1997 Mike Stump + + * exception.cc (__default_unexpected): Call terminate by default, + so that if the user overrides terminate, the correct function will + be called. + +Wed Mar 19 14:14:45 1997 Mike Stump + + * parse.y (left_curly): Avoid trying to use any fields of + error_mark_node, as there aren't any. + +Thu Mar 13 16:33:22 1997 Jason Merrill + + * lex.c (do_identifier): Avoid breaking on overloaded methods + as default arguments. + +Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson + + * call.c (add_template_candidate): Initialize the variable "dummy". + +Mon Mar 10 15:13:14 1997 Brendan Kehoe + + * decl.c (start_decl): Make sure TYPE isn't an error_mark_node + before we try to use TYPE_SIZE and TREE_CONSTANT on it. + +Fri Mar 7 13:19:36 1997 Brendan Kehoe + + * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl. + (debug_binfo): Delete decl, not needed. + + * tree.c (fnaddr_from_vtable_entry, function_arg_chain, + promotes_to_aggr_type): Delete fns. + * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY, + SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN, + PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1. + + * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars. + + * friend.c (is_friend_type): Delete fn. + * cp-tree.h (is_friend_type): Delete decl. + + * decl.c (original_result_rtx, double_ftype_double, + double_ftype_double_double, int_ftype_int, long_ftype_long, + float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static. + * typeck.c (original_result_rtx, warn_synth): Delete extern decls. + + * decl.c (push_overloaded_decl{,_top_level}): Make static, adding + fwd decls. + * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls. + + * decl.c (pushdecl_nonclass_level): #if 0, unused. + * cp-tree.h (pushdecl_nonclass_level): #if 0 decl. + + * lex.c (reinit_lang_specific): #if 0, unused. + * cp-tree.h (reinit_lang_specific): #if 0 decl. + + * decl.c (revert_static_member_fn): Make static, adding fwd decl. + * cp-tree.h (revert_static_member_fn): Delete decl. + + * class.c (root_lang_context_p): Delete fn. + * cp-tree.h (root_lang_context_p): Delete decl. + + * decl.c (set_current_level_tags_transparency): #if 0, unused. + * cp-tree.h (set_current_level_tags_transparency): #if 0 decl. + + * lex.c (set_vardecl_interface_info): Make static. + * cp-tree.h (set_vardecl_interface_info): Delete decl. + + * call.c (find_scoped_type): Make static. + * cp-tree.h (find_scoped_type): Delete decl. + + * search.c (convert_pointer_to_vbase): Make static. + * cp-tree.h (convert_pointer_to_vbase): Delete decl. + + * decl.c (const_ptr_type_node): Likewise. + * cp-tree.h (const_ptr_type_node): Delete decl. + + * typeck.c (common_base_type): Make static. + * cp-tree.h (common_base_types): Delete erroneous decl. + + * pt.c (classtype_mangled_name): Make static. + * cp-tree.h (classtype_mangled_name): Delete decl. + + * lex.c (check_newline): Make static. + * cp-tree.h (check_newline): Delete decl. + + * typeck.c (build_x_array_ref): Delete fn, same idea as + grok_array_decl. + * cp-tree.h (build_x_array_ref): Delete decl. + + * lex.c (copy_decl_lang_specific): Delete fn, same idea as + copy_lang_decl. + * cp-tree.h (copy_decl_lang_specific): #if 0 decl. + + * class.c (build_vtable_entry): Make static. + * cp-tree.h (build_vtable_entry): Delete decl. + + * class.c (build_vbase_pointer): Make static. + * cp-tree.h (build_vbase_pointer): Delete decl. + + * sig.c (build_sptr_ref): Add forward decl and make static. + * cp-tree.h (build_sptr_ref): Delete decl. + + * call.c (build_new_method_call): Add forward decl and make static. + * cp-tree.h (build_new_method_call): Delete decl. + + * call.c (build_object_call): Make static. + * class.c (check_for_override, complete_type_p, mark_overriders): + Likewise. + * decl.c (cp_function_chain): Likewise. + * lex.c (set_typedecl_interface_info, reinit_parse_for_block): + Likewise. + * pt.c (comp_template_args, get_class_bindings, push_tinst_level): + Likewise. + * tree.c (build_cplus_array_type_1): Likewise. + * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise. + (comp_target_parms): Likewise. + + * init.c (build_builtin_call): Make static. + * cp-tree.h (build_builtin_call): Delete decl. + + * typeck.c (binary_op_error): Delete decl. + * cp-tree.h (binary_op_error): Likewise. + +Thu Mar 6 16:13:52 1997 Brendan Kehoe + + * call.c (build_method_call): Compare against error_mark_node + directly, rather than the ERROR_MARK tree code. + * cvt.c (cp_convert): Likewise. + * decl.c (print_binding_level): Likewise. + (duplicate_decls): Likewise. + (grokdeclarator): Likewise. + (grokdeclarator): Likewise. + * init.c (expand_aggr_init_1): Likewise. + (decl_constant_value): Likewise. + * method.c (build_opfncall): Likewise. + (hack_identifier): Likewise. + * typeck.c (build_modify_expr): Likewise. + + * typeck.c (build_c_cast): Don't decl TYPE as register tree. + +Sun Mar 2 02:54:36 1997 Bruno Haible + + * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values. + + * pt.c (coerce_template_parms): Add new error message. + + * method.c (build_overload_value): Implement name mangling for + floating-point template arguments. + + * method.c (build_overload_int, icat, dicat): Fix mangling of template + arguments whose absolute value doesn't fit in a signed word. + +Mon Mar 3 12:14:54 1997 Brendan Kehoe + + * friend.c: New file; put all of the friend stuff in here. + * init.c: Instead of here. + * Makefile.in (CXX_OBJS): Add friend.o. + (friend.o): Add dependencies. + * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c. + +Sun Mar 2 11:04:43 1997 Jason Merrill + + * call.c (build_scoped_method_call): Complain if the scope isn't a + base. + +Wed Feb 26 11:31:06 1997 Jason Merrill + + * parse.y (left_curly): Don't crash on erroneous type. + + * init.c (build_delete): Fix type of ref. + +Tue Feb 25 12:41:48 1997 Jason Merrill + + * search.c (get_vbase_1): Renamed from get_vbase. + (get_vbase): Wrapper, now non-static. + (convert_pointer_to_vbase): Now static. + + * call.c (build_scoped_method_call): Accept a binfo for BASETYPE. + * init.c (build_delete): Pass one. + (build_partial_cleanup_for): Use build_scoped_method_call. + * decl.c (finish_function): Pass a binfo. + +Mon Feb 24 15:00:12 1997 Jason Merrill + + * call.c (build_over_call): Only synthesize non-trivial copy ctors. + + * typeck.c (build_c_cast): Lose other reference to flag. + + * call.c (build_field_call): Don't look for [cd]tor_identifier. + * decl2.c (delete_sanity): Remove meaningless use of + LOOKUP_HAS_IN_CHARGE. + * decl.c (finish_function): Use build_scoped_method_call instead + of build_delete for running vbase dtors. + * init.c (build_delete): Call overload resolution code instead of + duplicating it badly. + +Thu Feb 20 15:12:15 1997 Jason Merrill + + * call.c (build_over_call): Call mark_used before trying to elide + the call. + + * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL. + +Wed Feb 19 11:18:53 1997 Brendan Kehoe + + * typeck.c (build_modify_expr): Always pedwarn for a cast to + non-reference used as an lvalue. + +Wed Feb 19 10:35:37 1997 Jason Merrill + + * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly. + +Tue Feb 18 15:40:57 1997 Jason Merrill + + * parse.y (handler): Fix template typo. + +Sun Feb 16 02:12:28 1997 Jason Merrill + + * error.c (lang_decl_name): New fn. + * tree.c (lang_printable_name): Use it. + +Fri Feb 14 16:57:05 1997 Mike Stump + + * g++spec.c: Include config.h so that we can catch bzero #defines + from the config file. + +Tue Feb 11 13:50:48 1997 Mike Stump + + * new1.cc: Include a declaration for malloc, to avoid warning, and + avoid lossing on systems that require one (ones that define malloc + in xm.h). + +Mon Feb 10 22:51:13 1997 Bruno Haible + + * decl2.c (max_tinst_depth): New variable. + (lang_decode_option): Parse "-ftemplate-depth-NN" command line + option. + * pt.c (max_tinst_depth): Variable moved. + * lang-options.h: Declare "-ftemplate-depth-NN" command line option + as legal. + +Fri Feb 7 15:43:34 1997 Jason Merrill + + * decl.c (xref_basetypes): Allow a base class that depends on + template parms to be incomplete. + + * decl2.c (build_expr_from_tree): Support typeid(type). + * rtti.c (get_typeid): Support templates. + (expand_si_desc, expand_class_desc): Fix string length. + (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise. + +Tue Feb 4 11:28:24 1997 Jason Merrill + + * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal. + + * pt.c (tsubst): Put it back for -fno-ansi-overloading. + +Mon Feb 3 18:41:12 1997 Jason Merrill + + * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that + smashes together template and non-template decls of the same + signature. + +Thu Jan 30 19:18:00 1997 Jason Merrill + + * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE. + +Wed Jan 29 11:40:35 1997 Brendan Kehoe + + * decl.c (duplicate_decls): Next route, pedwarn about different + exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER. + +Tue Jan 28 20:43:29 1997 Brendan Kehoe + + * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro. + (struct lang_type): Delete has_default_implementation member. + Increase dummy to 21. + * decl.c (start_method): Delete usage. + + * cp-tree.h (build_call, null_ptr_cst_p, in_function_p, + store_after_parms, start_decl_1, auto_function): Add decls. + (get_arglist_len_in_bytes, declare_implicit_exception, + have_exceptions_p, make_type_decl, typedecl_for_tag, + store_in_parms, pop_implicit_try_blocks, push_exception_cleanup, + build_component_type_expr, cplus_exception_name, + {make,clear}_anon_parm_name, dont_see_typename): Removed decls. + * call.c (build_this): Make static. + (is_complete): Likewise. + (implicit_conversion): Likewise. + (reference_binding): Likewise. + (standard_conversion): Likewise. + (strip_top_quals): Likewise. + (non_reference): Likewise. + (build_conv): Likewise. + (user_harshness): Likewise. + (rank_for_ideal): Likewise. + * decl.c (start_decl_1): Delete forward decl. + (push_decl_level): Make static. + (resume_binding_level): Make static. + (namespace_bindings_p): Make static. + (declare_namespace_level): Make static. + (lookup_name_real): Make static. + (duplicate_decls): Make static. Take register off NEWDECL and + OLDDECL parm decls. + * decl2.c (get_sentry): Make static. + (temp_name_p): Delete fn. + * except.c (auto_function): Delete decl. + * lex.c (handle_{cp,sysv}_pragma): Make static. + (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl. + * method.c (do_build_{copy_constructor,assign_ref}): Make static. + * pt.c (tsubst_expr_values): Make static. + * rtti.c (combine_strings): Delete decl. + +Tue Jan 28 16:40:40 1997 Jason Merrill + + * pt.c (push_template_decl): Handle getting a typedef. + + * call.c (build_new_function_call): Complain about void arg. + +Tue Jan 28 15:25:09 1997 Brendan Kehoe + + * decl.c (duplicate_decls): Give pedwarn of different exceptions + if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER. + +Mon Jan 27 19:21:29 1997 Mike Stump + + * except.c (expand_throw): Don't expand the cleanup tree here, + since we are not going to write the rtl out. Fixes problem with + -g -O on SPARC. + +Mon Jan 27 16:24:35 1997 Sean McNeil + + * Make-lang.in: Add $(exeext) as necessary. + +Mon Jan 27 13:20:39 1997 Mike Stump + + * parse.y (handler_seq): Must have at least one catch clause. + +Sat Jan 25 12:00:05 1997 Jason Merrill + + * call.c (add_builtin_candidate): Restore ?: hack. + + * decl.c (grok_op_properties): More warnings. + +Sat Jan 25 08:50:03 1997 Brendan Kehoe + + * decl.c (duplicate_decls): On second thought, do it as a pedwarn + still but only if !DECL_IN_SYSTEM_HEADER (olddecl). + + * decl.c (duplicate_decls): Scale back to a warning, and only do + 'em if -pedantic. + +Fri Jan 24 17:52:54 1997 Mike Stump + + * decl.c (duplicate_decls): pedwarn mismatched exception + specifications. + +Thu Jan 23 18:18:54 1997 Mike Stump + + * call.c (build_new_method_call): Don't display the invisible + argument for controlling virtual bases. + +Thu Jan 23 16:48:10 1997 Mike Stump + + * new: Add nothrow new and delete, bad_alloc and throw specifications + for delete. + * decl.c (init_decl_processing): Add throw specification for delete. + * new.cc (nothrow): Define. + * lex.c (real_yylex): Removing warning that throw and friends are + keywords. + * new1.cc (operator new (size_t sz, const nothrow_t&)): Define. + * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define. + * Make-lang.in: Add new{1,2}.{cc,o}. + +Thu Jan 23 16:39:06 1997 Jason Merrill + + * lex.c (cons_up_default_function): Fix return type of synth op=. + + * init.c (emit_base_init): Add warnings for uninitialized members + and bases. + + * decl.c (xref_basetypes): Add warning for non-polymorphic type + with destructor used as base type. + + * decl.c (grok_op_properties): Add warning for op= returning void. + * typeck.c (c_expand_return): Add warning for op= returning anything + other than *this. + + * class.c (finish_struct_1): Add warning for class with pointers + but not copy ctor or copy op=. + + * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro. + * pt.c (add_pending_template): Use it instead of LANG_FLAG_0. + (instantiate_template): If -fexternal-templates, add this + instantiation to pending_templates. + + * decl2.c (copy_assignment_arg_p): Disable old hack to support + Booch components. + +Tue Jan 21 18:32:04 1997 Mike Stump + + * cvt.c (cp_convert): pedwarn enum to pointer conversions. + +Mon Jan 20 17:59:51 1997 Jason Merrill + + * call.c (standard_conversion): Handle getting references. Tack + on RVALUE_CONV here. Do it for non-class types, too. + (reference_binding): Pass references to standard_conversion. + (implicit_conversion): Likewise. + (add_builtin_candidate): Disable one ?: kludge. + (convert_like): Handle RVALUE_CONVs for non-class types. + (joust): Disable the other ?: kludge. + +Mon Jan 20 14:53:13 1997 Brendan Kehoe + + * decl.c (init_decl_processing): Add code to build up common + function types beforehand, to avoid creation then removal of + things already in the hash table. + +Mon Jan 20 14:43:49 1997 Jason Merrill + + * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for + the arguments. + + * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require + current_template_parms. + +Fri Jan 17 10:25:42 1997 Jason Merrill + + * search.c (lookup_field): Don't return a function, check want_type. + +Thu Jan 16 18:14:35 1997 Brendan Kehoe + + * init.c (build_new): Make sure PLACEMENT has a type. + +Thu Jan 16 17:40:28 1997 Jason Merrill + + * init.c (build_new): Support new (nothrow). + +Wed Jan 15 12:38:14 1997 Jason Merrill + + * pt.c (instantiate_decl): Also do push_to_top_level before setting + up DECL_INITIAL. + + * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro. + * pt.c (tsubst): Defer instantiation of default args. + * call.c (build_over_call): Until here. + +Wed Jan 15 10:08:10 1997 Brendan Kehoe + + * search.c (lookup_field): Make sure we have an + IDENTIFIER_CLASS_VALUE before we try to return it. + +Thu Jan 9 07:19:01 1997 Brendan Kehoe + + * call.c (build_method_call): Delete unused var PARM. + (build_overload_call_real): Likewise. + (build_object_call): Delete unused var P. + (build_new_op): Likewise. + * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static + var definitions, which are never used. + (shadow_tag): Delete unused var FN. + * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET. + * init.c (build_new): Delete unused var ALLOC_TEMP. + * method.c (hack_identifier): Delete unused var CONTEXT. + (do_build_copy_constructor): Delete unused var NAME. + (synthesize_method): Delete unused var BASE. + * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE. + * rtti.c (build_headof): Delete unused var VPTR. + (get_typeid): Delete unused var T. + * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1 + and ORIG_OP2. + (build_ptrmemfunc): Delete unused vars U and NINDEX. + * typeck2.c (build_functional_cast): Delete unused var BINFO. + +Wed Jan 8 13:09:54 1997 Jason Merrill + + * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up + things in a type being defined. + * decl.c (finish_enum): Reverse the values so that they are in + the correct order. + + * pt.c (instantiate_class_template): Don't initialize + BINFO_BASETYPES until the vector is filled out. + (unify): Don't abort on conflicting bindings, just fail. + (instantiate_decl): Do push_tinst_level before any tsubsting. + + * method.c (build_overload_value): Handle getting a + TEMPLATE_CONST_PARM for a pointer. + +Tue Jan 7 14:00:58 1997 Jason Merrill + + * init.c (expand_member_init): Don't give 'not a base' error for + templates. + + * pt.c (instantiate_decl): Call import_export_decl later. + + * pt.c (instantiate_class_template): Return a value. + + * parse.y (extension): New rule for __extension__. + (extdef, unary_expr, decl, component_decl): Use it. + +Tue Jan 7 09:20:28 1997 Mike Stump + + * class.c (base_binfo): Remove unused base_has_virtual member. + (finish_base_struct): Likewise. + (finish_struct_1): Likewise. + diff --git a/gcc/cp/ChangeLog-1998 b/gcc/cp/ChangeLog-1998 new file mode 100644 index 0000000..1b4e301 --- /dev/null +++ b/gcc/cp/ChangeLog-1998 @@ -0,0 +1,6887 @@ +Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi + + * Makefile.in (cvt.o): Depend on toplev.h. + + * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes. + + * cvt.c: Include toplev.h. + + * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and + definitions. + + * init.c (expand_vec_init): Initialize variable `itype'. + + * lex.c (yyerror): Cast the argument passed to a ctype function to + an unsigned char. + + * method.c (build_mangled_C9x_name): Wrap prototype and definition + in "HOST_BITS_PER_WIDE_INT >= 64". + + * typeck.c (build_binary_op): Mark parameter `convert_p' with + ATTRIBUTE_UNUSED. + +1998-12-22 Mark Mitchell + + * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation. + * tree.c (build_exception_variant): Don't crash on empty throw + specs. + +1998-12-18 DJ Delorie + + * cvt.c (convert_to_reference): Check for both error_mark_node + and NULL_NODE after call to convert_for_initialization. + +1998-12-17 Jason Merrill + + * error.c (interesting_scope_p): New fn. + (dump_simple_decl): Use it. + (dump_expr, case CONSTRUCTOR): Force a & for a PMF. + (dump_expr, case OFFSET_REF): Print ->* if appropriate. + +1998-12-16 Mark Mitchell + + * class.c (resolve_address_of_overloaded_function): Do conversion + to correct type here, rather than ... + (instantiate_type): Here. + + * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro. + (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it. + (decl_template_parm_p): Remove. + * decl.c (pushdecl): Don't set DECL_CONTEXT for a template + parameter. + * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P. + * pt.c (push_inline_template_parms_recursive): Set it. + (decl_template_parm_p): Remove. + (check_template_shadow): Use DECL_TEMPLATE_PARM_P. + (process_template_parm): Set it. + +Wed Dec 16 16:33:58 1998 Dave Brolley + + * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus + if configured with cpplib. + +1998-12-15 Mark Mitchell + + * decl.c (poplevel): Make sure ns_binding is initialized. + + * decl.c (finish_function): Undo inadvertent change in previous + patch. + +1998-12-14 Mark Mitchell + + * class.c (pushclass): Tweak handling of class-level bindings. + (resolve_address_of_overloaded_function): Update pointer-to-member + handling. + (instantiate_type): Likewise. + * cvt.c (cp_convert_to_pointer): Likewise. + * decl.c (pop_binding): Take the DECL to pop, not just the name. + Deal with `struct stat' hack. + (binding_level): Add to documentation. + (push_binding): Clear BINDING_TYPE. + (add_binding): New function. + (push_local_binding): Use it. + (push_class_binding): Likewise. + (poplevel): Adjust calls to pop_binding. + (poplevel_class): Likewise. + (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden + declarations to current binding level. + (push_class_level_binding): Likewise. + (push_overloaded_decl): Adjust handling of OVERLOADs in local + bindings. + (lookup_namespace_name): Don't crash when confronted with a + TEMPLATE_DECL. + (lookup_name_real): Do `struct stat' hack in local binding + contexts. + (build_ptrmemfunc_type): Adjust documentation. + (grokdeclarator): Don't avoid building real array types when + processing templates unless really necessary. + (finish_method): Adjust calls to pop_binding. + * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves, + not reparse_decl_as_expr. + (build_expr_from_tree): Deal with a template-id as the function to + call in a METHOD_CALL_EXPR. + * pt.c (convert_nontype_argument): Tweak pointer-to-member handling. + (maybe_adjust_types_For_deduction): Don't do peculiar things with + METHOD_TYPEs here. + (resolve_overloaded_unification): Handle COMPONENT_REFs. Build + pointer-to-member types where necessary. + * tree.c (build_cplus_array_type_1): Don't avoid building real + array types when processing templates unless really necessary. + (build_exception_variant): Compare the exception lists correctly. + +1998-12-13 Mark Mitchell + + * cp-tree.def (CPLUS_BINDING): Update documentation. + * cp-tree.h (LOCAL_BINDING_P): New macro. + (lang_identifier): Rename local_value to bindings. + (tree_binding): Make `scope' of type `void*', not `tree'. + (BINDING_SCOPE): Update documentation. + (IDENTIFIER_LOCAL_VALUE): Remove. + (IDENTIFIER_CLASS_VALUE): Document. + (IDENTIFIER_BINDING): New macro. + (IDENTIFIER_VALUE): Likewise. + (TIME_IDENTIFIER_TIME): Likewise. + (TIME_IDENTIFIER_FILEINFO): Likewise. + (IMPLICIT_TYPENAME_P): Likewise. + (set_identifier_local_value): Remove. + (push_local_binding): New function. + (push_class_binding): Likewise. + * class.c (pushclass): Update comments; use push_class_binding. + * decl.c (set_identifier_local_value_with_scope): Remove. + (set_identifier_local_value): Likewise. + (push_binding): New function. + (pop_binding): Likewise. + (binding_level): Update documentation. Remove shadowed. + (BINDING_LEVEL): New macro. + (free_binding_nodes): New variable. + (poplevel): Adjust for new name-lookup scheme. Don't mess up + BLOCK_VARs when doing for-scope extension. Remove effectively + dead code. + (pushlevel_class): Tweak formatting. + (poplevel_class): Adjust for new name-lookup scheme. + (print_binding_level): Likewise. + (store_bindings): Likewise. + (pushdecl): Likewise. + (pushdecl_class_level): Likewise. + (push_class_level_binding): Likewise. + (push_overloaded_decl): Update comments. Adjust for new + name-lookup scheme. + (lookup_name_real): Likewise. + (lookup_name_current_level): Likewise. + (cp_finish_decl): Likewise. + (require_complete_types_for_parms): Likewise. Remove misleading + #if 0'd code. + (grok_parms): Likewise. Don't call + require_complete_types_for_parms here. + (grok_ctor_properties): Don't treat templates as copy + constructors. + (grop_op_properties): Or as assignment operators. + (start_function): Document. Adjust for new name-lookup scheme. + (finish_function): Likewise. + * decl2.c (do_local_using_decl): Use push_local_binding. + * lex.c (begin_definition_of_inclass_inline): New function, split + out from ... + (do_pending_inlines): Here, and ... + (process_next_inline): Here. + (get_time_identifier): Use TIME_IDENTIFIER_* macros. + (init_filename_times): Likewise. + (extract_interface_info): Likewise. + (ste_typedecl_interface_info): Likewise. + (check_newline): Likewise. + (dump_time_statistics): Likewise. + (handle_cp_pragma): Likewise. + (do_identifier): Adjust for new name-lookup scheme. + * parse.y (function_try_block): Return ctor_initializer_opt value. + (fndef): Use it. + (fn.defpen): Pass appropriate values to start_function. + (pending_inline): Use functor_try_block value, and pass + appropriate values to finish_function. + * pt.c (is_member_template): Update documentation; remove handling + of FUNCTION_DECLs. As per name, this function should deal only in + TEMPLATE_DECLs. + (decl_template_parm_p): Change name of olddecl parameter to decl. + (check_template_shadow): Adjust for new name-lookup scheme. + (lookup_template_class): Likewise. + (tsubst_decl): Tweak so as not to confuse member templates with + copy constructors and assignment operators. + (unify): Handle UNION_TYPEs. + * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme. + (lang_print_xnode): Adjust for new name-lookup scheme. + * typeck.c (mark_addressable): Likewise. + (c_expand_return): Likewise. + +1998-12-08 Jason Merrill + + * decl.c (grokdeclarator): Allow field with same name as class + in extern "C". + + * decl.c (lookup_name_real): Don't limit field lookup to types. + * class.c (check_member_decl_is_same_in_complete_scope): No error + if icv and x are the same. + * lex.c (do_identifier): Tweak error message. + +1998-12-10 Mark Mitchell + + * decl.c (start_enum): Use push_obstacks, not + end_temporary_allocation. + (finish_enum): Call pop_obstacks. + +1998-12-10 Mark Mitchell + + * class.c (instantiate_type): Return error_mark_node rather than + junk. + +1998-12-09 Mark Mitchell + + * cp-tree.h (most_specialized_instantiation): New function. + (print_candidates): Likewise. + * class.c (validate_lhs): Remove. + (resolve_address_of_overloaded_function): New function, split out + and then substantially reworked, from ... + (instantiate_type): Use it. Simplify. + * cvt.c (convert_to_reference): Complain when caller has indicated + that's the right thing to do. Don't crash if instantiate_type + fails. + * pt.c: Substitute `parameters' for `paramters' throughout. + (print_candidates): Don't make it static. + (most_specialized_instantiation): Split out from ... + (most_specialized): Here. + +Wed Dec 9 15:33:01 1998 Dave Brolley + + * lex.c (lang_init_options): Initialize cpplib. + * decl2.c (parse_options,cpp_initialized): Removed. + (lang_decode_option): Move initialization of cpplib to + lang_init_options. + +1998-12-09 Mark Mitchell + + * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as + well as the TYPE_DECL, when a typedef name is assigned to a + previously anonymous type. + +1998-12-08 Andrew MacLeod + + * cp/except.c (call_eh_info): Use __start_cp_handler instead of + __cp_eh_info for getting the eh info pointer. Add table_index to + field list. + (push_eh_cleanup): Don't increment 'handlers' data field. + (process_start_catch_block): Don't set the 'caught' field. + + * cp/exception.cc (CP_EH_INFO): New macro for getting the + exception info pointer within library routines. + (__cp_eh_info): Use CP_EH_INFO. + (__start_cp_handler): Get exception info pointer, set caught field, + and increment the handlers field. Avoids this being done by handlers. + (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro. + (uncaught_exception): Use CP_EH_INFO macro. + +Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com) + + * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h + +Mon Dec 7 17:56:06 1998 Mike Stump + + * lex.c (check_newline): Add support for \ as `natural' + characters in file names in #line to be consistent with #include + handling. We support escape processing in the # 1 "..." version of + the command. See also support in cp/lex.c. + +1998-12-07 Zack Weinberg + + * cp/decl2.c: s/data/opts/ when initializing cpp_reader + structure. + +1998-12-07 Jason Merrill + + * decl.c (build_typename_type): Set DECL_ARTIFICIAL. + + * error.c (dump_simple_decl): Also print namespace context. + (dump_function_decl): Likewise. + + * decl2.c (ambiguous_decl): Don't print old value if it's + error_mark_node. + + * decl.c (lookup_name_real): Fix handling of local types shadowed + by a non-type decl. Remove obsolete code. + * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro. + + * lang-options.h: Add -fpermissive. + * decl2.c: Likewise. + * cp-tree.h: Add flag_permissive. + * decl.c (init_decl_processing): If neither -fpermissive or -pedantic + were specified, set flag_pedantic_errors. + * call.c (build_over_call): Turn dropped qualifier messages + back into pedwarns. + * cvt.c (convert_to_reference): Likewise. + * typeck.c (convert_for_assignment): Likewise. + +1998-12-05 Jason Merrill + + * decl2.c (coerce_new_type): Use same_type_p. + (coerce_delete_type): Likewise. + + * call.c (check_dtor_name): Return 1, not error_mark_node. + +1998-12-04 Jason Merrill + + * lex.c (handle_cp_pragma): Disable #pragma interface/implementation + if MULTIPLE_SYMBOL_SPACES. + + * pt.c (check_template_shadow): New fn. + * decl2.c (grokfield): Use it. + * decl.c (pushdecl): Likewise. + (pushdecl_class_level): Likewise. + (start_method): Likewise. + (xref_tag): Don't try to use 't' if we're defining. + + * call.c (check_dtor_name): Just return an error_mark_node. + * pt.c (lookup_template_class): Complain about using non-template here. + * parse.y (apparent_template_type): Not here. + + * pt.c (check_explicit_specialization): Complain about specialization + with C linkage. + + * lang-options.h: Add -f{no-,}implicit-inline-templates. + + * pt.c (convert_nontype_argument): Don't assume that any integer + argument is intended to be a constant-expression. + +1998-12-03 Mark Mitchell + + * class.c (handle_using_decl): Fix comment. Don't lookup + constructors in base classes. + (validate_lhs): Fix typo in comment. + * search.c (lookup_field_1): Don't return a USING_DECL. + + * cp-tree.h (DECL_ACCESS): Improve documentation. + + * decl.c (expand_static_init): Don't set the initialization-done + flag until the initialization is done. + +1998-12-02 Mark Mitchell + + * decl2.c (validate_nonmember_using_decl): Complain about using + declarations for class members. + +1998-11-29 Jason Merrill + + * typeck2.c (process_init_constructor): Use same_type_p. + + * decl.c (check_tag_decl): Don't warn about null decl inside a + class. + + * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than + UNIFY_ALLOW_NONE. + (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE. + (resolve_overloaded_unification): Strip baselinks. + +Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi + + * g++spec.c: Don't prototype xmalloc. + +1998-11-25 Jason Merrill + + * except.c (expand_throw): Use TYPE_PTR_P to check for pointers. + + * decl.c (check_tag_decl): Do complain about null friend decl at + file scope. + +1998-11-25 Andreas Schwab + + * lex.c (make_lang_type): Clear the whole struct lang_type, not + only the first multiple of sizeof (int). + +1998-11-24 Jason Merrill + + * decl.c (start_decl): An explicit specialization of a static data + member is only a definition if it has an initializer. + + * except.c (expand_throw): Use cp_finish_decl for the throw temp. + * cvt.c (build_up_reference): Pass DIRECT_BIND down into + cp_finish_decl. + * init.c (expand_default_init): Check for DIRECT_BIND instead of + DECL_ARTIFICIAL. + + * call.c (build_over_call): Use build_decl. + + * except.c (expand_throw): Just use convert, not + build_reinterpret_cast. + + * lex.c (handle_generic_pragma): Use token_buffer. + + * decl.c (check_tag_decl): Don't complain about null friend decl. + +1998-11-24 Dave Pitts + + * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the + first position. + * lex.c (check_newline): Use ISALPHA. + (readescape): Use ISGRAPH. + (yyerror): Use ISGRAPH. + +1998-11-24 Nathan Sidwell + + * search.c (get_abstract_virtuals): Do not use initial + CLASSTYPE_ABSTRACT_VIRTUALS. + * typeck2.c (abstract_virtuals_error): Show location of abstract + declaration. + * call.c (build_new_method_call): Use + CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate. + * class.c (finish_struct_bits): Don't bother working out whether + get_abstract_virtuals will do anything, just do it. + +1998-11-24 Graham + + * typeck.c (build_component_ref): Remove unused statement. + +1998-11-24 Jason Merrill + + * class.c (add_method): Catch invalid overloads. + + * class.c (add_method): Build up OVERLOADs properly for conversion ops. + * search.c (lookup_conversions): Handle getting real OVERLOADs. + (add_conversions): Likewise. Revert last change. + * call.c (add_conv_candidate): Pass totype to add_candidate instead + of fn. Don't add a new candidate if the last one was for the same + type. + (print_z_candidates): Handle getting a type as a function. + (joust): If we got two conversion candidates to the same type, + just pick one. + (build_object_call): Lose 'templates'. + (build_user_type_conversion_1): Handle getting real OVERLOADs. + +1998-11-23 Jason Merrill + + * typeck2.c (process_init_constructor): If there are elements + that don't have initializers and they need to have constructors + run, supply them with initializers. + + * class.c (finish_struct_1): A class with a 0-width bitfield is + still empty. + +1998-11-23 Mark Mitchell + + * pt.c (instantiate_class_template): Don't try to figure out what + specialization to use for a partial instantiation. Correct + typos in a couple of comments. Avoid calling uses_template_parms + multiple times. + +1998-11-23 Benjamin Kosnik + + * method.c (process_overload_item): Add call to + build_mangled_C9x_name for intTI_type_nodes. + (build_mangled_C9x_name): Add prototype, define. + * decl.c (init_decl_processing): Add names for + TImode_type_node. + +1998-11-23 Jason Merrill + + * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS. + + * class.c (finish_struct_1): Set things up for 0-width bitfields + like we do for others. + + * decl.c (check_tag_decl): New fn. + (shadow_tag): Split out from here. + * decl2.c (grok_x_components): Call it. + +1998-11-22 Jason Merrill + + * decl.c: Lose warn_about_return_type. + (grokdeclarator): Always complain about implicit int, except for + `main () { ... }'. + + * decl.c (tag_name): New fn. + (xref_tag): Complain about using typedef-name after class-key. + + * init.c (expand_vec_init): Also keep going if from_array. + + * tree.c (is_overloaded_fn): Also handle the output of + build_offset_ref. + + * decl.c (grokdeclarator): Use constructor_name when comparing + field name against enclosing class. + * class.c (finish_struct_anon): Likewise. + +1998-11-22 Mark Mitchell + + * decl.c (poplevel): Remove code to handle KEEP == 2. + (finish_function): Don't confuse BLOCK-order when + processing a destructor. + +1998-11-21 Jason Merrill + + * decl.c (require_complete_types_for_parms): Call layout_decl + after we've completed the type. + +1998-11-21 Martin von Löwis + + * decl2.c (validate_nonmember_using_decl): Allow using templates + from the global namespace. + +1998-11-21 Jason Merrill + + Handle specifying template args to member function templates. + * tree.c (build_overload): Always create an OVERLOAD for a template. + * search.c (add_conversions): Handle finding an OVERLOAD. + * decl2.c (check_classfn): Likewise. + * lex.c (identifier_type): See through a baselink. + * parse.y (do_id): Don't call do_identifier if we got a baselink. + * class.c (instantiate_type, case TREE_LIST): Recurse. + + * decl.c (grokdeclarator): Allow a boolean constant for array + bounds, odd as that sounds. + + * pt.c (unify): Be more strict about non-type parms, except for + array bounds. + (UNIFY_ALLOW_INTEGER): New macro. + +1998-11-19 Manfred Hollstein + + * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir). + +1998-11-19 Jason Merrill + + * semantics.c (begin_class_definition): Call + maybe_process_partial_specialization before push_template_decl. + Don't call push_template_decl for a specialization. + * search.c (lookup_field): Do return a member template class. + * decl2.c (handle_class_head): Handle member template classes. + + * decl.c (grokdeclarator): A parm type need not be complete. + + * pt.c (convert_nontype_argument): Fix thinko. + +1998-11-18 Mark Mitchell + + * cp-tree.h (PTRMEM_CST_CLASS): Fix typo. + (global_delete_fndecl): New variable. + * decl.c (global_delete_fndecl): Define it. + (init_decl_processing): Set it. + * init.c (build_builtin_delete_call): Use it. + * tree.c (mapcar): Recursively call mapcar for the type of EXPR + nodes. + +1998-11-18 Jason Merrill + + * decl.c (cplus_expand_expr_stmt): Always complain about unresolved + type. + + * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue. + * call.c (build_object_call): Also support references to functions. + * typeck.c (convert_for_initialization): Don't decay a function + if the target is a reference to function. + + * search.c (add_conversions): Get all the overloads from a class. + + * decl.c (grok_ctor_properties): Complain about any constructor + that will take a single arg of the class type by value. + + * typeck2.c (build_functional_cast): Can't create objects of + abstract classes this way. + * cvt.c (ocp_convert): Likewise. + + * decl.c (grokfndecl): Member functions of local classes are not + public. + +1998-11-18 Mark Mitchell + + * Make-lang.in (cc1plus): Add dependency on hash.o. + +1998-11-18 Jason Merrill + + * search.c (get_abstract_virtuals): Complain about virtuals with + no final overrider. + * typeck2.c (abstract_virtuals_error): Remove handling for virtuals + with no final overrider. + * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P + on virtuals with no final overrider. + + * lex.c (reinit_parse_for_block): Add a space after the initial ':'. + + * class.c (finish_struct_1): Don't remove zero-width bit-fields until + after layout_type. + + * friend.c (do_friend): Don't set_mangled_name_for_decl. + + * class.c (finish_struct_anon): Complain about non-fields. + * decl2.c (build_anon_union_vars): Likewise. + + * decl.c (grokdeclarator): Normal data members can't have the same + name as the class, either. + * class.c (finish_struct_anon): Neither can members of an + anonymous union. + +1998-11-17 Mark Mitchell + + * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses. + (TYPE_BINFO): Likewise. + (IS_AGGR_TYPE): Tweak. + (SET_IS_AGGR_TYPE): New macro. + (CLASS_TYPE_P): Tweak. + (lang_type): Group mark bitfields together. Remove linenum. + (CLASSTYPE_SOURCE_LINE): Remove macro. + (CLASSTYPE_MARKED_N): New macro. + (SET_CLASSTYPE_MARKED_N): Likewise. + (CLEAR_CLASSTYPE_MARKED_N): Likewise. + (CLASS_TYPE_MARKED_*): Use them. + (SET_CLASSTYPE_MARKED_*): Likewise. + (CLEAR_CLASSTYPE_MARKED_*): Likewise. + (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. + (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well. + (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE. + * class.c (class_cache_obstack): New variable. + (class_cache_firstobj): Likewise. + (finish_struct): Don't set CLASSTYPE_SOURCE_LINE. + (pushclass): Free the cache, when appropriate. + (popclass): Tidy. + (maybe_push_cache_obstack): Use class_cache_obstack. + * decl.c (include hash.h). + (typename_hash): New function. + (typename_compare): Likewise. + (build_typename_type): Check the hash table to avoid creating + duplicates. + (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE. + (grokdeclarator): Use CLASS_TYPE_P. + (xref_basetypes): Likewise. + (start_function): Likewise. Don't put current_class_ref on the + permanent obstack. + * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO + and TYPE_TI_ARGS. + * lex.c (note_got_semicolon): Use CLASS_TYPE_P. + (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated + fields for types other than class types. Do clear TYPE_ALIAS_SET + for types other than class types, though. + * method.c (build_overload_identifier): Use CLASS_TYPE_P and + TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. + * pt.c (process_template_parm): Don't set + CLASSTYPE_GOT_SEMICOLON. + (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. + Coerce arguments on the momentary obstack. + (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. + (instantiate_class_template): Calculate template arguments on the + momentary obstack. Tidy. + (tsubst_template_arg_vector): Use make_temp_vec. + (tsubst_aggr_type): Put template arguments on the momentary + obstack. + (tsubst_decl): Likewise. + (tsubst): Copy the array bounds index to the permanent obstack + before building index types. Use new macros. + (unify): Use new macros. + (do_type_instantiation): Likewise. + * search.c (lookup_fnfields_1): Use new macros. + (dfs_pushdecls): Build envelopes on the cache obstack. + (dfs_compress_decls): Use new macros. + (push_class_decls): Build on the cache obstack. + * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON. + * sign.c (build_signature_pointer_or_reference_type): Use + SET_IS_AGGR_TYPE. + * tree.c (make_binfo): Check CLASS_TYPE_P. + (copy_template_template_parm): Adjust. + (make_temp_vec): Use push_expression_obstack. + * typeck.c (complete_type): Use new macros. + (comptypes): Likewise. + +1998-11-17 Jason Merrill + + * pt.c (tsubst): Add diagnostics for invalid array, reference + and pointer to member types. + +1998-11-16 Jason Merrill + + * typeck2.c (my_friendly_abort): Don't fatal twice in a row. + + * typeck.c (c_expand_start_case): Use build_expr_type_conversion. + Simplify. + + * parse.y (structsp): Fix cut-and-paste error. + + * init.c (build_new): Complain about non-integral size. + + * parse.y (unary_expr): Complain about defining types in sizeof. + + * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn. + + * rtti.c (build_x_typeid): Complain about typeid without + including . + (get_typeid): Likewise. Complain about typeid of incomplete type. + (get_tinfo_fn_dynamic): Likewise. + (get_typeid_1): Not static anymore. + * except.c (build_eh_type_type): Use get_typeid_1. + + * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to + ambiguous or private bases. Fix warning for reference cast. + +1998-11-16 Mark Mitchell + + * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro. + * decl.c (duplicate_decls): Remove special-case code to deal with + template friends, and just do the obvious thing. + * pt.c (register_specialization): Tweak for clarity, and also to + clear DECL_INITIAL for an instantiation before it is merged with a + specialization. + (check_explicit_specialization): Fix indentation. + (tsubst_friend_function): Handle both definitions in friend + declaration and outside friend declarations. + (tsubst_decl): Don't clear DECL_INITIAL for an instantiation. + (regenerate_decl_from_template): Tweak accordingly. + (instantiate_decl): Likewise. + +1998-11-16 Jason Merrill + + * decl.c (cplus_expand_expr_stmt): Promote warning about naked + member function reference to error. + * cvt.c (ocp_convert): Complain about converting an overloaded + function to void. + + * init.c (build_offset_ref): Just return a lone static member + function. + + * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs, + not internal ones. + + * typeck.c (build_binary_op_nodefault): Improve error handling. + + * decl.c (grokfndecl): Complain about making 'main' a template. + + * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*. + + * call.c (build_method_call): Handle a BIT_NOT_EXPR around a + TYPE_DECL in a template. + +1998-11-15 Jason Merrill + + * typeck2.c (my_friendly_abort): Add URL in the other case, too. + + * decl.c (struct cp_function): Add named_label_uses. + (push_cp_function_context): Save it. + (pop_cp_function_context): Restore it. + (define_label): Also complain about jumping into the scope of + non-POD objects that don't have constructors. + * tree.c (pod_type_p): New fn. + + * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner. + * rtti.c (synthesize_tinfo_fn): Call import_export_decl here. + (get_tinfo_fn): Not here. + * repo.c (repo_get_id): Abort if we get called for an incomplete + type. + +1998-11-13 Mark Mitchell + + * except.c (expand_throw): Make sure first argument to + __cp_push_exception is of type `void*' to avoid spurious error + messages. + +1998-11-11 Jason Merrill + + * pt.c (try_one_overload): Take orig_targs again. Only check for + mismatches against them; we don't care what a previous call found. + (resolve_overloaded_unification): Adjust. + + * search.c (lookup_field): Don't return anything for a non-type + field from a dependent type. + * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class + in an array declarator. + (start_decl): Push into the class before looking for the field. + +1998-11-08 Mark Mitchell + + * method.c (build_overload_value): Handle REFERENCE_TYPE. + +1998-11-08 Martin von Löwis + + * decl.c (grokdeclarator): Allow namespace-scoped members if they + are friends. + +1998-11-08 Jason Merrill + + * pt.c (tsubst_decl): Don't mess with the global value of an + un-mangled DECL_ASSEMBLER_NAME. + +1998-11-03 Christopher Faylor + + * decl.c (init_decl_processing): Remove CYGWIN conditional + since CYGWIN is now able to deal with trapping signals. + +Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi + + * cp-tree.h: Don't include gansidecl.h. + * exception.cc: Include gansidecl.h (since we don't include config.h) + * g++spec.c: Don't include gansidecl.h. + +1998-11-06 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease + size of dummy. + (DECL_DEFINED_IN_CLASS_P): New macro. + (TEMPLATE_PARMS_FOR_INLINE): Document. + (check_static_variable_definition): New function. + * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if + appropriate. + (check_static_variable_definition): Split out from ... + (grokdeclarator): Here. + * pt.c (check_default_tmpl_args): New function, split out from ... + (push_template_decl_real): Here. + (instantiate_template): Fix comment. + +1998-11-04 Mark Mitchell + + * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued. + (CP_TYPE_VOLATILE_P): Likewise. + (CP_TYPE_RESTRICT_P): Likewise. + +1998-11-03 Mark Mitchell + + * pt.c (tsubst): Use build_index_type, not build_index_2_type. + +1998-11-02 Jason Merrill + + * class.c (instantiate_type): Be more helpful. + + * decl2.c (import_export_decl): Call import_export_class. + + * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR. + * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR. + * pt.c (tsubst_copy): Likewise. + +1998-11-02 Mark Mitchell + + * init.c (expand_vec_init): Fix off-by-one error. + +1998-11-02 Alexandre Oliva + + * parse.y (apparent_template_type): New type. + (named_complex_class_head_sans_basetype): Use it. + * Makefile.in (CONFLICTS): One new conflict. + * parse.c: Regenerated. + +1998-11-01 Mark Mitchell + + * cp-tree.h (COMPARE_STRICT): New macro. + (COMPARE_BASE): Likewise. + (COMPARE_RELAXED): Likewise. + (COMPARE_REDECLARATION): Likewise. + (same_type_p): Likewise. + (same_or_base_type_p): Likewise. + * call.c (standard_conversion): Use them, in place of comptypes + with numeric arguments. + (reference_binding): Likewise. + (convert_like): Likewise. + (build_over_call): Likewise. + (is_subseq): Likewise. + (is_properly_derived_from): Likewise. + (compare_ics): Likewise. + (joust): Likewise. + * class.c (delete_duplicate_fields_1): Likewise. + (resolves_to_fixed_type_p): Likewise. + (instantiate_type): Likewise. Remove #if 0'd code. + * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here. + (pushdecl): Likewise. + (lookup_name_real): Likewise. + (grokdeclarator): Likewise. Check for illegal array declarations. + (grokparms): Likewise. + (grok_op_properties): Likewise. + * decl2.c (check_classfn): Likewise. + * friend.c (is_friend): Likewise. + (make_friend_class): Likewise. + * init.c (expand_aggr_init): Likewise. + (expand_vec_init): Likewise. + * pt.c (is_member_template_class): Remove declaration. + (is_specialization_of): Use COMPARE_* and new macros. + (comp_template_parms): Likewise. + (convert_nontype_argument): Likewise. + (coerce_template_template_parms): Likewise. + (template_args_equal): Likewise. + (lookup_template_class): Likewise. + (type_unification_real): Likewise. + (unify): Likewise. + (get_bindings_real): Likewise. + * search.c (covariant_return_p): Likewise. + (get_matching_virtual): Likewise. + * sig.c (match_method_types): Likewise. + * tree.c (vec_binfo_member): Likewise. + (cp_tree_equal): Likewise. + * typeck.c (common_type): Likewise. + (comp_array_types): Likewise. Get issues involving unknown array + bounds right. + (comptypes): Update comments. Use new flags. + (comp_target_types): Use new macros. + (compparms): Likewise. + (comp_target_parms): Likewise. + (string_conv_p): Likewise. + (build_component_ref): Likewise. + (build_indirect_ref): Likewise. + (build_conditional_expr): Likewise. + (build_static_cast): Likewise. + (build_reinterpret_cast): Likewise. + (build_const_cast): Likewise. + (build_modify_expr): Likewise. + (convert_for_assignment): Likewise. + (comp_ptr_ttypes_real): Likewise. + (ptr_reasonably_similar): Likewise. + (comp_ptr_ttypes_const): Likewise. + +1998-10-31 Jason Merrill + + * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error. + +1998-10-30 Mark Mitchell + + * decl2.c (delete_sanity): Pass integer_zero_node, not + integer_two_node, to build_vec_delete. + * init.c (build_array_eh_cleanup): Remove. + (expand_vec_init_try_block): New function. + (expand_vec_init_catch_clause): Likewise. + (build_vec_delete_1): Don't deal with case that auto_delete_vec + might be integer_two_node anymore. + (expand_vec_init): Rework for initialization-correctness and + exception-correctness. + * typeck2.c (process_init_constructor): Make mutual exclusivity + of cases more obvious. + +1998-10-29 Jason Merrill + + * decl.c (lookup_name_real): OK, only warn if not lexing. + Simplify suggested fix. + + * cp-tree.h (IDENTIFIER_MARKED): New macro. + * search.c (lookup_conversions): Use breadth_first_search. + (add_conversions): Avoid adding two conversions to the same type. + (breadth_first_search): Work with base binfos, rather + than binfos and base indices. + (get_virtual_destructor): Adjust. + (tree_has_any_destructor_p): Adjust. + (get_matching_virtual): Adjust. + + * pt.c (push_template_decl_real): Generalize check for incorrect + number of template parms. + (is_member_template_class): #if 0. + +1998-10-29 Richard Henderson + + * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@, + last. + +1998-10-28 Zack Weinberg + + * lex.c: Call check_newline from lang_init always. After + calling cpp_start_read, set yy_cur and yy_lim to read from the + cpplib token buffer. + +1998-10-28 Jason Merrill + + * class.c (instantiate_type): Don't consider templates for a normal + match. + + * class.c (finish_struct_1): Don't complain about non-copy + assignment ops in union members. + + * class.c (build_vtable): Don't pass at_eof to import_export_vtable. + (prepare_fresh_vtable): Likewise. + (finish_struct_1): Don't call import_export_class. + * decl2.c (finish_vtable_vardecl): Do import/export stuff. + (finish_prevtable_vardecl): Lose. + (finish_file): Don't call it. + * pt.c (instantiate_class_template): Likewise. + * cp-tree.h: Remove it. + + * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here. + * decl.c (finish_function): Not here. + (start_function): Do set DECL_INITIAL. + + * pt.c (push_template_decl_real): Complain about default template + args for enclosing classes. + + * call.c (add_function_candidate): Treat conversion functions + as coming from the argument's class. + * cp-tree.h (DECL_CONV_FN_P): New fn. + (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE. + * class.c (add_method): Use DECL_CONV_FN_P. + * decl2.c (check_classfn): Likewise. + * error.c (dump_function_name): Likewise. + (dump_function_decl): Likewise. + * pt.c (fn_type_unification): Likewise. + * search.c (add_conversions): Likewise. + +1998-10-27 Jason Merrill + + * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL. + * method.c (hack_identifier): Also check for using RESULT_DECL + from outer context. + +1998-10-27 Mark Mitchell + + * decl.c (grokdeclarator): Use type_quals, rather than constp, + consistently. + +1998-10-27 Jason Merrill + + * call.c (standard_conversion): instantiate_type here. + (reference_binding): And here. + (implicit_conversion): Not here. + (build_op_delete_call): No need to cons up an OVERLOAD. + * cvt.c (cp_convert_to_pointer): instantiate_type here. + (convert_to_reference): And here. + * decl.c (grok_reference_init): Not here. + (grokparms): Or here. + * typeck2.c (digest_init): Or here. + * typeck.c (decay_conversion): Take the address of overloaded + functions, too. + (require_instantiated_type): Lose. + (convert_arguments): Don't handle unknown types here. + (build_c_cast): Likewise. + (build_binary_op): Gut. + (build_conditional_expr): Don't require_instantiated_type. + (build_modify_expr): Likewise. + (build_static_cast): Don't instantiate_type. + (build_reinterpret_cast): Likewise. + (build_const_cast): Likewise. + (convert_for_initialization): Likewise. + (build_ptrmemfunc): Use type_unknown_p. + (convert_for_assignment): Also do default_conversion on overloaded + functions. Hand them off to ocp_convert. + +1998-10-26 Mark Mitchell + + * error.c (dump_decl): Deal with TEMPLATE_DECLs that are + VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type. + + * class.c (finish_struct_1): Use build_cplus_array_type to build + array types. + * decl.c (init_decl_processing): Likewise. + * except.c (expand_end_eh_spec): Likewise. + * search.c (expand_upcast_fixups): Simplify very slightly. + +1998-10-26 Jason Merrill + + * decl.c (grokdeclarator): Complain about a variable using + constructor syntax coming back null from start_decl. + + * friend.c (make_friend_class): Complain about trying to make + a non-class type a friend. + + * decl.c (grokfndecl): Set DECL_INITIAL for a defn here. + (start_function): Not here. + +1998-10-26 Brendan Kehoe + + * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration. + +1998-10-26 Jason Merrill + + * typeck2.c (process_init_constructor): Only skip anonymous fields + if they are bitfields. + + * cp-tree.def (TYPEOF_TYPE): New code. + * error.c (dump_type_real): Handle it. + * pt.c (tsubst): Likewise. + * tree.c (search_tree): Likewise. + * semantics.c (finish_typeof): New fn. + * parse.y (typespec): Use it. + * cp-tree.h: Declare it. + +1998-10-26 Manfred Hollstein + + * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional. + +1998-10-26 Jason Merrill + + * typeck.c (convert_arguments): Don't handle pmf references + specially. + + * init.c (build_member_call): Don't try to convert to the base type + if it's ambiguous or pedantic. + + * typeck2.c (check_for_new_type): Only depend on pedantic for + C-style casts. + +1998-10-25 Mark Mitchell + + * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all + non-converting constructors. + +1998-10-24 Martin von Löwis + + * gxxint.texi: Correct documentation for n, N, Q, and B. + +1998-10-23 Martin von Löwis + + * parse.y (condition): Convert VAR_DECL from reference to indirect + reference. + +1998-10-23 Andrew MacLeod + + * exception.cc (__cp_pop_exception): Free the original exception + value, not the potentially coerced one. + +1998-10-23 Mark Mitchell + + * Makefile.in (hash.h): Run gperf when necessary. + + * cp-tree.h (CP_TYPE_READONLY): Remove. + (CP_TYPE_VOLATILE): Likewise. + (CP_TYPE_QUALS): New macro. + (CP_TYPE_CONST_P): Likewise. + (CP_TYPE_VOLATILE_P): Likewise. + (CP_TYPE_RESTRICT_P): Likewise. + (CP_TYPE_CONST_NON_VOLATILE_P): Likewise. + (cp_build_type_variant): Rename to ... + (cp_build_qualified_type): New function. + (c_apply_type_quals_to_decl): Declare. + (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'. + (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise. + (cp_type_qual_from_rid): New function. + (compparms): Remove unused parameter. All callers changed. + (cp_type_quals): New function. + (at_least_as_qualified_p): Likewise. + (more_qualified_p): Likewise. + + * call.c (standard_conversion): Replace calls to + cp_build_type_variant with cp_build_qualified_type. Use + CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to + compare them. Use CP_TYPE_* macros to check qualifiers. + (reference_binding): Likewise. + (implicit_conversion): Likewise. + (add_builtin_candidates): Likewise. + (build_over_call): Likewise. + * class.c (overrides): Compare all qualifiers, not just `const', + on method declarations. + * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc. + (convert_pointer_to_real): Likewise. + (type_promotes_to): Likewise. + * decl.c (check_for_uninitialized_const_var): New function. + (init_decl_processing): More CP_TYPE_QUALS conversion, etc. + (cp_finish_decl): Use check_for_uninitialized_const_var. + (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to + handle `restrict'. + (grok_ctor_properties): Likewise. + (grok_op_properties): Likewise. + (start_function): Likewise. + (rever_static_member_fn): Likewise. + * decl2.c (grok_method_quals): Likewise. + (grokfield): Likewise. + * error.c (dump_readonly_or_volatile): Rename to ... + (dump_qualifiers): New function. Handle `restrict'. + (dump_type_real): Use it. + (dump_aggr_type): Likewise. + (dump_type_prefix): Likewise. + (dump_type_suffix): Likewise. + (dump_function_decl): Likewise. + (cv_as_string): Likewise. + * gxx.gperf: Add __restrict and __restrict__. + * gxxint.texi: Document `u' as used for `__restrict', and a few + other previously undocumented codes. + * hash.h: Regenerated. + * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc. + (build_member_call): Likewise. + (build_new_1): Likewise. + * lex.c (init_parse): Add entry for RID_RESTRICT. + (cons_up_default_function): More CP_TYPE_QUALS conversion, etc. + (cp_type_qual_from_rid): Define. + * lex.h (enum rid): Add RID_RESTRICT. + * method.c (process_modifiers): Deal with `restrict'. + * parse.y (primary): More CP_TYPE_QUALS conversion, etc. + * parse.c: Regenerated. + * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc. + (tsubst_aggr_type): Likewise. + (tsubst): Likewise. + (check_cv_quals_for_unify): Likewise. + (unify): Likewise. + * rtti.c (init_rtti_processing): Likewise. + (build_headof): Likewise. + (get_tinfo_var): Likewise. + (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling. + (expand_class_desc): Likewise. + (expand_attr_desc): Likewise. + (synthesize_tinfo_fn): Likewise. + * search.c (covariant_return_p): Likewise. Fix `volatile' handling. + (get_matching_virtual): Likewise. + (expand_upcast_fixups): Likewise. + * sig.c (build_signature_pointer_or_reference_name): Take + type_quals, not constp and volatilep. + (build_signature_pointer_or_reference_type): Likewise. + (match_method_types): More CP_TYPE_QUALS conversion, etc. + (build_signature_pointer_constructor): Likewise. + (build_signature_method_call): Likewise. + * tree.c (build_cplus_array_type): Likewise. + (cp_build_type_variant): Rename to ... + (cp_build_qualified_type): New function. Deal with `__restrict'. + (canonical_type_variant): More CP_TYPE_QUALS conversion, etc. + (build_exception_variant): Likewise. + (mapcar): Likewise. + * typeck.c (qualif_type): Likewise. + (common_type): Likewise. + (comptypes): Likewise. + (comp_cv_target_types): Likewise. + (at_least_as_qualified_p): Define. + (more_qualified_p): Likewise. + (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc. + (compparms): Likewise. + (inline_conversion): Likewise. + (string_conv_p): Likewise. + (build_component_ref): Likewise. + (build_indirect_ref): Likewise. + (build_array_ref): Likewise. + (build_unary_op): Likewise. + (build_conditional_expr): Likewise. + (build_static_cast): Likewise. + (build_c_cast): Likewise. + (build_modify_expr): Likewise. + (convert_For_assignment): Likewise. + (comp_ptr_ttypes_real): Likewise. + (cp_type_quals): New function. + +1998-10-23 Jason Merrill + + * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays. + (CP_TYPE_VOLATILE): Likewise. + * decl.c (grokdeclarator): Use them. + * tree.c (canonical_type_variant): Likewise. + +1998-10-22 Martin von Löwis + + * parse.y (named_class_head): Push into class while parsing the + base class list. + * decl2.c (push_scope, pop_scope): New functions. + * cp-tree.h: Declare them. + * init.c (build_new_1): Delay cleanup until end of full expression. + +1998-10-21 Jason Merrill + + * typeck.c (build_component_ref): Use of a type here is an error. + +1998-10-19 Jason Merrill + + Revamp references to member functions. + * method.c (hack_identifier): Call build_component_ref for a + reference to a member function. + * typeck.c (build_component_ref): Only return a single function + if it's static. Otherwise, return a COMPONENT_REF. + (build_x_function_call): Handle a COMPONENT_REF. + (build_unary_op): Handle all unknown-type things. + * decl2.c (arg_assoc): Handle COMPONENT_REF. + * class.c (instantiate_type): Complain if the function we get is a + nonstatic member function. Remove code for finding "compatible" + functions. + * pt.c (tsubst_copy): Handle NOP_EXPR. + * tree.c (build_dummy_object): New fn. + (maybe_dummy_object): New fn. + (is_dummy_object): New fn. + * cp-tree.h: Declare them. + * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object. + * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object. + * init.c (build_member_call): Use maybe_dummy_object and + is_dummy_object. + (build_offset_ref): Use maybe_dummy_object. + (resolve_offset_ref): Use is_dummy_object. + * typeck.c (build_x_function_call): Call build_dummy_object. + (unary_complex_lvalue): Call is_dummy_object. + + * typeck.c (build_component_addr): Make sure field is a field. + + * call.c (build_new_op): Delete obsolete code. + + * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args. + +1998-10-18 Martin von Löwis + + * decl2.c (validate_nonmember_using_decl): Fix using-directives of + std if std is ignored. + +1998-10-18 Jason Merrill + + * decl.c (grokvardecl): Fix thinko. + + * decl.c (grokdeclarator): Embedded attrs bind to the right, + not the left. + + * parse.y (fn.def2): Fix 'attrs' format. + +1998-10-18 Alastair J. Houghton + + * Makefile.in (CONFLICTS): Update. + * parse.y (expr_or_declarator_intern): New rule. + (expr_or_declarator, direct_notype_declarator, primary, + functional_cast): Use it. + (notype_declarator_intern): New rule. + (notype_declarator, complex_notype_declarator): Use it. + +1998-10-17 Jason Merrill + + * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate. + (grokvardecl): Likewise. + +Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi + + * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR). + (add_method): Likewise for arguments 1 & 2 of `bcopy'. + + * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN. + + * pt.c (process_partial_specialization): Cast 1st argument of + `bzero' to (PTR). + + * tree.c (build_base_fields): Cast `base_align' to (int) when + comparing against one. + +1998-10-16 Mark Mitchell + + * decl.c (lookup_name_real): Handle template parameters for member + templates where said parameters have the same name as the + surrounding class. + + * decl.c (expand_static_init): Build cleanups before entering the + anonymous function used to do them to avoid access-checking + confusion. + + * decl.c (grokfndecl): Add back call to cplus_decl_attributes + accidentally removed by previous change, and make DECL_RTL here. + * class.c (add_method): Don't make DECL_RTL here. + + * pt.c (for_each_template_parm): Don't examine uninstantiated + default arguments. + +1998-10-16 Dave Brolley + + * lex.c (real_yylex): Fix unaligned access of wchar_t. + +1998-10-16 Mark Mitchell + + * class.c (add_method): Fix documentation to reflect previous + changes. Check for duplicate method declarations here. + * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL + correctly; such things never match. + (grokfndecl): Don't look for duplicate methods here. + * decl2.c (check_classfn): Don't assume names are mangled. + Don't add bogus member function declarations to a class before the + class type is complete. + (grokfield): Reformat error message. + * method.c (set_mangled_name_for_decl): Don't mangle names while + processing_template_decl. + +1998-10-16 Jason Merrill + + * typeck.c (build_indirect_ref): Complain about a pointer to data + member, too. + * typeck2.c (build_m_component_ref): Don't indirect a pointer to + data member. + * init.c (resolve_offset_ref): Don't undo the above. + + * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros. + (struct lang_decl_flags): Add `bitfield'. + * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of + DECL_BIT_FIELD. + * decl2.c (grokbitfield, grok_alignof): Likewise. + * init.c (build_offset_ref): Likewise. + * typeck.c (build_component_addr, expr_sizeof): Likewise. + * cvt.c (build_up_reference): Don't crash if taking the address + returns error_mark_node. + + * decl.c (grokfndecl): Also check ctype when checking for ::main(). + +1998-10-15 Jason Merrill + + * decl.c (grokfndecl): ::main and __builtin_* get C linkage. + Do mangling here. + (grokdeclarator): Instead of here. + * friend.c (do_friend): Lose special handling of ::main and + __builtin_*. + * cp-tree.h (DECL_MAIN_P): Check for C linkage. + + * spew.c (yylex): Clear looking_for_typename if we got + 'enum { ... };'. + +1998-10-15 Mark Mitchell + + * class.c (maybe_warn_about_overly_private_class): Improve error + messages for class with only private constructors. + + * cp-tree.def (TYPENAME_TYPE): Add to documentation. + * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document. + (build_typename_type): New function. + * decl.c (build_typename_type): Broken out from ... + (make_typename_type): Use it. + * search.c (lookup_field): Likewise. + +1998-10-14 Benjamin Kosnik + + * pt.c (convert_nontype_argument): Check against type_referred_to. + * decl.c (grokvardecl): Check for declarator name before building + DECL_ASSEMBLER_NAME. + +1998-10-14 Mark Mitchell + + * pt.c (lookup_template_class): Add comment. + (instantiate_class_template): Don't mark the _TYPE node for + member class templates as an instantiation. + +1998-10-14 Jason Merrill + + * decl.c (grokfndecl): Fix my thinko. + +1998-10-13 Jason Merrill + + * tinfo2.cc (fast_compare): Remove. + (before): Just use strcmp. + * tinfo.cc (operator==): Just use strcmp. + +1998-10-13 Klaus-Georg Adams + + * decl.c (grokfndecl): Don't check for linkage in `extern "C"' + declarations. + +1998-10-13 Mark Mitchell + + * cp-tree.h (specializations_of_same_template_p): Remove. + * search.c (get_template_base): Don't use it. + (get_template_base_recursive): Likewise. + * pt.c (specializations_of_same_template_p): Remove. + (unify): Don't use it. + (lookup_template_class): Find the correct parent when setting + CLASSTYPE_TI_TEMPLATE. + +1998-10-12 Jason Merrill + + * tinfo.cc (operator==): Always compare names. + +1998-10-12 Herman ten Brugge + + * decl.c (start_function): Fix cut-and-paste error. + +1998-10-12 Jason Merrill + + * inc/typeinfo: Add #pragma interface. + (operator!=): Just call operator==. + * tinfo.cc: Add #pragma implementation. + (operator==): Move from inc/typeinfo and tinfo2.cc. + Check __COMMON_UNRELIABLE instead of _WIN32. + + * typeck2.c (my_friendly_abort): Add URL. + +1998-10-12 Alastair J. Houghton + + * decl.c (start_method): Added extra parameter for attributes. + * cp-tree.h (start_method): Update prototype. + * parse.y (fn.def2): Update start_method parameter list. + +1998-10-11 Mark Mitchell + + * cp-tree.h (specializations_of_same_template_p): Declare. + * pt.c (specializations_of_same_template_p): New function. + (unify): Use it. + * search.c (get_template_base): Use it. + (get_template_base_recursive): Likewise. + +1998-10-10 Manfred Hollstein + + * decl2.c (start_objects): Add new variable `joiner' and + initialize it properly. + +1998-10-09 Mark Mitchell + + * search.c (expand_upcast_fixups): Tweak to match 1998-10-07 + change to vtable types. + + * cvt.c (ocp_convert): Avoid infinite recursion caused by + 1998-10-03 change. + +1998-10-08 Jason Merrill + + * pt.c (resolve_overloaded_unification): New fn. + (try_one_overload): Likewise. + (unify): Don't fail on unknown type. + (type_unification_real): Likewise. Use resolve_overloaded_unification + to handle an overloaded argument. + (template_args_equal): Split out... + (comp_template_args): From here. + (determine_specialization): Also allow a template with more + parms than were explicitly specified. + * cp-tree.h: Add template_args_equal. + * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code. + +Thu Oct 8 15:58:30 1998 Anthony Green + + * semantics.c (finish_asm_stmt): Revert my 1998-09-28 + change. + +Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com) + + * typeck.c (unsigned_type): Only return TItype nodes when + HOST_BITS_PER_WIDE_INT is >= 64 bits. + (signed_type): Likewise. + * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare + when HOST_BITS_PER_WIDE_INT is >= 64 bits. + (init_decl_processing): Only create TItype nodes when + HOST_BITS_PER_WIDE_INT is >= 64 bits. + * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare + when HOST_BITS_PER_WIDE_INT is >= 64 bits. + +Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi + + * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf. + (gxx.gperf): Update comments describing invocation flags. + (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs). + +1998-10-07 Mark Mitchell + + * class.c (finish_struct_1): Add commentary on previous change. + + * cp-tree.h (vtbl_ptr_type_node): New variable. + * class.c (build_vtbl_ref): Don't indirect through the vptr; it's + already of the right type. + (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node. + Simplify code to grow vtable. + * decl.c (vtbl_ptr_type_node): Define. + (init_decl_processing): Initialize it. + +1998-10-06 Mark Mitchell + + * cp-tree.def (PTRMEM_CST): New tree node. + * cp-tree.h (ptrmem_cst): New type. + (lang_type): Remove local_typedecls. + (dummy): Increase to 12 bits from 11. + (CLASSTYPE_LOCAL_TYPEDECLS): Remove. + (PTRMEM_CST_CLASS): New macro. + (PTRMEM_CST_MEMBER): Likewise. + (current_access_specifier): New variable. + (current_class_type): Remove duplicate declaration. + (finish_struct): Change prototype. + (unreverse_member_declarations): New function. + (pushdecl_class_level): Change prototype. + (grok_enum_decls): Remove. + (fixup_anonymous_union): New function. + (grok_x_components): Change prototype. + (tsubst_chain): Remove. + (finish_member_template_decl): Likewise. + (check_explicit_specialization): Fix indentation. + (finish_class_definition): Change prototype. + (finish_member_class_template): Likewise. + (finish_member_declaration): New function. + (check_multiple_declarators): Likewise. + * class.c (class_stack_node_t): New type. + (current_class_base): Remove. + (current_class_stack): Change type. + (current_access_specifier): New variable. + (grow_method): Remove. + (check_member_decl_is_same_in_complete_scope): Break out from + finish_struct. + (make_method_vec): New function. + (free_method_vec): Likewise. + (add_implicitly_declared_members): Break out from finish_struct_1. + (free_method_vecs): New variable. + (add_method): Rework for direct use from parser. + (handle_using_decl): Watch for NULL_TREE while iterating through + CLASSTYPE_METHOD_VEC. + (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here; + just do some error-checking. + (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC. + (finish_struct_1): Simplify. Use add_implicitly_declared_members. + (finish_struct): Change prototype. Simplify; fields and methods + are already set up at this point. + (init_class_processing): Set up current_class_stack. + (pushclass): Save current_access_specifier. + (popclass): Restore it. + (currently_open_class): Simplify. + (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS. + * decl.c (saved_scope): Add access_specifier. + (maybe_push_to_top_level): Save it. + (pop_from_top_level): Restore it. + (maybe_process_template_type_declaration): Use + finish_member_declaration. + (pushtag): Likewise. + (pushdecl_class_level): Don't return a value. + (fixup_anonymous_union): Break out from grok_x_components. + (shadow_tag): Use it. + (xref_tag): Complain about using an elaborated type specifier to + reference a template type parameter or typedef name. + (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS. + (current_local_enum): Remove. + (build_enumerator): Call finish_member_declaration. + (grok_enum_decls): Remove. + * decl2.c (grok_x_components): Simplify. + (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC. + (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS. + (merge_functions): Add to comment. + (arg_assoc_type): Prototype. + (arg_assoc): Pass as many arguments as there are parameters. + * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of + OFFSET_REF. + * expr.c (cpls_expand_expr): Remove dead code. Handle + PTRMEM_CST. + * friend.c (do_friend): Lookup friends when in nested classes. + Change comments. + * init.c (build_offset_ref): Do lookup even for classes that are + only partially defined. + (decl_constant_value): Remove dead code. + * method.c (build_overload_value): Remove hack where by TYPE was + not a TYPE. Handle PTRMEM_CST. + (build_template_parm_names): Don't pass a PARM_DECL where a TYPE + should go. + * parse.y (components, notype_components, component_decl, + component_decl_1, component_declarator, component_declarator0): + Now all are itype rather than ttype. Rework to add members to + classes on the fly. + (typesqpecqual_reserved): Use check_multiple_declarators. + (structsp): Update class to finish_class_definition. + (do_xref_defn): Unsplit into named_class_head. + (access_specifier): Set current_access_specifier. + * pt.c (set_current_access_from_decl): New function. + (finish_member_template_decl): Don't take the parameters. + (comp_template_args): Make more robust. + (lookup_template_class): Don't use current_local_enum. + (for_each_template_parm): Handle PTRMEM_CST. + (instantiate_class_template): Use set_current_access_from_decl, + finish_member_declaration and unreverse_member_declarations. Set + lineno/input_filename before generating implicit member functions. + (type_unification_real): Don't assume back-unification happens + only for the last argument. + (regenerate_decl_from_template): Call pushclass a bit earlier. + (tsubst_chain): Remove. + (tsubst_enum): Use set_current_access_from_decl. + (set_mangled_name_for_template_decl): Fix indentation. + * search.c (lookup_fnfields_1): Change iteration through + CLASSTYPE_METHOD_VEC. + (dfs_pushdecls): Likewise. + (dfs_compress_decls): Likewise. + (add_conversions): Likewise. + * semantics.c (finish_class_definition): Don't take components. + Change call to finish_struct. + (finish_member_declaration): New function. + (finish_member_class_template): Don't take template parameters. + Change call to grok_x_components. Call finish_member_template_decl. + (check_multiple_declarators): New function. + * sig.c (append_signature_fields): Work from the TYPE_METHODS, not + a passed in fieldlist. + * tree.c (search_tree): Handle PTRMEM_CST. + (mapcar): Likewise. + * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not + INTEGER_CSTs, for pointer-to-data members. + + * call.c (resolve_args): Resolve template specializations, if + possible. + +Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi + + * Makefile.in (spew.o): Depend on toplev.h. + + * call.c (compare_ics): Initialize variables `deref_from_type2', + `deref_to_type1' and `deref_to_type2'. + + * except.c (get_eh_type): Hide prototype and definition. + (process_start_catch_block_old): Remove unused static prototype. + + * pt.c (tsubst_decl): Initialize variable `argvec'. + + * spew.c: Include toplev.h. + +1998-10-05 Jason Merrill + + * pt.c (instantiate_decl): Do save and restore file position. + +1998-10-05 Martin von Löwis + + * method.c (build_decl_overload_real): Clear + numeric_output_need_bar after __. + +1998-10-05 Nathan Sidwell + + * call.c (build_new_method_call): Issue 'incomplete type' error, + if class is not defined. + +1998-10-05 Kaveh R. Ghazi + + * call.c (build_object_call): Move declaration of variable + `fn' into the scope where it is used. Don't access variable + `fn' when it is uninitialized, instead use `fns'. + +1998-10-04 Theodore Papadopoulo + + * errfn.c (cp_thing): Print buf as a string not as a printf format + to avoid problems with the operator%. Consequently, `%%' sequences + in format are copied as `%' in buf. + +1998-10-04 Jason Merrill + + * pt.c (pop_tinst_level): Call extract_interface_info. + (instantiate_decl): Don't save and restore file position. + + * decl.c (cp_finish_decl): Make statics in extern inlines and + templates common, if possible and the target doesn't support weak + symbols. + + * decl.c (grokdeclarator): Remove redundant calls to + build_type_variant and some duplicated code. + * sig.c (build_signature_reference_type): Only take the type parm. + (build_signature_pointer_type): Likewise. + * tree.c (build_cplus_method_type): Adjust. + * cp-tree.h: Update. + +1998-10-04 Mark Mitchell + + * call.c (build_over_call): Make pedwarns about dropped qualifiers + into full-fledged errors. + * cvt.c (convert_to_reference): Likewise. + * typeck.c (convert_for_assignment): Likewise. + + * search.c (expand_upcast_vtables): In addition to unsetting + TREE_READONLY, remove top-level const type qualifier. + +1998-10-03 Mark Mitchell + + * class.c (current_class_ptr, current_class_ref): Clarify + documentation. + * cvt.c (ocp_convert): Don't expect fold to remove all trivial + NOP type conversions. + * decl.c (decls_match): Use comptypes directly; ignore + qualifiers on the DECL. + (duplicate_decls): Remove qualifier checks on DECL. + (grokdeclarator): Make the type built up include top-level + qualifiers. + * decl2.c (do_dtors): Fix spelling error. + * error.c (dump_simple_decl): Don't look at qualifiers on the decl + when printing type information. + * init.c (build_new_1): Add documentation. Deal with the fact + that type of allocated memory now contains qualifiers. + * lex.c (is_global): Improve error-recovery. + * sig.c (build_member_function_pointer): Don't cast away const + on fields of sigtable_entry_type. + * tree.c (lvalue_type): Don't look at top-level qualifiers on + expressions. + * typeck.c (decay_conversion): Likewise. + (build_component_ref): Make sure the type of the COMPONENT_REF + contains top-level qualifiers, as appropriate. Improve + error-handling. + (build_indirect_ref): Simplify. Don't strip top-level qualifiers. + (build_array_ref): Likewise. + (build_unary_op): Improve error-recovery. + (unary_complex_lvalue): Make taking the address a bound member + function an error, not a sorry. + (build_conditional_expr): Look at the type qualifiers, not the + qualifiers on the expression itself. + +1998-10-03 Jason Merrill + + * decl2.c (merge_functions): Remove duplicates. + + * decl2.c: Add -f{no-,}implicit-inline-templates. + (import_export_decl): Check it. + + * decl.c (lookup_name_real): Template parms also take precedence + over implicit typename. Only warn if yylex. + + * typeck.c (build_conditional_expr): Only fold if ifexp is an + INTEGER_CST. + + * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN + instead of linkage. + +1998-10-01 Jason Merrill + + * cp-tree.h (FORMAT_VBASE_NAME): New macro. + * class.c (build_vbase_pointer): Use it. + * rtti.c (expand_class_desc): Likewise. + * tree.c (build_vbase_pointer_fields): Likewise. + +Thu Oct 1 10:43:45 1998 Nick Clifton + + * decl.c (start_decl): Add invocation of + SET_DEFAULT_DECL_ATTRIBUTES, if defined. + (start_function): Add invocation of + SET_DEFAULT_DECL_ATTRIBUTES, if defined. + + * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with + HANDLE_GENERIC_PRAGMAS. + +1998-09-28 Anthony Green + + * semantics.c (finish_asm_stmt): Always permit volatile asms. + +1998-09-28 Mark Mitchell + + * decl.c (grokdeclarator): Tighten checks for invalid + destructors. Improve error-messages and error-recovery. + * decl2.c (check_classfn): Don't assume that mangled destructor + names contain type information. + +1998-09-25 Jason Merrill + + * search.c (get_base_distance): Remove assert. + + * decl2.c (build_anon_union_vars): Don't process a field with no + name. + (finish_anon_union): Also complain about local anon unions with no + members. + +1998-09-25 Martin von Löwis + + * decl.c (lookup_namespace_name): If the name is a namespace, + return it immediately. + +Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi + + * cp-tree.h (define_case_label): Remove unused parameter. + (check_java_method): Likewise. + (grokclassfn): Likewise. + (expand_aggr_init): Likewise. + (build_x_delete): Likewise. + (maybe_end_member_template_processing): Likewise. + (unshare_base_binfos): Add prototype. + (string_conv_p): Likewise. + (my_friendly_abort): Mark with ATTRIBUTE_NORETURN. + + * cvt.c (build_up_reference): Remove unused parameter + `checkconst', all callers changed. + (build_type_conversion): Mark parameter `code' with + ATTRIBUTE_UNUSED. + (build_expr_type_conversion): Initialize variable `conv'. + + * decl.c (push_namespace): Initialize variable `d'. + (define_case_label): Remove unused parameter `decl', all callers + changed. + + * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter + `argc' with ATTRIBUTE_UNUSED. + (grokclassfn): Remove unused parameter `cname', all callers + changed. + (check_java_method): Likewise for parameter `ctype'. + (copy_assignment_arg_p): Mark parameter `virtualp' with + ATTRIBUTE_UNUSED. + (finish_prevtable_vardecl): Likewise for parameter `prev'. + + * expr.c (extract_init): Likewise for parameters `decl' and `init'. + + * init.c (expand_aggr_init_1): Remove unused parameter + `alias_this', all callers changed. + (expand_aggr_init): Likewise. + (expand_default_init): Likewise. + (build_new_1): Initialize variable `susp'. + (build_x_delete): Remove unused parameter `type', all callers + changed. + + * lex.c (set_typedecl_interface_info): Mark parameter `prev' with + ATTRIBUTE_UNUSED. + (readescape): Use (unsigned) value in shift. + (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when + comparing to a signed quantity. + + * pt.c (maybe_end_member_template_processing): Remove unused + parameter `decl', all callers changed. + (check_explicit_specialization): Add braces around empty body in + an else-statement. + (current_template_args): Initialize variable `args'. + (lookup_template_class): Likewise for variable `prev_local_enum'. + (tsubst_decl): Likewise for variable `r'. + (set_mangled_name_for_template_decl): Initialize variable + `context'. + + * spew.c (scan_tokens): Change type of parameter `n' to unsigned. + Likewise for variable `i'. + (yylex): Initialize variable `trrr'. + + * typeck.c (compparms): Mark variable `strict' with + ATTRIBUTE_UNUSED. + + * xref.c (simplify_type): Cast argument of ctype function to + `unsigned char'. + +1998-09-24 Mark Mitchell + + * cp-tree.h (language_lvalue_valid): Remove. + * decl.c (grokdeclarator): Don't disallow references to functions. + * tree.c (lvalue_p_1): New function, combining duplicated + code from ... + (lvalue_p): Use it. + (real_lvalue_p): Likewise. + * typeck.c (language_lvalue_valid): Remove. + (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though + they don't have TREE_READONLY set. + * typeck2.c (readonly_error): Add case for FUNCTION_DECLs. + +1998-09-24 Benjamin Kosnik + + * spew.c (yylex): Give diagnostic. + * hash.h (is_reserved_word): Add export. + * gxx.gperf: Likewise. + * lex.h (rid): Add RID_EXPORT. + * lex.c (init_parse): Likewise. + +Tue Sep 22 21:01:19 1998 Gerald Pfeifer + + * friend.c (do_friend): Make warning a full sentence. + +1998-09-22 Mark Mitchell + + * parse.y (component_decl_list): Improve error-recovery. + +1998-09-22 Benjamin Kosnik + + * decl.c (make_typename_type): Move error to point where name + variable can be used by dump_type. + +1998-09-22 Mark Mitchell + + * decl.c (grokfndecl): Improve error-recovery. + * decl2.c (grokfield): Likewise. + * pt.c (finish_member_template_decl): Likewise. + +1998-09-20 Martin von Löwis + + * method.c (hack_identifier): Finding multiple members is always + an error. + +1998-09-21 Per Bothner + + * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o. + +Mon Sep 21 01:53:05 1998 Felix Lee + + * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT (). + +1998-09-20 Mark Mitchell + + * class.c (maybe_warn_about_overly_private_class): Reformat. + +1998-09-17 Andrew MacLeod + + * exception.cc (__cplus_type_matcher): Realign some code. + +1998-09-16 Mark Mitchell + + * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling. + (tinfo2.o): Likewise. + (exception.o): Likewise. + (new.o): Likewise. + (opnew.o): Likewise. + (opnewnt.o): Likewise. + (opvnew.o): Likewise. + (opvnewnt.o): Likewise. + (opdel.o): Likewise. + (opdelnt.o): Likewise. + (opvdel.o): Likewise. + (opvdelnt.o): Likewise. + +1998-09-16 Richard Henderson + + * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp. + +1998-09-15 Alexandre Oliva + + * call.c (build_field_call): Handle static data members too. + + * typeck.c (comptypes): When comparing pointer types, check + whether referred types match even in strictest modes. + +1998-09-15 Mark Mitchell + + * cp-tree.h: Revert previous change. + (finish_struct_methods): Remove declaration. + * class.c: Revert previous change. + (maybe_warn_about_overly_private_class): New function. + (finish_struct_methods): Declare here, and make static. Remove + unnecessary parameters. Tidy slightly. Use + maybe_warn_about_overly_private_class. + (finish_struct_1): Adjust. Remove check for private constructors, + now done elsewhere. + (finish_struct): Adjust. + +1998-09-15 Andrew MacLeod + + * except.c (expand_start_catch_block): No need to check for new + exception model. + (process_start_catch_block_old): Deleted. + (process_start_catch_block): Add call to start_decl_1(). + (expand_end_catch_block): Add call to end_catch_handler(). + * exception.cc (__cplus_type_matcher): Only check the exception + language if there is an exception table. + +1998-09-15 Andrew MacLeod + + * search.c (expand_indirect_vtbls_init): Mark temporary stack slots + as used to prevent conflicts with virtual function tables. + +1998-09-14 Mark Mitchell + + * cp-tree.h (lang_type): Add has_non_private_static_mem_fn. + (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it. + * class.c (maybe_class_too_private_p): New function. + (finish_struct_methods): Use it. + (finish_struct_1): Likewise. + (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if + appropriate. + + * pt.c (check_specialization_scope): Fix spelling error. + (check_explicit_specialization): Remove code to handle explicit + specializations in class scope; they are now correctly diagnosed + as errors. + +1998-09-10 Mark Mitchell + + * decl.c (pushdecl): Don't copy types if the + DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the + type. + +1998-09-09 Kriang Lerdsuwanakij + + * class.c (get_enclosing_class): New function. + (is_base_of_enclosing_class): Likewise. + * cp-tree.h (get_enclosing_class): Declare. + (is_base_of_enclosing_class): Likewise. + * pt.c (coerce_template_parms): Use them. + +1998-09-09 Jason Merrill + + * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is + null to decide whether to use it. + + * error.c (dump_type_real): Handle NAMESPACE_DECL. + * parse.y (base_class.1): Avoid crash on error. + +1998-09-08 Martin von Löwis + + * decl.c (make_typename_type): If context is a namespace, the code + is in error. + +1998-09-08 Mumit Khan + + * parse.y (nomods_initdcl0): Set up the parser stack correctly. + +1998-09-08 Mark Mitchell + + * cp-tree.h (anonymous_namespace_name): Declare. + * decl.c: Define it. + (push_namespace): Use anonymous_namespace_name, rather than local + static anon_name. + * error.c (dump_decl): If a namespace is named + anonymous_namespace_name, call it {anonymous}. + + * decl.c (grokparms): Distinguish between references and pointers + in error message. + +1998-09-08 Richard Henderson + Mark Mitchell + + * pt.c (process_partial_specialization): Consistently allocate + and zero tpd.parms based on ntparms. Use tpd2.parms, not + tpd.parms, where appropriate. + +Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (INCLUDES): Update after recent toplevel gcc + reorganizations. + +1998-09-05 Mark Mitchell + + * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove. + * class.c (finish_struct): Remove hackery to deal with explicit + specializations in class scope. + * decl.c (grokfndecl): Improve error-recovery. + * decl2.c (grokfield): Likewise. + * pt.c (check_specialization_scope): New function. + (begin_specialization): Call it. + (process_partial_specialization): New function, split out from + push_template_decl. Check partial specializations more + stringently. + (push_template_decl): Call it. + (check_explicit_specialization): Don't attempt to handle explicit + specializations in class scope. + (template_parm_data): Document. Add current_arg and + arg_uses_template_parms. + (mark_template_parm): Set it. + (tsubst_arg_types): Remove unused variable. + * semantics.c (begin_class_definition): Tweak. + +1998-09-04 Mark Mitchell + + * inc/typeinfo (type_info::type_info(const char*)): Make + `explicit'. + + * cp-tree.h (hash_tree_cons_simple): New macro. + * pt.c (tsubst_arg_types): New function. Use hash_tree_cons. + (coerce_template_parms): Use make_temp_vec, instead of + make_tree_vec. Document this behavior. + (lookup_template_class): Likewise. + (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types. + Remove dead code (and add assertion to check its deadness). Fix + bug w.r.t. exception specifications. + +1998-09-03 Jason Merrill + + * decl2.c (import_export_vtable): Always make artificials comdat. + (import_export_decl): Likewise. + * pt.c (mark_decl_instantiated): Likewise. + +1998-09-03 Mark Mitchell + + * cp-tree.h (finish_globally_qualified_member_call_expr): + Rename to ... + (finish_qualified_call_expr). + * semantics.c: Likewise. + * parse.y (primary): Use it. + * method.c (hack_identifier): Remove redundant code. + + * init.c (resolve_offset_ref): Call convert_from_reference to + handle members of reference type. Improve error recovery. + +1998-09-03 Benjamin Kosnik + + * cp-tree.h: Declare warn_nontemplate_friend. + * decl2.c (lang_decode_option): Set. + * lang-options.h: Add -Wnon-template-friend. + * friend.c (do_friend): Use to toggle non-template function warning. + +1998-09-03 Mark Mitchell + + * decl.c (finish_enum): Don't resolve CONST_DECLs to their + corresponding INTEGER_CSTs when processing_template_decl. + * pt.c (tsubst_enum): Tweak accordingly. + +1998-09-03 Benjamin Kosnik + + * decl.c (pushdecl_class_level): Add warning here. + (pushdecl): Tweak. + +1998-09-02 Jason Merrill + + * cvt.c (convert_pointer_to_real): Tidy. + * search.c (get_base_distance_recursive): Simplify. + (get_base_distance): Likewise. + + * pt.c (unify): Only special-case INTEGER_TYPE if it uses template + parms. + +Wed Sep 02 09:25:29 1998 Nick Clifton + + * lex.c (check_newline): Call HANDLE_PRAGMA before + HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages + if unknown pragmas are encountered. + (handle_sysv_pragma): Interpret return code from + handle_pragma_token (). Return success/failure indication rather + than next unprocessed character. + (pragma_getc): New function: retrieves characters from the + input stream. Defined when HANDLE_PRAGMA is defined. + (pragma_ungetc): New function: replaces characters back into the + input stream. Defined when HANDLE_PRAGMA is defined. + +1998-09-01 Jason Merrill + + * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands. + * class.c (build_vtable_entry_ref): Likewise. + +1998-09-01 Mark Mitchell + + * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro. + * decl2.c (import_export_decl): Likewise. + * pt.c (instantiate_decl): Use it. + +1998-09-01 Jason Merrill + + * decl.c (lookup_name_real): Also do implicit typename thing for + artificial TYPE_DECLs. + * search.c (lookup_field): Likewise. + (lookup_fnfields, lookup_field): Adjust for implicit typename kludge. + * semantics.c (begin_constructor_declarator): Use enter_scope_of. + (enter_scope_of): Extract type from implicit typename. + (begin_class_definition): Likewise. + * lex.c (identifier_type): Handle implicit typename when checking + for SELFNAME. + + * cp-tree.h: Declare flag_strict_prototype. + * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if + -fstrict-prototype. + * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't + specified, set it to the value of pedantic. + +1998-09-01 Mark Mitchell + + * decl2.c (arg_assoc): Handle template-id expressions as arguments. + +1998-08-31 Mark Mitchell + + * decl.c (finish_enum): Handle member enums of classes declared in + template functions. + + * decl2.c (grok_x_components): Strip attributes before calling + groktypename. + +1998-08-31 Jason Merrill + + * cp-tree.h, decl2.c: Remove support for -fall-virtual, + -fenum-int-equivalence and -fno-nonnull-objects. + * class.c (check_for_override): Remove support for -fall-virtual. + (finish_struct_1): Likewise. + * call.c (build_new_op): Remove support for -fenum-int-equivalence. + * typeck.c (build_binary_op_nodefault): Likewise. + * cvt.c (ocp_convert): Likewise. + * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects. + * class.c (build_vbase_path): Likewise. + +Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org) + + * Makefile.in (INTERFACE): New, set to 1. + +1998-08-30 Mark Mitchell + + * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when + comparing with global_namespace. + (dump_aggr_type): Likewise. + + * decl.c (grokfndecl): Issue error on declaration of friend + templates with explicit template arguments. + + * pt.c (convert_template_argument): New function, split out + from... + (coerce_template_parms): Here. + (tsubst): Attempt better error-recovery. + +1998-08-28 Benjamin Kosnik + + * pt.c (decl_template_parm_p): Add checks for + TEMPLATE_TEMPLATE_PARM. + +1998-08-28 Mark Mitchell + + * lex.c (do_identifier): Fix thinko in previous change. + +1998-08-28 Jason Merrill + + * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns. + * decl2.c (output_vtable_inherit): Call binfo_for_vtable. + +1998-08-28 Richard Henderson + + Add support for discarding unused virtual functions. + * lang-options.h: Add -fvtable-gc. + * cp-tree.h: Add flag_vtable_gc. + * decl2.c (output_vtable_inherit): New fn. + (finish_vtable_vardecl): Call it. + * class.c (build_vtable_entry_ref): New fn. + (build_vtbl_ref): Call it. + +1998-08-28 Mark Mitchell + + * cp-tree.h (build_enumerator): Take the enumeration type as a + parameter. + * decl.c (finish_enum): Don't set the TREE_TYPE for the + enumeration constant values if we're processing_template_decls. + Don't set the type for the CONST_DECLs either; that's done in + build_enumerator. + (build_enumerator): Take the enumeration type as a + parameter. + * lex.c (do_identifier): Don't resolve enumeration constants while + processing template declarations, even if they happen to be + TEMPLATE_PARM_INDEXs. + + * parse.y (current_enum_type): New variable. + (primary): Don't allow statement-expression in local classes just + as we don't in global classes. + (structsp): Use current_enum_type. + (enum_list): Likewise. + * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by + finish_enum; they no longer occur. + + * cp-tree.h (finish_base_specifier): New function. + * parse.y (base_class): Use it. + * semantics.c (finish_base_specifier): Define it. + + * parse.y (structsp): Warn on use of typename outside of template + declarations. + +1998-08-27 Jason Merrill + + * lex.c (handle_cp_pragma): Remove #pragma vtable. + * lang-options.h: Remove +e options. + * decl2.c (lang_decode_option): Likewise. + (import_export_vtable): Don't check write_virtuals. + (finish_vtable_vardecl, finish_file): Likewise. + * search.c (dfs_debug_mark): Likewise. + * semantics.c (begin_class_definition): Likewise. + * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise. + + * call.c (build_over_call): Check flag_elide_constructors. + * decl2.c: flag_elide_constructors defaults to 1. + * typeck.c (convert_arguments): Remove return_loc parm. + (build_function_call_real): Adjust. + + * search.c: Tear out all mi_matrix and memoize code. + (lookup_field, lookup_fnfields): Use scratch_tree_cons. + * lang-options.h: Remove documentation for -fhandle-exceptions, + -fmemoize-lookups and -fsave-memoized. + * cp-tree.h: Lose mi_matrix and memoize support. + * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized. + * class.c: Lose struct class_level. + (pushclass, popclass): Lose memoize support. + * init.c (build_offset_ref): Likewise. + + Never change BINFO_INHERITANCE_CHAIN. + * init.c (emit_base_init): Change modification of + BINFO_INHERITANCE_CHAIN to an assert. + * search.c (get_base_distance_recursive): Likewise. + (get_base_distance): Likewise. + (lookup_member): Likewise. + (convert_pointer_to_single_level): Likewise. + (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs. + (lookup_fnfields): Likewise. + * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos. + (unshare_base_binfos): Don't call propagate_binfo_offsets. + (layout_basetypes): Call propagate_binfo_offsets instead of + unshare_base_binfos. + * decl.c (xref_basetypes): Call unshare_base_binfos. + * pt.c (instantiate_class_template): Likewise. + * tree.c (reverse_path): Remove 'copy' parm; always make a + temporary copy. + * class.c (build_vbase_path): Just call it. + * search.c (compute_access): Likewise. Don't re-reverse. + +1998-08-27 Mark Mitchell + + * class.c (build_vbase_path): Use reverse_path. + (finish_base_struct): Move warnings for inaccessible bases to + layout_basetypes. + (modify_one_vtable): Remove check of TREE_USED (binfo). + (fixup_vtable_deltas1): Likewise. + * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here. + (xref_tag): Remove binfos parameter. + (make_binfo): Remove chain parameter. + (reverse_path): Add copy parameter. + * decl.c (init_decl_processing): Change calls to xref_tag. + (xref_tag): Remove binfos parameter. + (xref_basetypes): Change calls to make_binfo. + * decl2.c (grok_x_components): Change calls to xref_tag. + (handle_class_head): Likewise. + * friend.c (do_friend): Likewise. + * lex.c (make_lang_type): Change calls to make_binfo. + * parse.y (structsp): Change calls to xref_tag. + (named_complex_class_head_sans_basetype): Likewise. + (named_class_head): Likewise. + * rtti.c (init_rtti_processing): Likewise. + * search.c (compute_access): Change calls to reverse_path. + (dfs_get_vbase_types): Change calls to make_binfo. + (get_vbase_types): Remove dead code. + * tree.c (unshare_base_binfos): Change calls to make_binfo. + (layout_basetypes): Warn here about inaccessible bases. + (make_binfo): Remove chain parameter. + (reverse_path): Add copy parameter. + +1998-08-27 Jason Merrill + + * class.c: #if 0 complete_type_p. + * init.c (build_java_class_ref, build_new_1): Remove unused locals. + * method.c (process_overload_item): Likewise. + * typeck.c (comp_target_types): Likewise. + + Stop sharing binfos for indirect virtual bases. + * tree.c (propagate_binfo_offsets): Unshare vbases, too. + (layout_basetypes): Likewise. + (unshare_base_binfos): Copy vbases, too. + * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED, + BINFO_VBASE_INIT_MARKED): Remove obsolete macros. + (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED, + CLEAR_BINFO_PUSHDECLS_MARKED): New macros. + * search.c (lookup_field, lookup_fnfields, lookup_member): Remove + reference to BINFO_VIA_PUBLIC. + (marked_pushdecls_p, unmarked_pushdecls_p): New fns. + (push_class_decls): Use them. + (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED. + (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED. + +1998-08-27 Mark Mitchell + + * decl.c (build_enumerator): Set DECL_CONTEXT for the + CONST_DECLs. + +1998-08-26 Mark Mitchell + + * cp-tree.h (finish_enum): Change prototype. + * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a + VALUES parameter. Don't try to compute mins/maxs if + processing_template_decl. + * parse.y (structsp): Use new calling sequence for finish_enum. + * pt.c (tsubst_enum): Likewise. Take the new type as input. + (lookup_template_class): Remove unused variables. Tweak. + Register enums on instantiation list before substituting + enumeration constants. + (tsubst_decl): Remove unused variables. + (regenerate_decl_from_template): Likewise. + + * decl.c (duplicate_decls): Don't obliterate the + DECL_TEMPLATE_INFO for a template if we're not replacing it with + anything. + + * lex.c (do_identifier): Fix typo in comment. + +Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi + + * errfn.c: Remove stdarg.h/varargs.h. + * tree.c: Likewise. + +1998-08-25 Brendan Kehoe + + * pt.c (tsubst_copy): Only do typename overloading on an + IDENTIFIER_NODE that happens to look like a typename if it actually + has a type for us to use. + +1998-08-25 Jason Merrill + + * typeck.c (comp_cv_target_types): Split out... + (comp_target_types): From here. Don't allow cv-qual changes under + a pointer if nptrs == 0. Fix OFFSET_TYPE handling. + (build_ptrmemfunc): Pass 1 to nptrs. + * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes. + +1998-08-25 Mark Mitchell + + * search.c (dependent_base_p): Don't compare a binfo to + current_class_type; use the TREE_TYPE of the binfo instead. + + * cp-tree.h (CLASS_TYPE_P): Revise definition. + +1998-08-25 Jason Merrill + + * decl.c (duplicate_decls): Don't complain about different + exceptions from an internal decl even if pedantic. + + * typeck.c (convert_for_assignment): Converting from pm of vbase + to derived is an error, not a sorry. + + * call.c (build_over_call): Use convert_pointer_to_real for 'this'. + * class.c (fixed_type_or_null): Rename from + resolves_to_fixed_type_p. Return the dynamic type of the + expression, if fixed, or null. + (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type + does not match the static type. + (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use + resolves_to_fixed_type_p again. + +1998-08-24 Mark Mitchell + + * pt.c (tsubst_decl): Move special case code for dealing with + tricky friend templates here from ... + (regenerate_decl_from_template): Here. + +1998-08-24 Jason Merrill + + * decl.c (start_decl): Remove redundant linkage check. + +1998-08-24 Gavin Romig-Koch + + * typeck.c (c_expand_return): Handle the case that valtype + is wider than the functions return type. + +1998-08-24 Mark Mitchell + + * cp-tree.h (CLASS_TYPE_P): New macro. + * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE. + * pt.c (process_template_parm): Undo previous change. + +1998-08-24 Benjamin Kosnik + + * cp-tree.h: Declare. + * pt.c (decl_template_parm_p): New function. + * decl.c (pushdecl): Check decls for redeclaring template parms. + (xref_tag): Make redeclaration an error, print decl. + * decl2.c (grokfield): Check field_decls for redeclaration as well. + +1998-08-24 Jason Merrill + + * parse.y (primary): Fix up the type of string constants. + +1998-08-24 Mark Mitchell + + * typeck.c (convert_for_initialization): Move check for odd uses + of NULL to avoid duplicate warnings. + +1998-08-24 Jason Merrill + + * tree.c (lvalue_type): Fix for arrays. + * typeck.c (string_conv_p): New fn. + (convert_for_assignment): Use it. + (build_unary_op): Use lvalue_type. + * call.c (standard_conversion, convert_like): Use string_conv_p. + (add_function_candidate): Use lvalue_type. + * cvt.c (convert_to_reference): Likewise. + * decl2.c (lang_decode_option): Ignore -traditional. + * decl.c (init_decl_processing): flag_writable_strings inhibits + flag_const_strings. + +1998-08-24 Andrew MacLeod + + * lang-options.h (lang_options): Add fconst-strings to the list + of valid options. + * decl2.c (lang_f_options, lang_decode_option): Likewise. + +1998-08-24 Nathan Sidwell + + * lex.c (real_yylex): Don't warn about long long constants if + we're allowing long long. + +1998-08-24 Martin von Löwis + + * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of + accessing bindings directly. + + * search.c (my_tree_cons): Reimplement. + + * lang-specs.h: Remove __HONOR_STD. + * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise. + +1998-08-23 Mark Mitchell + + * decl.c (grokdeclarator): Complain about in-class initialization + of aggregates and/or references. + * pt.c (process_template_parm): Clear IS_AGGR_TYPE for + TEMPLATE_TYPE_PARMs. + + * decl2.c (grok_array_decl): Add comment. + (mark_used): Don't instantiate an explicit instantiation. + * friend.c (make_friend_class): Remove bogus comment. Fix check + for partial specializations. + * pt.c (check_explicit_specialization): Don't + SET_DECL_EXPLICIT_INSTANTIATION here. + (mark_decl_instantiated): Or here. + (do_decl_instantiation): Do it here, instead. Add checks for + duplicate explicit instantiations, etc. Tidy. + (do_type_instantiation): Likewise. + (instantiate_decl): Improve comments. Complain about explicit + instantiations where no definition is available. + + * cp-tree.h (ansi_null_node): Remove. + * call.c (build_over_call): Warn about converting NULL to an + arithmetic type. + * cvt.c (build_expr_type_conversion): Likewise. Use + null_ptr_cst_p instead of expanding it inline. + * decl.c (ansi_null_node): Remove. + (init_decl_processing): Make null_node always have integral type. + * except.c (build_throw): Warn about converting NULL to an + arithmetic type. + * lex.c (init_parse): Remove handling of ansi_null_node. + * pt.c (type_unification_real): Don't convert NULL to void* type. + * typeck.c (build_binary_op_nodefault): Fix NULL warnings. + (convert_for_assignment): Warn about converting NULL to an + arithmetic type. + (convert_for_initialization): Likewise. + +1998-08-20 Jason Merrill + + * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn. + * pt.c (coerce_template_parms): Use no_linkage_check. + * decl.c (grokvardecl): Likewise. + (grokfndecl): Likewise. Members of anonymous types have no linkage. + + * method.c (process_overload_item): Remove useless code. + +1998-08-20 Per Bothner + + Handle new'ing of Java classes. + * init.c (build_class_classref): New function. + (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject; + constructor does not return this; don't need to exception-protect. + + * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag. + * decl2.c (acceptable_java_type): Handle template-derived types. + +1998-08-20 Per Bothner + + * decl2.c (import_export_vtable): Suppress vtables for Java classes. + +1998-08-20 Mark Mitchell + + * decl.c (duplicate_decls): Always merge the old and new patterns + for templates, regardless of whether or not the new one has + DECL_INITIAL. Don't throw away specializations. Merge + DECL_SAVED_TREE. + * pt.c (tsubst_decl): Use the right pattern when calculating the + complete args for a new template instance. + (do_decl_instantiation): Fix typo in comment. + (regenerate_decl_from_template): Deal with tricky friend template + case. + (instantiate_decl): Likewise. + +Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com) + + * init.c (build_builtin_delete_call): Add missing assemble_external + call. + +1998-08-20 Jason Merrill + + * parse.y (notype_unqualified_id): Also accept ~A. + +1998-08-19 Mark Mitchell + + * typeck.c (build_binary_op_nodefault): Warn on use of NULL in + arithmetic. + * except.c (build_throw): Warn when NULL is thrown, even with + -ansi. Use ansi_null_node, rather than integer_zero_node, in the + thrown expression. + + * cp-tree.h (ansi_null_node): New variable. + * decl.c (ansi_null_node): New variable. + (init_decl_processing): Initialize its type. + * lex.c (init_parse): Initialize its value. Use ansi_null_node + for null_node in non-ANSI mode. + * typeck.c (build_binary_op_nodefault): Use ansi_null_node in + place of null_node to avoid spurious errors. + +1998-08-17 Mark Mitchell + + * cp-tree.h (enter_scope_of): New function. + * parse.y (complex_direct_notype_declarator): Use it. + * semantics.c (enter_scope_of): New function. + +1998-08-17 Jason Merrill + + * decl.c (grokparms): No, here. + + * decl.c (grokdeclarator): Catch parm with pointer to array of + unknown bound here... + * method.c (process_overload_item): ...not here. + + * gxxint.texi: Remove obsolete documentation of overloading code. + + * decl.c (finish_enum): Also set TYPE_SIZE_UNIT. + * class.c (finish_struct_bits): Likewise. + + * tree.c (lvalue_type): Fix for arrays. + * typeck.c (build_unary_op): Use lvalue_type. + * call.c (add_function_candidate): Likewise. + * cvt.c (convert_to_reference): Likewise. + + * decl2.c (lang_decode_option): Ignore -traditional. + + * init.c (build_offset_ref): Don't mess with error_mark_node. + * lex.c (do_scoped_id): Use cp_error. + + * rtti.c (get_tinfo_fn): Don't mess with the context for now. + +1998-08-17 Benjamin Kosnik + + * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified. + +Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com) + + * cp-tree.h (set_identifier_local_value): Provide prototype. + + * decl2.c (do_namespace_alias): Remove unused variables `binding' + and `old'. + +Fri Aug 14 16:42:27 1998 Nick Clifton + + * Makefile.in: Rename BBISON to BISON so that it can be properly + inherited from the parent makefile. + +1998-08-13 Jason Merrill + + * lang-options.h: Add -finit-priority. + * decl2.c: Likewise. Check flag_init_priority instead of + USE_INIT_PRIORITY. + + * decl2.c (setup_initp): New fn. + (start_objects, finish_objects, do_ctors): Handle init_priority. + (do_dtors, finish_file): Likewise. + +1998-08-13 Jason Merrill + + * pt.c (tsubst_copy): Hush warning. + + * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P. + +1998-08-12 Mark Mitchell + + * pt.c (print_template_context): Don't abort when instantiating a + synthesized method. + + * decl.c (grokdeclarator): Issue errors on namespace qualified + declarators in parameter lists or in class scope. + +1998-08-09 Mark Mitchell + + * pt.c (check_explicit_specialization): Don't abort on bogus + explicit instantiations. + +1998-08-07 Mark Mitchell + + * typeck.c (require_complete_type): Use complete_type_or_else. + (complete_type_or_else): Always return NULL_TREE on failure, as + documented. + + * pt.c (tsubst_aggr_type): Prototype. + (tsubst_decl): New function, split out from tsubst. Set + input_filename and lineno as appropriate. + (pop_tinst_level): Restore the file and line number saved in + push_tinst_level. + (instantiate_class_template): Set input_filename and lineno as + appropriate. + (tsubst): Move _DECL processing to tsubst_decl. Make sure the + context for a TYPENAME_TYPE is complete. + + * decl2.c (grokbitfield): Issue errors on bitfields declared with + function type. + (do_dtors): As in do_ctors, pretend to be a member of the same + class as a static data member while generating a call to its + destructor. + + * cvt.c (cp_convert_to_pointer): Handle NULL pointer + conversions, even in complex virtual base class hierarchies. + +1998-08-06 Mark Mitchell + + * cp-tree.h (ENUM_TEMPLATE_INFO): New macro. + (TYPE_TEMPLATE_INFO): Likewise. + (SET_TYPE_TEMPLATE_INFO): Likewise. + (ENUM_TI_TEMPLATE): Likewise. + (ENUM_TI_ARGS): Likewise. + (lookup_nested_type_by_name): Remove. + * decl.c (maybe_process_template_type_declaration): Handle enums. + (start_enum): Don't check for primary-template enum declarations + here. + (finish_enum): Clean up, document. Make sure template enum + constants get the correct type. + (build_enumerator): Copy initializers for template enumerations, + too. + (grok_enum_decls): Document. + * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit + better. Build LOOKUP_EXPRs for local variables, even if they are + TREE_PERMANENT. + * pt.c (tsubst_enum): Remove field_chain parameter. + (template_class_depth): Include the depth of surrounding function + contexts. + (push_template_decl): Check for primary-template enum declarations + here. Deal with enumeration templates. + (lookup_template_class): Likewise. + (for_each_template_parm): Likewise. + (instantiate_class_template): Don't call tsubst_enum directly, + call tsubst instead, to instantiate enums. Deal with all + field_chain issues here, not in tsubst_enum. + (lookup_nested_type_by_name): Remove. + (tsubst_aggr_type): Revise handling of enumeration types. + (tsubst): Likewise. + (tsubst_copy): Likewise. + (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs. + +1998-08-04 Mark Mitchell + + * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it + uses template parameters. + * method.c (build_template_parm_names): Use the full set of + template arguments for tsubst'ing. + (build_overload_identifier): Pass the full set of template + arguments to build_template_parm_names, not just the + innermost_args. + * pt.c (TMPL_ARGS_DEPTH): Define using + TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity. + (NUM_TMPL_ARGS): New macro. + (add_outermost_template_args): Deal with the case where the outer + args will be completely discarded. + (coerce_template_parms): Use the full set of template arguments + for tsubst'ing. Simplify. Add some asserts. Improve + error messages. + (lookup_template_class): Pass the full set of template arguments + to coerce_template_parms. + (tsubst): Add assertion. + (do_type_instantiation): Don't instantiate member template + classes. + + * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose + name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE. + +1998-08-03 Jason Merrill + + * method.c (set_mangled_name_for_decl): Change return type to void. + + * decl.c (lookup_name_real): A namespace-level decl takes priority + over implicit typename. Avoid doing the same lookup twice. + + * search.c (dependent_base_p): New fn. + (dfs_pushdecls, dfs_compress_decls): Use it. + + * typeck.c (get_member_function_from_ptrfunc): Don't try to handle + virtual functions if the type doesn't have any. + +1998-08-03 Mark Mitchell + + * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it + uses template parameters. + +1998-08-02 Mark Mitchell + + * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument. + * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation. + * lex.c (do_identifier): Don't use a second argument, or a type, + when building LOOKUP_EXPRs. + (do_identifier): Likewise. + (do_scoped_id): Likewise. + * method.c (hack_identifier): Improve error message. + * pt.c (lookup_template_function): Don't needlessly call + copy_to_permanent or build_min. + (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if + necessary. + (do_decl_instantiation): Improve error message. + * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy. + (build_min): Copy the type to the permanent obstack, too. + +1998-08-01 Jason Merrill + + * init.c (init_init_processing): Remove BI* handling. + (build_builtin_call): Remove. + (build_builtin_delete_call): New fn. + (build_delete): Use it. + +1998-07-31 Mark Mitchell + + * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro. + (maybe_check_template_type): New function. + * decl.c (maybe_process_template_type_declaration): New function, + split out from pushtag Call maybe_check_template_type. + (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P. + (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P. + * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P. + * pt.c (template_class_depth_real): Generalization of ... + (template_class_depth): Use it. + (register_specialization): Use duplicate_decls for duplicate + declarations of specializations. + (maybe_check_template_type): New function. + (push_template_decl_real): Fix comment. + (convert_nontype_argument): Likewise. + (lookup_template_class): Likewise. Avoid an infinite loop on + erroneous code. + (tsubst_friend_function): Fix comment. + (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is + an IDENTIFIER_NODE. + * semantics.c (begin_function_definition): Use + reset_specialization to note that template headers don't apply + directly to declarations after the opening curly for a function. + +1998-07-29 Jason Merrill + + * decl.c (push_overloaded_decl): Use current_namespace instead of + DECL_CONTEXT (decl) to determine where we go. + + * decl.c (lookup_name_real): Fix typo. + +1998-07-28 Mark Mitchell + + * friend.c (is_friend): Be lenient with member functions to deal + with nested friends. + +1998-07-28 Jason Merrill + + * class.c (finish_struct_1): Convert integer_zero_node to + ssizetype before passing it to set_rtti_entry. + * typeck2.c (initializer_constant_valid_p): Allow conversion of 0 + of any size to a pointer. + +1998-07-27 Mark Mitchell + + * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove. + (build_template_decl_overload): Remove. + (set_mangled_name_for_decl): New function. + (innermost_args): Remove is_spec parameter. + (most_specialized, most_specialized_class): Remove declarations. + (lookup_template_class): Add entering_scope parameter. + (maybe_process_partial_specialization): New function. + (finish_template_decl): Likewise. + (finish_template_type): Likewise. + * class.c (finish_struct): Clean up processing of member template + specializations. + * decl.c (pushtag): Fix formatting. + (lookup_tag): Improve handling of pseudo-global levels. + (make_typename_type): Adjust call to lookup_template_class. + (shadow_tag): Use maybe_process_partial_specialization. + (xref_tag): Improve handling of member friends. + (start_function): Call push_nested_class before + push_template_decl. Don't call push_template_decl for + specializations. + * decl2.c (grok_x_components): Don't call xref_tag for + template instantiations. Handle UNION_TYPEs like RECORD_TYPEs. + (grokclassfn): Use set_mangled_name_for_decl. + (arg_assoc_class): Adjust call to innermost_args. + (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL. + * error.c (dump_function_name): Improve printing of template + function names. + * friend.c (is_friend): Don't compare types of decls to determine + friendship, unless flag_guiding_decls. + (make_friend_class): Partial specializations cannot be friends. + (do_friend): Use set_mangled_name_for_decl. Call + push_template_decl_real instead of push_template_decl. + * method.c (build_decl_overload_real): Remove prototype. Give it + external linkage. + (build_overload_identifier): Adjust call to innermost_args. + (build_template_decl_overload): Remove. + (set_mangled_name_for_decl): New function. + * parse.y (.finish_template_type): New non-terminal. + (template_def): Use finish_template_decl. Use template_extdef + instead of extdef. + (template_extdef, template_datadef): New non-terminals, containing + only those rules for things which can be templates. + (datadef): Tidy. + (template_type, self_template_type): Use .finish_template_type. + (named_class_head): Use maybe_process_partial_specialization. + * pt.c (mangle_class_name_for_template): Remove context parameter. + (get_class_bindings): Remove outer_args parameter. + (complete_template_args): Remove. + (add_outermost_template_args): New function. + (register_specialization): Return the specialization. + (unregister_specialization): New function. + (tsubst_template_parms): Likewise. + (most_specialized, most_specialized_class): Prototype here as + static. + (original_template): Rename to most_general_template. + (tsubst_template_parms): New function. + (set_mangled_name_for_template_decl): Likewise. + (TMPL_ARGS_DEPTH): New macro. + (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust. + (TMPL_ARGS_LEVEL): New macro. + (SET_TMPL_ARGS_LEVEL): Likewise. + (TMPL_ARG): Likewise. + (SET_TMPL_ARG): Likewise. + (TMPL_ARGS_DEPTH): Likewise. + (finish_member_template_decl): Use finish_template_decl. + (maybe_process_partial_specialization): New function, split out + from tsubst. + (inline_needs_template_parms): Use TMPL_PARMS_DEPTH. + (maybe_begin_member_template_processing): Use new macros. + (is_member_template): Likewise. + (is_member_template_class): Likewise. + (add_to_template_args): Likewise. Deal with multiple levels of + args. + (maybe_process_partial_specialization): New function. + (retrieve_specialization): Add consistency check. + (determine_specialization): Return full argument list. + (check_explicit_specialization): Tweak friend handling. Use full + argument lists. Simplify. + (current_template_args): Use new macros. + (push_template_decl_real): Change ill-named mainargs to specargs. + Check that a partial specialization actually specializes at least + one parameter. Improve friend handling. Modify for full + template arguments. + (classtype_mangled_name): Don't mangle the names of + specializations. + (lookup_template_class): Add entering_scope parameter. Use it to + avoid finding a template type when an instantiation is required. + Simplify. Use full template arguments. + (tsubst_friend_function): Use unregister_specialization. Use new + macros. Use full template arguments. + (tsubst_friend_class): Substitute, using tsubst_template_parms, + into the template parameters before passing them to + redeclare_class_template. + (instantiate_class_template): Simplify. Use full template + arguments. Adjust calls to get_class_bindings. Use + SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling. + (innermost_args): Use new macros. + (tsubst_aggr_type): New function, split out from tsubst. + (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling + conventions for lookup_template_class. Refine handling of partial + instantiations. Remove calls to complete_template_args. + Simplify. Add consistency checks. Use set_mangled_name_for_decl + and set_mangled_name_for_template_decl. + (tsubst_copy): Use tsubst_aggr_type. + (instantiate_template): Use full template arguments. + (more_specialized): Improve formatting. + (more_specialized_class): Adjust calls to get_class_bindings. + (get_bindings_real): Don't call complete_template_args. + (most_specialized): Don't overwrite input; create a new list. + (most_specialized_class): Use most_general_template. + (regenerate_decl_from_template): Use unregister_specialization. + Use full template arguments. + (instantiate_decl): Use full template arguments. + (set_mangled_name_for_template_decl): New function. + * semantics.c (begin_class_definition): Use + maybe_process_partial_specialization. + (finish_member_class_template): New function. + (finish_template_decl): Likewise. + (finish_template_type): Likewise. + (typeck.c): Don't crash after issuing a compiler_error. + * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict. + +1998-07-27 Jason Merrill + + * typeck2.c (build_functional_cast): Handle default-initialization. + + * call.c (build_over_call): Pass 1 to popclass. + + * parse.y (direct_notype_declarator): Add precedence declaration + to notype_unqualified_id case. + * Makefile.in (EXPECT): Adjust. + + * tree.c (ovl_member): Fix for single function in OVL. + +1998-07-27 Dave Brolley + + * c-lex.c (yylex): Fix boundary conditions in character literal and + string literal loops. + +1998-07-24 Jason Merrill + + * decl.c (lookup_name_real): OK, do return the from_obj value + unless got_object depends on template parms. + + * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT. + + * pt.c (coerce_template_parms): Also complain about local enums. + + * cp-tree.h: Add prototype for set_identifier_local_value. + * decl.c (set_identifier_local_value_with_scope): Make static, + prototype. + * search.c (covariant_return_p): Likewise. + * except.c (build_terminate_handler, alloc_eh_object): Likewise. + + * call.c (build_method_call): Only pull out the type of a destructor + if it's a template type parm. + * decl.c (lookup_name_real): Never return the from_obj value. + +1998-07-23 Jason Merrill + + * except.c (process_start_catch_block_old): Call start_decl_1 for + catch parm. + * decl.c (start_decl_1): Avoid duplicate error. + + * init.c (expand_default_init): Only perform the initialization if + it will do something. + +1998-07-23 H.J. Lu (hjl@gnu.org) + + * parse.y (base_class): Check for invalid base class. + +1998-07-23 Jason Merrill + + * decl2.c (import_export_template): Fold in... + (import_export_class): ...to here. Handle dllimport/export. + + * class.c (build_vtable): Pass at_eof to import_export_vtable. + (prepare_fresh_vtable): Likewise. + * decl2.c (import_export_class): Split out... + (finish_prevtable_vardecl): From here. + * class.c (finish_struct_1): Call import_export_class if at_eof. + + * decl.c (start_function): #if 0 mysterious code I wrote and have + forgotten why. + * rtti.c (get_tinfo_fn): If this is for a class type, set + DECL_CONTEXT. + +1998-07-22 Jason Merrill + + * inc/exception: Change terminate and unexpected to (). + + * parse.y (named_class_head_sans_basetype_defn): A + named_class_head_sans_basetype followed by '{' or ':' is a defn. + +1998-07-21 Jason Merrill + + * tree.c (canonical_type_variant): New fn to handle arrays. + * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove. + * pt.c (unify, default case): Also fold arg. Fix array bounds case. + * method.c (process_overload_item): Use build_overload_value for + arrays. + +1998-07-20 Dave Brolley + + * lex.c (mbchar.h): #include it. + (GET_ENVIRONMENT): New macro. + (init_parse): Set character set based on LANG environment variable. + (real_yylex): Handle multibyte characters in character literals. + (real_yylex): Handle multibyte characters in string literals. + +1998-07-19 Jason Merrill + + * lex.c (do_identifier): Look for class value even if we don't + have a global value. Do implicit declaration if parsing is 2. + * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig + lookup. + +1998-07-19 Mark Mitchell + + * decl.c (pushtag): Revert previous change. + * pt.c (lookup_template_class): Don't put out debugging + information for types that use template parameters. + + * decl.c (pushtag): Don't put out debugging information for + compiler-generated typedefs. + + * error.c (dump_type_real): Don't crash when presented with + intQI_type_node or the like. + + * semantics.c (finish_translation_unit): Fix spelling error in + comment. + +1998-07-17 Jason Merrill + + * decl.c (lookup_name_real): Pull out single function here. + (select_decl): Not here. + (unqualified_namespace_lookup): Use CP_DECL_CONTEXT. + + * decl.c (qualify_lookup): Tweak again. + + * pt.c (lookup_template_class): Don't mess with the context of the + instantiation. + * decl2.c (current_decl_namespace): Remove special handling for + templates. + + * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for + a member template specialization. + + * tree.c (ovl_member): Use decls_match to compare functions. + * decl.c (decls_match): Check the context of a function. + + * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER + in Koenig lookup support rules. + * semantics.c (finish_call_expr): Handle the new cases. + + * typeck.c (build_x_function_call): Handle overloaded methods. + + * decl.c (grokvardecl): Don't call build_static_name for extern "C". + +1998-07-16 Mark Mitchell + + * semantics.c (finish_object_call_expr): Revert previous change. + * call.c (build_new_method_call): Likewise. Instead, convert + TYPE_DECLs to IDENTIFIERs here, in the presence of templates. + +1998-07-16 Jason Merrill + + * decl.c (qualify_lookup): Handle templates. + + * decl2.c (do_using_directive): Don't pass ancestor. + * decl.c (push_using_directive): Calculate ancestor. + + * decl2.c (do_nonmember_using_decl): Allow for type shadowing. + * decl.c (pushdecl): Move type shadowing handling from here... + (duplicate_decls): ...to here. + * decl.c (set_identifier_local_value_with_scope): New fn. + (pushdecl): Use it. + (set_identifier_local_value, lookup_type_current_level): New fns. + * decl2.c (do_local_using_decl): Handle types and binding level + stuff properly. + + * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD. + * decl.c (select_decl): Extract a lone function from an OVERLOAD. + (lookup_namespace_name): Likewise. + * typeck.c (build_unary_op): Not here anymore. + + * decl2.c (do_class_using_decl): Make sure we get an identifier. + * class.c (handle_using_decl): Ignore TYPE_DECLs. + + * decl.c (qualify_lookup): New fn. + (lookup_name_real): Use it. + +1998-07-16 Martin v. Loewis + + * decl2.c (add_using_namespace): When directly using a namespace + that was indirect before, promote it. + + * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES, + LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY, + LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros. + * decl.c (select_decl): Replace two flag parameters by one. + (unqualified_namespace_lookup): Likewise, pass flag. + (lookup_flags): New function. + (lookup_name_real): Compute flags, pass them. + (lookup_namespace_name): Call with zero-flag. + * decl2.c (ambiguous_decl): Add flag parameter, complain only + according to flags. + (lookup_using_namespace, qualified_lookup_using_namespace): + Add flag parameter, pass them through. + * lex.c (do_scoped_id): Call with zero-flag. + +1998-07-16 Jason Merrill + + * typeck.c (convert_for_assignment): Use comptypes. + +1998-07-16 Mark Mitchell + + * semantics.c (finish_object_call_expr): Move test for the + function called being a TYPE_DECL to ... + * call.c (build_new_method_call): Here. + +1998-07-15 Jason Merrill + + * decl2.c (arg_assoc_class): Also look at template arguments, if any. + (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST. + + * lex.c (looking_for_typename): Don't initialize. + + * decl2.c (ambiguous_decl): Clarify error message. + + * decl.c (push_using_directive): Iterate over namespaces used + indirectly. + +1998-07-15 Martin v. Löwis + + * decl2.c (add_using_namespace): Iterate over namespaces used + indirectly. + + * decl.c (lookup_name_real): Accept namespace aliases as locals. + (cat_namespace_levels): Ignore aliases. + (duplicate_decls): Ignore duplicate aliases. + * decl2.c (do_namespace_alias): Process block level namespace + aliases. Store alias with pushdecl. Remove odr errors. + * parse.y (namespace_alias): New non-terminal. + (extdef): Use it. + +1998-07-15 Jason Merrill + + * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE. + Handle TEMPLATE_TYPE_PARM. + (arg_assoc): Rewrite. + + * pt.c (complete_template_args): Don't look at the context unless + we have to. + + * method.c (build_decl_overload_real): Fix namespace handling. + + * typeck.c (build_unary_op): Extract a lone function from an + OVERLOAD. + + * call.c (build_scoped_method_call): Handle getting a namespace + for basetype in a destructor call. + (check_dtor_name): Handle enums. + + * parse.y (using_directive): New nonterminal. + (extdef, simple_stmt): Use it. + +1998-07-14 Martin von Löwis + + * decl2.c (add_function): Move error message ... + (arg_assoc_namespace): ... from here. + +1998-07-14 Jason Merrill + + * parse.y (namespace_qualifier): Fix multiple level handling. + * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT. + (arg_assoc): Don't skip the first argument of a function. + +Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com) + + * search.c (my_tree_cons): Clean up. + +1998-07-14 Jason Merrill + + * call.c (joust): Don't warn about "confusing" conversions to the + same type. + +1998-07-14 Martin von Löwis + + * class.c (push_nested_class): Complain about namespaces. + * decl.c (start_decl): Enter the object's namespace. + (cp_finish_decl): Leave it. + (grokdeclarator): Likewise. + * decl2.c (check_decl_namespace): New function. + (finish_file): Call it. + * parse.y (complex_direct_notype_declarator): Set complexity + of namespace-qualified ids to -1, enter the namespace. + + * method.c (build_template_decl_overload): Expect _DECL as first + parameter. Put context temporarily into current_namespace. + * pt.c (check_explicit_specialization): Change caller. + (tsubst): Likewise. + + * init.c (build_offset_ref): Call mark_used and + convert_from_reference for namespace members. + +Mon Jul 13 23:25:28 1998 Martin von Löwis + + * search.c (my_tree_cons): The bitfield is at index 2. + +Mon Jul 13 17:21:01 1998 Nick Clifton + + * lang-options.h: Format changed to work with new --help support + in gcc/toplev.c + +1998-07-12 Martin von Löwis + + * decl2.c (build_expr_from_tree): Change calls of do_identifier. + Do Koenig lookup in CALL_EXPR. + (arg_assoc): Handle error_mark. + * lex.c (is_global): New function. + (do_identifier): Expect arguments for Koenig lookup. + * parse.y (primary): Add rules for calls of unqualified function calls. + (do_id): Change call of do_identifier. + * pt.c (finish_stmt_expr): Likewise. + * semantics.c (finish_id_expr): Likewise. + (finish_call_expr): Add integer parameter to indicate + argument-dependent lookup. + + * decl.c (struct binding_level): New field using_directives. + (push_using_decl): Not sorry anymore. + (push_using_directive): New function. + (lookup_tag): Use CP_DECL_CONTEXT to iterate. + (unqualified_namespace_lookup): New function, code from ... + (lookup_name_real): ... here. + * decl2.c (lookup_using_namespace): Pass using list instead of + initial scope. + (validate_nonmember_using_decl): New function. + (do_nonmember_using_decl): New function. + (do_toplevel_using_decl): Use them. + (do_local_using_decl): New function. + (do_using_directive): Support block-level directives. + * parse.y (simple_stmt): Support using declarations and + directives. + (namespace_qualifier, namespace_using_decl): New non-terminals. + + * xref.c (classname): New function. + (GNU_xref_hier): Change class and base parameters to tree. + * decl.c (xref_baseypes): Change caller. + * friend.c (make_friend_class): Likewise. + +1998-07-12 Kriang Lerdsuwanakij + + * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter + comparison. + + * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a + template template parameter, record its use. + (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse + its template arguments if exists. + + * pt.c (coerce_template_template_parms): New function equivalent + to coerce_template_parms when IS_TMPL_PARM is true. + (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter, + all callers changed. + + (coerce_template_parms): Access ARGLIST properly when creating a + new vector. Only accept implicit TYPE_DECL as valid argument for + a template template parameter when it is a base class of + current_class_type. Don't display error message when COMPLAIN is + false. + +1998-07-12 Klaus Kaempf (kkaempf@progis.de) + + * repo.c (get_base_filename): Use file_name_nondirectory. + (open_repo_file): Likewise. + * cp-tree.h (file_name_nondirectory): Add prototype. + +1998-07-12 Jason Merrill + + * friend.c (do_friend): Pull the identifier out of declarator. + Use cp_error and friends. + * decl2.c (qualified_lookup_using_namespace): Fix call to + purpose_member. + * decl.c (lookup_name_real): Don't call complete_type on a namespace. + (grokvardecl): Use DECL_CLASS_SCOPE_P. + * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner. + * class.c (warn_hidden): Fix for OVERLOAD. + From grahams@rcp.co.uk: + * cp-tree.h (DEFARG_NODE_CHECK): New macro. + (DEFARG_LENGTH, DEFARG_POINTER): Use it. + +Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com) + + * g++.1 (-traditional): Remove duplicated documentation. + +1998-07-11 Mark Mitchell + + * method.c (flush_repeats): Add nrepeats parameter. + (issue_nrepeats): Likewise. + (is_back_referenceable_type): New function. Don't back-reference + TEMPLATE_TYPE_PARMs as well as simple types like integers. + (build_mangled_name_for_type): Likewise. + (build_mangled_name_for_type_with_Gcode): Likewise. + (lasttype): Remove. + (nrepeats): Likewise. + (Nrepeats): Likewise. + (start_squangling): Don't clear the variables removed above. + (end_squangling): Likewise. + (flush_repeats): Tidy. Use nrepeats parameter rather than + Nrepeats global. + (issue_nrepeats): Likewise, but with nrepeats global. Use + is_backreferenceable_type. + (build_overload_nested_name): Tidy. Add comment. Use + build_mangled_name_for_type. + (build_underscore_int): Comment. + (build_overload_scope_ref): Use build_mangled_name_for_type. + (build_overload_int): Likewise. + (build_template_template_parm_names): Tidy. + (build_template_parm_names): Use build_mangled_name_for_type. + (build_overload_identifier): Add comments. + (build_mangled_name_for_type_with_Gcode): Split out from + build_mangled_name. + (build_mangled_name_for_type): Use it. + (build_mangled_name): Rework to use build_mangled_name_for_type + and to not use global nrepeats/Nrepeats. Tidy. + (process_modifiers): Tidy. + (check_btype): Use is_backreferenceable_type. Add comment. + Rename `node' to `type'. + (process_overload_item): Set numeric_output_need_bar here. + Use build_mangled_name_for_type. Tidy. + (build_decl_overload_real): Tidy. Don't use Nrepeats. Use + build_mangled_name_for_type. + + * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO + for TYPE_DECLs. + +1998-07-08 Vladimir N. Makarov + + * cp-tree.h (warn_long_long): Define. + * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for + warning "ANSI C++ does not support `long long'". + * decl2.c (warn_long_long): Define. + (lang_decode_option): Parse -Wlong-long, -Wno-long-long options. + +1998-07-07 Jason Merrill + + * decl.c (xref_tag): Handle attributes between 'class' and name. + * parse.y (aggr): Likewise. + * semantics.c (finish_class_definition): Likewise. + * Makefile.in (EXPECTED): Adjust. + + * cp-tree.h: Declare flag_optional_diags and warn_multichar. + * decl2.c: Define them. + (lang_decode_option): Handle them. + * lang-options.h: Add -foptional-diags. + * class.c (finish_struct): Don't complain about multiple meanings of + name if -fno-optional-diags. + * decl.c (pushdecl_class_level): Likewise. + * lex.c (real_yylex): Check warn_multichar. + +1998-07-06 Jason Merrill + + * decl.c (lookup_tag): Use CP_DECL_CONTEXT. + + * tree.c (make_binfo): Fix length. + +1998-06-30 Benjamin Kosnik + + * decl2.c (lang_decode_option): Remove warn_template_debugging. + * lang-options.h: Likewise. + +Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi + + * except.c (build_eh_type_type_ref): Remove unused variable `susp'. + (process_start_catch_block): Likewise for variables + `false_label_rtx', `call_rtx' and `return_value_rtx'. + +1998-06-29 Brendan Kehoe + + * tree.c (build_srcloc): Make sure we allocate this node on the + permanent obstack. + +Sat Jun 27 23:34:18 1998 Fred Fish + + * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined. + (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY. + (lang_specific_driver): Only add -lm automatically if need_math is + nonzero. + +Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com) + + * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o + +Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi + + * Makefile.in (EXPR_H): New dependency variable. + (decl2.o): Depend on $(EXPR_H). + (typeck.o): Likewise. + (init.o): Likewise. + (expr.o): Likewise. + +1998-06-25 Benjamin Kosnik + + * decl.c (start_enum): Put local enums on permanent_obstack. + +1998-06-25 Mark Mitchell + + * cp-tree.h (c_get_alias_set): Declare. + * decl.c (init_decl_processing): Set lang_get_alias_set. + +1998-06-25 Andrew MacLeod + + * cp-tree.h (mark_all_runtime_matches): Add function prototype. + * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED + flag for all function decls which are in the exception table. + * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match. + * decl2.c (finish_file): Call mark_all_runtime_matches to make sure + code is emitted for any referenced rtti function. + +1998-06-25 Dave Brolley + + * lang-specs.h: Use new | syntax to eliminate + string concatenation. + +1998-06-25 Jason Merrill + + * cp-tree.h (CP_DECL_CONTEXT): New macro. + * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it. + * method.c (build_overload_nested_name): Likewise. + * sig.c (build_signature_pointer_or_reference_type): Don't set + DECL_CONTEXT. + +1998-06-24 Martin v. Löwis + + Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace. + * cp-tree.h (FROB_CONTEXT): New macro. + (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE. + * decl.c (namespace_binding): Replace NULL_TREE with + global_namespace. + (set_namespace_binding, pop_namespace, lookup_name_real): Likewise. + * decl2.c (is_namespace_ancestor, lookup_using_namespace): + Likewise. + * decl.c (pushtag): Use FROB_CONTEXT. + (pushdecl, make_typename_type, define_function, grokdeclarator): + Likewise. + * decl2.c (set_decl_namespace, do_namespace_alias): Likewise. + * pt.c (push_template_decl_real, lookup_template_class, tsubst): + Likewise. + * decl2.c (decl_namespace): Return global_namespace if no context. + * method.c (build_overload_nested_name): Expect null as context. + * pt.c (mangle_class_name_for_template): Do nothing for null + contexts. + (lookup_template_class): Allow for null id_context. + +1998-06-25 Richard Henderson + + * method.c (emit_thunk): Set current_function_is_thunk for the + ASM_OUTPUT_MI_THUNK case as well. + +1998-06-23 Andrew MacLeod + + * exception.cc (__cplus_type_matcher): Get a match_info pointer + instead of an exception table entry as a parameter. + +1998-06-23 Andrew MacLeod + + * parse.y (function_try_block): Don't call start_catch_handler. + * except.c (call_eh_info): Remove coerced field from declaration. + (build_eh_type_type_ref): New function to create an address of a + rtti function for the new style exception tables. + (expand_start_catch_block): Split function, this contains the + common part. + (process_start_catch_block_old): New function to perform the rest + of expand_start_catch_block under old style exceptions. + (process_start_catch_block_old): New function to perform the rest + of expand_start_catch_block under new style exceptions. + (expand_end_catch_block): Only pop the false label off the stack under + the old style of exceptions. + * semantics.c (finish_try_block): Don't call start_catch_handler. + * exception.cc (struct cp_eh_info): Add original_value field. + (__cplus_type_matcher): Perform type matching on the original exception + value, and if we have a match, set the current value. + (__cp_push_exception): Set the original exception value. + +1998-06-23 Jason Merrill + + * call.c (joust): Fix confusing conversion warning. + + * call.c (build_op_delete_call): Add placement parm. Check + LOOKUP_SPECULATIVELY. + * cp-tree.h, decl2.c, init.c: Adjust. + * decl.c (finish_function): Use it. + + * pt.c (tsubst): Diagnose creating void fields or variables. + +Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi + + * call.c (build_scoped_method_call): Remove unused variable `tmp'. + + * cp-tree.h (check_dtor_name): Add prototype. + + * init.c (expand_member_init): Remove unused variables + `ptr_type_node', `parm' and `rval'. + + * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier + in call to fprintf. + (lang_print_xnode): Likewise. + + * typeck2.c (enum_name_string): Cast argument to sprintf to long + and use %ld specifier. + + * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC + specifier in call to fprintf. + (GNU_xref_member): Cast argument to sprintf to int. + +Fri Jun 19 23:22:42 1998 Bruno Haible + + * typeck2.c (pop_init_level): Warn about implicit zero initialization + of struct members. + +Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi + + * cp-tree.h: Prototype function `check_java_method'. + +1998-06-17 Jason Merrill + + * class.c (finish_struct): Make conflicting use of id a pedwarn. + * decl.c (pushdecl_class_level): Likewise. + +1998-06-17 Mark Mitchell + + * pt.c (convert_nontype_argument): Issue an error when presented + with an integer (real) constant that cannot be simplified to an + INT_CST (REAL_CST). + + * cp-tree.h (c_get_alias_set): Remove declaration added in + 1998-06-13 change that should never have been checked in. + +1998-06-17 Jason Merrill + + * typeck.c (build_binary_op_nodefault): Change % in format strings + to %%. + + * decl.c (grokvardecl): Don't build_static_name for decls that + aren't at namespace scope. + + * init.c (perform_member_init): Catch default-initialization of + references. + +1998-06-17 Mark Mitchell + + * errfn.c (cp_thing): Handle the `%%' formatting sequence. + +1998-06-17 Jason Merrill + + * method.c (hack_identifier): Complain about getting a namespace + or class template. + * typeck.c (decay_conversion): Remove check for namespaces. + * typeck2.c (incomplete_type_error): Likewise. + * parse.y (template_arg): Add PTYPENAME expansion. + +1998-06-16 Andrew MacLeod + + * decl.c (grokvardecl): Don't build external assembler names for + TYPENAMEs in other namespaces as there is no declarator. + * error.c (cp_file_of, cp_line_of): Don't extract file or line number + info from DECL_CONTEXT if it is NULL. + +1998-06-16 Jason Merrill + + * call.c (check_dtor_name): Split out. + (build_scoped_method_call): Use it. + (build_method_call): Use it. + * init.c (build_offset_ref): Use it. + + * typeck.c (build_static_cast): Fix handling of pointers to members. + + * decl.c (finish_function): Just return nothing from a constructor. + * typeck.c (c_expand_return): Complain about returning a void + expression from a destructor. + +1998-06-13 Mark Mitchell + + * class.c (alter_access): Accept a BINFO explaining how to get + from the entity whose accessed is being altered to the type doing + the altering. + (handle_using_decl): New function containing code split out from ... + (finish_struct_1): Here. + + * cp-tree.h (complete_type_or_else): Declare. + * init.c (build_new_1, build_delete): Use it. + * typeck.c (require_complete_type): Use complete_type, rather than + expanding it inline. + (complete_type_or_else): New function. + (build_component_ref): Use it. + (pointer_int_sum): Make sure the type pointed to is complete. + (pointer_diff): Likewise. + + * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for + types. + + * search.c (get_matching_virtual): Note that member templates + cannot override virtual functions. + +1998-06-12 Brendan Kehoe + + * pt.c (check_explicit_specialization): If DECLARATOR turned into + an error_mark_node from lookup_template_function, return the same. + (determine_specialization): Also make sure TEMPLATE_ID isn't an + error_mark_node, before we try to read its operands. + * decl.c (grokdeclarator): If we got an error_mark_node from + check_explicit_specialization, just return it right back. + +1998-06-12 Mark Mitchell + + * class.c (instantiate_type): Don't treat template-ids that don't + specify any template arguments as equivalent to ordinary + identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to + pointer-to-members for member templates. Tidy slightly. + * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation. + * init.c (build_offset_ref): Handle template-ids like ordinary + identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the + offset part of the OFFSET_REF. + * typeck.c (build_unary_op): Change check for unknown types to + look for OFFSET_REFs, not SCOPE_REFs. + +1998-06-11 Mark Mitchell + + * pt.c (is_member_template_class): New function. + (push_template_decl_real): Use it. + +1998-06-11 Benjamin Kosnik + + * friend.c (do_friend): Add support for nested classes using + member functions of the enclosing class as friends. + +1998-06-10 Mark Mitchell + + * call.c (convert_default_arg): Make global, not static. + (convert_arg_for_ellipsis): Split out from ... + (build_over_call): Here. + * cp-tree.h (convert_default_arg); Declare. + (convert_arg_to_ellipsis): Likewise. + (do_member_init): Remove. + * init.c (do_member_init): Remove; this code is dead. + (expand_member_init): Remove much of this code; it is dead. + * typeck.c (convert_arguments): Use convert_default_arg and + convert_arg_for_ellipsis, rather than duplicating here. + + * call.c (convert_like): Don't fail silently if + build_user_type_conversion fails. Always return error_mark_node + for failure. + +1998-06-10 Jason Merrill + + * search.c (covariant_return_p): Complain about ambiguous base. + + * typeck.c (build_component_ref): Diagnose ref to nested type. + +1998-06-10 Brendan Kehoe + + * decl.c (grokparms): Check that INIT isn't an error_mark_node + before giving error about invalid type for default arg. + +1998-06-10 Jason Merrill + + * call.c (build_method_call): Fix thinko. + +1998-06-10 Dave Brolley + + * decl2.c (lang_decode_option): New argc/argv interface. + * cp-tree.h (lang_decode_option): New argc/argv interface. + * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is + specified for cpplib-enabled compilers. + * lex.c (lang_init): Don't check_newline for cpplib. + (init_parse): Don't initialize cpplib here. + +1998-06-10 Brendan Kehoe + + * typeck.c (build_component_ref): Make sure FIELD has a lang_specific + piece before checking DECL_MUTABLE_P. + +1998-06-10 John Carr + + * tree.c (debug_binfo): Make printf format match arguments. + + * error.c (OB_PUTI): Make printf format match arguments. + +1998-06-10 Jason Merrill + + * init.c (perform_member_init): Handle default-initialization. + + * except.c (build_throw): Handle throwing NULL. + + * typeck.c (build_x_function_call): Use resolve_offset_ref. + + * search.c (compute_access): Only strip an anonymous union + for a FIELD_DECL. + + * call.c (add_builtin_candidates): Tweak. + + * cvt.c (build_expr_type_conversion): Restore code for conversion + from class types. + * decl2.c (delete_sanity): Use it. Clean up. + + * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons. + +1998-06-10 Branko Cibej + + * typeck.c (c_expand_return): Don't warn about void expressions on + return statements in functions returning void. + +1998-06-09 Mark Mitchell + + * pt.c (fn_type_unification): Revise documentation. Tidy. + (type_unification): Likewise. + +1998-06-09 Andrew MacLeod + + * semantics.c (finish_try_block): Rename expand_start_catch, and delete + expand_end_catch. + * parse.y (function_try_block): Rename expand_start_catch, and delete + expand_end_catch. + * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete + expand_end_catch. + +1998-06-09 Jason Merrill + + * search.c (lookup_member): New fn. + * class.c (finish_struct_1): Use it. + * decl.c (lookup_name_real): Use it. + +Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi + + * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h. + + * cp-tree.h: Add prototype for `maybe_print_template_context' and + `maybe_make_one_only'. + + * decl.c (auto_function): Remove unused variable `decl'. + + * decl2.c: Include dwarf2out.h and dwarfout.h. + + * lex.c: Remove redundant declarations of `set_float_handler' and + `asm_out_file'. + +1998-06-08 Andrew MacLeod + + * except.c (init_exception_processing): Remove NEW_EH_MODEL compile + time flag. Call __cp_eh_info instead of __cp_exception_info. + * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag. + (__cp_exception_info): Return offset into cp_eh_info structure to + match what use to be the start of this structure. + (__cp_eh_info): New function to return a pointer to cp_eh_info struct. + (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL + compile time flag. + (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call + __cp_eh_info instead of __cp_exception_info. + +1998-06-08 Jason Merrill + + * decl.c (cp_finish_decl): Disable inlining of extern inlines + with static variables. + +1998-06-08 Mark Mitchell + + * init.c (build_offset_ref): Correct previous change to use build, + not build_min. + +1998-06-07 Mark Mitchell + + * class.c (instantiate_type): Handle pointer-to-members where the + member is a template. + * init.c (build_offset_ref): Likewise. + * typeck.c (build_unary_op): Likewise. + +1998-06-07 Richard Henderson + + * lex.c (lang_init_options): New function. + (lang_init): Remove flag_exceptions == 2 hack. + +1998-06-05 Jason Merrill + + * search.c (envelope_add_decl): Tweak for implicit typename. + + * call.c (joust): Also warn about confusing conversion op/constructor + overload resolution. + + * spew.c (yylex): Also return the TYPE_DECL if got_object. + Don't clear got_object after '~'. + * call.c (build_scoped_method_call): Tweak destructor handling. + (build_method_call): Likewise. + * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with + TYPE_MAIN_VARIANT for destructors. + * semantics.c (finish_object_call_expr): Complain about calling a + TYPE_DECL. + +1998-06-05 Per Bothner + + * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles): + Define - update needed by gcc.c change. + +1998-06-05 Jason Merrill + + * error.c (cp_printers): Use 'o' instead of '_' for the null entry. + +1998-06-05 Martin v. Loewis + + * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare. + * decl.c (lookup_name_real): Add namespaces_only parameter. + If set, return only NAMESPACE_DECLs. + (select_decl): Likewise. + (identifier_type_value): Give additional parameter. + (lookup_name_nonclass): Likewise. + (lookup_name): Likewise. + (find_binding): Skip namespace aliases. + (binding_for_name): Likewise. + (push_namespace): Check for namespace aliases. + (lookup_name_namespace_only): New function. + (begin_only_namespace_names, end_only_namespace_names): New functions. + * decl2.c (set_decl_namespace): Skip namespace aliases. + (do_using_directive): Likewise. + (do_namespace_alias): Produce namespace aliases, fix alias + redeclaration. + * error.c (dump_decl): Support SCOPE_REF. + * parse.y (extdef): Wrap lookup with namespace_only for namespace + aliases and using declarations. + +1998-06-04 Jason Merrill + + * tree.c (really_overloaded_fn): Only see through one TREE_LIST. + + * error.c (dump_expr): Clean up NEW_EXPR case. + +1998-06-04 Martin von Löwis + + Suggested by Brendan Kehoe + * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL, + treat it as using ::decl. + + * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE. + + * tree.c (mapcar): Support NEW_EXPR. + + * error.c (dump_expr): Support NEW_EXPR. + +1998-06-03 Jason Merrill + + * method.c (make_thunk): Use overload machinery to make name. + * search.c (covariant_return_p): New fn. + (get_matching_virtual): Use it. + + * init.c (build_new_1): Fix check for void. + +1998-06-01 Per Bothner + + * cp-tree.h (TYPE_FOR_JAVA): New macro. + * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node, + java_int_type_node, java_long_type_node, java_float_type_node, + java_double_type_node, java_char_type_node, java_boolean_type_node): + New "primitive" types, with predefined names __java_byte etc. + (record_builtin_java_type): New function. + (init_decl_processing): Make Java types with record_builtin_java_type. + (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA". + (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class. + (grokfndecl): Call check_java_method for Java classes. + * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA. + (process_overload_item): Match types against specific + java_XX_type_node types, rather than using is_java_type. + * class.c (finish_struct_1): Don't add default copy constructor + or operator= if TYPE_FOR_JAVA. + (pop_lang_conext): Restore strict_prototyp proper if Java. + * decl2.c (acceptable_java_type, check_java_method): New functions. + * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern. + (tsubst): Move common statement after if statement. + * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match. + +1998-06-01 Jason Merrill + + * pt.c (for_each_template_parm): Use first_rtl_op. + + * tree.c (build_cplus_array_type_1): Also check index_type for + template parms. + +1998-05-31 Jason Merrill + + * pt.c (tsubst): Always copy BINFO_BASETYPES. + +1998-05-29 scott snyder + + * tree.c (layout_basetypes): If we change TYPE_SIZE, change + TYPE_SIZE_UNIT too. + +1998-05-29 Mark Mitchell + + * decl.c (grokdeclarator): Don't complain about in-class + initialization of static consts if we don't really know the type + of the variable. + +1998-05-29 Jason Merrill + + * cp-tree.h (DECL_DESTRUCTOR_P): New macro. + * method.c (build_destructor_name): New fn. + * decl2.c (maybe_retrofit_in_chrg): Split out... + (grokclassfn): From here. Reorganize. + * decl.c (grok_ctor_properties): Make sure ctors for types with + vbases have the in_chrg parm. + * pt.c (instantiate_class_template): Update + TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call + grok_*_properties. + (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg. + +1998-05-28 Mark Mitchell + + * pt.c (instantiate_decl): Make test for whether or not static + variables should be instantiated early match its comment. + +1998-05-28 Jason Merrill + + * decl.c (start_decl): Always pedwarn about vacuously redeclaring + a member. + (start_function): Call check_default_args. + * decl2.c (grokfield): Don't call check_default_args. + (check_default_args): Use cp_error_at. + * lex.c (do_pending_defargs): Call check_default_args. + +1998-05-27 Brendan Kehoe + + * call.c (build_method_call): Make sure get_type_value returns + something before we try to use its TYPE_MAIN_VARIANT. + (build_scoped_method_call): Likewise. + +1998-05-27 Jason Merrill + + * typeck2.c (digest_init): Complain about getting a TREE_LIST to + initialize an array. + + * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and + DECL_VIRTUAL_P. + + * friend.c (do_friend): Clarify template warning. + +1998-05-27 Mark Mitchell + + * decl.c (shadow_label): Don't treat decls as identifiers. + (maybe_push_to_top_level): Clear shadowed_labels. + + * pt.c (instantiate_decl): Reset lineno and filename after calling + regenerate_decl_from_template. + + * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an + error_mark_node. + +1998-05-27 Kevin Buhr + + * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE. + +1998-05-26 Kriang Lerdsuwanakij + + * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes. + (convert_nontype_argument): Handle cases when nontype template + parameters become classes after substitution. + +1998-05-26 Mark Mitchell + + * friend.c (is_friend): Use comptypes, rather than == to compare + types. Modify for new representation of template friends. + (make_friend_class): Likewise. + * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak. + (instantiate_class_template): Deal with template friends. + + * decl.c (store_parm_decls): Remove redundant call to + expand_main_function. + +1998-05-26 Benjamin Kosnik + + * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before + DECL_USE_TEMPLATE. + +1998-05-26 Per Bothner + + * language_as_string: Handle lang_java. + +1998-05-26 Jason Merrill + + * decl.c (pushdecl): Don't copy the type_decl. + +1998-05-26 Martin v. Löwis + + * class.c (pushclass): Always store TYPE_MAIN_VARIANT in + current_class_type. + * decl.c (grokdeclarator): Put typedefs on the type's obstack. + + * parse.y (complex_direct_notype_declarator): Use $1 to access + scope of notype_qualified_id. + +1998-05-26 Dave Brolley + + * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib. + (init_parse): Initialize cpplib interface. + + * Makefile.in (CXX_OBJS): Make sure dependencies never end with an + empty continuation. + +1998-05-26 Mark Mitchell + + * decl.c (pushtag): Avoid crashing on erroneous input. + +1998-05-25 Martin v. Löwis + + * decl.c (push_namespace): Only produce one unique name for + anonymous namespaces. + (get_unique_name): Remove. + +1998-05-25 Mark Mitchell + + * call.c (tourney): Don't do any extra comparisons. + + * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions. + + * cp-tree.h (processing_template_parmlist): Declare. + * decl.c (pushtag): Don't call push_template_decl when we + shouldn't. + * pt.c (processing_template_parmlist): New variable. + (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro. + (complete_template_args): Use it. + (add_to_template_args): Likewise. + (innermost_args): Likewise. + (tsubst): Likewise. + (begin_template_parm_list): Use processing_template_parmlist. + (end_template_parm_list): Likewise. + + * cp-tree.h (ANON_UNION_TYPE_P): New macro. + * decl.c (grokdeclarator): Use it. + * decl2.c (grok_x_components): Likewise. + * init.c (initializing_context): Likewise. + * method.c (do_build_copy_constructor): Likewise. + (do_build_assign_ref): Likewise. + * search.c (compute_access): Likewise. + * typeck.c (build_component_ref): Likewise. + + * decl.c (grokdeclarator): Don't give a cv-qualified version of an + unnamed type a typedef name "for linkage purposes". + + * pt.c (lookup_template_class): Don't look at + IDENTIFIER_CLASS_VALUE when there's no current_class_type. + + * method.c (build_overload_int): Handle error cases gracefully. + + * pt.c (instantiate_decl): Handle static member variables + correctly. + + * pt.c (tsubst): Use the tsubst'd type when producing new + TEMPLATE_PARM_INDEX nodes. + +1998-05-24 Mark Mitchell + + * tree.c (cp_tree_equal): Handle pointers to member functions. + + * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make + sure the type of the REF_BIND is a reference type. + (maybe_handle_ref_bind, compare_ics): Rename reference_type to + target_type for clarity. + + * parse.y (xcond): Move call to condition_conversion ... + * semantics.c (finish_for_cond): Here. + * parse.c: Regenerated. + +1998-05-24 Jason Merrill + + * decl.c (push_namespace): Namespaces have type void. + * typeck2.c (incomplete_type_error): Complain about namespace + used as expression. + * typeck.c (decay_conversion): Likewise. + +1998-05-24 Martin von Löwis + + * error.c (dump_expr): Support namespaces. + +1998-05-23 Jason Merrill + + * cp-tree.def: Add SRCLOC. + * cp-tree.h: Add struct tree_srcloc and accessor macros. + * tree.c (build_srcloc, build_srcloc_here): New fns. + * pt.c (add_pending_template): Use build_srcloc_here. + (push_tinst_level): Update last_template_error_tick before erroring. + (instantiate_decl): Restore lineno and input_filename before + calling add_pending_template. + * decl2.c (finish_file): Set up lineno and input_filename for + pending templates. + +1998-05-22 Jason Merrill + + * decl.c (lang_print_error_function): New fn. + (init_decl_processing): Set print_error_function to use it. + * errfn.c (cp_thing): Don't call maybe_print_template_context here. + + * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and + ICS_BAD_FLAG. + + * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for + copy-initialization. + + * class.c (build_vtable_entry): Use int_fits_type_p. + (build_vtable): Pass a signed offset to build_vtable_entry. + (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1, + set_rtti_entry): Likewise. + +1998-05-22 Per Bothner + + * cp-tree.h: Add comments documenting which LANG_FLAGS are used. + (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used. + +1998-05-22 Jason Merrill + + * pt.c (print_template_context): Use fprintf instead of cp_error. + + * pt.c (determine_specialization): Just return an error_mark_node. + Also print the decl we want in error messages. If we complain, + return error_mark_node. + (tsubst_friend_function): Set lineno and input_filename so + error messages will be useful. + (instantiate_template): Just return an error_mark_node. + (check_explicit_specialization): Don't mess with a returned + error_mark_node. + + * pt.c (print_template_context): Add new argument. + (maybe_print_template_context): New fn. + (push_tinst_level): Increment tinst_level_tick. + (pop_tinst_level): Likewise. + * errfn.c (cp_thing): Call maybe_print_template_context. Use + xrealloc instead of xmalloc. + + * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT. + +1998-05-21 Jason Merrill + + * pt.c (tsubst_friend_class): Don't call redeclare_class_template + if the template we looked up is the same as the one we already + have. + +Thu May 21 11:54:44 1998 Dave Brolley + + * lex.c: (handle_sysv_pragma): FILE* parameter not used. + (cpp_reader,parse_in): Add for cpplib. + (check_newline): Call handle_sysv_pragma with new interface. + (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line. + + * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib. + (sub_getch): Call GETC for cpplib. + + * cp-tree.h: (get_directive_line): Different prototype for cpplib. + (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line. + + * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib. + +1998-05-21 Jason Merrill + + * decl2.c (maybe_make_one_only): New fn. + (import_export_vtable): Use it. + (import_export_decl): Likewise. + * pt.c (mark_decl_instantiated): Likewise. + +1998-05-21 Mark Mitchell + + * decl2.c (find_representative_member): Rename to ... + (build_anon_union_vars): New function. + (finish_anon_union): Fix stupidity of previous change. + +1998-05-20 Jason Merrill + + * decl.c (grokfndecl): Handle definition of specialization in + friend declaration. + + * error.c (dump_decl): Fix LOOKUP_EXPR handling. + +1998-05-20 Mark Mitchell + + * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P + to look for type declarations. + (finish_struct): Deal with templates on the CLASSTYPE_TAGS list. + * cp-tree.h (DECL_DECLARES_TYPE_P): New macro. + (finish_member_class_template): Declare. + * decl.c (pushtag): Put member class templates on the + CLASSTYPE_TAGS list, just as for ordinary member classes. + (pushdecl_class_level): Use DECL_DECLARES_TYPE_P. + (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with + IDENTIFIER_NAMESPACE_VALUEs. + * parse.y (component_decl): Move code to ... + * semantics.c (finish_member_class_template): New function. + Don't put member class templates on the list of components for a + class. + * parse.c: Regenerated. + * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types. + In fact, don't use DECL_CONTEXT at all here. + +1998-05-20 Martin von Loewis + + * decl.c (record_unknown_type): New function. + (init_decl_processing): Call it for the unknown and global type + nodes. + +1998-05-20 Mark Mitchell + + * decl2.c (find_representative_member): New function. + (finish_anon_union): Use it. + + * cp-tree.h (MAIN_NAME_P): New macro. + (DECL_MAIN_P): Likwise. + * decl.c (pushdecl): Avoid crashing on redefinitions of `main'. + (grokfndecl): Use the new macros. + (grokdeclarator): Likewise. + (start_function): Likewise. + (store_parm_decls): Likewise. + (finsh_function): Likewise. + * friend.c (do_friend): Likewise. + * typeck.c (build_function_call_real): Likewise. + (build_unary_op): Likewise. + +Wed May 20 02:16:01 1998 Jason Merrill + + * decl2.c (start_objects, finish_objects, do_dtors, + do_ctors): Split out from... + (finish_file): ...here. + +Tue May 19 20:36:23 1998 Jason Merrill + + * tree.c (is_overloaded_fn): Don't abort on placeholders from + push_class_decls. + +Tue May 19 15:16:22 1998 Brendan Kehoe + + * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node. + + * error.c (dump_expr): Handle an ARROW_EXPR. + +Tue May 19 15:13:39 1998 Mark Mitchell + + * decl.c (saveable_obstack): Declare. + (pushdecl): Copy TYPE_DECLs to the same obstack as the type they + declare, if necessary. + +Tue May 19 14:50:27 1998 Mark Mitchell + + * call.c (compare_qual): Remove. + (is_subseq): Tweak. + (is_properly_derived_from): New function. + (maybe_handle_ref_bind): Likewise. + (maybe_handle_implicit_object): Likewise. + (compare_ics): Modify substantially to bring into conformance with + the standard. + * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro. + (comp_cv_qualification): Declare. + (comp_cv_qual_signature): Likewise. + * typeck.c (comp_cv_qualification): Likewise. + (comp_cv_qual_signature): Likewise. + +Tue May 19 10:05:02 1998 Kaveh R. Ghazi + + * Makefile.in (parse.o): Depend on toplev.h. + + * class.c (typecode_p): Remove prototype and definition. + + * cp-tree.h (currently_open_class, is_empty_class, member_p): + Add prototype. + + * decl.c (push_overloaded_decl_top_level): Remove prototype and + definition. + + * errfn.c (cp_error): Cast function pointer `error' to (errorfn *) + in call to `cp_thing'. + (cp_warning): Likewise for function pointer `warning'. + + * except.c (do_function_call): Remove prototype and definition. + (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL. + + * method.c (is_java_type): Add prototype and make it static. + + * parse.y: Include toplev.h. + + * pt.c (type_unification): Remove unused variable `arg'. + (instantiate_decl): Likewise for `save_ti'. + + * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'. + +Tue May 19 02:43:25 1998 Jason Merrill + + * init.c (build_member_call): Handle template_ids. + * parse.y (primary): Add global_scope template_id. + +Mon May 18 23:22:52 1998 Jason Merrill + + * decl2.c (get_sentry): Use end_temporary_allocation. + Don't declare permanent_obstack. + +Mon May 18 12:28:44 1998 Mark Mitchell + + * parse.y (.finish_new_placement): New non-terminal. + (unary_expr, new_type_id): Use it. + * parse.c: Regenerated. + +Mon May 18 12:20:27 1998 Brendan Kehoe + + * pt.c (redeclare_class_template): Say where the original definition + of the template-parameter's default argument appeared. + +Mon May 18 03:00:57 1998 Jason Merrill + + * call.c (build_over_call): Tweak empty class handling. + + * decl.c (make_typename_type): Use currently_open_class. + + * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG. + +Mon May 18 01:43:01 1998 Martin v. Loewis + + * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE + for a type unless it is one. + + * class.c (finish_struct_1): Use OVL_CURRENT in error message. + +Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (program_transform_name, objdir): Define. + + * Makefile.in (BISON): Use bison from the build tree if it exists. + (FLEX): Likewise. + +Sun May 17 14:52:08 1998 Martin v. Loewis + + * typeck.c (type_unknown_p): Return true for TREE_LIST also. + + * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs. + +Sun May 17 14:51:41 1998 Jason Merrill + + * call.c (build_scoped_method_call): Likewise. + +Sun May 17 13:53:48 1998 Mark Mitchell + + * init.c (build_new_1): Call suspend_momentary around the creation + of values that must be saved for exception handling. + * parse.y (.build_new_placement): New non-terminal. + (unary_expr, new_placement): Use it. + * parse.c: Regenerated. + +Sun May 17 12:32:08 1998 Jason Merrill + + * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare + old and new types. + + * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the + canonical type. + + * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace. + +Fri May 15 20:28:00 1998 Jason Merrill + + * decl.c (start_decl): Revert problem change. + + * Makefile.in (CONFLICTS): Fix. + +Fri May 15 15:34:02 1998 Benjamin Kosnik + + * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits. + +Fri May 15 00:46:05 1998 Jason Merrill + + * class.c (finish_struct_1): Use BINFO_SIZE. + + * decl.c (start_decl): Use 'tem'. + +Thu May 14 16:30:47 1998 Andrew MacLeod + + * exception.cc: Include eh-common.h. + (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL. + (__cplus_type_matcher): First stab at new C++ runtime type matcher. + (__cp_push_exception): Initialize eh_info struct as well. + * except.c: Remove local structs and include eh-common.h. + (init_exception_processing): Set language and version codes. + (call_eh_info): Add presence of eh_info to runtime description of + struct cp_eh_info. + (expand_end_eh_spec): Call start_catch_block() and end_catch_block(). + * semantics.c (finish_try_block): Call start_catch_block() and + end_catch_block(). + * parse.y (function_try_block): Call start_catch_block() and + end_catch_block(). + +Thu May 14 12:27:34 1998 Brendan Kehoe + + * typeck.c (original_type): New function. + (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2, + to see if they're actually the same. + * cp-tree.h (original_type): Declare. + +Wed May 13 12:54:30 1998 Kaveh R. Ghazi + + * Makefile.in (lex.o): Depend on output.h. + + * call.c (add_function_candidate): Remove unused variable `cand'. + (add_conv_candidate): Likewise. + (build_builtin_candidate): Likewise. + + * cp-tree.h: Add prototype for `types_overlap_p'. + + * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED. + + * decl2.c (merge_functions): Remove unused variables `tmp' and + `tempn'. + + * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED. + (code_as_string): Likewise. + (language_as_string): Likewise. + (parm_as_string): Likewise. + (op_as_string): Likewise. + (assop_as_string): Likewise. + (cv_as_string): Likewise. + + * lex.c: Include output.h. + + * pt.c (type_unification): Cast first argument of `bzero' to a char*. + + * search.c (dfs_no_overlap_yet): Mark parameter `t' with + ATTRIBUTE_UNUSED. + + * tinfo.cc (__class_type_info::dcast): Change the type of variable + `i' from int to size_t. + + * typeck.c (language_lvalue_valid): Mark parameter `exp' with + ATTRIBUTE_UNUSED. + +Tue May 12 21:37:49 1998 Jason Merrill + + * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or + DECL_NAMESPACE_SCOPE_P. + (lang_decl_name): Likewise. + * pt.c (tsubst_friend_function, tsubst): Likewise. + * decl.c (pushdecl, redeclaration_error_message, start_decl, + cp_finish_decl, start_function): Likewise. + * class.c (finish_struct_1): Likewise. + * call.c (build_over_call): Likewise. + (compare_ics): Use DERIVED_FROM_P. + +Tue May 12 07:24:18 1998 Mark Mitchell + + * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro. + * method.c (build_mangled_name): Use it. + (build_decl_overload_real): Likewise. + + * error.c (dump_simple_decl): New function, broken out from ... + (dump_decl): Use it. + +Mon May 11 11:38:07 1998 Mark Mitchell + + * ptree.c (lang_print_xnode): Add missing `break'. + + * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE. + + * call.c (add_template_candidate): Adjust for changes to + fn_type_unification. + (add_template_candidate_real): Likewise. + (add_template_conv_candidate): Likewise. + (build_user_type_conversion_1): Likewise. + (build_new_function_call): Likewise. + (build_object_call): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + * class.c (instantiate_type): Likewise. + * cp-tree.h (unification_kind_t): New type. + (fn_type_unification): Adjust prototype. + (type_unificaiton): Likewise. + * pt.c (UNIFY_ALLOW_NONE): New macro. + (UNIFY_ALLOW_MORE_CV_QUAL): Likewise. + (UNIFY_ALLOW_LESS_CV_QUAL): Likewise. + (UNIFY_ALLOW_DERIVED): Likewise. + (unify): Change prototype. + (maybe_adjust_types_for_deduction): New function. + (check_cv_quals_for_unify): Likewise. + (determine_specialization): Adjust. + (fn_type_unification): Likewise. + (type_unification): Likewise. + (type_unification_real): Likewise. Use + maybe_adjust_types_for_deduction. Fix mishandling of + back-unification of template functions passed as arguments. Pass + appropriate combination of UNIFY_ALLOW_* to unify. + (unify): Remove unused NTPARMS parameter. Use + check_cv_quals_for_unify. Remove bogus code that allowed + too-generous unification in order to adhere more closely to standard. + (get_bindings_real): Adjust. + (get_class_bindings): Likewise. + + * method.c (build_overload_identifier): Only use the innermost + template arguments when mangling. + * pt.c (tsubst_template_argument_vector): New function. + (complete_template_args): Deal with the situation where the + extra_args contain more than one level of arguments. + (lookup_template_class): Deal with member template classes, which + may have more than one level of arguments. + (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE. + Improve handling of member template classes. Use + DECL_PRIMARY_TEMPLATE instead of inline expansion. Use + tsubst_template_argument_vector where appropriate. + (regenerate_decl_from_template): Break out from ... + (instantiate_decl): Here. + + * lex.c (yyprint): Remove TYPENAME_ELLIPSIS. + * parse.h: Regenerated. + * parse.c: Really regenerated. + + * cp-tree.h (finish_unary_op_expr): New function. + (finish_id_expr): Likewise. + (begin_new_placement): Likewise. + (finish_new_placement): Likewise. + (finish_declarator): Likewise. + (finish_translation_unit): Likewise. + (finish_parmlist): Likewise. + (begin_class_definition): Likewise. + (finish_class_definition): Likewise. + (finish_default_args): Likewise. + (finish_inline_definitions): Likewise. + * parse.y (GCC_ASM_KEYWORD): Remove. + (TYPENAME_ELLIPSIS): Likewise. + * parse.c: Regenerated. + Use new functions in semantics.c in the actions for many rules. + * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD. + * hash.h: Regenerated. + * semantics.c (finish_expr_stmt): Allow NULL expr. + (finish_unary_op_expr): New function, containing + code previously in parse.y. + (finish_id_expr): Likewise. + (begin_new_placement): Likewise. + (finish_new_placement): Likewise. + (finish_declarator): Likewise. + (finish_translation_unit): Likewise. + (finish_parmlist): Likewise. + (begin_class_definition): Likewise. + (finish_class_definition): Likewise. + (finish_default_args): Likewise. + (finish_inline_definitions): Likewise. + +Sun May 10 23:43:13 1998 Mark Mitchell + + * typeck.c (build_c_cast): Don't decay arrays and functions to + pointer type when converting to a class type. + +Sun May 10 22:53:56 1998 Jason Merrill + + * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro. + (DECL_CLASS_SCOPE_P): Likewise. + +Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org) + + * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT. + * decl2.c (constructor_name_full): Likewise. + +Sun May 10 22:48:12 1998 Mike Stump + + * tree.c (mapcar): Add OVERLOAD support. + + * init.c (resolve_offset_ref): We must use basetype_path before we + destroy it with a call to convert_pointer_to. + +Sat May 9 14:44:37 1998 Jason Merrill + + * class.c (currently_open_class): New fn. + * decl.c (lookup_name_real): Use it. + * search.c (lookup_field): Likewise. + +Fri May 8 23:32:42 1998 Martin von Loewis + + * cp-tree.def (OVERLOAD): New node. + * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE, + SET_IDENTIFIER_NAMESPACE_VALUE): Define. + (NAMESPACE_BINDING): Remove. + (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use + namespace_binding. + (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED): + Define. + (tree_overload): New struct. + (IDENTIFIER_TYPE_VALUE): Use identifier_type_value. + (REAL_IDENTIFIER_TYPE_VALUE): Define. + (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE. + (lang_decl_flags): Remove in_namespace. + (lang_decl): Remove chain. + (DECL_CHAIN, DECL_NAMESPACE): Remove. + (flag_honor_std): Declare extern. + (identifier_type_value, pushdecl_namespace_level, push_using_decl, + namespace_binding, set_namespace_binding, + lookup_function_nonclass, cat_namespace_levels, + set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons, + scratch_ovl_cons, ovl_member, build_overload): Declare. + (decl_list_length, get_namespace_id, current_namespace_id, + overloaded_globals_p): Remove. + (lookup_using_namespace, qualified_lookup_using_namespace): Change + return type. + (push_scratch_obstack): New macro. + * call.c (add_function_candidate): Special-case type of OVERLOAD node. + (build_user_conversions_1): Iterate using OVL_NEXT for ctors, + convs, fns. + (build_new_function_call): Iterate using OVL_CHAIN. + Print DECL_NAME in when reporting ambiguities. + (build_object_call): Iterate using OVL_NEXT for fns, convs. + (build_new_op): Call lookup_function_nonclass. + Iterate using OVL_NEXT. + (build_op_delete_call): Change detection of members. + Do not wrap TREE_LIST around fields and single global functions. + (build_over_call): Don't push a class level if the context is a + namespace. + (build_new_method_call): Iterate using OVL_NEXT. + * class.c (add_method): Chain overloaded members using + build_overload. Remove copying of method. + (grow_method): When iterating through the obstack, expect OVERLOAD + nodes. Chain overload members. + (finish_struct_methods): Chain overload members. Unpack OVERLOAD + nodes in call to get_baselinks. + (duplicate_tag_error): Expect OVERLOAD nodes when unchaining. + (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle + fdecls that are OVERLOAD nodes. + (validate_lhs): New function. + (instantiate_type): Do not copy OVERLOAD nodes. Remove dead + code. Use DECL_NAME in error messages. Split code between global + and member function processing. + * decl.c (global_type_node): New static variable. + (in_std): New global. + (struct binding_level): New field usings. + (resume_binding_level): Assert that we are not in a class. + (toplevel_bindings_p): Just check for namespace_p or + pseudo_global. + (resume_level): Remove. + (find_binding): New function. + (binding_for_name): Call it. + (namespace_binding, set_namespace_binding): New functions. + (push_namespace): Associate binding level with new namespace, + resume_binding_level for existing namespace. Remove old code. + Fake std by counting. + (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE. + (maybe_push_to_top_level): Save current namespace. + (pop_from_top_level): Restore saved namespace. + (pop_namespace): Call suspend_binding_level. Remove old code. + (cat_namespace_levels): New function. + (set_identifier_type_value_with_scope): For namespace bindings, + set BINDING_TYPE, and use global_type_node. + Use REAL_IDENTIFIER_TYPE_VALUE otherwise. + (identifier_type_value): New function. + (pushtag): If no context, use current_namespace. + (duplicate_decls): Don't process DECL_CHAIN. + (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not + already set. Never reset it to NULL_TREE. Lookup global variables + in their namespace. Push overloaded templates if they are on + namespace level. + (pushdecl_namespace_level): New function. + (pushdecl_top_level): Implement using pushdecl_namespace_level. + (pushdecl_using_decl): New function. + (overloaded_globals_p): Remove. + (push_overloaded_decl): Create OVERLOAD nodes, and iterate through + them. Use namespace_binding and set_namespace_value. + (redeclaration_error_message): Complain if the declarations come + from different namespaces. + (lookup_tag): On namespace level, look in the BINDING_TYPE. + (lookup_namespace_name): Pass tree_bindings from stack. Remove + old code. + (select_decl): New function. + (lookup_name_real): Call it for qualified and unqualified lookup. + Pass tree_bindings from the stack. + If prefer_type is 1, also accept namespaces. + (lookup_function_nonclass): New function. + (init_decl_processing): Set the binding level of the global + namespace to global_binding_level. + Build a proper type list for __builtin_apply. + Initialize std_node to "fake std" if flag_honor_std is set. + Initialize global_type_node. + Allocated bad_alloc in namespace std if flag_honor_std. + (define_function): Set the DECL_CONTEXT to the current_namespace. + (start_decl): A namespace is not considered as a context here. If + the DECL_CONTEXT is a namespace, push the decl. + (cp_finish_decl): Check for namespaces used as initializers. + (grokfndecl): Add namespace parameter. Remove processing of + DECL_CHAIN. + (grokvardecl): Add namespace parameter. + (grokdeclarator): Process SCOPEs that are namespaces. For + mangling, temporarily set the DECL_CONTEXT on anonymous structs. + (start_function): Check for contexts that are namespaces. + Set context for declarations that have not been pushed. + (store_parm_decls): Check for ::main only. + (finish_function): Likewise. + (start_method): Check for contexts that are namespaces. + (start_method): Remove DECL_CHAIN processing. + * decl2.c (flag_honor_std): Declare. + (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given. + (decl_namespace_list): New static global. + (grok_x_components): Ignore namespaces as type contexts. + (check_classfn): Expect OVERLOAD nodes. + (grokfield): Remove DECL_CHAIN processing. + (finish_file): Call cat_namespace_levels. + (merge_functions): New function. + (ambiguous_decl): Rewrite. + (lookup_using_namespace): Produce tree_bindings. + (qualified_lookup_using_namespace): Likewise. + (set_decl_namespace, decl_namespace, current_decl_namespace, + push_decl_namespace, pop_decl_namespace): New functions. + (arg_lookup): New struct. + (add_function, arg_assoc_namespace, arg_assoc_class, + arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent): + New functions. + (get_namespace_id, current_namespace_id): Remove. + (do_toplevel_using_decl): Rewrite. + (do_class_using_decl): Complain about namespace qualifiers. + (do_using_directive): Sorry if not on namespace level. Complain + about unknown namespaces. + * error.c (dump_aggr_type): Check for namespace contexts. + * except.c (init_exception_processing): Push terminate into std. + * friend.c (is_friend): A namespace is not a context, here. + * init.c (expand_member_init): Remove DECL_CHAIN processing. + (build_offset_ref): Process OVERLOAD nodes. + * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std. + * lex.c (identifier_type): Loop using OVL_CHAIN. + (see_typename): Set looking_for_typename to 2. + (real_yylex): Likewise. + (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs. + (do_scoped_id): Expect OVERLOAD nodes. + Change calling convention for qualified_lookup_using_namespace. + (build_lang_decl): Don't set in_namespace anymore. + * method.c (typevec_size): New global. + (build_overload_nested_name): Return if global_namespace. + Otherwise, always expect a declaration context. + (build_qualified_name): Likewise. + Make sure we don't write beyond typevec_size. + (build_decl_overload_real): Likewise. + Allocate one extra slot for the namespace. + (hack_identifier): Mark code dead. + Process OVERLOAD and NAMESPACE_DECL nodes. + * parse.y (program): Pop namespaces until in global namespace. + (extdef): In a using-declaration, don't discard the identifier if + there is no declaration. + (left_curly): Ignore type contexts which are namespaces. + (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type + used as scope. + * pt.c (template_class_depth): Expect types to be namespaces. + (determine_specialization): Simplify by expecting OVERLOAD nodes. + (push_template_decl): Push into namespace level. + Reset ctx if it is a namespace. + Set DECL_CONTEXT to current_namespace if not set already. + Ignore real contexts that are namespaces. + (mangle_class_name_for_template): Skip global_namespace. + Mangle other namespaces as declarations. + (lookup_template_function): Set type of OVERLOAD nodes to unknown. + (lookup_template_class): Push into namespace of context. + If the context is a namespace, set it to global_namespace. + Use id_context for mangling. + (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes. + (tsubst_friend_function): Ignore namespace contexts. + Push into namespace level. + (tsubst): Handle NAMESPACE_DECL nodes. + Remove DECL_CHAIN processing. + (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes. + * ptree.c (print_lang_identifier): Print bindings. + (lang_print_xnode): Print OVERLOAD nodes. + * rtti.c (init_rtti_processing): Push type_info into std. + * search.c (lookup_fnfields_here): Expect OVERLOAD nodes. + (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual, + dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions, + lookup_fnfields_here): Likewise. + Process all nodes, instead of going through TREE_CHAIN. + * sig.c (build_signature_pointer_or_reference_type): Set context + to global_namespace. + (build_signature_table_constructor): Expect OVERLOAD nodes. + * spew.c (yylex): Save old setting of looking_for_typename. + * tree.c (decl_list_length): Remove. + (binding_init): New function. + (count_functions): Rewrite. + (is_overloaded_fn): Expect OVERLOAD nodes. + (really_overloaded_fn, get_first_fn, lvalue_type): Likewise. + (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after, + ovl_member): New functions. + * typeck.c (require_complete_type): Expect OVERLOAD nodes. + (type_unknown_p): Likewise. + (require_instantiated_type): Likewise. + (build_component_ref): Declare code dead. + (build_x_function_call): Create and expect OVERLOAD nodes. + (build_function_call_real): Check for ::main only. + (build_unary_op): Likewise. Expect OVERLOAD nodes. + (convert_for_assignment): Check for TREE_LIST before accessing + TREE_VALUE. + * decl.c (duplicate_decls): Check for namespace bindings instead + of global bindings. + (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real, + lookup_name_current_level, start_decl, xref_tag, + finish_enum): Likewise. + * init.c (build_offset_ref): Likewise. + * search.c (lookup_field): Likewise. + (lookup_fnfields): Likewise. + (dfs_debug_mark): Likewise. + * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE. + (poplevel_class, pop_from_top_level): Likewise. + * decl2.c (finish_method): Likewise. + * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE. + * decl.c (record_builtin_type): Likewise. + (init_decl_processing, grokfndecl): Likewise. + * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise. + (make_lang_type): Likewise. + * parse.y (make_thunk): Likewise. + * pt.c (tsubst): Likewise. + * tree.c (debug_binfo): Likewise. + * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h, + tinfo2.cc, inc/new.h: Add std qualifications. + * inc/new: Wrap with namespace std if __HONOR_STD. + * inc/typeinfo: Likewise. + +Fri May 8 00:43:50 1998 Jason Merrill + + * call.c (build_user_type_conversion_1): Handle second_conv + properly for templates. + +Thu May 7 17:09:25 1998 Andrew MacLeod + + * method.c (build_decl_overload_real): Set TREE_USED flag to + zero for build_type_variants nodes as well. + +Wed May 6 19:27:09 1998 Jason Merrill + + * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE. + +Wed May 6 16:49:48 1998 Jim Wilson + + * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o, + except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o, + rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o, + xref.o): Add toplev.h dependencies. + +Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com) + + * errfn.c (cp_error, cp_warning): Remove declarations for + error and warning respectively. + +Wed May 6 14:28:18 1998 Kaveh R. Ghazi + + * error.c: Convert to using ctype macros defined in system.h. + * method.c: Likewise. + * xref.c: Likewise. + * lex.c: Likewise. Also remove redundant system header stuff. + +Wed May 6 06:36:41 1998 Robert Lipe + + * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c, + expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c, + search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c, + xref.c: Add include of toplev.h. + +Wed May 6 02:33:39 1998 Jason Merrill + + * tree.c (perm_manip): Also regenerate the RTL of an extern. + (copy_to_permanent): Use end_temporary_allocation. + +Tue May 5 23:54:04 1998 Jason Merrill + + * init.c (expand_vec_init): The initialization of each array + element is a full-expression. + +Tue May 5 18:24:13 1998 Andrew MacLeod + + * method.c (build_mangled_name): Add a call to build_type_variant + to get the right type. + +Tue May 5 01:25:03 1998 Jason Merrill + + * Makefile.in: Add .SUFFIXES. + + * cp-tree.def: Remove NAMESPACE_DECL. + +Sun May 3 01:32:14 1998 Jason Merrill + + * call.c (build_over_call): Do evaluate arg even if it has empty + class type. + * decl.c (start_function): Don't push a member function. + +Thu Apr 30 18:59:23 1998 Jim Wilson + + * Makefile.in (g++FAQ.info): Put -o option before input file. + +Thu Apr 30 13:05:33 1998 Andrew MacLeod + + * gxxint.texi: Add info for squangling codes K and B. + +Tue Apr 28 13:22:01 1998 Mark Mitchell + + * semantics.c (begin_stmt_expr): Avoid duplicating the effect of + the expression in templates. + (finish_stmt_expr): Likewise. + +1998-04-28 Brendan Kehoe + + * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int. + +Mon Apr 27 13:58:10 1998 Mark Mitchell + + * decl.c (maybe_push_to_top_level): Always clear + current_template_parms and processing_template_decl. + (pushtag): Remove check of current_class_type and some comments, + since maybe_push_to_top_level no longer creates confusion. + +Sun Apr 26 12:10:18 1998 Mark Mitchell + + * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro. + (DECL_CLASS_TEMPLATE_P): Likewise. + (DECL_PRIMARY_TEMPLATE): Likewise. + (PRIMARY_TEMPLATE_P): Use it. + (push_template_decl_real): New function. + (redeclare_class_template): Take new template parameters as + input. + (is_specialization_of): New function. + (comp_template_args): Declare. + * decl.c (pushtag): Handle friend template classes. + (xref_tag): Likewise. Use new calling convention for + redeclare_class_template. + * decl2.c (grok_x_components): Handle friend templates. + * friend.c (is_friend): Use is_specialization_of where + appropriate. Deal with friend class templates. + (make_friend_class): Let a class template be friends with itself. + * pt.c (comp_template_args): Remove declaration. + (tsubst_friend_class): New function. + (push_template_decl_real): New function. + (push_template_decl): Use it. + (redeclare_class_template): Adjust for new calling convention. + (comp_template_args): Give it external linkage. + (instantiate_class_type): Use tsubst_friend_class to deal + with friend templates. + * typeck.c (comptypes): Use comp_template_args, rather than + expanding it inline. + * parse.y (component_decl): Handle a nested template type + like other component type declarations. + + * pt.c (check_explicit_specialization): Handle overloaded + constructors correctly. + + * pt.c (mabybe_get_template_decl_from_type_decl): New function. + (lookup_template_class): Use it. + +Thu Apr 23 21:19:06 1998 Jason Merrill + + * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops. + * cp-tree.h: Add WRAPPER support. + * call.c (add_candidate): Split out from add_*_candidate fns. + (build_over_call): Take the candidate instead of function and args. + Enforce access control here. Emit overload warnings here. + (add_warning): New fn. + (joust): Add WARN parm. If not set, call add_warning instead of + printing a warning. Re-enable some warnings. + (tourney): Pass it. + (convert_like): Adjust. + (build_new_op): Adjust. + (build_new_function_call): Adjust. + (build_user_type_conversion_1): Adjust. + (USER_CONV_FN): Adjust. + * tree.c (build_expr_wrapper, build_expr_ptr_wrapper, + build_int_wrapper): New fns. + +Thu Apr 23 18:27:53 1998 Mark P. Mitchell + + * pt.c (unify): Fix typo in previous change. + +Thu Apr 23 09:32:58 1998 Jason Merrill + + * error.c (dump_type_real): Declare canonical_name. + + * typeck.c (comp_target_types): Fix PMFs. + +Wed Apr 22 13:24:48 1998 Mark Mitchell + + * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for + the DECL_RESULTs of a member TEMPLATE_DECL, not just the + TEMPLATE_DECL. + + * pt.c (tsubst): Decrease the template-level of + TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a + TEMPLATE_PARM_INDEX. + (template_decl_level): New function. + (unify): Make sure to record unifications for template + parameters, even when the parameters exactly match the arguments. + Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and + TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that + aren't from the level we're currently working on. + +Tue Apr 21 22:00:04 1998 Mark Mitchell + + * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory. + + * decl2.c (check_member_template): Set DECL_IGNORED for member + class templates, too. + + * decl2.c (grokfield): Remangle the name of a member TYPE_DECL. + +Tue Apr 21 18:59:11 1998 Benjamin Kosnik + + * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function. + +Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com) + + * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare. + * decl.c (intTI_type_node, unsigned_intTI_type_node): Define. + (init_decl_processing): Handle TI types. + * typeck.c (unsigned_type, signed_type): Handle TI types. + +Sat Apr 18 15:25:21 1998 Jim Wilson + + * g++spec.c (lang_specific_driver): New argument in_added_libraries. + New local added_libraries. Increment count when add library to + arglist. + +Fri Apr 17 21:25:00 1998 Mark Mitchell + + * cp-tree.h (type_as_string_real): New function. + * pt.c (mangle_class_name_for_template): Use it. + * error.c (dump_aggr_type): Change prototype. + (dump_type_prefix): Likewise. + (dump_type_suffix): Likewise. + (dump_type_real): Convert from dump_type. If desired, the + "canonica" name of a typedef, i.e., the name of the underlying + type, can be printed. + (dump_type): Call dump_type_real. + +Fri Apr 17 14:30:45 1998 Jason Merrill + + * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks. + + * typeck.c (comp_target_types): Tweak pedantic case. + (comp_target_parms): Tweak pedantic case. Clean up somewhat. + Return -1 or 1 instead of 1 or 2. + (compparms): Remove STRICT handling. + (convert_for_assignment): Fix handling of pmfs. + +Fri Apr 17 14:04:16 1998 Mark Mitchell + + * typeck.c (comp_target_types): Handle references like pointers. + (comp_target_parms): Note that return code from comp_target_types + can be negative to indicate failure. + +Fri Apr 17 09:10:52 1998 Andreas Schwab + + * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG), + which requires a working target compiler to build. + +Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com) + + * tree.c (avoid_overlap): Add prototype. + + * spew.c (num_tokens): Add prototype. + (nth_noken, add_token, consume_token, debug_yychar): Likewise. + + * search.c (dfs_check_overlap): Add prototype. + (dfs_no_overlap_yet): Likewise. + + * pt.c (original_template): Add prototype. + (inline_needs_template_parms): Likewise. + (push_inline_template_parms_recursive): Likewise. + (retrieve_specialization, register_specialization): Likewise. + (print_candidates, reduce_template_parm_level): Likewise. + (build_template_decl, mark_template_parm): Likewise. + (tsubst_friend_function, get_bindings_real): Likewise. + + * method.c (start_squangling): Add prototype. + (end_squangling, check_ktype, issue_ktype): Likewise. + (build_overloaded_scope_ref, check_btype): Likewise. + (build_mangled_template_parm_index): Likewise. + + * lex.c (init_cpp_parse): Add prototype. + (handle_cp_pragma, handle_sysv_pragma): Likewise. + (reduce_cmp, token_cmp): Likewise. + + * except.c (call_eh_info): Add prototype. + (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise. + (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise. + + * decl2.c (is_namespace_ancestor): Add prototype. + (namespace_ancestor, add_using_namespace): Likewise. + (ambiguous_decl): Likewise. + + * decl.c (indent): Add prototype. + + * call.c (add_template_candidate_real): Add prototype. + +Fri Apr 17 01:57:12 1998 Jason Merrill + + * decl2.c (build_expr_from_tree): Just return a PMF. + +Fri Apr 17 00:45:12 1998 Mark Mitchell + + * typeck2.c (process_init_constructor): Don't strip cv-qualifiers + when doing initializations. + + * pt.c (unify): Use comptypes to compare type args. + +Fri Apr 17 00:24:22 1998 Jason Merrill + + * decl.c (duplicate_decls): Fix check for when it's safe to free + the new decl. + + * pt.c (mangle_class_name_for_template): Don't pass a typedef type + to type_as_string. + +Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com) + + * pt.c (build_template_parm_index): Add prototype. + + * search.c (my_tree_cons): Don't clear words outside the + newly allocated node. + +Wed Apr 15 15:34:44 1998 Dave Brolley + + * lex.c (init_parse): Now returns char* containing the filename. + +Wed Apr 15 13:20:06 1998 John Carr + Jeff Law + + * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer + than a pointer. + +Sun Apr 12 22:31:19 1998 Richard Kenner + + * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION. + +Fri Apr 10 12:16:49 1998 Benjamin Kosnik + + * decl.c (duplicate_decls): Don't warn for redundant decls if + friend: let add_friend take care of it. + +Thu Apr 9 02:40:48 1998 Jason Merrill + + * sig.c (build_signature_pointer_constructor): Don't set + TREE_HAS_CONSTRUCTOR for a signature pointer. + * cvt.c (ocp_convert): Don't force a temporary for internal structs. + * init.c (resolve_offset_ref): Warn about implicit & on pmfs + here, too. + * typeck.c (build_unary_op): Only allow taking the address of a + real constructor. + * typeck2.c (digest_init): Simplify. + (store_init_value): Don't pedwarn about using { } for pmfs. + +Thu Apr 9 22:16:57 1998 Per Bothner + + * cp-tree.h (start_decl): Update prototype. + * decl.c (start_decl): Like the C version, new parameters + for the attributes. Call cplus_decl_attributes here, + (pushdecl): Like C version, do build_type_copy if TYPE_DECL, + (grokdeclarator): Pass NULL for new start_decl arguments. + * pt.c (tsubst_expr): Likewise. + * parse.y: Merge cplus_decl_attribute calls into start_decl calls. + * typeck.c (common_type): Check TYPE_MAIN_VARIANT. + * lex.c (build_lang_decl): Add lang_name_java. + * class.c (push_lang_context): Add lang_name_java. + * method.c (build_mangled_name): Check for is_java_type. + +Thu Apr 9 22:16:57 1998 Benjamin Kosnik + + * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT. + * call.c (build_scoped_method_call): Check for TREE_CODE for + VOID_TYPE instead of type == void_type_node. + (build_method_call): Likewise. + * decl.c (lookup_name_real): Likewise. + (grokdeclarator): Likewise. + (start_decl): Likewise. + (grokparms): Likewise. + (start_function): Likewise. + (finish_function): Likewise. + (start_method): Likewise. + +Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com) + + * lex.c (finput): New variable. + (init_cpp_parse): Renamed from init_parse. + (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished. + (finish_parse): New function. + * cp-tree.h (init_lex, init_parse): Remove declarations. + +Mon Apr 6 02:25:05 1998 Jason Merrill + + * call.c (build_call): Still evaluate the actual argument. + * class.c (is_empty_class): Update for -fnew-abi. + + * decl2.c: -fnew-abi implies -fsquangle. + + * method.c (do_build_assign_ref): Don't do anything to copy + an empty class. + (do_build_copy_constructor): Likewise. + * call.c (build_over_call): Likewise. + +Sat Apr 4 18:43:58 1998 Jason Merrill + + * tree.c (avoid_overlap): Return a value. + +Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com) + + * method.c (check_btype): Add missing argument to xrealloc. + (check_ktype): Likewise. + +Fri Apr 3 02:22:59 1998 Jason Merrill + + Implement empty base optimization. + * class.c (finish_struct_1): Add vbase fields earlier. Set + CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty. + * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns. + (types_overlap_p): New fn. + * tree.c (avoid_overlap): New fn. + (build_base_fields): Use it to avoid overlapping empty bases. + * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi. + + * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs. + + Re-implement allocation of base class subobjects. + * tree.c (unshare_base_binfos): New fn. + (layout_basetypes): Use it. Now handles offsets of both virtual and + non-virtual bases, after layout_type. + (layout_vbasetypes): Remove. + (build_base_fields): Generate FIELD_DECLs for each non-virtual base. + (build_vbase_pointer_fields): Split out from old layout_basetypes. + * class.c (finish_base_struct): Lose offset handling code. + Move nonvdtor warning here. Don't mess with t_binfo anymore. + (finish_struct_1): Don't mess with t_binfo anymore. Use fns above. + * cp-tree.h: Adjust. + +Thu Apr 2 14:25:13 1998 Jason Merrill + + * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff. + * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise. + * class.c (duplicate_tag_error): Likewise. + (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN. + * tree.c (layout_vbasetypes): Update from layout_record, remove + var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE. + (layout_basetypes): Likewise. + +Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com) + + * class.c, Make sure system.h is included just after config.h. + Delete lingering stdio and errno references too. + * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise. + +Wed Apr 1 15:38:36 1998 Jason Merrill + + * friend.c (is_friend): Fix access control for local classes. + + * class.c (is_empty_class): New fn. + * call.c (build_call): Don't pass empty class objects to a function. + +Wed Apr 1 14:58:35 1998 Mark Mitchell + + * call.c (build_over_call): Do name resolution for default + arguments of function templates in the scope of the templates. + +Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com) + + * call.c: Include system.h. Remove includes, declarations and + defines provided by system.h. + * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise. + * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise. + * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise. + * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise. + * typeck2.c, xref.c: Likewise. + * Makefile.in: Dependencies updated as appropriate. + * Make-lang.in: Likewise. + +Mon Mar 30 12:15:00 1998 Mark Mitchell + + * pt.c (fn_type_unification): Allow incomplete unification without + an immediate error message. + +Mon Mar 30 08:55:42 1998 Jason Merrill + + * tree.c (member_p): New fn. + * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for + initializing class members. + + * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'. + * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX. + + * call.c (build_method_call): Handle non-scoped destructors, too. + * pt.c (tsubst_copy): Likewise. + + * pt.c (print_template_context): Split out... + (push_tinst_level): ...from here. + + * friend.c (is_friend): Don't pass a type to decl_function_context. + + * typeck.c (convert_for_initialization): Always hand off + conversions to class type. + +Sun Mar 29 20:01:59 1998 Jason Merrill + + * friend.c (is_friend): Local classes have the same access as the + enclosing function. + +Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com) + + * typeck.c (expand_target_expr): Delete dead function. + + * search.c: Put various prototypes inside #ifdef MI_MATRIX. + + * repo.c (save_string): Delete dead function. + + * method.c (thunk_printable_name): Delete dead function. + + * lex.c (yynextch): Delete dead function. + + * expr.c (tree_extract_aggr_init): #if 0 out. + + * except.c (do_unwind): Delete dead function. + (easy_expand_asm): Likewise. + + * cvt.c (build_conversion_type_1): Delete dead function. + + * cp-tree.h (push_expression_obstack): Declare. + + * call.c (source_type): #if 0 out. + + * class.c (alter_access): Remove unused label. Add braces + around empty else clause. + + * lex.c (yyprint): Fix argument to printf. + +Sat Mar 28 17:43:52 1998 Mark Mitchell + + * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs. + + * pt.c (instantiate_class_template): Make sure template + arguments are permanent. + * init.c (resolve_offset_ref): Don't go looking around in + template types. + + * semantics.c: Add routines to handle expressions, and some + declaration processing. + * parse.y: Use them. + (current_class_depth): Move declaration to cp-tree.h. + * parse.c: Regenerated. + * cp-tree.h: Use them. + (current_class_depth): Declare. + * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr. + +Fri Mar 27 20:23:18 1998 Mark Mitchell + + * error.c (dump_decl): Be a bit more explicit with template + type arguments, when verbose. + +Fri Mar 27 18:16:40 1998 Jason Merrill + + * inc/exception: Reorder closing braces. + +Fri Mar 27 13:22:18 1998 Mark Mitchell + + * pt.c (redeclare_class_template): New function. + * cp_tree.h (redeclare_class_template): Declare it. + * decl.c (xref_tag): Use it. + +Thu Mar 26 11:16:30 1998 Jason Merrill + + * call.c (build_over_call): Check IS_AGGR_TYPE, not + TYPE_LANG_SPECIFIC. + * typeck.c (convert_arguments): Likewise. + + * decl.c (grokdeclarator): Remove const and volatile from type after + setting constp and volatilep. + + * class.c (finish_struct_1): Don't warn about bool bitfield larger + than one bit. + +Thu Mar 26 10:25:52 1998 Mark Mitchell + + * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate. + +Thu Mar 26 10:24:05 1998 Mark Mitchell + + * call.c (build_object_call): Complain about ambiguous operator(), + rather that crashing. + (build_new_op): Likewise. + (build_op_delete_call): Likewise. + +Thu Mar 26 10:23:24 1998 Mark Mitchell + + * cvt.c (perform_qualification_conversions): Use comp_target_types + instead of comp_ptr_ttypes. + +Wed Mar 25 16:10:50 1998 Mark Mitchell + + * cp-tree.h (enforce_access): Declare. + * call.c (enforce_access): Make it extern, not static. + * class.c (alter_access): Use enforce_access; modify code for ISO + compliance, rather than ARM rules. + +Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij + + * cp-tree.h: Fix typo. + +Wed Mar 25 02:01:02 1998 Jason Merrill + + * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing + if (aggregate_value_p (type)). + + * decl2.c (constructor_name_full): Handle TYPENAME_TYPE. + +Tue Mar 24 16:12:01 1998 Mark Mitchell + + * tree.c (mapcar): When dealing with a DECL, use it's constant + value, if any. + * pt.c (lookup_template_class): Don't mangle the names of template + classes whose arguments are unknown. + + * pt.c (tsubst_expr): Handle GOTO_STMT correctly. + +Tue Mar 24 12:21:55 1998 Benjamin Kosnik + + * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1. + +Tue Mar 24 12:21:48 1998 Jim Wilson + + * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for + boolean_type_node to 1. + +Tue Mar 24 10:23:47 1998 Mark Mitchell + + * error.c (dump_expr): Remove unused variable `l'. + + * pt.c (for_each_template_parm): New function, created by + converting uses_template_parms. + (tree_fn_t): New typedef. + (uses_template_parms): Use it. + (mark_template_parm): New function. + (push_template_decl): Check that the argument list of a partial + specialization uses all the template parameters. + + * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done + with it; we might want it for debugging. + * cp-tree.h (type_unification): Change interface. + * class.c (finish_struct_1): Skip nested template types, just like + ordinary nested types. + (instantiate_type): Use new interface to type_unification. + * lex.c (init_lex): Add __sz as opname for sizeof. + * method.c (build_overload_scope_ref): New function. + (build_overload_int): Handle complex expressions. Set + numeric_output_need_bar if necessary. + (build_overload_value): Handle non-PARM_DECL nodes; this + routine is now used by build_overload_int. Remove some + assignments to numeric_output_need_bar. Use + build_overload_scope_ref. + (build_qualified_name): Note that some template mangled names end + with digits, and set numeric_output_need_bar appropriately. Use + build_underscore_int. + * pt.c (unify): Change interface. + (type_unification_real): Likewise. + (determine_specialization): Use new interfaces. + (tsubst): Deal gracefully with situations in which the argument + vector is not fully filled. + (fn_type_unification): Use new interfaces. + (type_unification): Likewise. Remove NOP_EXPR hack. + (type_unification_real): Likewise. + (unify): Likewise. Deal with unification of complex expressions. + +Mon Mar 23 12:24:37 1998 Jason Merrill + + * pt.c (complete_template_args): Initialize skip properly. + + * decl.c (make_typename_type): Revert. + (make_implicit_typename): Remove. + (lookup_name_real): Don't call it. Call lookup_field if we see a + TYPE_DECL from a template base. + * search.c (lookup_field): Do implicit typename stuff. + +Sun Mar 22 00:50:42 1998 Nick Clifton + Geoff Noer + + * Makefile.in: Various fixes for building cygwin32 native toolchains. + * Make-lang.in: Likewise. + +Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij + + * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify. + +Fri Mar 20 10:42:07 1998 Jason Merrill + + * decl.c (make_implicit_typename): Rewrite removed code. + (make_typename_type): Call it if the type we look up comes from + a base that uses template parms. + + * pt.c (complete_template_args): Rewrite. + (tsubst, FUNCTION_DECL): Use it. + +Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org) + + * semantics.c (finish_asm_stmt): Fix combine strings. Call + c_expand_asm_operands () if output_operands, input_operands or + clobbers is not NULL_TREE. + +Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij + + * pt.c (complete_template_args): New function. + (get_bindings): Deal with specializations of function templates + with return type containing parameters from outer class + templates. + (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level, + substitute arguments and compose a new type. + +Thu Mar 19 19:01:48 1998 Mark Mitchell + + * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new + FUNCTION_DECLs. + +Thu Mar 19 11:51:58 1998 Jason Merrill + + * decl.c (make_implicit_typename): Lose useless code. + + * call.c (standard_conversion): Handle A* -> const A* properly. + + * pt.c (get_bindings_real): Rename from get_bindings. Add + check_rettype parm. + (get_bindings): Pass 1. + (get_bindings_overload): Pass 0. + +Wed Mar 19 09:08:12 1998 Mark Mitchell + + * pt.c (check_explicit_specialization): When reverting a static + member function, also remove the `this' parameter from + last_function_parms. + +Thu Mar 19 02:27:48 1998 Jason Merrill + + * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting + a function context. + + * decl.c (store_bindings): Use free_binding_vecs. + (pop_from_top_level): Likewise. + +Wed Mar 18 12:41:43 1998 Jason Merrill + + * decl.c (make_implicit_typename): Only change the type of a + TYPENAME_TYPE. + +Wed Mar 18 10:09:51 1998 Mark Mitchell + + * semantics.c: New file, containing routines to perform the + semantic phase of parsing. + * parse.y: Use it. + * pt.c (tsubst_expr): Likewise. + * cp-tree.h: Declare the various functions in semantics.c. + Provide macros to access _STMT tree nodes. + * cp-tree.def: Add ASM_STMT tree node. + * Makefile.in, Make-lang.in: Add dependencies on and for + semantics.c. + +Wed Mar 18 00:24:10 1998 Jason Merrill + + * pt.c (push_template_decl): Only check primary templates. + + * pt.c (check_explicit_specialization): Complain about default args + in explicit specialization. + + * parse.y (nomods_initdcl0): Also call cp_finish_decl for a + constructor_declarator. + +Tue Mar 17 14:44:54 1998 Mark Mitchell + + * typeck2.c (build_x_arrow): Don't crash when an aggregate type + has no overloaded operator ->. + + * call.c (build_field_call): Don't crash when presented with a + field that is actually a nested type. + + * decl.c (pushtag): Deal with friend class injection in local + classes. + + * call.c (build_object_call): Don't crash if OBJ is a + pointer-to-member-function. + +Tue Mar 17 11:40:26 1998 Jason Merrill + + * pt.c (push_template_decl): Complain about template with C linkage, + anonymous template class. + +Mon Mar 16 12:10:39 1998 Jason Merrill + + * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX. + * search.c: Likewise. + + * lex.c (do_pending_defargs): Only call + maybe_{begin,end}_member_template_processing for FUNCTION_DECLs. + + * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al. + +Mon Mar 16 10:47:22 1998 Mark Mitchell + + * parse.y: Deal with CONSTRUCTORS in new_initializers. + +Mon Mar 16 10:54:21 1998 Mark Mitchell + + * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more + closely mimics the behavior in parse.y. + (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing + into a compound statement. + +Sun Mar 15 02:07:26 1998 Jason Merrill + + * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro. + * pt.c (inline_needs_template_parms): New fn. + (original_template): New fn. + (push_inline_template_parms_recursive): New fn. + (maybe_begin_member_template_processing): Use them. + (maybe_end_member_template_processing): Likewise. + (is_member_or_friend_template): Rename to is_member_template. + Member functions of local classes are never member templates. + +Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij + + * lex.c (do_identifier): Handle TEMPLATE_DECL that was + added in the class scope to catch redefinition error. + + * pt.c (reduce_template_parm_level): Also copy + the DECL_TEMPLATE_PARMS field. + +Sun Mar 15 10:54:08 1998 Mark Mitchell + + * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a + reduced-level template type parameter. + +Sun Mar 15 12:26:02 1998 Manfred Hollstein + + * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider. + (DECL_NEEDS_FINAL_OVERRIDER_P): New macro. + * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P. + * decl.c (duplicate_decls): Propagate it. + * typeck2.c (abstract_virtuals_error): Use two loops to emit + abstract virtual functions and virtual functions which need a + final overrider separately. + +Thu Mar 12 09:39:40 1998 Manfred Hollstein + + * lang-specs.h: Properly put brackets around array elements in + initializer. + + * typeck.c (build_binary_op_nodefault): Correctly place parens around + && and || in expression. + +Thu Mar 12 09:26:04 1998 Manfred Hollstein + + * call.c (default_parm_conversions): Remove prototype definition. + (build_method_call): Remove unused variable result. + + * cvt.c (ocp_convert): Remove unused variable conversion. + + * decl2.c (ambiguous_decl): Add explicit parameter definition for name. + + * except.c (do_unwind): #if 0 definition of unused variables fcall + and next_pc. + + * expr.c (extract_scalar_init): #if 0 prototype and function + definition. + + * init.c (expand_aggr_init_1): Remove unused variable init_type. + (build_new_1): Remove unused variable t. + + * pt.c (instantiate_class_template): Remove unused variable newtag; + cast called function return value to void. + (do_decl_instantiation): Remove unused variables name and fn. + + * tree.c (get_type_decl): Add default return to shut up compiler from + complaining control reaches end of non-void function. + + * typeck.c (build_x_conditional_expr): Remove unused variable rval. + +Thu Mar 12 09:12:15 1998 Manfred Hollstein + + * call.c (default_parm_conversions): Remove prototype definition. + (build_method_call): Remove unused variable result. + (build_over_call): Add default case in enumeration switch. + +Thu Mar 12 08:39:13 1998 Manfred Hollstein + + * decl2.c (lang_decode_option): Change j's type to size_t. + + * tree.c (layout_vbasetypes): record_align and desired_align are of + type unsigned int; const_size and nonvirtual_const_size likewise. + +Wed Mar 11 07:25:20 1998 Mark Mitchell + + * parse.y (new_initializer): Make sure all initializers are + lists. + +Tue Mar 10 07:32:36 1998 Mark Mitchell + + * decl2.c (import_export_decl): Mark tinfo functions for + cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN. + +Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com) + + * method.c: Fix typo. + +Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi + + * method.c: Include "system.h" to get stdlib.h, stdio.h, + ctype.h, string.h, etc. + (issue_nrepeats): Add default case in enumeration switch. + (check_btype): Likewise. + (process_overload_item): Likewise. + + * Makefile.in (method.o): Depend on system.h. + +Wed Mar 4 22:26:53 1998 Andreas Schwab + + * lex.c (do_scoped_id): Fix parenthesizing. + +Wed Mar 4 12:11:53 1998 Michael Tiemann + + * rtti.c (get_tinfo_fn_dynamic): If this function is called an + FLAG_RTTI is unset, initialize type info machinery and continue + with FLAG_RTTI enabled. + (get_typeid): Likewise. + +Wed Mar 4 11:47:55 1998 Jason Merrill + + * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes + from B. + +Wed Mar 4 11:28:08 1998 Mark Mitchell + + * pt.c (finish_member_template_decl): Deal more gracefully with + invalid declarations. + +Tue Mar 3 01:38:17 1998 Jason Merrill + + * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c, + cp-tree.h: Clean up more old overloading code, old RTTI code, and + some formatting quirks. + + * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c, + method.c, pt.c, ptree.c, typeck.c: Remove support for + -fno-ansi-overloading and overloading METHOD_CALL_EXPR. + * class.h: Remove. + * Makefile.in: Adjust. + + * pt.c (unify): Don't allow reduced cv-quals when strict. + + * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from + *type_unification* and unify. + +Mon Mar 2 12:11:06 1998 Jason Merrill + + * parse.y (explicit_template_type): Remove TEMPLATE keyword. + (nested_name_specifier): And add it before this use. + (typename_sub0): And this use. Also add use without the keyword. + (typename_sub1): Likewise. + * pt.c (instantiate_class_template): Don't actually instantiate + anything if our type uses template parms. + +Mon Mar 2 11:04:59 1998 Jim Wilson + + * decl.c (start_function): Don't call temporary_allocation for a + nested function. + +Sun Mar 1 21:06:37 1998 Jason Merrill + + * pt.c (instantiate_class_template): Don't mess with friends if + our type uses template parms. + +Sat Feb 28 12:06:44 1998 Jason Merrill + + * parse.y (nested_name_specifier): Use explicit_template_type. + (typename_sub): Allow a template_type, an explicit_template_type, + or an implicit template type at the end. + * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL. + * decl.c (make_typename_type): Handle template-id where the name + is a TEMPLATE_DECL. + * call.c (build_scoped_method_call): Handle member template + destructor call. + * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member + destructor is represented by the type. + + * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro. + * parse.y (nested_name_specifier): Add 'template' case. + (explicit_template_type): New rule. + (typename_sub): Use it. + * decl.c (make_typename_type): Handle getting a template-id for NAME. + * pt.c (tsubst): Likewise. + +Fri Feb 27 11:17:50 1998 Jason Merrill + + * pt.c (add_to_template_args): Fix thinko. + (instantiate_class_template): Call it later. + + * pt.c (get_class_bindings): Add outer_args parm. + (most_specialized_class): Likewise. + (instantiate_class_template): Pass it. + (more_specialized_class): Likewise. + (lookup_template_class): Get context from template if none + was specified. + (finish_member_template_decl): Don't do anything with a + partial specialization. + * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of + AGGREGATE_TYPE_P. + * class.c (finish_struct): Member class templates have already been + checked for name clashes. + * decl.c (pushdecl_with_scope): Handle pushing at class level. + +Fri Feb 27 02:25:16 1998 Jason Merrill + + * pt.c (tsubst, TEMPLATE_DECL): Support member class templates. + (tsubst, *_PARM): Support multiple levels of template classes. + (instantiate_class_template): Look up the pattern from the + original template. + (lookup_template_class): Handle getting a template for d1. + (push_template_decl): Correct setting of 'primary'. + (reduce_template_parm_level): Add 'levels' parm. + (finish_member_template_decl): Support member class templates. + (template_class_depth): Handle multiple levels. + * parse.y (component_decl_1, fn.def2): Remove member template case. + (component_decl): Add member template cases. + * decl2.c (check_member_template): We now handle member template + classes. + * decl.c (pushtag): Handle member templates. + * method.c (do_inline_function_hair): Don't touch + IDENTIFIER_GLOBAL_VALUE. + * init.c (build_offset_ref): If name isn't an identifier, just + return it. + * spew.c (yylex): Handle PTYPENAME like TYPENAME. + + * typeck.c (get_delta_difference): Do adjust for conversions to + and from virtual base. + +Wed Feb 25 09:51:29 1998 Jason Merrill + + * typeck.c (get_delta_difference): Give hard error for conversion + from virtual base. + + * cp-tree.h: Tweak formatting. + +Wed Feb 25 00:35:33 1998 Jason Merrill + + * decl.c (push_namespace): Handle redeclaration error. + + * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro. + (IDENTIFIER_NAMESPACE_BINDINGS): New macro. + (NAMESPACE_BINDING): New macro. + (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING. + * *.c: Use them. + + * pt.c (push_template_decl): Use innermost_args. + + * decl.c (get_unique_name): Tweak from earlier in the name. + +Tue Feb 24 22:15:04 1998 Martin von Loewis + + * cp-tree.def: Add CPLUS_BINDING node. + * cp-tree.h (tree_binding): New struct. + (BINDING_SCOPE, BINDING_VALUE): New macros. + (current_namespace, global_namespace): Declare extern. + (struct lang_decl_flags): New field in_namespace. + (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros. + (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros. + (TREE_INDIRECT_USING): New macro. + * decl2.c (current_namespace, global_namespace): Declare. The + value is a NAMESPACE_DECL now, not a TREE_LIST. + (is_namespace_ancestor, namespace_ancestor): New static functions. + (add_using_namespace, ambiguous_decl): Likewise. + (lookup_using_namespace): New support function for lookup_name. + (qualified_lookup_using_namespace): New support function for + do_scoped_id and lookup_namespace_name. + (get_namespace_id): Mark as obsolete. + (current_namespace_id): Likewise. + (do_namespace_alias): Implement. + (do_using_directive): Implement as call to add_using_namespace. + * decl.c (binding_for_name): New function. + (push_namespace, pop_namespace): Implement. + (push_decl): Don't install a FUNCTION_DECL in the global branch. + (lookup_namespace_name): Implement using qualified lookup. + (lookup_name_real): For global scoping, lookup in + global_namespace. For namespace scoping, lookup in given + namespace. For unscoped lookup, iterate over namespace, + considering using directives. + (init_decl_processing): Initialize global_namespace. + (grokvardecl): Build assembler name as static name for globals. + (grokdeclarator): Remove old namespace mangling. + (xref_tag): When installing a global binding for the + tag, make sure we have an identifier. + * method.c (build_overload_nested_name): Mangle namespaces. + (build_qualified_name): Likewise. + (build_decl_overload_real): Likewise. + * lex.c (build_lang_decl): Set namespace for new declaration to + current_namespace. + (do_scoped_id): Find global names in global or current + namespace, or using qualified namespace lookup, depending on + context. + * init.c (build_member_call): When scope is namespace, use + build_x_function_call instead. + (build_offset_ref): When scope is namespace, collapse processing + to lookup_namespace_name instead. + * error.c (dump_decl): Support NAMESPACE_DECL. + * decl.c (pushdecl): Bind globals to current namespace. + (push_overloaded_decl): Likewise. + (lookup_tag): Likewise. + (lookup_name_current_level): Likewise. + (xref_tag): Likewise. + (start_function): Likewise. + * lex.c (do_identifier): Likewise. + (identifier_typedecl_value): Likewise. + (real_yylex): Likewise. + * method.c (do_inline_function_hair): Likewise. + * parse.y (unscoped): Likewise. + * pt.c (check_explicit_specialization): Likewise. + (lookup_template_class): Likewise. + * rtti.c (call_void_fn): Likewise. + * sig.c (build_sigtable): Likewise. + * ptree.c (lang_print_xnode): New function. + +Tue Feb 24 01:40:24 1998 Jason Merrill + + * pt.c (instantiate_class_template): Don't instantiate if pedantic + and the args use template parms. + + * pt.c (push_tinst_level): If the instantiation uses template parms, + fail silently. + * decl.c (xref_basetypes): Do call complete_type for basetypes + that involve template parameters. + +Tue Feb 24 00:36:43 1998 Jason Merrill + + * typeck2.c (process_init_constructor): Fix labeled init check. + +Mon Feb 23 05:08:55 1998 Jason Merrill + + * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS + argument to tsubst and friends. + + * pt.c (tsubst, FUNCTION_DECL): Tidy. + + * typeck.c (build_x_function_call): Handle static member function + templates like non-templates. Handle friend templates like normal + function templates. + * pt.c (tsubst, *_PARM): Don't use orig_level. + (get_bindings): Don't call add_to_template_args. + (instantiate_template): Likewise. + (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate. + * ptree.c (print_lang_type): Print index/level for template parms. + +Mon Feb 23 02:52:29 1998 Mark Mitchell + + * Make-lang.in (cc1plus): Note that cc1plus depends on + cp/cp-tree.h and cp/cp-tree.def. + + * cp-tree.def (TEMPLATE_CONST_PARM): Remove. + (TEMPLATE_PARM_INDEX): New tree code, used to indicate a + position in a template parameter list. + * cp-tree.h (template_parm_index): New structure, used as the tree + structure for a TEMPLATE_PARM_INDEX. + (TEMPLATE_PARM_IDX): New macro. + (TEMPLATE_PARM_LEVEL): Likewise. + (TEMPLATE_PARM_DESCENDANTS): Likewise. + (TEMPLATE_PARM_ORIG_LEVEL): Likewise. + (TEMPLATE_PARM_DECL): Likewise. + (TEMPLATE_TYPE_PARM_INDEX): Likewise. + (TEMPLATE_TYPE_ORIG_LEVEL): Likewise. + (TEMPLATE_TYPE_DECL): Likewise. + (TEMPLATE_CONST_IDX): Remove. + (TEMPLATE_CONST_LEVEL): Likewise. + (TEMPLATE_CONST_SET_INFO): Likewise. + (TEMPLATE_TYPE_SET_INFO): Likewise. + (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX + node. + (TEMPLATE_TYPE_LEVEL): Likewise. + * decl.c (decls_match): Call comp_template_parms, rather than + expanding it inline. + (duplicate_decls): If two template declarations are being merged, + then their TEMPLATE_INFOs should be merged as well. + (grokfndecl): Save template-id information when declaring a friend + with explicit template arguments. Pass arguments to + check_explicit_specialization via correct convention; at some + point check_explicit_specialization changed, but these call-sites + did not. + (grokdeclarator): Tidy up slightly. + * decl2.c (check_classfn): Tidy up slightly. Don't assume that + two template functions with the same DECL_ASSEMBLER_NAME the same, + since the names are not yet mangled. + * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of + TEMPLATE_CONST_PARM. + (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the + decl for a non-type parameter, rather than printing `'. + * friend.c (is_friend): Handle TEMPLATE_DECL friends. + (do_friend): Deal with template friends. + * lex.c (do_pending_inlines): Call + maybe_begin_member_template_processing, rather than + conditionally calling begin_member_template_processing. + (process_next_inline): Likewise. Call + maybe_end_member_template_processing, rather than + conditionally calling end_member_template_processing. + (do_pending_defargs): Likewise. + (do_identifier): Use TEMPLATE_PARM_INDEX instead of + TEMPLATE_CONST_PARM. + * method.c (build_mangled_template_parm_index): New function. + (build_overload_value): Use it. + (build_overload_name): Likewise. + * pt.c (finish_member_template_decl): Allow friend declarations. + (template_class_depth): New function. + (is_member_template): Rename, and modify, to become... + (is_member_or_friend_template): New function. + (end_member_template_processing): Rename, and modify, to become... + (maybe_end_member_template_processing). + (build_template_parm_index): New function. + (reduce_template_parm_level): New function. + (process_template_parm): Modify to use build_template_parm_index. + (push_template_decl): Deal with friend templates. + (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of + TEMPLATE_CONST_PARM. + (tsubst_friend_function): New function. + (instantiate_class_template): Generate the DECL_FRIENDLIST + for a new instantiation by using tsubst_friend_function rather + than just tsubst. + (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL. + Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the + appropriate new macros. Use reduce_template_parm_level to + generate lower-level template parameters. Handle tsubst'ing into + TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget + to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created + templates. Similarly for the template parameters for a new + template. + (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead + of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them. + (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM. + (get_bindings): Call add_to_template_args if necessary. + (instantiate_decl): Handle instantiations of friend templates. + * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a + TEMPLATE_TYPE_PARM as a list of fields; it's not! + * spew.c (yylex): Do a little manual constant propagation to + clarify the code. + +Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com) + + * error.c: Include sys/types.h. + +Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com) + + * method.c (build_mangled_name): Start CPP directives in column zero. + +Thu Feb 19 10:36:48 1998 Jason Merrill + + * typeck2.c (process_init_constructor): Sorry about non-trivial + labeled initializers. + * parse.y (initlist): Re-enable labeled initializers. + +Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij + + * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm, + all callers changed. Rely on the new parameter instead of arg + being a TREE_LIST when determine whether we are working inside + template template parameter. Clean up is_type test. + +Thu Feb 19 10:04:12 1998 Jason Merrill + + * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT. + * typeck2.c (initializer_constant_valid_p): Allow conversions + between pointers and references. + +1998-02-19 Brendan Kehoe + + * typeck.c (build_unary_op): Only warn about incr/decr a pointer + if pedantic || warn_pointer_arith. + +Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij + + * pt.c (unify): Handle TEMPLATE_DECL. + +1998-02-18 Brendan Kehoe + + * cp-tree.h (strip_attrs): Remove decl. + +1998-02-18 Doug Evans + + * decl.c (duplicate_decls): Call merge_machine_decl_attributes. + Update olddecl's attributes too. + (strip_attrs): Remove function. + * typeck.c (common_type): Call merge_machine_type_attributes. + +Tue Feb 17 14:07:52 1998 Mark Mitchell + + * parse.y (initdcl0_innards): New grammar symbol. + (nomods_initdecls, nomods_initdcl0): Change type from itype to + none, since the resulting value is never used. + (parse_decl): New function. + (datadef): Remove redundant actions. + (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards. + * parse.c: Regenerated. + +Tue Feb 17 11:54:16 1998 Jason Merrill + + * parse.y (simple_stmt): Use getdecls() to check for decl. + +Sat Feb 14 11:50:51 1998 Manfred Hollstein + + * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New + macros. + (c++.install-common): Install c++filt properly as native or as cross + variant. + (c++.uninstall): Add c++filt. + +Fri Feb 13 14:55:37 1998 Jason Merrill + + * call.c (standard_conversion): Fix multi-level ptr conversions. + +Fri Feb 13 14:06:22 1998 Mike Stump + + * init.c (build_new): Propagate error_mark_node up. + +Fri Feb 13 13:24:32 1998 Jason Merrill + + * parse.y (simple_stmt): If the condition isn't a declaration, + start the controlled block after the test. + +Fri Feb 13 02:26:10 1998 Andreas Schwab + + * call.c (build_over_call): Convert builtin abs, labs and fabs to + tree-codes. + * decl.c (init_decl_processing): Re-enable abs, labs and fabs as + builtins. + +Fri Feb 13 01:36:42 1998 Jason Merrill + + * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV. + +Fri Feb 13 00:21:59 1998 Jason Merrill + + * cp-tree.h: Add access_protected_virtual_node. + * class.c (init_class_processing): Initialize it. + * decl.c (xref_basetypes): Use it. + * parse.y (base_class_access_list): Likewise. + + * Make-lang.in (DEMANGLER_PROG): Add $(exeext). + (c++.install-common): Install c++filt. + +Thu Feb 12 12:46:51 1998 Benjamin Kosnik + + * decl.c (shadow_tag): Give error for typedef-ing built-in types. + +Wed Feb 11 23:28:05 1998 Mark Mitchell + + * call.c (reference_binding): Use comptypes when comparing + TYPE_MAIN_VARIANTS to handle non-canonical array/index types. + +Wed Feb 11 16:42:04 1998 Mark Mitchell + + * tree.c (is_overloaded_fn): Use really_overloaded_fn. + (really_overloaded_fn): Move check here from is_overloaded_fn. + (get_first_fn): Use really_overloaded_fn and is_overloaded_fn. + +Wed Feb 11 15:54:18 1998 Mark Mitchell + + * typeck.c (build_ptrmemfunc): Type-check pointer-to-member + conversions. + +Mon Feb 9 22:23:31 1998 Mark Mitchell + + * cp-tree.h (push_template_decl): Return the decl passed in, or an + equivalent duplicate. + * decl.c (pushtag): Use the return value from push_template_decl. + (duplicate_decls): When duplicating a template declaration, merge + the DECL_TEMPLATE_RESULTs as well. + (make_implicit_typename): Don't try to dive into typename types to + find a context for making a new implicit typename. + (start_decl): Use the return value from push_template_decl. + (grokdeclarator): Complain about declarations list `const operator + int'. Since we don't correctly handle in-class initializations of + non-static data members, complain about this (now illegal) + practice. Issue an error for initializations of non-const statics + since that is illegal as well, and since we don't handle that case + correctly either. + (start_function): Use the return value from push_template_decl. + (start_method): Likewise. + * decl2.c (grokfield): Likewise. Since the change to + grokdeclarator ensures that all initialized fields are in fact + static, remove a redundant test for TREE_PUBLIC. + * parse.y (initlist): Disable labeled initializers since they do + not work as per the documentation, and since they do not use the + same syntax as the C front end. + * pt.c (push_template_decl): Return the decl passed in, or an + equivalent duplicate. + (lookup_template_class): When searching in a nested context, + use the right arguments. + (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL. + * typeck.c (build_component_ref): Assign the correct type to the + result of build_vfn_ref. + +Tue Feb 10 23:56:46 1998 Jason Merrill + + * pt.c (convert_nontype_argument): Fix typo. + (check_explicit_specialization): Allow old-style specialization + of class template members. + +Tue Feb 10 20:36:52 1998 Jason Merrill + Manfred Hollstein + + * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead + when deciding to override DECL_ASSEMBLER_NAME. + +Tue Feb 10 15:30:55 1998 Andrew MacLeod + + * decl2.c (lang_f_options): Add -fsquangle to option processing list. + * cp-tree.h (flag_do_squangling): Add declaration. + * lang-options.h: Add -fsquangle and -fno-squangle. + * method.c: Add macros and static variables for squangling. + (build_overload_name): Rename to build_mangled_name, add logic for B + compression, and split into process_modifiers and + process_overload_item. + (process_modifiers): New function, to handle constant, reference, + and pointer types. + (process_overload_item): New function, handles issue of type codes. + (build_overload_name): New function, start squangling and call + build_mangled_name. + (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline. + (start_squangling): New function to initialize squangling structs. + (end_squangling): New function to destroy squangling structs. + (nrepeats): Rename variable to Nrepeats. + (issue_nrepeats): New function for issuing 'n' type repeats. + (check_ktype): New function to check for type K name compression. + (build_overload_nested_name): Add a check for K name compression. + (build_qualified_name): Add a check for K name compression and don't + use DECL_ASSEMBLER_NAME when squangling is on. + (check_btype): New function, checks for B type compression. + (build_static_name, build_decl_overload_real): Initiate squangling. + (build_typename_overload, build_overload_with_type): Initiate + squangling + +Sun Feb 8 23:47:38 1998 scott snyder + + * method.c (make_thunk): Avoid name buffer overflow. + +Sat Feb 7 16:48:54 1998 Jason Merrill + + * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we + don't define them yet. + + * parse.y (nomods_initdcl0): Add constructor_declarator case. + +Fri Feb 6 21:32:25 1998 Richard Kenner + + * config-lang.in (diff_excludes): Use basename only. + +Thu Feb 5 19:10:40 1998 Jason Merrill + + * tinfo2.cc: Add tinfo for signed char. + +Thu Feb 5 14:38:23 1998 Mike Stump + + * search.c (compute_access): Handle protected constructors in derived + classes as accessible. + +Wed Feb 4 01:26:49 1998 Jason Merrill + + * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code): + Call convert_from_reference sooner. + +Tue Feb 3 23:50:52 1998 Mark Mitchell + + * cvt.c (ocp_convert): Obtain the constant values from constant + decls even if the destination type is the same as the type of the + decl. + + * decl2.c (finish_file): Make sure that static inlines with + definitions are not marked DECL_EXTERNAL before returning. + +Tue Feb 3 22:43:42 1998 Jason Merrill + + * decl.c: Lose arg_looking_for_template. + (lookup_name_real): Likewise. + * parse.y: Lose processing_template_arg, template_arg1. + (primary): Likewise. + * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too. + +Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij + + * error.c (dump_decl): Fix type of default arguments for template + template parameters and nontype template parameters. + * parse.y (template_parm): Handle invalid default template + template arguments here. + + * parse.y (template_parm): Use template_arg instead of PTYPENAME + for default template template argument. + * pt.c (coerce_template_parms): Merge default template argument + codes. Can treat RECORD_TYPE as template name if it is implicitly + created. Fix argument index in error message. + * typeck.c (comptypes): Merge template argument comparison codes in + TEMPLATE_TEMPLATE_PARM and RECORD_TYPE. + +Tue Jan 6 01:42:44 1998 Mumit Khan + + * lex.c (file_name_nondirectory): Also check for '/'. + +Mon Feb 2 11:24:22 1998 Mark Mitchell + + * parse.y (primary): Deal with statement-expressions in + templates. + * pt.c (tsubst_copy): Handle BIND_EXPR. + * tree.c (mapcar): Likewise. + + * call.c (add_template_candidate_real): Pass extra parameter to + fn_type_unification. + * cp-tree.h (fn_type_unification): Add parameter. + * pt.c (fn_type_unification): Add additional parameter to deal with + static member functions. + (get_bindings): Deal with static member functions. + + * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro. + (revert_static_member_fn): Declare. + * decl.c (revert_static_member_fn): Remove declaration. Change + linkage from internal to external. + (cp_finish_decl): Deal with virtual functions in classes local to + template functions. + * decl2.c (finish_file): Don't forget to emit increment/decrement + expressions in initializers for file-scope variables. + * parse.y (typename_sub2): If the typename doesn't names a + template, rather than a type, issue an error message. + * pt.c (check_explicit_specialization): Handle specializations of + static member functions. + (coerce_template_parms): Handle offset references to lists of + member functions. + * search.c (note_debug_info_needed): Don't crash when handed a + type which is being defined. + * typeck.c (complete_type): Don't crash when handed NULL_TREE; + that can happen with some illegal code. + +Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi + + * call.c (user_harshness): Initialize `code' to 0. + (build_method_call): Initialize `candidates', `cp' and `len' to 0. + (null_ptr_cst_p): Add parentheses around && within ||. + (standard_conversion): Likewise. + (z_candidate): Likewise. + (build_user_type_conversion_1): Initialize `args' to NULL_TREE. + (build_object_call): Likewise for `mem_args'. + (build_new_op): Likewise for `mem_arglist'. Add `return' from + default case in enumeration switch. + + * class.c (build_vtable_entry): Add explicit braces to avoid + ambiguous `else'. + (build_class_init_list): Likewise. + (finish_struct_1): Initialize `width' to 0. + (instantiate_type): Initialize `name' to NULL_TREE. Add + explicit braces to avoid ambiguous `else'. + + * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous + `else'. + + * decl.c (grok_reference_init): Eliminate unused parameter, all + callers changed. + (record_builtin_type): Initialize `tdecl' to NULL_TREE. + (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE. + (cp_finish_decl): Initialize `ttype' to NULL_TREE. + (grokdeclarator): Add parentheses around && within ||. Add + explicit braces to avoid ambiguous `else'. + (grokparms): Initialize `type' to NULL_TREE. + (xref_tag): Remove unused label `just_return'. + (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE. + (finish_function): Initialize `cond' and `thenclause' to NULL_TREE. + (hack_incomplete_structures): Add parentheses around assignment + used as truth value. + + * decl2.c (coerce_delete_type): Hide definition of `e3'. + + * error.c: Include . + (dump_expr): Change the type of `i' to size_t. Remove unused + label `error'. + + * except.c (init_exception_processing): Remove unused variable `d'. + (expand_throw): Likewise for `label'. + + * friend.c (add_friends): Add explicit braces to avoid ambiguous + `else'. + + * init.c (sort_member_init): Initialize `last_field' to NULL_TREE. + (sort_base_init): Likewise for `binfo'. + (expand_member_init): Likewise for `rval'. + (build_member_call): Add parentheses around assignment used as + truth value. + (build_offset_ref): Add explicit braces to avoid ambiguous `else'. + (build_new): Initialize `nelts' to NULL_TREE. Initialize + `old_immediate_size_expand' to 0. + (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE. + (build_vec_delete_1): Remove unused variable `block'. + (expand_vec_init): Initialize `itype' to NULL_TREE. + + * lex.c: Include if we don't have . Protect + declaration of `index' and `rindex' with autoconf macros. + (reinit_parse_for_expr): Remove unused variables + `look_for_semicolon' and `look_for_lbrac'. + (cons_up_default_function): Initialize `args' to NULL_TREE. + (readescape): Initialize `firstdig' to 0. + (real_yylex): Add parentheses around assignment used as truth value. + + * method.c: Include if we don't have . + Protect declaration of `index' with autoconf macro. + + * parse.y (primary): Add explicit braces to avoid ambiguous `else'. + Initialize `type' to NULL_TREE. + (structsp): Remove unused variable `id'. + + * pt.c (coerce_template_parms): Add explicit braces to avoid + ambiguous `else'. + (lookup_template_class): Initialize `template' to NULL_TREE. + (instantiate_class_template): Remove unused variable `name' and `e'. + (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE. + (do_poplevel): Initialize `saved_warn_unused' to 0. + (type_unification): Remove unused varable `parm'. + (unify): Likewise for `j'. + + * repo.c (init_repo): Add parentheses around assignment used as + truth value. + (finish_repo): Remove unused varable `p'. + + * search.c (get_binfo): Initialize `type' to NULL_TREE. + (get_base_distance): Likewise. + (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path' + and `new_v' to NULL_TREE. + (lookup_fnfields): Likewise for `rval_binfo_h'. + (breadth_first_search): Add parentheses around assignment used as + truth value. + (get_template_base): Initialize `type' to NULL_TREE. + + * sig.c (append_signature_fields): Initialize `last_mfptr' to + NULL_TREE. + (build_signature_table_constructor): Likewise for + `last_rhs_field', `pfn' and `vt_off'. + (build_sigtable): Likewise for `init'. + + * tree.c (break_out_calls): Initialize `t2' to NULL_TREE. + (propagate_binfo_offsets): Likewise for `delta'. + (hash_tree_cons): Initialize hashcode to 0. + (can_free): Likewise for `size'. + (cp_tree_equal): Add explicit braces to avoid ambiguous `else'. + + * typeck.c (convert_sequence): Hide prototype. + (common_type): Add explicit braces to avoid ambiguous `else'. + (comp_target_types): Likewise. + (build_x_function_call): Initialize `ctypeptr' to NULL_TREE. + (build_function_call_real): Add explicit braces to avoid ambiguous + `else'. + (convert_arguments): Initialize `called_thing' to 0. + (convert_for_initialization): Initialize `savew' and `savee' to 0. + + * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0. + (digest_init): Initialize `old_tail_contents' to NULL_TREE. + (build_x_arrow): Likewise for `last_rval'. + + * xref.c (GNU_xref_decl): Initialize `cls' to 0. + +Sun Feb 1 12:45:34 1998 J"orn Rennecke + + * decl.c (init_decl_processing): Use set_sizetype. + * decl2.c (sizetype): Don't declare. + * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype. + (c_sizeof_nowarn, build_binary_op_nodefault): Likewise. + (build_component_addr, unary_complex_lvalue): Likewise. + * rtti.c (expand_class_desc): Likewise. + * class.c (get_vfield_offset): Likewise. + +Thu Jan 29 10:39:30 1998 Mark Mitchell + + * pt.c (convert_nontype_argument): Move check for is_overloaded_fn + early to avoid bogus error. Handle overloaded function + names provided as template arguments correctly. + (coerce_template_parms): Don't mishandle overloaded functions when + dealing with template template parameters. + (lookup_template_class): Issue an error message, rather than + crashing, when the TYPE_DECL provided is not a template type. + +Wed Jan 28 23:14:44 1998 Jason Merrill + + * class.c (instantiate_type): Don't just return a known type if + it's wrong. + +Wed Jan 28 11:04:07 1998 Mark Mitchell + + * class.c (instantiate_type): Remove handling of FUNCTION_DECL + since that code could never be reached. + + * error.c (dump_decl): Avoid aborting in the midst of printing an + error message about an illegal template declaration. + + * parse.y (structsp): Print an error message, rather than crashing, + when a class-head does not name a class. + + * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE + template arguments as a g++ extension. + + * cp-tree.def (ALIGNOF_EXPR): New tree code. + * decl2.c (grok_alignof): If processing_template_decl, just store + the expression. + * typeck.c (c_alignof): Likewise. + * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR. + * error.c (dump_expr): Likewise. + * pt.c (tsubst_copy): Likewise. + * tree.c (cp_tree_equal): Likewise. + * pt.c (uses_template_parms): Correctly determine whether or not a + SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant + folding can be done. + + * cp-tree.h (grok_enum_decls): Remove type parameter. + * decl.c (grok_enum_decls): Likewise. + * decl2.c (grok_x_components): Call grok_enum_decls + unconditionally, since it will do nothing if there is no + current_local_enum. Use the new calling sequence. + * pt.c (tsubst_enum): Use the new calling sequence for + grok_enum_decls. + + * decl.c (start_function): Make member functions of local classes + in extern inline functions have comdat linkage here... + (grokdeclarator): Rather than here. + +Wed Jan 28 10:55:47 1998 Jason Merrill + + * pt.c (convert_nontype_argument): Use decl_constant_value. + +Tue Jan 27 16:42:21 1998 Mark Mitchell + + * call.c (add_template_candidate_real): New function. + (add_template_candidate): Use it. + (add_template_conv_candidate): Likewise. + (joust): Pass extra argument to more_specialized. + * class.c (instantiate_type): Handle a single FUNCTION_DECL. + (is_local_class): Remove. + (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG. + * cp-tree.h (is_local_class): Remove. + (perform_array_to_pointer_conversion): Likewise. + (finish_member_template_decl): Add. + (check_explicit_specialization): Return a tree, not an int. + (more_specialized): Take additional argument. + (get_bindings): Likewise. + (TI_PENDING_SPECIALIZATION_FLAG): New macro. + * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes. + (perform_array_to_pointer_conversion): Remove. + * decl.c (saved_scope): Add processing_specialization, + processing_explicit_instantiation fields. + (maybe_push_to_top_level): Save them. + (pop_from_top_level): Restore them. + (grokfndecl): Use new return value from + check_explicit_specialization. + (start_decl): Don't check flag_guiding_decls before pushing + decls. + (cp_finish_decl): Remove previous (bogus) change. + (grok_declarator): Use decl_function_context rather than + is_local_class. + * decl2.c (finish_file): Pass extra argument to get_bindings. + (build_expr_from_tree): Let build_x_component_ref check + validity of arguments rather than doing it here. + * lex.c (cons_up_default_function): Remove code fooling with + processing_specialization, processing_explicit_instantiation + flags, as that is now done in {maybe_push_top,pop_from}_top_level. + * method.c (build_overload_identifier): Mangle local classes in + template functions correctly. + * parse.y (finish_member_template_decl): Move to pt.c. + * pt.c (finish_member_template_decl): Moved here from parse.y. + (print_candidates): New function. + (determine_specialization): Change interface. Properly look for + most specialized versions of template candidates. + (check_explicit_specialization): Fully process explicit + instantiations. + (push_template_decl): Avoid looking at CLASSTYPE fields in + FUNCTION_DECLS. + (determine_overloaded_function): Remove. + (convert_nontype_argument): Change name from + convert_nontype_parameter. Use determine_overloaded_function + instead of instantiate_type. + (mangle_class_name_for_template): Handle type contexts as well as + function contexts. + (classtype_mangled_name): Likewise. + (lookup_template_class): Likewise. + (tsubst): Likewise. + (more_specialized): Take explicit template arguments as a + parameter. + (most_specialized): Likewise. + (get_bindings): Likewise. Check that return types match before + proclaiming a function a match. + (do_decl_instantiation): Remove code searching for function to + instantiate; that is now done in check_explicit_specialization. + (add_maybe_template): Pass extra argument to get_bindings. + * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify + implementation. + * typeck.c (build_component_ref): Check for invalid arguments. + +Tue Jan 27 01:44:02 1998 Jason Merrill + + * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that + return_target and call_target are equivalent. + + * pt.c (type_unification_real): Just accept function parms that + don't use any template parms. + +Sun Jan 25 03:30:00 1998 Jason Merrill + + * decl.c (cp_finish_decl): When bailing on a comdat variable, also + unset DECL_NOT_REALLY_EXTERN. + + * parse.y (typename_sub*): Fix std::. + +Sat Jan 24 12:13:54 1998 Jason Merrill + + * error.c (dump_decl): Fix type default template args. + (dump_type): Hand TEMPLATE_DECL off to dump_decl. + +Fri Jan 23 18:34:37 1998 Mumit Khan + + * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. + (file_name_nondirectory): Use. + +Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij + + * pt.c (coerce_template_parms): Don't access elements of ARGLIST + that are not really present. Substitute default arguments in + template template arguments. Correctly convert TEMPLATE_DECL to + TEMPLATE_TEMPLATE_PARM. + (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM + are no longer treated specially here. + * parse.y (template_template_parm): Fix copy error. + * decl.c (grokdeclarator): Warn about missing `typename' for nested + type created from template template parameters. + * parse.y (bad_parm): Likewise + + * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM. + (push_nested_class): Likewise. + * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code. + * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro. + (copy_template_template_parm): Declare. + * decl.c (arg_looking_for_template): New variable. + (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM. + Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM + node if arg_looking_for_template is nonzero. + (pushdecl): Handle TEMPLATE_TEMPLATE_PARM. + (grok_op_properties, xref_tag, xref_basetypes): Likewise. + (grokdeclarator): Handle TEMPLATE_DECL. + * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM. + * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM. + (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM. + (dump_decl): Handle unnamed template type parameters. + Handle template template parameters. + (dump_function_name): Handle template template parameters. + * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef): + Handle TEMPLATE_TEMPLATE_PARM. + * method.c (build_template_template_parm_names): New function. + (build_template_parm_names): Handle TEMPLATE_DECL. + (build_overload_nested_name, build_overload_name): + Handle TEMPLATE_TEMPLATE_PARM. + * parse.y (maybe_identifier): New nonterminal. + (template_type_parm): Use it. + (template_template_parm, template_arg1): New nonterminal. + (template_parm): Add template_template_parm rules. + (template_arg): Set processing_template_arg. + (template_arg1): Rules moved from template_arg. + (primary, nonnested_type): Set arg_looking_for_template if we are + processing template arguments. + * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL. + (process_template_parm): Handle template template parameters. + (coerce_template_parms, comp_template_args): Likewise. + (mangle_class_name_for_template, lookup_template_class): Likewise. + (uses_template_parms): Handle TEMPLATE_DECL and + TEMPLATE_TEMPLATE_PARM. + (current_template_args): Handle TEMPLATE_DECL. + (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM. + * search.c (dfs_walk, dfs_record_inheritance): + Handle TEMPLATE_TEMPLATE_PARM. + * tree.c (copy_template_template_parm): New function. + (mapcar): Handle TEMPLATE_TEMPLATE_PARM. + * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM. + +Mon Jan 19 22:40:03 1998 Mark Mitchell + + * decl.c (start_decl): Don't allow duplicate definitions of static + data members. + + * call.c (build_user_type_conversion_1): Handle user-defined + template conversion operators correctly. + + * decl2.c (build_expr_from_tree): Issue an error message if the + object in a COMPONENT_REF is a TEMPLATE_DECL. + + * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs. + + * class.c (is_local_class): New function. + * cp-tree.h (is_local_class): Declare it. + (last_tree): Likewise. + (begin_tree): Likewise. + (end_tree): Likewise. + (lookup_template_class): Change prototype. + * decl.c (cp_finish_decl): Check for NULL where necessary. + Consider FUNCTION_DECLS to declare objects with top-level binding, + when calling make_decl_rtl. + (grokdeclarator): Give members of local classes internal linkage. + (start_function): Remove declaration of last_tree. + (finish_function): Set flag_keep_inline_functions around call to + rest_of_compilation if we are processing a member function in a + local class. + (start_method): Call push_template_decl for member functions of + local classes in template functions. + * decl2.c (import_export_decl): Don't give external linkage to + instantiations of templates with internal linkage. + * parse.y (last_tree): Remove declaration. + (template_type): Pass extra parameter to lookup_template_class. + (self_template_type): Likewise. + (structsp): Move call to reset_specialization into left_curly. + (left_curly): Call reset_specialization, and begin_tree. + * pt.c (saved_trees): New variable. + (mangle_class_name_for_template): Change prototype. Use + additional function context to name local classes in templates + correctly. + (classtype_mangled_name): Pass the context. + (push_template_decl): Handle local classes and templates, and + member functions for such classes. + (convert_nontype_parameter): Fix handling of pointer-to-member + constants. + (lookup_template_class): Handle local classes in templates. + (tsubst): Likewise. Don't assume that template instantiations + have external linkage; pay attention to the template declaration. + (mark_decl_instantiated): Likewise. + (begin_tree): New function. + (end_tree): Likewise. + + * decl.c (xref_basetypes): Don't call complete_type for basetypes + that involve template parameters; that can lead to infinite + recursion unnecessarily. + + * pt.c (register_specialization): Do not register specializations + that aren't ready to be registered yet. + (check_explicit_specialization): Handle explicit specialization of + constructors and destructors. + (build_template_decl): New function. + (push_template_delc): Handle out-of-class specializations of + member templates. + + * pt.c (check_explicit_specialization): Set up the template + information before registering the specialization. + (coerce_template_parms): Fix thinko. + (tsubst): Handle specializations of member templates correctly. + + * class.c (finish_struct_methods): Remove calls to + check_explicit_specialization from here. + (finish_struct): And insert them here. + * cp-tree.h (perform_qualification_conversions): New function. + (perform_array_to_pointer_conversion): Likewise. + (begin_explicit_instantiation): Likewise. + (end_explicit_instantiation): Likewise. + (determine_specialization): Renamed from + determine_explicit_specialization. + (comp_template_parms): New function. + (processing_explicit_instantiation): New variable. + * cvt.c (perform_qualification_conversions): New function. + (perform_array_to_pointer_conversion): Likewise. + * decl.c (duplicate_decls): Don't consider template functions + alike unless they have the same parameters. Refine handling of + instantiation/specialization mismatches. + (start_decl): Don't call pushdecl for template specializations, + since they don't affect overloading. + (start_function): Likewise. + (grokfndecl): Call check_explicit_specialization a little later. + Don't call duplicate_decls for memberm template specializations. + (grokdeclarator): Don't update template_count for classes that are + themselves specializations. Remove use of `2' as parameter to + grokfndecl since that value isn't used. + * lex.c (cons_up_default_function): Save and restore + processing_explicit_instantiation around calls to grokfield. + * parse.y (finish_member_template_decl): New function. + (component_decl_1): Use it. + (fn.def2): Likewise. + (template_arg_list_opt): New nonterminal. + (template_type): Use it. + (self_template_type): Likewise. + (template_id): Likewise. + (object_template_id): Likewise. + (notype_template_declarator): Likwise. + (begin_explicit_instantiation): Likewise. + (end_explicit_instantiation): Likewise. + (explicit_instantiation): Use them. + * pt.c (coerce_template_parms): Add parameters. + (processing_explicit_instantiation): New variable. + (convert_nontype_parameter): New function. + (determine_overloaded_function): Likewise. + (begin_explicit_instantiation): Likewise. + (end_explicit_instantiation): Likewise. + (retrieve_specialization): Likewise. + (register_specialization): Likewise. + (processing_explicit_specialization): Removed. + (determine_specialization): Handle specializations of member + functions of template class instantiations. + (check_explicit_specialization): Refine to conform to standard. + (comp_template_parms): New function. + (coerce_template_parms): Call convert_nontype_parameter. + (tsubst): Refine handling of member templates. Use + register_specialization. + (instantiate_template): Use retrieve_specialization. + (do_decl_instantiation): Likewise. + (instantiate_decl): Likewise. + (type_unification): Improve handling of explicit template + arguments. + * tree.c (mapcar): Return error_mark_node, rather than aborting, + on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS. + * typeck.c (build_unary_op): Call determine_specialization, rather + than determine_explicit_specialization. + +Mon Jan 19 13:18:51 1998 Jason Merrill + + * cvt.c (build_up_reference): A TARGET_EXPR has side effects. + +Fri Jan 16 11:40:50 1998 Bruno Haible + + * error.c (dump_decl): For enum tags, output the tag, not its value. + +1998-01-13 Brendan Kehoe + + * decl.c (init_decl_processing): Only call init_rtti_processing + FLAG_RTTI is set. + +Mon Jan 12 01:35:18 1998 Jason Merrill + + * init.c (build_new_1): Split out from build_new. + (build_new): Just return a NEW_EXPR. + * expr.c (cplus_expand_expr): Handle NEW_EXPR. + + * decl2.c (get_temp_regvar): Tweak. + + * cp-tree.h (TREE_CALLS_NEW): Comment out. + * class.c (resolves_to_fixed_type_p): Remove use. + * method.c (build_opfncall): Likewise. + * call.c (build_new_op): Likewise. + +Wed Jan 7 23:47:13 1998 Jason Merrill + + * exception.cc (__eh_alloc, __eh_free): New fns. + (__cp_push_exception, __cp_pop_exception): Use them. + (__uncatch_exception): Call terminate here if no exception. + * except.c (build_terminate_handler): New fn. + (expand_start_catch_block): Use it. + (expand_exception_blocks): Likewise. + (alloc_eh_object): New fn. + (expand_throw): Use it. Protect exception init with terminate. + * typeck.c (build_modify_expr): Remove code that ignores trivial + methods. + diff --git a/gcc/cp/ChangeLog-1999 b/gcc/cp/ChangeLog-1999 new file mode 100644 index 0000000..b89cd35 --- /dev/null +++ b/gcc/cp/ChangeLog-1999 @@ -0,0 +1,6787 @@ +1999-12-31 Mark Mitchell + + * cp-tree.h (VF_NORMAL_VALUE): Remove. + * class.c (struct base_info): Remove vfield, vfields, and rtti. + (set_primary_base): New function, split out from ... + (finish_base_struct): ... here. Rename to ... + (determine_primary_base): ... this. Simplify. + (create_vtable_ptr): Tweak accordingly. + (finish_struct_1): Simplify. + + * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation. + (CLASSTYPE_N_BASECLASSES): Likewise. + (BINFO_FOR_VBASE): New macro. + (get_vbase_types): Change prototype. + * class.c (build_vbase_path): Use BINFO_FOR_VBASE. + (prepare_fresh_vtable): Likewise. + (finish_vtbls): Likewise. + (get_class_offset_1): Likewise. + (modify_all_indirect_vtables): Likewise. + (build_vbase_pointer_fields): Likewise. + * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here. + * init.c (sort_base_init): Use BINFO_FOR_VBASE. + (expand_member_init): Likewise. + * search.c (get_base_distance): Likewise. + (lookup_field_queue_p): Likewise. + (virtual_context): Likewise. + (get_vbase_types): Don't return a value. Set + CLASSTYPE_VBASECLASSES here. + * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE. + +1999-12-30 Mark Mitchell + + * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS. + +1999-12-29 Mark Mitchell + + * class.c (create_vtable_ptr): Put the vtable at the beginning of + the class, not the end, in the new ABI. + * tree.c (propagate_binfo_offsets): Do the right thing for the new + ABI. + +1999-12-29 Mark Mitchell + + * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy. + (CLASSTYPE_NEARLY_EMPTY_P): New macro. + * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P. + (check_field_decls): Likewise. + (check_bases_and_members): Likewise. + +1999-12-28 Mark Mitchell + + * cp-tree.h (do_inline_function_hair): Remove. + * class.c (layout_class_type): New function, split out from + finish_struct_1. + (fixup_pending_inline): Likewise. + (fixup_inline_methods): New function. + * method.c (fixup_pending_inline): Remove. + (do_inline_function_hair): Likewise. + + * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the + new ABI. + + * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals. + (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ... + (CLASSTYPE_PURE_VIRTUALS): ... this. + (lang_decl_flags): Replace abstract_virtual with pure_virtual. + (DECL_ABSTRACT_VIRTUAL_P): Rename to ... + (DECL_PURE_VIRTUAL_P): ... this. + (get_abstract_virtuals): Rename to ... + (get_pure_virtuals): ... this. + * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with + DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with + CLASSTYPE_PURE_VIRTUALS. + * class.c (build_vtable_entry): Likewise. + (finish_struct_bits): Likewise. Call get_pure_virtuals, not + get_abstract_virtuals. + (build_vtbl_initializer): Likewise. + (override_one_vtable): Likewise. + (check_methods): Likewise. + * decl.c (duplicate_decls): Likewise. + (redeclaration_error_message): Likewise. + (lang_mark_tree): Likewise. + * decl2.c (grok_function_init): Likewise. + (import_export_vtable): Likewise. + (import_expor_class): Likewise. + * typeck2.c (abstract_virtuals_error): Likewise. + * xref.c (GNU_xref_member): Likewise. + * search.c (get_abstract_virtuals): Rename to get_pure_virtuals. + +1999-12-26 Zack Weinberg + + * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING + throughout. + +1999-12-26 Mark Mitchell + + * decl.c (store_return_init): Use mode of old RTL generated for + DECL_RESULT, not the mode of DECL_RESULT itself. + * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE + for functions that used named return values. + +1999-12-24 Mark Mitchell + + * semantics.c (expand_body): Use + note_deferral_of_defined_inline_function. + +1999-12-22 Mark Mitchell + + * dump.c (dequeue_and_dump): Handle CTOR_STMTs. + +1999-12-22 Alexandre Oliva + + * error.c (dump_decl): Support named return values. + +1999-12-20 Mark Mitchell + + * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments. + (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro. + (CLASSTYPE_PRIMARY_BINFO): Likewise. + * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF, + TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here. + (check_bases_and_members): Set them here instead. + (create_vtable_ptr): New function, split out from ... + (finish_struct_1): ... here. Use it. Tidy. Use + CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO. + * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as + the first field in the class. + * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle + seeing TYPE_VFIELD as the first field in the class. + + * cp-tree.h (TYPE_VIRTUAL_P): Rename to ... + (TYPE_POLYMORPHIC_P): ... this. + (TYPE_USES_COMPLEX_INHERITANCE): Rename to ... + (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this. + (TREE_CALLS_NEW): Remove. + (TREE_MANGLED): Likewise. + * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, + and TYPE_POLYMORPHIC_P. + * class.c (check_bases): Likewise. + (finish_base_struct): Likewise. + (finish_struct_bits): Likewise. + (check_for_override): Likewise. + (finish_struct_1): Likewise. + (get_vfield_name): Likewise. + * decl.c (xref_basetypes): Likewise. + * decl2.c (import_export_class): Likewise. + (import_export_decl): Likewise. + * error.c (dump_function_decl): Likewise. + * pt.c (instantiate_class_template): Likewise. + * repo.c (repo_inline_used): Likewise. + * rtti.c (build_headof): Likewise. + (get_tinfo_fn_dynamic): Likewise. + (build_x_typeid): Likewise. + (get_tinfo_var): Likewise. + (build_dynamic_cast_1): Likewise. + (synthesize_tinfo_fn): Likewise. + * search.c (lookup_field_1): Likewise. + (dfs_debug_mark): Likewise. + (maybe_suppress_debug_info): Likewise. + * typeck.c (build_component_ref): Likewise. + (build_component_addr): Likewise. + * typeck2.c (process_init_constructor): Likewise. + +1999-12-20 Nathan Sidwell + + * typeck.c (strip_all_pointer_quals): New static function. + (build_static_cast): Use it. Don't use at_least_as_qualified_p. + +1999-12-16 Mark Mitchell + + * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE. + (dso_handle_node): New macro. + (flag_use_cxa_atexit): New variable. + (declare_global_var): New function. + (start_anon_func): Remove declaration. + (end_anon_func): Likewise. + * decl.c (get_atexit_node): New function, split out from + destroy_local_static. Handle flag_use_cxa_atexit. + (get_dso_handle_node): Likewise. + (start_cleanup_fn): Renamed from start_anon_func. Moved here from + except.c. Handle flag_use_cxa_atexit. + (end_cleanup_fn): Renamed from end_anon_func. Moved here from + except.c. + (declare_global_var): New variable. + (destroy_local_static): Handle flag_use_cxa_atexit. + * decl2.c (flag_use_cxa_atexit): New variable. + (lang_f_options): Likewise. + * except.c (start_anon_func): Remove. + (end_anon_func): Liekwise. + * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit. + * rtti.c (get_tinfo_var): Use declare_global_var. + +1999-12-16 Mark Mitchell + + * class.c (check_field_decls): Don't return a value. + (avoid_overlap): Moved here from tree.c. + (build_base_fields): Likewise. + (check_bases): New function, split out from finish_base_struct. + (check_bases_and_members): New function, split out from + finish_struct_1. + (struct base_info): Remove cant_have_default_ctor, + cant_have_const_ctor, cant_have_asn_ref. + (finish_base_struct): Split semantic analysis into check_bases. + (finish_struct_methods): Fix bogus assertion. + (check_field_decls): Call finish_struct_anon here. + (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES. + (finish_struct_1): Use check_bases_and_members. Reorganize. + * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. + (build_base_fields): Don't declare. + * tree.c (avoid_overlap): Remove. + (build_base_fields): Likewise. + + * optimize.c (struct inline_data): Remove scope_stmt. + (remap_block): Don't use insert_block_after_note. Don't update + scope_stmt. + (expand_call_inline): Don't update scope_stmt. + (optimize_function): Don't initialize scope_stmt. + * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted + NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes. + +1999-12-15 Mark Mitchell + + * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS + out of the class, rather than taking them as parameters. + (build_vbase_pointer_fields): Move here from tree.c. + (build_vtbl_or_vbase_field): New function. + (check_methods): Likewise. + (remove_zero_width_bitfields): Likewise. + (add_virtual_function): Use tree_cons instead of temp_tree_cons. + (delete_duplicate_fields_1): Tidy. Don't delete duplicate + USING_DECLs here. + (finish_struct_methods): Handle the case where there are no + methods here. + (get_basefndecls): Use tree_cons instead of temp_tree_cons. + (check_field_decls): Call delete_duplicate_fields here. + (finish_struct_1): Tidy. Use check_methods and + remove_zero_width_bitfields. + * cp-tree.h (build_vbase_pointer_fields): Remove. + * decl.c (grokdeclarator): Use tree_cons instead of + temp_tree_cons. + * decl2.c (qualified_lookup_using_namespace): Use tree_cons + instead of temp_tree_cons. + * lex.c (cons_up_default_function): Remove dead code. + * method.c (fixup_pending_inline): New function, split out from ... + (do_inline_function_hair): ... here. + * tree.c (build_vbase_pointer_fields): Remove. + +1999-12-15 Jason Merrill + + * tree.c (walk_tree): Walk operand subtrees in forward order. + * optimize.c (expand_call_inline): Likewise. + (optimize_function): Initialize id->scope_stmt to something useful. + (remap_block): Assume id->scope_stmt has a useful value. + +1999-12-15 Nathan Sidwell + + * typeck.c (build_c_cast): Expand warning message. Move pointer + alignment warning to after the cast. Don't warn about pointer + alignment when given a pointer to incomplete. + +1999-12-15 Richard Henderson + + * cp-tree.h (make_aggr_type): Declare. + * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE. + (make_aggr_type): New. + + * decl.c (build_typename_type, init_decl_processing): Use it. + (build_ptrmemfunc_type, xref_tag): Likewise. + * except.c (call_eh_info): Likewise. + * init.c (init_init_processing): Likewise. + * pt.c (process_template_parm, lookup_template_class): Likewise. + * rtti.c (expand_class_desc): Likewise. + * semantics.c (begin_class_definition, finish_typeof): Likewise. + * tree.c (copy_template_template_parm): Likewise. + +1999-12-15 Jason Merrill + + * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using + sizeof (struct tree_common). + +1999-12-14 Jason Merrill + + * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the + outermost block to point to the inlined function decl. + + * error.c (dump_decl): operator==, not operator ==. + (op_to_string): Likewise. + + * decl.c (compute_array_index_type): Handle null name. + + * decl2.c (ambiguous_decl): Fix to match comment. + (lookup_using_namespace): Adjust. + + * decl2.c (import_export_class): Don't ignore dllimport. + +1999-12-14 Mark Mitchell + + * class.c (check_field_decls): Split out from ... + (finish_struct_1): ... here. Use it. Tidy. + + * cp-tree.h (remap_save_expr): Add walk_subtrees parameter. + * optimize.c (copy_body_r): Pass it. + * tree.c (remap_save_expr): Clear walk_subtrees for an + already-handled SAVE_EXPR. + (cp_unsave_r): Pass walk_subtrees to remap_save_expr. + + * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS. + * ir.texi (DECL_NAMESPACE_ALIAS): Document it. + + * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION. + +1999-12-14 Mumit Khan + + * class.c (finish_base_struct): Allow multiple COM base classes + as well as non-COM bases as long as it's not the leftmost. + +1999-12-13 Mumit Khan + + * lex.c (saving_parse_to_obstack): New global. + (reinit_parse_for_block): Use. + (reinit_parse_for_expr): Use. + (check_newline): Use. + +1999-12-13 Mark Mitchell + + * optimize.c (initialize_inlined_parameters): Take FN to which the + parameters belong as an argument. + (expand_call_inline): Expand calls into the parameter + initializations before pushing the function onto the list of + functions we are presently expanding. + +1999-12-11 Kaveh R. Ghazi + + * class.c (get_vtable_name): Use a literal format string and + VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT. + (prepare_fresh_vtable): Likewise. + + * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of + VTABLE_NAME_FORMAT. + + * decl.c (make_rtl_for_local_static): Remove unused variable `type'. + + * init.c (build_vec_init): Initialize variable `try_body'. + + * lex.c (yyerror): Don't call a variadic function with a + non-literal format string. + + * optimize.c (optimize_function): Call memset, not bzero. + + * pt.c (for_each_template_parm_r): Add static prototype. + +1999-12-09 Andreas Jaeger + + * except.c (expand_throw): Add static attribute to match + prototype. + + * Makefile.in (semantics.o): Add dependency on output.h. + * semantics.c: Include output.h for declaration of + make_function_rtl. + +1999-12-09 Mark Mitchell + + * decl.c (init_decl_processing): Reenable inlining on trees. + (finish_function): Likewise. + * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here. + * semantics.c (simplify_aggr_init_exprs): New function. + (expand_body): Use it. + * tree.c (walk_tree): Special-case TARGET_EXPRs since they + sometimes present the same sub-tree twice. + + * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not + `csl'. + + * semantics.c (finish_switch_cond): Do conversions here, not ... + * typeck.c (c_expand_start_case): Here. + + * semantics.c (do_poplevel): Remove unused variable. + +1999-12-06 Mark Mitchell + + * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE + unless we're declaring the variable in question. + +1999-12-06 Mark Mitchell + + * decl.c (init_decl_processing): #if 0 last patch. + (finish_function): Likewise. + +1999-12-05 Mark Mitchell + + * decl.c (init_decl_processing): Set flag_inline_trees if + !flag_no_inline. + + * cp-tree.h (calls_setjmp_p): Declare. + * decl.c (finish_function): Mark functions that call setjmp as + uninlinable. + * optimize.c (calls_setjmp_r): New function. + (calls_setjmp_p): Likewise. + +1999-12-04 Mark Mitchell + + * optimize.c (expand_call_inline): Wrap the expanded call in an + EXPR_WITH_FILE_LOCATION node to get correct line numbers for + inlined functions. + + * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add + in_target_cleanup_p. + (remap_decl): New function. + (remap_block): Likewise. + (copy_scope_stmt): Likewise. + (copy_body_r): Use remap_decl and copy_scope_stmt. + (copy_body): Use VARRAY_TOP_TREE. + (initialize_inlined_parameters): Likewise. + (declare_return_variable): Likewise. + (inlinable_function_p): Check flag_inline_trees. + (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs + specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the + parameters of the inlined function. + (optimize_function): Prevent recursion into partially complete + functions. + + * cp-tree.def (SCOPE_STMT): Take one operand. + * cp-tree.h (SCOPE_STMT_BLOCK): New macro. + (SCOPE_NULLIFIED_P): Redefine. + (SCOPE_NO_CLEANUPS_P): New macro. + (add_scope_stmt): Change prototype. + * decl.c (poplevel): Tidy. Warn about unused variables here. + Record SCOPE_STMT_BLOCKs. + (finish_function): Keep DECL_INITIAL for functions that might be + inlined. + * ir.texi: Document SCOPE_NO_CLEANUPS_P. + * semantics.c: Include rtl.h. + (add_scope_stmt): Return the new scope statement and, for an + end-of-scope statement, its matching begin statement. Don't set + SCOPE_NULLIFIED_P. + (do_pushlevel): Simplify, now that we are always + function-at-a-time. + (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs. + (expand_stmt): Don't call expand_start_bindings or + expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set. + * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting + SCOPE_NULLIFIED_P. + * Makefile.in (semantics.o): Depend on RTL_H. + + * decl2.c (pending_statics_used): Make it a macro. + (saved_inlines_used): Likewise. + (finish_static_data_member_decl): Use VARRAY_PUSH_TREE. + (mark_inline_for_output): Likewise. + (ssdf_decls_used): Remove. + (start_static_storage_duration_function): Use VARRAY_PUSH_TREE. + (generate_ctor_or_dtor_function): Adjust accordingly. + +1999-11-24 Geoffrey Keating + Greg McGary + + * decl.c (duplicate_decls): Merge + DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, + DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK. + +1999-12-02 Mike Stump + + * init.c (perform_member_init): Handle parse errors better. + +1999-12-01 Mark Mitchell + + * cp-tree.h (min_tree_cons): Remove. + (scratch_ovl_cons): Likewise. + * decl.c (saveable_obstack): Don't declare. + (duplicate_decls): Tweak error-message. + (initialize_local_var): Explicitly mark the definition as static. + (finish_function): Call permanent_allocation, just so + that the middle-end sees the obstacks it expects. + (mark_cp_function_context): Likewise. + * init.c (build_new): Don't use min_tree_cons. + * lex.c (permanent_obstack): Don't declare. + (current_obstack, saveable_obstack): Likewise. + * spew.c (current_obstack, saveable_obstack): Likewise. + * tree.c (current_obstack, saveable_obstack): Likewise. + (scratch_ovl_cons): Remove. + (build_min_nt): Don't mess with obstacks. + (build_min): Likewise. + (min_tree_cons): Remove + * typeck.c (build_component_ref): Don't use scratch_ovl_cons. + (build_x_function_call): Likewise. + (build_c_cast): Don't use min_tree_cons. + +1999-11-29 Mark Mitchell + + * pt.c (tsubst_decl): Robustify. + +1999-11-27 Mark Mitchell + + * decl2.c (finish_file): Call expand_body for inline functions + that will be written out but that do not yet have RTL. + * semantics.c (expand_body): Do not generate RTL For inline + functions that do not yet need to be written out. + +1999-11-25 Mark Mitchell + + * Make-lang.in (CXX_SRCS): Add optimize.c. + * Makefile.in (CXX_OBJS): Add optimize.o. + (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H). + (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust. + (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise. + (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise. + (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise. + (dump.o): Likewise. + (optimize.o): New target. + * class.c: Don't include splay-tree.h. + * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT. + * cp-tree.h: Include splay-tree.h. + (DECL_UNINLINABLE): New macro. + (CTOR_BEGIN_P, CTOR_END_P): New macros. + (flag_inline_trees): New variable. + (local_variable_p): New function. + (nonstatic_local_decl_p): Likewise. + (optimize_function): Likewise. + (cplus_unsave_expr_now): Remove. + (copy_tree_r): Declare. + (remap_save_expr): Likewise. + * decl.c (local_variable_p): Don't + make it static. + (local_variable_p_walkfn): New function. + (make_rtl_for_local_static): Remove code to try to avoid writing + out static constants. + (emit_local_var): Fix indentation. + (nonstatic_local_decl_p): New function. + (check_default_argument): Use local_variable_p_walkfn, not + local_variable_p, when walking the tree. + (start_function): Set the DECL_CONTEXT for automatically generated + labels. + (finish_constructor_body): Use CTOR_STMT to mark the end of a + constructor. + * decl2.c: Don't include splay-tree.h. + (flag_inline_trees): Define. + * dump.c: Don't include + splay-tree.h. + * except.c (expand_end_catch_block): Fix comment formatting. + (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables. + (expand_throw): Tidy comment. + * init.c (build_vec_delete_1): Use create_temporary_var. + * lex.c (cplus_tree_code_type): Make it static. + (cplus_tree_code_length): Likewise. + (cplus_tree_code_name): Likewise. + * optimize.c: New file. + * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions + with computed gotos. + (setup_vtbl_ptr): Mark the beginnings of constructors with + CTOR_STMT. + (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE. + (expand_body): Call optimize_function. Save bodies if we're doing + inlining on trees. + * tree.c: Don't include splay-tree.h. Include insn-config.h and + integrate.h. + (copy_tree_r): Make it public. + (statement_code_p): New function. + (mark_local_for_remap_r): Likewise. + (cp_usave_r): Likewise. + (cp_unsave): Likewise. + (build_cplus_new): Set DECL_CONTEXT for temporary variables. + (walk_tree): Walk into `s' class nodes. Walk statement chains. + (copy_tree_r): Handle 's' class nodes. Restore chains for + statements. Nullify scopes. Don't copy types. + (init_tree): Set lang_unsave to cp_unsave. + (remap_save_expr): Define. + * ir.texi: Document CTOR_STMT. + +1999-11-24 Jason Merrill + + * search.c (note_debug_info_needed): Do perform this optimization + for dwarf2. + (maybe_suppress_debug_info): Likewise. Start by clearing + TYPE_DECL_SUPPRESS_DEBUG. + +1999-11-24 Mark Mitchell + + * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs. + + * decl2.c (finish_vtable_vardecl): Don't prune vtables here. + +1999-11-23 Kaveh R. Ghazi + + * decl.c (pushdecl, grokdeclarator): Don't call a variadic + function with a non-literal format string. + + * lex.c (do_identifier): Likewise. + + * typeck.c (build_unary_op): Likewise. + +1999-11-23 Mark Mitchell + + * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation. + +1999-11-22 Mark Mitchell + + * cp-tree.def (CTOR_COMPLETE): New tree node. + * decl.c (finish_constructor_body): Add it, to mark the end of the + constructor. + (finish_function): Don't call end_protect_partials here. + * ir.texi (CTOR_COMPLETE): Document it. + * semantics.c (expand_stmt): Handle it. + + * cp-tree.def (FUNCTION_NAME): New tree node. + * cp-tree.h (current_function_name_declared): Tweak documentation. + (lang_decl_flags): Add pretty_function_p, adjust dummy. + (DECL_PRETTY_FUNCTION_P): New macro. + * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__, + etc., in a template function. Use at_function_scope_p instead of + expanding it inline. + * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations + specially. + (tsubst): Handle FUNCTION_NAME. + (tsubst_copy): Likewise. + (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__, + etc. in instantiation. + * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc., + even in template functions. + (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the + conditional scope at the top of a destructor. + + * error.c (dump_function_decl): Use `[ with ... ]' syntax for + specializations too. + +1999-11-22 Nathan Sidwell + + * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT + when actually negative. + + * typeck.c (convert_for_assignment): Expand comment about + strange NULL check, moved from ... + (convert_for_initialization): ... here. Remove unneeded + code. + +1999-11-21 Alexandre Oliva + + * cp-tree.h (build_vec_delete): Remove `auto_delete' argument. + * init.c (build_vec_delete, build_vec_delete_1): Likewise. + Always destruct virtual bases of array components, but never + delete them. + (build_vec_init): Adjust invocations. + (build_delete): Likewise. + * decl2.c (delete_sanity): Likewise. + +1999-11-19 Nathan Sidwell + + * cp-tree.h (grok_method_quals): Return this pointer qualifiers. + * decl.c (grokdeclarator): Adjust calls to grok_method_quals. + * decl2.c (grok_method_quals): Accept `restrict' as applying to + the object pointer. Return such qualifiers. + (grokclassfn): Apply this pointer qualifiers. Cleanup unused + variables. + +1999-11-18 Mark Mitchell + + * except.c (expand_end_catch_block): Fix typo. + (expand_exception_blocks): Simplify. Don't call + expand_leftover_cleanups. + +1999-11-15 Jason Merrill + + * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic. + * pt.c (tsubst, case INTEGER_TYPE): Call it. + Check uses_template_parms. + + * class.c (finish_struct): If we're a local class in a template + function, add a TAG_DEFN. + * pt.c (lookup_template_class): If this is a local class in a + template function, call pushtag. + (tsubst_expr, case TAG_DEFN): Handle classes, too. + + Emit debug info with the vtable. + * search.c (maybe_suppress_debug_info): New function... + * class.c (finish_struct_1): ...split out from here. + * cp-tree.h: Declare it. + * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG + if we're writing out the vtable. + * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, + note_debug_info_needed): #if 0 out. + +1999-11-14 Mark Mitchell + + * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. + * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not + TREE_PERMANENT. + * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P. + * decl2.c (lookup_arg_dependent): Use it. + + * cp-tree.h (cp_finish_decl): Change prototype. + (finish_static_data_member_decl): Likewise. + (push_permanent_obstack): Remove declaration. + (push_expression_obstack): Likewise. + (push_scratch_obstack): Likewise. + (DECL_TEMPLATE_PARM_P): Robustify. + (SET_DECL_TEMPLATE_PARM_P): New macro. + * class.c (add_method): Don't manipulate obstacks. + (finish_vtbls): Likewise. + * cvt.c (build_up_reference): Adjust calls to cp_finish_decl. + * decl.c (binding_for_name): Don't manipulate obstacks. + (maybe_push_to_top_level): Likewise. + (pop_from_top_level): Likewise. + (duplicate_decls): Likewise. + (pushdecl): Likewise. + (implicitly_declare): Likewise. + (build_typename_type): Likewise. + (start_decl): Likewise. + (cp_finish_decl): Likewise. + (finish_decl): Likewise. + (destroy_local_static): Likewise. + (expand_static_init): Likewise. + (complete_array_type): Likewise. + (grokvardecl): Likewise. + (build_ptrmemfnc_type): Likewise. + (grokdeclarator): Likewise. + (xref_tag): Likewise. + (xref_basetypes): Likewise. + (start_enum): Likewise. + (finish_enum): Likewise. + (start_function): Likewise. + (finish_function): Likewise. + (start_method): Adjust call to cp_finish_decl. + * decl2.c (finish_static_data_member_decl): Don't manipulate + obstacks. + (grokfield): Likewise. + (grokbitfield): Likewise. + (get_temp_name): Likewise. + (get_sentry): Likewise. + (fnish_file): Likewise. + (lookup_arg_dependent): Likewise. + * except.c (call_eh_info): Likewise. + (push_eh_info): Likewise. + (do_pop_exception): Likewise. + (initialize_handler_parm): Likewise. + (expand_end_eh_spec): Likewise. + (alloc_eh_object): Likewise. + (expand_throw): Likewise. + * expr.c (extract_scalar_init): Likewise. + * init.c (build_java_class_ref): Likewise. + * lex.c (get_time_identifier): Likewise. + (snarf_defarg): Likewise. + (add_defarg_fn): Likewise. + (is_global): Simplify. + (do_identifier): Don't check TREE_PERMANENT. + * method.c (emit_thunk): Don't manipulate obstacks. + * parse.y (condition): Adjust call to cp_finish_decl. + (primary): Likewise. + (initdcl): Likewise. + (initdcl0_innards): Likewise. + (nomods_initdcl0): Likewise. + * pt.c (push_inline_template_parms_recursive): Use + SET_DECL_TEMPLATE_PARM_P. + (process_template_parm): Likewise. + (lookup_template_class): Don't manipulate obstacks. + (instantiate_class_template): Adjust call to + finish_static_data_member_decl. + (tsubst_decl): Don't manipulate obstacks. + (tsubst_expr): Likewise. + (instantiate_template): Likewise. + (instantiate_decl): Adjust calls to cp_finish_decl. + * rtti.c (call_void_fn): Don't manipulate obstacks. + (get_tinfo_var): Likewise. + (get_tinfo_fn_unused): Likewise. + (build_dynamic_cast_1): Likewise. + (expand_si_desc): Likewise. + (expand_class_desc): Likewise. + (expand_ptr_desc): Likewise. + (expand_attr_desc): Likewise. + (expand_generic_desc): Likewise. + (synthesize_tinfo_fn): Likewise. + * search.c (expand_upcast_fixups): Likewise. + * semantics.c (finish_asm_stmt): Likewise. + (finish_named_return_value): Likewise. + (begin_class_definition): Likewise. + (finish_class_definition): Likewise. + (finish_typeof): Likewise. + * tree.c (build_cplus_method_type): Likewise. + (reverse_path): Likewise. + (copy_template_template_parm): Likewise. + (build_expr_ptr_wrapper): Likewise. + (push_expression_obstack): Remove. + (push_permanent_obstack): Likewise. + * typeck.c (mark_addressable): Likewise. + +1999-11-13 Mark Mitchell + + * call.c (build_conditional_expr): Use build_target_expr_with_type. + (convert_like): Likewise. + (build_over_call): Likewise. + * cp-tree.h (build_target_expr): Remove. + (build_target_expr_with_type): New function. + * cvt.c (build_up_reference): Use get_target_expr. + * decl.c (build_target_expr): Move to ... + * tree.c (build_target_expr): Here. Make it static. + (build_target_expr_with_type): New function. Set DECL_CONTEXT on + the temporary VAR_DECLs. + (get_target_expr): Use it. + +1999-11-13 Jason Merrill + + * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT. + * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT. + * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn. + * class.c (set_rtti_entry): Use it. + +1999-11-12 Mark Mitchell + + * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups + here. + * semantics.c (finish_expr_stmt): Call it here instead. Move + default_conversion logic to semantic-analysis time. + +1999-11-12 Jason Merrill + + * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT. + +Fri Nov 12 12:56:32 MST 1999 Diego Novillo + + * init.c (init_init_processing): Re-instated Nov 11 patch after + approval. + +Fri Nov 12 10:42:02 MST 1999 Diego Novillo + + * init.c (init_init_processing): Undo patch from Nov 11, 1999. + Patch had not been approved yet. + +1999-11-12 Mark Mitchell + + * decl.c (compute_array_index_type): New function, split out from + grokdeclarator. + (create_array_type_for_decl): Likewise. + (grokdeclarator): Use them. + + * semantics.c (expand_stmt): Don't suspend_momentary or + resume_momentary. + +Thu Nov 11 12:42:11 MST 1999 Diego Novillo + + * init.c (init_init_processing): Header information for + arrays allocated via `new' should have the same alignment used by + malloc. + +1999-11-10 Mark Mitchell + + * error.c (dump_function_name): Don't crash if given a friend + pseudo-instantiation. + + * cp-tree.h (build_enumerator): Change prototype. + * decl.c (enum_next_value): Remove. + (enum_overflow): Likewise. + (init_decl_processing): Don't register enum_next_value as a root. + (start_enum): Clear TYPE_VALUES for a redefined enum. + (finish_enum): Reset the type of enumeration constants. + (build_enumerator): Fix indentation. Don't copy CONST_DECLs when + we don't need to. Maintain the TYPE_VALUES list and look there + for the previously defined enumeration constant. Let enumeration + constants have the type of their values until the enumeration type + is complete. + * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value. + (structsp): Adjust. + * parse.c: Regenerated. + * pt.c (tsubst_enum): Adjust according to build_enumerator changes. + +Wed Nov 10 12:43:21 1999 Philippe De Muyter + Kaveh R. Ghazi + + * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. + +1999-11-09 Mark Mitchell + + * cp-tree.h (language_function): Remove x_last_dtor_insn and + x_last_parm_cleanup_insn. + * decl.c (last_dtor_insn): Remove. + (last_parm_cleanup_insn): Likewise. + (expand_start_early_try_stmts): Don't set them. + (store_parm_decls): Likewise. + (save_function_data): Or save them. + (mark_lang_function): Or mark them. + +1999-11-08 Mark Mitchell + + * decl.c (store_parm_decls): Generate cleanup code at + semantic-analysis time. Destroy objects in the correct order. + +1999-11-07 Mark Mitchell + + * cp-tree.h (begin_new_placement): Remove. + (finish_new_placement): Likewise. + * class.c (finish_struct_1): Don't suspend_momentary or + resume_momentary. + * decl.c (grokdeclarator): Likewise. + (maybe_build_cleanup_1): Likewise. + * except.c (push_eh_cleanup): Likewise. + (build_terminate_handler): Likewise. + * init.c (build_new_1): Likewise. + * parse.y (parse_decl): Change prototype. + (initdecls, notype_initdecls, initdcl): Don't return int. + (initdcl0, notype_initdcl0, initdcl0_innards): Likewise. + (.begin_new_placement): Remove. + (.finish_new_placement): Likewise. + (nonmomentary_expr): Likewise. + (suspend_mom): Likewise. + (condition): Don't suspend_momentary, resume_momentary, or keep + track of need to resume. + (unary_expr): Likewise. + (new_placement): Likewise. + (decl): Likewise. + (structsp): Likewise. + (new_type_id): Likewise. + (maybe_parmlist): Likewise. + (direct_after_type_declaration): Likewise. + (direct_new_declarator): Likewise. + (direct_abstract_declaration): Likewise. + * parse.c: Regenerated. + * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary. + * semantics.c (begin_new_placement): Remove. + (finish_new_placement): Likewise. + +1999-11-05 Martin v. Löwis + + * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro. + (DECL_TEMPLATE_INFO): Use it. + * decl.c (warn_extern_redeclared_static): Do nothing for + TEMPLATE_DECLs. + * decl2.c (mark_used): Explicitly check for function or variable. + * semantics.c (finish_unary_op_expr): Check whether result is also + an INTEGER_CST. + +1999-11-05 Mark Mitchell + + * Makefile.in (typeck2.o): Depend on output.h. + * typeck2.c: Include output.h. + + * decl.c (flag_ansi): Remove declaration. + + * pt.c (tinst_level_tick): Make it static. + (last_template_error_tick): Likewise. + + * cp-tree.h (mapcar): Remove declaration. + (search_tree): Likewise. + (walk_tree_fn): New typedef. + (walk_tree): New function. + * tree.c (bot_manip): Change prototype. Adjust to be called via + walk_tree. + (bot_replace): Likewise. + (no_linkage_helper): Likewise. + (copy_tree_r): New function. + (search_tree): Rename, and adjust, to become ... + (walk_tree): New function. + (mapcar): Remove. + (target_remap): Remove. + (target_remap_count): Likewise. + (break_out_target_exprs): Use walk_tree. + * decl.c (local_variable_p): Change prototype. + (check_default_argument): Use walk_tree. + * pt.c (for_each_template_parm_r): New function, split out from ... + (for_each_template_parm): Here. Use it, via walk_tree. + +1999-11-03 Mark Mitchell + + * class.c (check_bitfield_decl): New function, split out from + finish_stuct_1. + (check_field_decl): Likewise. Recursively examine members of + anonymous structs. + (finish_struct_1): Use them. + * cp-tree.h (ANON_UNION_TYPE_P): New macro. + +1999-11-02 Mark Mitchell + + * decl.c (grokfndecl): Remove dead code. + + * dump.c (dequeue_and_dump): Fix thinko for catch-clauses. + +1999-11-02 Scott Snyder + + * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and + IMAGPART_EXPR. + * pt.c (tsubst_copy): Likewise. + +1999-11-01 Jason Merrill + + * decl2.c (maybe_make_one_only): Always make things comdat on + ELF targets, too. + +1999-10-31 Mark Mitchell + + * decl.c (finish_function): Call free_after_parsing for functions + we are not immediately turning into RTL. + +1999-10-31 Brendan Kehoe + + * cp-tree.h (flag_dump_translation_unit): Add decl. + +Sat Oct 30 22:42:50 1999 Stephen L Moshier + + * lex.c (yylex): Accept 'f' in mantissa of hex float constant. + +1999-10-30 Mark Mitchell + + * decl.c (pop_cp_function_context): Don't call free on a NULL + pointer. + * semantics.c: Include ggc.h. + (expand_body): Do garbage-collection after processing a template + function. Clear DECL_SAVED_TREE after generating RTL for a + function. + * Makefile.in (semantics.o): Depend on ggc.h. + +1999-10-29 Mark Mitchell + + * cp-tree.h (make_typename_type): Change prototype. + * decl.c (make_typename_type): Only complain if so requested. + * parse.y (nested_name_specifier): Adjust calls. + (typename_sub0): Likewise. + (typename_sub1): Likewise. + * parse.c: Regenerated. + * pt.c (convert_template_argument): Pass complain to + make_typename_type. + (tsubst): Likewise. + +1999-10-28 Mark Mitchell + + * semantics.c (finish_handler): End the scope of the handler + before attaching it to the statement-tree. + +1999-10-28 Ian Lance Taylor + + * rtti.c (build_dynamic_cast_1): Give a better error message for + an attempt to dynamic_cast from a non-polymorphic type. + +1999-10-27 Mark Mitchell + + * cp-tree.h (make_temp_vec): Remove. + (make_scratch_vec): Likewise. + * call.c (add_function_candidate): Use make_tree_vec. + (add_conv_candidate): Likewise. + (build_builtin_candidate): Likewise. + (add_template_candidate_real): Likewise. + * class.c (resolve_address_of_overloaded_function): Likewise. + * decl.c (start_function): Don't fool with the momentary obstack. + (finish_function): Likewise. + * init.c (expand_direct_vtbls_init): Likewise. + (begin_init_stmts): Likewise. + (finish_init_stmts): Likewise. + * pt.c (add_to_template_args): Use make_tree_vec. + (check_explicit_specialization): Likewise. + (coerce_template_parms): Likewise. + (lookup_template_class): Don't fool with the momentary obstack. + (instantiate_class_template): Likewise. + (tsubst_template_arg_vector): Use make_tree_vec. + (tsubst_aggr_type): Don't fool with the momentary obstack. + (tsubst_decl): Likewise. Use make_tree_vec. + (try_one_overload): Likewise. + (try_class_unification): Don't fool with the momentary obstack. + (get_bindings_real): Use make_tree_vec. + (set_mangled_name_for_template_decl): Likewise. + * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack. + * semantics.c (finish_expr_stmt): Likewise. + (finish_do_stmt): Likewise. + (finish_for_expr): Likewise. + (finish_switch_cond): Likewise. + (do_pushlevel): Likewise. + (do_poplevel): Likewise. + * tree.c (make_temp_vec): Remove. + + * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump + CLEANUP_P for a TRY_BLOCK. + * ir.texi: Document SAVE_EXPR. + +Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com) + + * call.c (build_over_call): Check that the built-in function is + of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS. + * typeck.c (build_function_call_real): Similarly. + +1999-10-26 Mark Mitchell + + * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call + remember_end_note. + +1999-10-24 Mark Mitchell + + * decl.c (push_overloaded_decl_1): Use pushdecl. + + * decl.c (auto_function): Replace #ifdef'd __inline with just + plain inline. + * lex.c (my_get_run_time): Likeise. + (yyprint): Likewise. + (identifier_type): Likewise. + * method.c (start_squangling): Likewise. + (end_squangling): Likewise. + (icat): Likewise. + (old_backref_index): Likewise. + (flush_repeats): Likewise. + (issue_ktype): Likewise. + * parse.y (empty_parms): Likewise. + * parse.c: Regenerated. + +1999-10-21 Mark Mitchell + + * dump.c (dequeue_and_dump): Replace several uses of + queue_and_dump_index with dump_child. + +1999-10-21 Kaveh R. Ghazi + + * expr.c: Include tm_p.h. + +1999-10-21 Mark Mitchell + + * cp-tree.h (SCOPE_PARTIAL_P): New macro. + (pushlevel_temporary): Remove. + (add_scope_stmt): New function. + * decl.c (pushlevel_temporary): Remove. + (poplevel): Use add_scope_stmt. + (start_decl_1): Likewise. + * semantics.c (add_scope_stmt): New function. + (do_pushlevel): Use it. + (do_poplevel): Use it. + (expand_stmt): Check SCOPE_PARTIAL_P. + + * cp-tree.def (EMPTY_CLASS_EXPR): New tree node. + * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR. + * expr.c (cplus_expand_expr): Expand it. + * ir.texi: Document EMPTY_CLASS_EXPR. + +1999-10-20 Mark Mitchell + + * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template + parameters as having namespace scope. + +1999-10-19 Mark Mitchell + + * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove. + (mangling_flags): New type. + (build_overload_int): Change prototype. + (build_overload_value): Likewise. + (numeric_output_need_bar): Improve comment. + (mangle_expression): New function, broken out from ... + (build_overload_int): Here. + (build_overload_value): Adjust for use of mangling flags. Don't + warn about real-valued template parameters here. Do handle + complex expressions involving real-valued template parameters. + (build_template_parm_names): Encase non-type template parameters + in underscores, if necessary. + (process_overload_item): Remove conditional on + PARM_CAN_BE_ARRAY_TYPE. + +1999-10-17 Mark Mitchell + + * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR. + + * ir.texi: Clean up documentation of RETURN_INIT. + +1999-10-15 Greg McGary + + * lex.c (lang_init_options): Set flag_bounds_check as "unspecified". + (lang_init): Set default for flag_bounds_check if still "unspecified". + +1999-10-13 Andrew Haley + + * class.c (finish_struct_1): Force alignment of non-bitfields to + BITS_PER_UNIT. + +Wed Oct 13 22:01:35 1999 J"orn Rennecke + + * typeck2.c (process_init_constructor): Handle empty constructors. + +1999-10-13 Jason Merrill + + * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL. + + * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size + array error. + +1999-10-13 Mark Mitchell + + * decl.c (make_rtl_for_local_static): Don't create register RTL + for addressable constants. + +1999-10-13 Nathan Sidwell + + * cp-tree.h (build_x_va_arg): Prototype new function. + * call.c (build_x_va_arg): Define it. + * parse.y (unary_expr): Call build_x_va_arg. + + * cp-tree.h (convert_type_from_ellipsis): Prototype new function. + * call.c (convert_type_from_ellipsis): Define it. + * decl.c (init_decl_processing): Set lang_type_promotes_to. + + * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates. + +1999-10-11 Jason Merrill + + * class.c (fixed_type_or_null): Always set *nonnull. + +1999-10-10 Kaveh R. Ghazi + + * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing + __GNUC__ and __GNUC_MINOR__. + +1999-10-09 Mark Mitchell + + * cp-tree.h (make_rtl_for_local_static): New function. + * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for + local statics ... + (make_rtl_for_local_static): Here. + * semantics.c (expand_stmt): Use make_rtl_for_local_static. + +1999-10-08 Kaveh R. Ghazi + + * method.c: Include tm_p.h. + +1999-10-7 Franz Sirl + + * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type. + * lex.c (cp_make_lake_type): Likewise. + * tree.c (init_tree): Init make_lang_type_fn. + +1999-10-07 Mark Mitchell + + * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch + parameter. + + * semantics.c (expand_stmt): Don't pretend to have asmspecs for + local statics if we don't really have them. + + * ir.texi: Improve documentation for STMT_EXPR. Describe + CLEANUP_POINT_EXPR. + +1999-10-07 Jason Merrill + + * class.c (build_vtable_entry_ref): Use finish_asm_stmt. + +1999-10-07 Greg McGary + + * class.c (finish_struct_1): Use simpler method of + removing elements of a singly-linked list which doesn't + lose for classes without data members. + +1999-10-07 Mark Mitchell + + * friend.c (make_friend_class): Robustify. + + * semantics.c (finish_object_call_expr): Reject calls to template + types. + +1999-10-06 Mark Mitchell + + * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR. + + * cp-tree.h (CLASSTYPE_VFIELD): Remove. + * call.c (build_vfield_ref): Use TYPE_VFIELD, not + CLASSTYPE_VFIELD. + * class.c (get_vfield_offset): Likewise. + (finish_base_struct): Likewise. + (modify_one_vtable): Likewise. + (fixup_vtable_deltas): Likewise. + (finish_struct_1): Likewise. + * init.c (expand_virtual_init): Likewise. + * search.c (lookup_field_1): Likewise. + (expand_upcast_fixups): Likewise. + * typeck.c (build_component_ref): Likewise. + (build_binary_op_nodefault): Likewise. + + * dump.c (dqueue_and_dump): Dump TYPE_VFIELD. + * ir.texi: Document TYPE_VFIELD. + +1999-10-06 Brendan Kehoe + + * decl.c (grokdeclarator): Only warn about nonzero arrays if + !in_system_header (linux socketbits.h can give this for + __cmsg_data, which is using a GNU extension). + +1999-10-05 Mark Mitchell + + * decl2.c (start_static_storage_duration_function): Push the + function declaration so it ends up in namespace scope. + + * dump.c (DUMP_CHILDREN): Remove. + (DUMP_BINFO): Adjust. + (struct dump_node_info): Remove dump_children_p. + (queue_and_dump_type): Remove dump_children_p parameter. + (queue): Don't set dump_children_p. + (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to + queue_and_dump_index. + (dequeue_and_dump): Unconditionally print children. Adjust calls + to functions mentioned above. + (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue. + + * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR. + * dump.c (dequeue_and_dump): Dump them. + + * method.c (synthesize_method): Call setup_vtbl_ptr for destructors. + + * decl.c (start_function): Set current_in_charge_parm for + constructors, too, where appropriate. + * search.c (fixup_all_virtual_upcast_offsets): New function. + (expand_indirect_vtbls_init): Use it. + +1999-10-04 Nathan Sidwell + + * decl2.c (grok_alignof): Don't decay lvalues. + + * init.c (build_new): Remove unused variable. + +1999-10-04 Mark Mitchell + + * cp-tree.h (struct language_function): Remove static_labelno. + (static_labelno): Remove macro. + * method.c (build_overload_nested_name): Make static_labelno + static here. + + * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL, + to decide whether or not a function is defined. + + * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for + situations where make_node will do it automatically. + * decl.c (grok_reference_init): Likewise. + (expand_static_init): Likewise. + (do_static_initialization): Likewise. + * init.c (perform_member_init): Likewise. + (expand_aggr_init_1): Likewise. + (build_new_1): Likewise. + * method.c (do_build_copy_constructor): Likewise. + (do_build_assign_ref): Likewise. + * search.c (expand_upcast_fixups): Likewise. + * semantics.c (finish_stmt_expr): Likewise. + * typeck.c (build_unary_op): Likewise. + (check_return_expr): Likewise. + +1999-10-04 Jason Merrill + + * init.c (build_vec_delete_1): Fold COND_EXPRs. + +1999-10-03 Mark Mitchell + + * cp-tree.def (VEC_INIT_EXPR): Remove. + * cp-tree.h (struct stmt_tree): New type. + (struct saved_scope): Remove firstobj. Add x_saved_tree, + x_stmt_tree. + (class_cache_firstobj): Remove. + (struct language_function): Remove stmts_are_full_exprs_p, + x_last_tree, and x_last_expr_type. Add x_stmt_tree. + (current_stmt_tree): New macro. + (last_tree): Adjust. + (last_expr_type): Likewise. + (doing_semantic_analysis_p): Simplify. + (stmts_are_full_exprs_p): Adjust. + (begin_tree): Remove prototype. + (end_tree): Likewise. + (begin_stmt_tree): Change prototype. + (finish_stmt_tree): Likewise. + (building_stmt_tree): Simplify. + * decl.c (mark_stmt_tree): New function. + (mark_saved_scope): Use it. + (start_function): Rearrange slightly to call begin_stmt_tree + earlier. + (save_function_data): Tweak. + (finish_function): Adjust call to finish_stmt_tree. + (mark_lang_function): Use mark_stmt_tree. + * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR. + * init.c (build_new_1): Remove creation of VEC_INIT_EXPR. + (build_vec_init): Remove creation of stand-in initializer. + * pt.c (begin_tree): Remove. + (end_tree): Likewise. + * semantics.c (SET_LAST_STMT): New macro. Use it throughout. + (begin_compound_stmt): Handle a compound-statement outside of a + function. + (begin_stmt_expr): Handle a statement-expression outsidef of a + function. + (finish_stmt_expr): Likewise. + (begin_class_definition): Don't call begin_tree. + (finish_inline_definitions): Don't call end_tree. + (begin_stmt_tree): Take a pointer to tree, not a function as input. + (finish_stmt_tree): Likewise. + * tree.c (search_tree): Don't handle VEC_INIT_EXPR. + (mapcar): Likewise. + + * parse.y (simple_stmt): Don't call finish_stmt unnecessarily. + * parse.c: Regenerated. + + * dump.c (dqueue_and_dump): Dump bitfieldness. + + * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for + bitfields, rather than DECL_BIT_FIELD. + * ir.texi: Document how to tell whether or not a field is a + bitfield. + + * lex.c (make_lang_type): Fix typo in comment. + +1999-10-01 Jason Merrill + + * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues. + +1999-10-01 Mark Mitchell + + * pt.c (tsubst_decl): If the type of a template instantiation is + bogus, so is the whole instantiation. + +1999-09-30 Mark Mitchell + + * decl.c (initialize_local_var): Handle static variables here. + (cp_finish_decl): Tweak handling of function-scope static + variables. + * semantics.c (expand_stmt): Handle DECL_STMTs for static + variables. + + * method.c (emit_thunk): Don't crash when -fsyntax-only. + + * cp-tree.h (lang_decl_flags): Add global_ctor_p and + global_dtor_p. Add init_priority. + (DECL_ACCESS): Adjust accordingly. + (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros. + (GLOBAL_INIT_PRIORITY): Likewise. + * decl.c (lang_mark_tree): Adjust accordingly. + (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, + and GLOBAL_INIT_PRIORITY. + * dump.c (dequeue_and_dump): Print them. + * ir.texi: Document them. + + * decl2.c (struct priority_info_s): Remove initialization_sequence + and destruction_sequence. + (start_static_storage_duration_function): Return the body of the + function. Convert for function-at-a-time mode. + (generate_inits_for_priority): Remove. + (finish_static_storage_duration_function): Change prototype. + Adjust for function-at-a-time mode. + (do_static_initialization): Likewise. + (do_static_destruction): Likewise. + (do_static_initialization_and_destruction): Remove. + (start_static_initialization_or_destruction): New function. + (finish_static_initialization_or_destruction): Likewise. + (get_priority_info): Don't manipulation initialization_sequence or + destruction_sequence. + (prune_vars_needing_no_initialization): New function. + (write_out_vars): Likewise. + (finish_file): Use the various new functions instead of the old. + +Thu Sep 30 00:13:27 1999 Dirk Zoller + + * cp-tree.h (warn_float_equal): Declare. + * decl2.c (warn_float_equal): Define. + (lang_decode_option): Recognize -W[no-]float-equal. + * typeck.c (build_binary_op_nodefault): Conditionally warn + about equality tests of floating point types. + +1999-09-29 Jason Merrill + + Support normal type_info-based EH mechanisms with -fno-rtti. + * except.c (build_eh_type_type): Remove special -fno-rtti handling. + (build_eh_type_type_ref): Likewise. + (build_eh_type): Remove. + (expand_throw): Call build_eh_type_type, not build_eh_type. + * decl2.c (import_export_decl): Don't associate the tinfo fn with + the vtable if -fno-rtti. + * decl.c (init_decl_processing): Always init_rtti_processing. + + * rtti.c (get_typeid): Don't complain about -fno-rtti. + + * class.c (class_cache_obstack, class_obstack): Remove. + (init_class_processing): Don't initialize class_obstack. + (push_cache_obstack): Remove. + (pushclass): Don't call it. + * cp-tree.h: Remove prototype for push_cache_obstack. + * decl.c (decl_obstack, decl_stack, push_decl_level): Remove. + (pushlevel_class): Don't push_decl_level. + (poplevel_class): Don't pop_stack_level. + (push_class_level_binding): Don't push_cache_obstack. + (init_decl_processing): Don't initialize decl_obstack. + * search.c (push_class_decls): Don't push_cache_obstack. + * tree.c (list_hash_add): Put hash node on permanent_obstack. + (hash_tree_cons): Don't mess with obstacks. + (print_lang_statistics): Don't print stats for class_obstack and + decl_obstack. + +1999-09-29 Mark Mitchell + + * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL. + * ir.texi: Document DECL_EXTERNAL. + + * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs. + * ir.texi: Document THUNK_DECLs. + + * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c. + (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. + (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. + * error.c (dump_template_bindings): Remove unused parameter. + Handle multiple levels of template parameters. + (dump_template_decl): Use `parms', not `args', for template + parameters. Fix thinko. + (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass + flags to dump_template_bindings. + * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h. + (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. + (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. + (tsubst_copy): Clarify variable name. + (most_general_template): Robustify. + +1999-09-29 Nathan Sidwell + + * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME + to change primary template rendering. + +1999-09-29 Mark Mitchell + + * cp-tree.h (UPT_TEMPLATE): Remove. + (UPT_PARMS): Likewise. + (DECL_NEEDED_P): New macro. + * decl2.c (finish_vtable_vardecl): Use it. + (finish_objects): Don't crash with -fsyntax-only. + (finish_file): Use DECL_NEEDED_P. Don't prune vtables when + -fsyntax-only. + * pt.c (tsubst_friend_function): Remove FIXME that talks about + obstacks. + (tsubst_expr): Correct handling of function try-blocks. + * semantics.c: Include flags.h. + (expand_body): Don't do RTL generation if -fsyntax-only. + * Makefile.in (semantics.o): Depends on flags.h. + +1999-09-28 Gabriel Dos Reis + + * pt.c (most_general_template): Adjust declaration. + + * cp-tree.h: (most_general_template): Declare. + + * error.c (dump_template_value): Rename to ... + (dump_template_argument): This. + (dump_template_argument_list): New function. + (dump_type): Use it. + (dump_template_parameter): New function. + (dump_template_decl): Use it. + (dump_template_bindings): New function. + (dump_function_decl): Use it. Pretty print function template + instantiations. + +1999-09-28 Nathan Sidwell + + * decl.c (grokdeclarator): Distinguish parameter context for + diagnostics. Tidy up missing type diagnostic. + Diagnose `explicit' in one place. Diagnose `mutable' in one place. + +1999-09-28 Mark Mitchell + + * ir.texi: Improve documentation for TARGET_EXPR. + +1999-09-27 Nathan Sidwell + + Augment stringification of trees. + * cp-tree.h (tree_string_flags): New error stringifying enumeration. + (fndecl_as_string, type_as_string_real, args_as_string, + code_as_string, language_as_string, parm_as_string, + op_as_string, assop_as_string, cv_as_string): Remove. + (type_as_string, decl_as_string, expr_as_string): Adjust prototype. + (context_as_string): Declare new function. + * error.c (cp_printers): Move definition. + (OB_UNPUT): Remove. + (OB_END_TEMPLATE_ID): Adjust. + (interesting_scope_p): Remove. + (dump_scope): New static function. + (dump_qualifiers): Adjust prototype, reimplement. + (dump_template_value): Use tree_string_flags. + (dump_type_real): Move back to dump_type. + (dump_type): Adjust prototype. Use tree_string_flags. + (dump_aggr_type): Likewise. Use dump_template_parms. + (dump_type_prefix): Adjust prototype. Use tree_string_flags. + Return pad flag. + (dump_type_suffix): Adjust prototype. Use tree_string_flags. + (dump_simple_decl): Likewise. + (dump_decl): Likewise. Use dump_template_decl. + (dump_template_decl): New static function broken out of dump_decl. + (dump_function_decl): Adjust prototype. Use tree_string_flags. + (dump_parameters): Likewise. Prefix space. + (dump_exception_spec): Adjust prototype. Use tree_string_flags. + (dump_function_name): Likewise. Use dump_template_parms. + (dump_template_parms): New static function broken out of + dump_function_name. + (dump_expr_list): Adjust prototype. Use tree_string_flags. + (dump_expr): Likewise. + (fndecl_as_string): Removed + (type_as_string_real): Removed + (dump_binary_op): Adjust prototype. Use tree_string_flags. + (dump_unary_op): Likewise. + (type_as_string): Likewise. + (expr_as_string): Likewise. + (decl_as_string): Likewise. + (context_as_string): New function. + (lang_decl_name): Adjust. + (decl_to_string): New static print callback. + (expr_to_string): Likewise. + (fndecl_to_string): Likewise. + (code_as_string): Renamed to ... + (code_to_string): ... here. Adjust. + (language_as_string): Renamed to ... + (language_to_string): ... here. Adjust. + (parm_as_string): Renamed to ... + (parm_to_string): ... here. + (op_as_string): Renamed to ... + (op_to_string): ... here. + (assop_as_string): Renamed to ... + (assop_to_string): ... here. + (type_to_string): New static print callback. + (args_as_string): Renamed to ... + (args_to_string): ... here. Adjust. + (cv_as_string): Renamed to ... + (cv_to_string): ... here. Adjust. + * pt.c (mangle_class_name_for_template): Use tree_string_flags. + (print_template_context): Likewise. + +1999-09-26 Mark Mitchell + + * cp-tree.h (expand_throw): Remove prototype. + * except.c (expand_throw): Make it static. Use tree-generation + functions, rather than RTL-generation functions. + (build_throw): Use it. + * expr.c: Include except.h. + (cplus_expand_expr): Don't call expand_throw here. + * Makefile.in (expr.o): Depend on except.h. + * ir.texi: Update documentation for THROW_EXPR. + + * decl.c (start_function): Set x_dont_save_pending_sizes rather + than calling get_pending_sizes. + * init.c (build_new): Don't save and restore + immediate_size_expand; instead, assert that it has the expected + value already. + +1999-09-26 Kaveh R. Ghazi + + * lex.c (compiler_error): Add missing call to va_end(). + +1999-09-25 Mark Mitchell + + * dump.c (dequeue_and_dump): Handle RESULT_DECL. + * ir.texi: Document RESULT_DECL and DECL_RESULT. + + * cp-tree.h (check_return_expr): New function. + * decl.c (finish_constructor_body): New function. + (pushdecl): Put global friend functions in namespace binding + level, not the class binding level. + (finish_destructor_body): Make sure the dtor_label is always + defined. Fix typo in comment. + (finish_function): Move generation of constructor-termination code + to semantic-analysis time. Move generation of implicit `main' + return value to semantic-analysis time. + * semantics.c (finish_return_stmt): Generate goto's to + ctor_label/dtor_label here. Use check_return_expr to do semantic + analysis on the returned expression. + * typeck.c (maybe_warn_about_returning_address_of_local): New + function split out from c_expand_return. + (check_return_expr): Likewise. + (c_expand_return): Just generate the RTL for the return. + +1999-09-24 Mark Mitchell + + * cp-tree.h (CPTI_CLEANUP_TYPE): New macro. + (cleanup_type): Likewise. + (search_tree): Change prototype. + * decl.c (local_variable_p): Adjust for new interface to + search_tree. + (check_default_argument): Likewise. + * error.c (dump_expr): Handle INIT_EXPR. + * except.c (expand_throw): Don't make cleanup_type a local static. + * expr.c (cplus_expand_expr): Don't handle NEW_EXPR. + * init.c (build_new): Call build_new_1 directly, rather than + building a NEW_EXPR. + (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when + processing file-scope initializers. + * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR. + * tree.c: Include splay-tree.h + (no_linkage_helper): Adjust for new interface to search_tree. + (search_tree): Pass around pointers to tree nodes, rather than the + nodes themselves. Handle VEC_INIT_EXPR. + (no_linkage_check): Adjust for new interface to search_tree. + (mapcar): Handle VEC_INIT_EXPR. + (target_remap): New variable. + (bot_manip): Use it. + (bot_replace): New function. + (break_out_target_exprs): Use it to remap all variables used in a + default argument expression. + * typeck.c (build_modify_expr): Don't crash when outside a + function and presented with an INIT_EXPR assignment + * Makefile.in (tree.o): Depend on splay-tree.h. + +Fri Sep 24 10:48:10 1999 Bernd Schmidt + + * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than + DECL_BUILT_IN. + (builtin_function): New arg CLASS. Arg CODE now of type int. All + callers changed. + Set the builtin's DECL_BUILT_IN_CLASS. + +1999-09-24 Mark Mitchell + + * decl.c (pushdecl): Don't make local declarations of extern + variables give the variable a DECL_CONTEXT for the function. + (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify. + Don't accidentally make RTL for local declarations. + (emit_local_var): Handle declarations with asm-specifiers here. + +1999-09-23 Mark Mitchell + + * ir.texi: Improve documentation for TARGET_EXPRs. Discuss + STMT_IS_FULL_EXPR_P. + + * cp-tree.h (language_function): Add cannot_inline. + * decl.c (start_function): Restore current_function_cannot_inline + from the saved value. + (save_function_data): Save current_function_cannot_inline. + * decl2.c (start_objects): Change prototype. Build the function + in function-at-a-time mode. + (finish_objects): Likewise. + (generate_ctor_or_dtor_function): Adjust accordingly. + + * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro. + * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS. + Don't call expand_anon_union_decl here + * semantics.c (exapnd_stmt): Call it here, instead. + * typeck.c (mark_addressable): Addressed variables are implicitly + used. + +1999-09-23 Martin v. Löwis + + * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro. + (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise. + (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK. + * cp-tree.h: Add tree checking macros to various tree access + macros. + * ptree.c (print_lang_decl): Test for function or variable + before accessing template info. + +1999-09-23 Jason Merrill + + * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node. + * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__. + * decl2.c (lang_f_options): Add -fshort-wchar. + * cp-tree.h: Declare flag_short_wchar. + * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned + int' for wchar_t. + +1999-09-23 Martin v. Löwis + + * ir.texi: Fix formatting errors and typos. + +1999-09-22 Mark Mitchell + + * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT. + + * decl.c (pushdecl): Do create a binding for extern "C" functions, + but not for their DECL_ASSEMBLER_NAMEs. + (lookup_name_current_level): Fix formatting. + (xref_tag): Likewise. + * decl2.c (start_objects): Mark static constructors and + destructors as used. + +1999-09-22 Jason Merrill + + * decl.c (define_case_label): Don't crash if we're not in a switch. + + * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags. + * lang-options.h: Restore -fthis-is-variable. Remove help strings + for unsupported flags. + +1999-09-21 Jason Merrill + + * decl2.c (lang_decode_option): Accept and ignore -finit-priority. + Accept and warn about -fthis-is-variable. + +1999-09-21 Mark Mitchell + + * dump.c (dequeue_and_dump): Handle START_CATCH_STMT, + CLEANUP_STMT, and SCOPE_STMT. + + * decl2.c (lang_decode_option): Adjust, in the wake of recent + changes to option processing. + +1999-09-21 Martin v. Löwis + + * typeck.c (get_member_function_from_ptrfunc): Allow extraction of + function pointer from pmfs with no object given. + (convert_for_assignment): Do not return error when converting + pmfs. + +1999-09-21 Alex Samuel + + * lex.c (internal_filename): New variable. + (INTERNAL_FILENAME): New macro. + (init_parse): Allocate internal_filename and mark as root. Use it + instead of a string constant. + +1999-09-21 Nathan Sidwell + + Reimplement dynamic cast and catch matching. + * cp-tree.h (get_dynamic_cast_base_type): Prototype new function + * search.c (dynamic_cast_base_recurse): New function. + (get_dynamic_cast_base_type): New function for dynamic cast. + * rtti.c (build_dynamic_cast_1): Determine source and target + class relationship. Call __dynamic_cast_2. + * tinfo.h (__user_type_info::upcast): New catch dispatcher. + (__user_type_info::dyncast): New dynamic cast dispatcher. + (__user_type_info::sub_kind): New nested enumeration. + (__user_type_info::contained_p): sub_kind predicate. + (__user_type_info::contained_public_p): Likewise. + (__user_type_info::contained_nonpublic_p): Likewise. + (__user_type_info::contained_nonvirtual_p: Likewise. + (__user_type_info::upcast_result): New nested struct. + (__user_type_info::dyncast_result): New nested struct. + (*::do_upcast): New catch function. + (*::do_dyncast): New dynamic cast function. + (__user_type_info::find_public_subobj): New dynamic cast + helper dispatcher. + (*::do_find_public_subobj): New dynamic cast helper function. + * tinfo.cc (__user_type_info::upcast): Define catch dispatcher. + (__user_type_info::dyncast): Define dynamic cast dispatcher. + (*::do_upcast): Define catch function. + (*::do_dyncast): Define dynamic cast function. + (*::do_find_public_subobj): Define dynamic cast helper function. + * tinfo2.cc (__throw_type_match_rtti_2): Use upcast. + (__dynamic_cast): Backwards compatibility wrapper. Use dyncast. + (__dynamic_cast_2): New dynamic cast runtime. + +1999-09-20 Mark Mitchell + + * cp-tree.h (finish_stmt_expr): Change prototype. + * expr.c (cplus_expand_expr): Adjust call accordingly. + * init.c (finish_init_stmts): Likewise. + * parse.y (primary): Likewise. + * pt.c (tsubst_copy): Likewise. + * semantics.c (finish_stmt_expr): Don't take two parameters. + Don't remove generated BLOCKs from the block-tree. + + Remove support for assigning to `this'. + * NEWS: Note that fact. + * class.c (build_vbase_path): Don't check flag_this_is_variable. + * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove. + (language_function): Remove assigns_this, just_assigned_this, and + x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p. + (base_init_expr): Remove. + (current_vcalls_possible_p): New macro. + (vtbls_set_up_p): Likewise. + (emit_base_init): Change prototype. + * decl.c (finish_destructor_body): New function, split out from + finish_function. + (current_function_assigns_this): Remove. + (current_function_just_assigned_this): Likewise. + (start_function): Don't set them. + (finish_function): Don't check them. Don't emit + base-initialization code here. Generate code for destructors when + doing semantic analysis. + (finish_stmt): Don't check current_function_just_assigned_this. + * decl2.c (lang_f_options): Remove this-is-variable. + (lang_decode_option): Likewise. + (grokclassfn): Don't check flag_this_is_variable. + * init.c (emit_base_init): Return the expression generated. + (construct_virtual_bases): Don't push/pop obstacks. Fix + typo. + (build_new_1): Don't check flag_this_is_variable. + (get_temp_regvar): Don't set DECL_REGISTER. + (build_vec_init): Don't call use_variable. + * lang-options.h: Remove "-fthis-is-variable" and + "-fno-this-is-variable". + * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS. + * search.c (expand_upcast_fixups): Use finish_expr_stmt, not + expand_expr_stmt. + * semantics.c (finish_expr_stmt_real): Rename to ... + (finish_expr_stmt): This. Remove assigned_this parameter. + (begin_if_stmt): Call do_pushlevel before starting the statement. + (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less + blocks. + (setup_vtbl_ptr): Emit initialization code for bases and members + at semantic-analysis time. Emit code to initialize vtables in + destructors here. + (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real. + Don't handle CTOR_INITIALIZER any more. + * typeck.c (build_modify_expr): Don't check for assignments to + this. + (c_expand_return): Don't suggest assigning to `this'. + + * Makefile.in (decl.o): Depend on RTL_H. + (decl2.o): Likewise. + (class.o): Likewise. + (call.o): Likewise. + (method.o): Likewise. + (search.o): Likewise. + (tree.o): Likewise. + (pt.o): Likewise. + + * decl.c (duplicate_decls): When a builtin function is redeclared + as static, make sure it is mangled correctly. + + * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add + detail about the statement-tree. + +1999-09-20 Nathan Sidwell + + * parse.y (primary): Use build_functional_cast for CV_QUALIFIER. + +1999-09-20 Nick Clifton + + * decl2.c (lang_decode_option): Extend comment. + +Mon Sep 20 10:49:05 1999 Bernd Schmidt + + * typeck.c: Include "tm_p.h". + +1999-09-19 Mark Mitchell + + * ir.texi: New file. + +1999-09-19 Paul Burchard + + * semantics.c (expand_stmt): Initialize return value. + +1999-09-18 Paul Burchard + + * gxxint.texi: G++ now implements namespaces. + +1999-09-18 Mark Mitchell + + * decl.c (pop_label): Don't warn about unused labels more than + once. + * semantics.c (finish_goto_stmt): Always marked used labels as + used. + + * decl.c (layout_var_decl): Change prototype. Call layout_decl + even when the declaration is external. + (cp_finish_decl): Adjust call to layout_var_decl. + * pt.c (tsubst_expr): Make sure to initialize stmt before using it. + +1999-09-18 Martin von Loewis + + * typeck.c (get_member_function_from_ptrfunc): Always consider + virtuality inside member pointer. + +1999-09-17 Mark Mitchell + + Turn on function-at-a-time processing. + * cp-tree.h (doing_semantic_analysis_p): New macro. + (SF_DEFAULT): Define to zero, not SF_EXPAND. + (start_handler_parms): Change prototype. + (expand_start_catch_block): Likewise. + (expand_end_catch_block): Likewise. + (expand_start_eh_spec): Likewise. + (expand_end_eh_spec): Declare. + (finish_handler_parms): Change prototype. + (begin_catch_block): Declare. + (finish_handler): Change prototype. + (do_pushlevel): Declare. + (do_poplevel): Likewise. + * decl.c (pushlevel): Don't create + binding levels when not doing semantic analysis. + (poplevel): Don't pop them. + (pushdecl): Assert that we are never called when not doing + semantic analysis. + (pushdecl_top_level): Use push_to_top_level. + (make_label_decl): Don't fiddle with obstacks. Make RTL For the + label when expanding. + (cp_finish_decl): Only inject for-scope variables when doing + semantic analysis. Add comments. + (start_handler_parms): Return the handler parm. + (start_function): Reorganize. Don't clear DECL_INITIAL if it is + already set. Reinitialize from saved function data if available. + Don't pushlevel when not doing semantic analysis. + (store_parm_decls): Only generate RTL when expanding. Only + pushdecl when doing semantic analysis. Set + current_eh_spec_try_block if appropriate. + (finish_function): Simplify. Use do_pushlevel and do_poplevel. + Combine common code. Don't poplevel when not doing semantic + analysis. + (push_cp_function_context): Don't expand functions without an + explicit call to expand_body. + (mark_lang_function): Make eh_spec_try_block and + x_scope_stmt_stack. + * except.c (expand_end_eh_spec): Don't + declare. + (process_start_catch_block): Likewise. + (push_eh_cleanup): Use finish_decl_cleanup. + (initialize_handler_parm): New function. + (expand_start_catch_block): Use it. + (expand_end_catch_block): Use tree-generation functions, not + RTL-generation functions. + (expand_start_eh_spec): Likewise. + (expand_end_eh_spec): Likewise. + (expand_exception_blocks): Simplify. + (start_anon_func): Use do_pushlevel. + (end_anon_func): Use do_poplvel. Call expand_body for the + function. + * expr.c (do_case): Don't call define_case_label. + * init.c (create_temporary_var): Set DECL_CONTEXT for local + variables. + * method.c (emit_thunk): Call expand_body for the + thunk. + (sythesize_method): Likewise. + * parse.y (handler_args): Give it ttype. + (eat_saved_input): Call expand_body. + (base_init): Use do_pushlevel. + (pending_inline): Call expand_body. + (handler): Adjust calls to finish_handler_parms and + finish_handler. + (handler_args): Don't call expand_start_catch_block. Return the + catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling. + * parse.c: Regenerated. + * rtti.c (synthesize_tinfo_fn): Call finish_function. + * semantics.c (do_pushlevel): Give it external linkage. Build + SCOPE_STMTs. + (do_poplevel): Likewise. + (finish_case_label): Call define_case_label when doing semantic + analysis. + (finish_goto_stmt): Create RTL for labels. + (finish_function_try_block): Set in_function_try_handler + unconditionally. + (finish_function_handler_sequence): Unset it. + (finish_handler_parms): Use expand_start_catch_block even when + building a statement-tree. + (begin_catch_block): New function. + (finish_handler): Move a little RTL-generation logic here. + (finish_decl_cleanup): Allow cleanups for empty declarations. + (finish_named_return_value): Don't pushdecl when not doing + semantic analysis. + (expand_stmt): Don't do semantic analysis for variable + declarations. Handle START_CATCH_STMT. Call expand_label + directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust + HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT. + (expand_body): Let expand_stmt handle CTOR_INITIALIZER, + RETURN_INIT and function try blocks. + + * cp-tree.h (language_function): Add x_eh_spec_try_block. Add + x_scope_stmt_stack. Add x_in_charge_parm. + (current_eh_spec_try_block): New macro. + (current_scope_stmt_stack): Likewise. + (current_in_charge_parm): Likewise. + * decl.c (start_function): Initialize current_in_charge_parm. + (finish_function): Use current_in_charge_parm rather than looking + up __in_chrg. + * search.c (expand_indirect_vtbls_init): Likewise. + + * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps. + (TRY_BLOCK): Likewise. + (HANDLER): Likewise. + (START_CATCH_STMT): New tree node. + (SCOPE_STMT): Likewise. + * cp-tree.h (SCOPE_BEGIN_P): New macro. + (SCOPE_NULLIFIED_P): Likewise. + (struct lang_decl_flags): Add pending_inline_p. Adjust dummy. + (struct lang_decl): Add saved_language_function. + (DECL_PENDING_INLINE_INFO): Adjust documentation. + (DECL_PENDING_INLINE_P): New macro. + (TYPE_TI_ARGS): Fix typo in comment. + (DECL_SAVED_TREE): Add to documentation. + (DECL_SAVED_FUNCTION_DATA): New macro. + (START_CATCH_TYPE): Likewise. + (SCOPE_END_P): New macro. + (declare_parm_level): Don't declare. + * decl.c (mark_lang_function): New function, split out from + mark_cp_function_context. + (save_function_data): New function. + (declare_parm_level): Remove. + (finish_function): Use save_function_data to squirrel away + important stuff for later use. + (mark_cp_function_context): Use mark_function_data. + (lang_mark_tree): Likewise. + * lex.c (begin_definition_of_inclass_inline): Set + DECL_PENDING_INLINE_P. + (store_pending_inline): Clear it. + * pt.c (tsubst_decl): Likewise. + +1999-09-17 Nathan Sidwell + + * call.c (perform_implicit_conversion): Deal with error_mark_node. + +1999-09-17 Mark Mitchell + + * decl.c (warn_extern_redeclared_static): Don't get confused by + static member functions. + (duplicate_decls): Merge DECL_THIS_STATIC. + + * decl.c (expand_static_init): Make sure assignments to local + statics actually occur. + +1999-09-17 Mark Mitchell + + * cp-tree.h (poplevel_class): Declare. + * class.c (popclass): Use poplevel_class, not poplevel. + * decl.c (poplevel_class): Don't make it static. Don't return a + value. + (poplevel): Don't call poplevel_class; abort in a class + binding level is seen. + * semantics.c (finish_translation_unit): Use pop_everything. + * parse.y (member_init): Allow errors. + (pending_inline): Call finish_function. + * parse.c: Regenerated. + * Makefile.in (CONFLICTS): Adjust. + +1999-09-17 Gabriel Dos Reis + + * error.c: Reduce code duplication. + (dump_template_value): New function. + (dump_type_real): Use it. + (dump_decl): Likewise. + (dump_function_name): Likewise. + (dump_function_decl): Don't be too talkative about function return + type variety. + +1999-09-16 Kaveh R. Ghazi + + * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero. + + * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy. + +1999-09-16 Jason Merrill + + * decl2.c (finish_file): Also call check_global_declarations for + the pending_statics list. + +1999-09-15 Jason Merrill + + * lex.c (cp_pragma_implementation): Allow #pragma implementation + in header files. + +1999-09-15 Richard Henderson + + * lex.c (mark_impl_file_chain): Follow the next chain. + +1999-09-15 Mark Mitchell + + * decl.c (warn_extern_redeclared_static): Simplify. Catch + problems with extern "C" functions redeclared as static. + (duplicate_decls): When a builtin is redeclared static, make the + new function have internal linkage. + +1999-09-15 Mark Mitchell + + * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR. + * pt.c (tsubst_copy): Likewise. + * tree.c (search_tree): Likewise. + (mapcar): Likewise. + +1999-09-15 Kaveh R. Ghazi + + * typeck2.c (ack): Don't declare progname. + +1999-09-14 Alexandre Oliva + + * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy + filenames with ggc_alloc_string. + +1999-09-14 Mark Mitchell + + * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the + TARGET_EXPR. + * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on + the TARGET_EXPR. + * cvt.c (build_up_reference): Likewise. + * tree.c (build_cplus_new): Likewise. + (get_target_expr): Likewise. + +Tue Sep 14 01:45:10 1999 Marc Espie + + * Makefile.in: Prepend $(SHELL) to move-if-change calls. + +1999-09-13 Mark Mitchell + + * cp-tree.h (build_target_expr): New function. + * call.c (build_conditional_expr): Use build_target_expr. + (convert_like): Likewise. + (build_over_call): Likewise. + * cvt.c (build_up_reference): Likewise. + * decl.c (build_cleanup_on_safe_obstack): Fold into ... + (destroy_local_var): Here. + (build_target_expr): New function. + * tree.c (build_cplus_new): Use it. + (get_target_expr): Likewise. + +1999-09-13 Nathan Sidwell + + * typeck.c (expr_sizeof): Don't decay arrays and functions. + Remove misleading comment. + (build_compound_expr): Don't decay arrays. + +1999-09-13 Jason Merrill + + * call.c (build_conditional_expr): Always use a TARGET_EXPR for + class rvalues again. + +Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi + + * Make-lang.in (g++spec.o): Depend on system.h and gcc.h. + + * g++spec.c: Include gcc.h. + (lang_specific_driver): Constify a char*. Call xcalloc, not + xmalloc/bzero. All calls to the function pointer parameter now + explicitly call `fatal'. + +1999-09-12 Mark Mitchell + + * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs. + * cvt.c (ocp_convert): Complete the from and destination types. + Adjust warning about functions always being `true' in conditionals. + * decl.c (duplicate_decls): Don't play funny games with abort. + * error.c (dump_expr): Handle OVERLOADs. + * spew.c (probe_obstack): Remove. + * typeck.c (condition_conversion): Use perform_implicit_conversion. + +1999-09-12 Bernd Schmidt + + * cp-tree.h (auto_function, define_function): Adjust prototypes. + * decl.c (define_function): Lose FUNCTION_CODE arg. All callers + changed. + (auto_function): Likewise, for CODE arg. + Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to... + (builtin_function): ... here. + +1999-09-11 Mark Mitchell + + * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion. + (init_decl_processing): Don't set TREE_PERMANENT for the + error_mark_node. + (start_decl): Don't rebuild non-permanent ARRAY_TYPEs. + (grokdeclarator): Likewise. + (grokparms): Don't check TREE_PERMANENT when building up lists. + * decl2.c (grokfield): Don't assert TREE_PERMANENT. + (mark_inline_for_output): Likewise. + * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT. + * init.c (build_offset_ref): Don't check TREE_PERMANENT. + * lex.c (check_newline): Don't check ggc_p; it is always one. + * pt.c (process_template_parm): Don't check TREE_PERMANENT. + * spew.c (yylex): Don't copy_node or probe_obstacks for + non-permanent CONSTANTs and STRINGs. + * tree.c (build_cplus_array_type_1): Don't fuss with + TREE_PERMANENT on ARRAY_TYPEs. + + * cp-tree.def (CLEANUP_STMT): New node. + * cp-tree.h (language_function): Add name_declared. + (current_function_name_declared): New macro. + (CLEANUP_DECL): New macro. + (CLEANUP_EXPR): Likewise. + (emit_local_var): Likewise. + (finish_decl_cleanup): New function. + * cvt.c (build_up_reference): Simplify. + (ocp_convert): Remove dead code. + * decl.c (start_decl): Remove call to add_decl_stmt. + (grok_reference_init): Adjust, to handle bindings temporaries to + references. Remove dead code. + (initialize_local_var): Don't generate RTL for + declarations here, or build cleanups here. Don't fuss with + obstacks. Replace expand_start_target_temps calls with explicit + setting of stms_are_full_exprs_p. + (destroy_local_var): New function. + (emit_local_var): Likewise. + (cp_finish_decl): Use them, as appropriate. + (start_function): Announce template functions. + (store_parm_decls): Don't call declare_function_name here. + (finish_stmt): Don't start emit base-initialization code when just + building the statement-tree. + * init.c (create_temporary_var): Move add_decl_stmt call ... + (get_temp_regvar): Here. + * pt.c (tsubst_expr): Make DECL_INITIAL look like what + cp_finish_decl would expect. Don't call add_decl_stmt. + * semantics.c (begin_compound_stmt): Call declare_function_name, + if appropriate. + (finish_decl_cleanup): New function. + (expand_stmt): Use emit_local_var to output variables. + (expand_body): Set current_function_name_declared. + +1999-09-10 Mark Mitchell + + * cp-tree.h (finish_cleanup_try_block): New function. + * semantics.c (finish_cleanup_try_block): Add comment. + +Fri Sep 10 10:32:32 1999 Bernd Schmidt + + * cp-tree.h: Delete declarations for all tree nodes now moved to + global_trees. + * decl.c: Delete their definitions. + (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, + FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't + provide defaults. + (init_decl_processing): Call build_common_tree_nodes and + build_common_tree_nodes_2 instead of building their nodes here. + Don't add gc roots for them. + +1999-09-10 Mark Mitchell + + * cp-tree.h (language_function): Rename expanding_p to + x_expanding_p. Rename named_label_uses to x_named_label_uses. + (expanding_p): Adjust accordingly. + (TREE_VIA_PRIVATE): Fix typo in comment. + (DECL_REFERENCE_SLOT): Remove. + (SET_DECL_REFERENCE_SLOT): Likewise. + * decl.c (named_label_uses): Adjust. Remove chicken comment. + (push_overloaded_decl): Don't truncate the chain of bindings when + adding an overloaded function. + (grok_reference_init): Don't use DECL_REFERENCE_SLOT. + (initialize_local_var): Fix typo in comment. + (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up. + * decl2.c (start_objects): Make the fact that we are expanding + the generated function right away explicit. + (start_static_storage_duration_function): Likewise. + (finish_file): Fix typo in comment. + * init.c (build_vec_init): Correct bugs in handling cleanups. + * semantics.c (maybe_convert_cond): New function. + (FINISH_COND): Always store the condition, even if there's + a declaration. + (finish_if_stmt_cond): Use maybe_convert_cond. + (finish_while_stmt_cond): Likewise. + (finish_do_stmt): Likewise. + (finish_for_cond): Likewise. + (expand_cond): Adjust. + + * cp-tree.h (FN_TRY_BLOCK_P): New macro. + * init.c (perform_member_init): Remove obstack machinations. + (expand_cleanup_for_base): Likewise. + (finish_init_stmts): Mark the statement-expression as used. + * method.c (emit_thunk): Use tree-generating functions, not + RTL. + (do_build_copy_constructor): Likewise. + (do_build_assign_ref): Likewise. + (synthesize_method): Likewise. Keep track of line numbers. + * pt.c (tsubst_expr): Handle various kinds of try blocks. + * semantics.c (expand_stmts): Remove. + (begin_function_try_block): Set FN_TRY_BLOCK_P. + (finish_function_try_block): Be careful rechaining + function try blocks. + (expand_stmt): Loop through all the statements at a given level. + (exapnd_body): Be careful with line-numbers here too. Prepare for + being called directly from the parser. + + * cp-tree.h (finish_function): Adjust prototype. + * decl.c (finish_function): Return the function compiled. + * pt.c (instantiate_decl): Don't play games with obstacks. + * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF. + (search_tree): Likewise. + * typeck.c: Fix typo in comment. + * typeck2.c (store_init_value): Add comment. + + * cp-tree.h (CPTI_ATEXIT): New macro. + (atexit_node): Likewise. + * decl.c (destroy_local_static): New function, broken out from ... + (expand_static_init): Here. + + * rtti.c (get_tinfo_var): These should always be global + (expand_si_desc): Use tree, not RTL, functions to generate code. + (expand_class_desc): Likewise. + (expand_ptr_desc): Likewise. + (expand_attr_desc): Likewise. + (expand_generic_desc): Likewise. + (synthesize_tinfo_fn): Likewise. + +1999-09-09 Mark Mitchell + + * semantics.c (RECHAIN_STMTS): Remove `last' parameter. + (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with + RECHAIN_STMTS. + (RECHAIN_STMST_FROM_CHAIN): Likewise. + + * parse.y (simple_stmt): Fix typo in last change. + + * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro. + (STMT_IS_FULL_EXPR_P): Likewise. + (STMT_LINENO_FOR_FN_P): Likewise. + (prep_stmt): New function. + (building_stmt_tree): Tweak for safety. + * pt.c (tsubst_expr): Use prep_stmt throughout. + (add_tree): Move it to semantics.c + * semantics.c (add_tree): Move it here. + (finish_expr_stmt_real): New function. + (finish_expr_stmt): Use it. + (finish_if_stmt_cond): Use FINISH_COND. + (finish_while_stmt_cond): Likewise. + (finish_for_cond): Likewise. + (finish_stmt_tree): Tweak line-number handling. + (prep_stmt): New function. + (expand_stmt): Use it. + + * cp-tree.h (begin_switch_stmt): Adjust prototype. + (finish_switch_cond): Likewise. + * parse.y (simple_stmt): Adjust accordingly. + * parse.c: Regenerated. + * pt.c (tsubst_expr): Adjust accordingly. + * semantics.c (expand_cond): New function. + (FINISH_COND): New macro. + (begin_switch_stmt): Build the SWITCH_STMT here. + (finish_switch_stmt_cond): Not here. + (expand_stmt): Adjust calls to begin_switch_stmt and + finish_switch_cond. Use expand_cond throughout. + + * dump.c (dequeue_and_dump): Dump types for constants. + Describe DECL_ARG_TYPE more intuitively. + Handle ARRAY_REF. + + * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC. + (lang_cleanup_tree): Remove. + * lex.c (make_lang_type): Use ggc_alloc to allocate + TYPE_LANG_SPECIFIC. + + Reorganize per-function data. + * cp-tree.h (saved_scope): Add function_decl, bindings. + (language_function): Rename binding_level to bindings. + (cp_function_chain): Use the current_function, not the + outer_function_chain. + (current_class_ptr): Make it work, even when there's no + current function. + (current_class_ref): Likewise. + (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New + macros. + (clear_temp_name): Remove. + * decl.c (check_function_type): New function, broken out from + start_function. + (current_binding_level): Adjust definition. + (pushlevel): Simplify. + (poplevel): Don't use named_label_uses when we're outside + a function scope. + (mark_saved_scope): Mark function_decl and bindings. + (maybe_push_to_top_level): Don't unconditionally push a new + function context. Save bindings and the current_function_decl. + Don't clear named_labels. + (pop_from_top_level): Pop function context if appropriate. + (init_decl_processing): Set init_lang_status and free_lang_status, + rather than save_lang_status and restore_lang_status. + (start_function): Take SF_* flags. Don't clear per-function data. + Reorder and simplify to use new per-function data code. Add + asserts. + (store_parm_decls): Don't call init_function_start here. + (finish_function): Adjust for new handling of per-function data. + (push_cp_function_context): Simplify. + (mark_cp_function_context): Change binding_level to bindings. + * decl2.c (clear_temp_name): Remove. + (start_objects): Use SF flags to start_function. + (start_static_storage_duration_function): Likewise. + * except.c (start_anon_func): Remove redundant calls to + push_function_context_to. Use SF flags to start function. + (end_anon_func): Remove redundant call to pop_function_context + from. + * lex.c (reinit_parse_for_function): Don't initialize per-function + data. + * method.c (emit_thunk): Clear current_function after calling + assemble_end_function. Use SF flags for start_function. + (synthesize_method): Use SF flags for start_function. + * parse.c: Regenerated. + * parse.y (fn.defpen): Likewise. + (pending_inline): Clear current_function, even if something goes + wrong. + * pt.c (instantiate_decl): Use SF flags to start_function. + Don't save and restore expanding_p. + (add_tree): Handle the case where we are outside any function. + (end_tree): Likewise. + * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function. + * semantics.c (begin_function_definition): Likewise. + (expand_body): Likewise. + +1999-09-09 Nathan Sidwell + + * cp-tree.h (convert_to_void): Prototype new function. + (require_complete_type_in_void): Remove prototype. + * cvt.c (convert_to_void): New function. + (ocp_convert): Use convert_to_void. + * decl.c (cplus_expand_expr_stmt): Likewise, for complete + expressions. + * typeck.c (require_complete_type_in_void): Remove function. + (build_compound_expr): Use convert_to_void. + (build_static_cast): Likewise. + (build_c_cast): Likewise. + * semantics.c (finish_expr_stmt): Do not decay full expressions. + + * typeck.c (build_x_compound_expr): Add FIXME. + +1999-09-08 Mark Mitchell + + * cp-tree.h (scratch_tree_cons): Remove. + * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons, + and perm_tree_cons with plain tree_cons. + * class.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * except.c: Likewise. + * expr.c: Likewise. + * init.c: Likewise. + * lex.c: Likewise. + * method.c: Likewise. + * parse.y: Likewise. + * pt.c: Likewise. + * repo.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * typeck.c: Likewise. + * parse.c: Regenerated. + * tree.c (build_srcloc): Simplify. + +1999-09-08 Bruce Korb autogen@linuxbox.com + + * Makefile.in: Give the gperf user a hint about why "gperf -F" fails. + +1999-09-08 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Remove permanent_attr. + Remove next. + (LANG_DECL_PERMANENT): Remove. + * decl.c (duplicate_decls): Don't mess about with obstacks trying + to free memory. + (lang_mark_tree): Mark DECL_LANG_SPECIFIC. + * lex.c (free_lang_decl_chain): Remove. + (build_lang_decl): Don't use obstacks. + (retrofit_lang_decl): Likewise. + (copy_lang_decl): Likewise. + + * cp-tree.h (saved_scope): Remove old_binding_level and + function_decl. Tidy up. + * decl.c (mark_saved_scope): Don't set them. + (maybe_push_to_top_level): Clear memory. + + * decl.c (layout_var_decl): Change prototype. Don't complete + types for external objects. + (check_initializer): Likewise. Tidy. + (initialize_local_var): Complete types here. + (cp_finish_decl): Not here. Reorganize a little. + (grokvardecl): Don't complete types here. + + * decl.c (start_function): Clear last_dtor_insn and + last_parm_cleanup_insn. + (push_cp_function_context): Just copy over a little of + the old context, not all of it. + + * cp-tree.h (copy_to_permanent): Remove. + (permanent_p): Likewise. + * decl.c (building_typename_type): Don't use copy_to_permanent. + (start_decl): Likewise. + (grok_reference_init): Likewise. + (cp_finish_decl): Likewise. + * init.c (build_new_1): Don't use mapcar. + (build_vec_delete_1): Don't use copy_to_permanent. + (build_vec_init): Likewise. + * parse.y (primary): Likewise. + * parse.c: Regenerated. + * pt.c (push_template_decl_real): Don't use copy_to_permanent. + (lookup_template_class): Likewise. + (tsubst_friend_function): Likewise. + (instantiate_class_template): Likewise. + (tsubst_decl): Likewise. + (tsubst): Likewise. + (instantiate_template): Likewise. + (unify): Likewise. + * rtti.c (get_tinfo_fn): Likewise. + (build_dynamic_cast): Likewise. + * semantics.c (finish_if_stmt_cond): Likewise. + (finish_while_stmt_cond): Likewise. + (finish_do_stmt): Likewise. + (finish_for_cond): Likewise. + (finish_for_expr): Likewise. + (finish_cleanup): Likewise. + (add_decl_stmt): Likewise. + (finish_named_return_value): Likewise. + (finish_qualified_call_expr): Likewise. + * tree.c (perm_manip): Remove. + (build_exception_variant): Don't use copy_to_permanent. + (permanent_p): Remove. + (copy_to_permament): Remove. + (build_min_nt): Don't use copy_to_permanent. + (build_min): Likewise. + (min_tree_cons): Likewise. + * typeckc.c (build_static_cast): Likewise. + (build_reinterpret_cast): Likewise. + (build_const_cast): Likewise. + +1999-09-07 Mark Mitchell + + * decl.c (ggc_p): Set it to 1. + (mark_saved_scope): Add prototype. + +1999-09-07 Richard Henderson + + * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete. + * typeck.c (self_promoting_args_p): Delete. + +1999-09-07 Jason Merrill + + * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT. + (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove. + +1999-09-07 Mark Mitchell + + * Makefile.in (tree.o): Depend on ggc.h. + * class.c (make_method_vec): Remove. + (free_method_vec): Likewise. + (free_method_vecs): Remove. + (add_method): Don't use them. + * cp-tree.def (PTRMEM_CST): Make it longer. + (TEMPLATE_PARM_INDEX): Make it shorter. + * cp-tree.h (BINDING_HAS_LEVEL_P): New macro. + (template_parm_index): Remove RTL field. + (ptrmem_cst): Add RTL field. + (finish_function): Removed parameter. + (process_next_inline): Change prototype. + (init_cplus_unsave): Rename to init_tree. + (binding_init): Remove. + * decl.c (free_binding_nodes): Remove. + (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P. + (pop_binding): Don't use free_binding_nodes. + (free_binding_vecs): Remove. + (store_bindings): Don't use them. + (pop_from_top_level): Likewise. + (lookup_namespace_name): Simplify. + (build_typename_type): Don't use obstack_free. + (unqualified_namespace_lookup): Simplify. + (lookup_name_real): Simplify. + (start_function): Remove comment about leaks. + (finish_function): Removed nested parameter. Call + expand_end_bindings even when building_stmt_tree. + Call ggc_push_context and ggc_pop_context around + rest_of_compilation, if necessary. + (mark_cp_function_context): Handle a NULL language-context. + (lang_mark_false_label_stack): Fix typo. + (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD, + TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on + pointer to method types. + (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC. + * decl2.c (finish_objects): Adjust call to finish_function. + (finish_static_store_duration_function): Likewise. + (do_nonmember_using_decl): Remove call to binding_init. + * except.c (end_anon_func): Adjust call to finish_function. + * lex.c (mark_impl_file_chain): New function. + (init_parse): Call init_tree, not init_cplus_unsave. + Add GC roots. + (cp_pramga_interface): Use xmalloc, not permalloc. + (cp_pragma_implementation): Likewise. + (begin_definition_of_inclass_inline): Simplify. + (process_next_inline): Adjust prototype. + (do_scoped_id): Don't call binding_init. + (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc. + * method.c (emit_thunk): Adjust call to finish_function. + (synthesize_method): Likewise. + * parse.y (%union): Add a new `pi' variant. + (PRE_PARSED_FUNCTION_DECL): Use it. + (fn.defpen): Likewise. + (fndef): Adjust call to finish_function. + * pt.c (instantiate_decl): Likewise. + * rtti.c (syntheisze_tinfo_fn): Likewise. + * semantics.c (expand_body): Likewise. + * tree.c: Include ggc.h. + (mark_list_hash): New function. + (binding_init): Remove. + (init_cplus_unsave): Rename to ... + (init_tree): This. Add GC roots. + +1999-09-05 Mark Mitchell + + Get ready for garbage collection. + * Makefile.in (CXX_TREE_H): Add varray.h + (lex.o): Depend on ggc.h. + (decl.o): Likewise. + (decl2.o): Likewise. + (method.o): Likewise. + (search.o): Likewise. + (pt.o): Likewise. + (repo.o): Likewise. + * class.c: Include ggc.h. + (current_class_name): Remove. + (current_class_type): Likewise. + (current_access_specifier): Likewise. + (previous_class_type): Likewise. + (previous_class_values): Likewise. + (class_cache_firstobj): Likewise. + (current_lang_base): Likewise. + (current_lang_stack): Likewise. + (current_lang_stacksize): Likewise. + (lang_name_c): Likewise. + (lang_name_cplusplus): Likewise. + (lang_name_java): Likewise. + (current_lang_name): Likewise. + (base_layout_decl): Likewise. + (access_default_node): Likewise. + (access_public_node): Likewise. + (access_protected_node): Likewise. + (access_private_node): Likewise. + (access_default_virtual_node): Likewise. + (access_public_virtual_node): Likewise. + (access_protected_virtual_node): Likewise. + (access_private_virtual_node): Likewise. + (signed_zero_node): Likewise. + (init_class_processing): Don't build base_layout_decl. + (push_lang_context): Adjust now that current_lang_base is a varray. + (pop_lang_context): Likewise. + * cp-tree.h: Include varray.h. + (cp_global_trees): Add access_default, access_public, + access_protected, access_private, access_default_virtual, + access_public_virtual, access_protected_virtual, + access_private_virtual, ctor_identifier, delta2_identifier, + delta_identifier, dtor_identifier, in_charge_identifier, + index_identifier, nelts_identifier, this_identifier, + pfn_identifier, pfn_or_delta2_identifier, vptr_identifier, + lang_name_c, lang_name_cplusplus, lang_name_java, + empty_except_spec, null, jclass, minus_one, terminate. + (saved_scope): Move here from decl.c. Define globals in terms of + saved_scope: current_namespace, current_class_name, + current_class_type, current_access_specifier, current_lang_stack, + current_lang_base, current_lang_name, current_function_parms, + current_template_parms, processing_template_decl, + processing_specialization, processing_explicit_instantiation, + previous_class_type, previous_class_values, class_cache_firstobj. + (scope_chain): New variable. + (init_pt): New function. + * decl.c (current_namespace): Remove. + (this_identifier, in_charge_identifier, ctor_identifier): Likewise. + (dtor_identifier, pfn_identifier, index_identifier): Likewise. + (delta_identifier, delta2_identifier): Likewise. + (pfn_or_delta2_identifier, tag_identifier): Likewise + (vt_off_identifier, empty_except_spec, null_node): Likewise. + (current_function_parms, current_lang_base): Remove. + (current_lang_stack, previous_class_values): Remove. + (class_binding_level): Macroize. + (saved_scope): Remove. + (current_saved_scope): Rename to scope_chain. + (mark_saved_scope): Adjust for new scope structure. + (maybe_push_to_top_level): Likewise. + (pop_from_top_level): Likewise. + (duplicate_decls): Adjust now that current_lang_base is a varray. + (build_typename_type): Call ggc_add_tree_hash_table_root. + (init_decl_processing): Call init_pt. Call push_to_top_level to + set up globals. Add GC roots. + (xref_basetypes): Adjust now that current_lang_base is a varray. + * decl.h (this_identifier): Remove. + (in_charge_identifier): Likewise. + * decl2.c: Don't include varray.h. + (current_namespace): Remove. + (init_decl2): Add GC roots. + * except.c (Terminate): Remove. + (init_exception_processing): Use terminate_node instead. + (build_terminate_handler): Likewise. + * init.c (nc_nelts_field_id): Remove. + (minus_one): Likewise. + (init_init_processing): Use minus_one_node and nelts_identifier + instead. Add GC roots. + (jclass_node): Remove. + (build_new_1): Use nelts_identifier. + (build_vec_init): Likewise. + (build_vec_delete): Likewise. + * lex.c: Include ggc.h. + (defarg_fn): Move declaration early. + (defarg_parms): Likewise. + (init_parse): Add GC roots. + (handle_cp_pragma): Remove redundant declaration of + pending_vtables. + * method.c: Include ggc.h. + (btypelist): Make it a varray. All uses changed. + (ktypelist): Likewise. + (init_method): Add GC roots. + * pt.c: Don't include varray.h. Include ggc.h. + (current_template_parms): Remove. + (processing_template_decl): Likewise. + (processing_specialization): Likewise. + (processing_explicit_instantiation): Likewise. + (init_pt): New function. + * repo.c: Include ggc.h. + (init_repo): Add GC roots. + * search.c: Don't include varray.h. + (_vptr_name): Remove. + (lookup_field_1): Use vtpr_identifier instead. + (expand_indirect_vtbls_init): Remove redundant declaration of + in_charge_identifier. + (init_search_processing): Use vptr_identifier. + +1999-09-05 Richard Henderson + Bernd Schmidt + Mark Mitchell + + * Makefile.in (parse.o): Depend on ggc.h. + (decl2.o): Depend on ggc.h. + (init.o): Depend on ggc.h. + * cp-tree.h (init_decl2): Declare. + (cp_parse_init): Likewise. + * decl.c (ggc_p): Define to zero. + (mark_saved_scope): New function. + (init_decl_processing): Call cp_parse_init, and cp_decl2. + Register GC roots. + (expand_static_init): Add GC roots. + * decl2.c: Include ggc.h. + (init_decl2): New function. + * init.c: Include ggc.h. + (init_init_processing): Add GC roots. + * parse.y: Include ggc.h. + (cp_parse_init): New function. + +1999-09-04 Mark Mitchell + + * decl.c (init_decl_processing): Set mark_lang_status. + (lang_mark_false_label_stack): Adjust prototype. + * decl2.c (grok_function_init): Remove extraneous declaration of + abort_fndecl. + + * Make-lang.in (cc1plus): Remove dependency on GGC. + * Makefile.in (OBJS): Don't mention ggc-simple.o. + (OBJDEPS): Don't mention ggc-simple.o. + + * Make-lang.in (cc1plus): Depend on $(GGC). + * Makefile.in (OBJS): Add ggc-simple.o. + (OBJDEPS): Likewise. + * cp-tree.h (language_function): Rename members to `x_' versions; + we now have x_named_labels, x_ctor_label, x_dtor_label, + x_base_init_list, x_member_init_list, x_base_init_expr, + x_current_class_ptr, x_current_class_ref, x_last_tree, + x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and + x_result_rtx. + (dtor_label, ctor_label, current_base_init_list, + current_member_init_list, base_init_expr, current_class_ptr, + current_class_ref, last_tree, last_expr_type): Adjust accordingly. + * decl.c: Include ggc.h. + (last_dtor_insn): Adjust to use x_ names. + (last_parm_cleanup_insn): Likewise. + (original_result_rtx): Likewise. + (named_labels): Likewise. + (mark_binding_level): New function. + (mark_cp_function_context): Likewise. + (mark_false_label_stack): Likewise. + (lang_mark_tree): Likewise. + (lang_cleanup_tree): Likewise. + +1999-09-03 Mark Mitchell + + * Makefile.in (CXX_TREE_H): Include function.h. + (decl.o): Don't depend on function.h. + (decl2.o): Likewise. + (typeck.o): Likewise. + (init.o): Likewise. + (method.o): Likewise. + * cp-tree.h: Include function.h. + (cp_function): Rename to language_function. Remove next. + (cp_function_chain): Make it a macro, not a variable. + (push_cp_function_context): Don't declare. + (pop_cp_function_context): Likewise. + * decl.c: Don't include function.h. + (push_cp_function_context): Make it static. Make it suitable for + a save_lang_status callback. + (pop_cp_function_context): Likewise. + (maybe_push_to_top_level): Call push_function_context_to, not + push_cp_function_context. + (pop_from_top_level): Call pop_function_context_from, not + pop_cp_function_context. + (init_decl_processing): Set save_lang_status and + restore_lang_status. Call push_function_context_to, not + push_cp_function_context. + (cp_function_chain): Remove. + * decl2.c: Don't include function.h. + * except.c: Don't include function.h. + (start_anon_func): Call push_function_context_to, not + push_cp_function_context. + (end_anon_func): Call pop_function_context_from, not + pop_cp_function_context. + * init.c: Don't include function.h. + * lex.c (begin_definition_of_inclass_inline): Call + push_function_context_to, not push_cp_function_context. + (process_next_inline): Call pop_function_context_from, not + pop_cp_function_context. + * method.c: Don't include function.h. + (synthesize_method): Call push_function_context_to, not + push_cp_function_context. Call pop_function_context_from, not + pop_cp_function_context. + * typeck.c: Don't include function.h. + + * decl.c (expand_static_init): Tweak handling of static + initializations for objects without constructors. + +1999-09-03 Nathan Sidwell + + * typeck.c (build_indirect_ref): Reject dereference of pointer to + void. + +1999-09-02 Mark Mitchell + + * cp-tree.h (cp_function): Move here, from decl.c. + (cp_function_chain): Declare. + (dtor_label): New macro, instead of variable. + (ctor_label): Likewise. + (current_base_init_list): Likewise. + (current_member_init_list): Likewise. + (base_init_expr): Likewise. + (current_class_ptr): Likewise. + (current_class_ref): Likewise. + (last_tree): Likewise. + (last_expr_type): Likewise. + (current_function_returns_value): Likewise. + (current_function_returns_null): Likewise. + (current_function_just_assigned_this): Likewise. + (current_function_parms_stored): Likewise. + (temp_name_counter): Likewise. + (static_labelno): Likewise. + (expanding_p): Likewise. + (stmts_are_full_exprs_p): Likewise. + (in_function_try_handler): Likewise. + (lang_type): Remove nested type_flags. All uses changed. + * call.c (ctor_label): Remove. + (dtor_label): Likewise. + * class.c (current_class_ptr): Remove. + (current_class_ref): Likewise. + * decl.c (static_labelno): Remove. + (dtor_label): Likewise. + (last_dtor_insn): New macro, instead of variable. + (last_parm_cleanup_insn): Likewise. + (original_result_rtx): Likewise. + (in_function_try_handler): Remove. + (named_label_uses): New macro, instead of variable. + (named_labels): Likewise. + (current_function_returns_value): Remove. + (current_function_returns_null): Likewise. + (current_function_assigns_this): New macro, instead of variable. + (current_function_just_assigned_this): Likewise. + (current_binding_level): Likewise. + (init_decl_processing): Call push_cp_function_context. + (cp_function): Move to cp-tree.h + (cp_function_chain): Make it global. + (temp_name_counter): Remove. + (push_cp_function_context): Simplify. + (pop_cp_function_context): Likewise. + * decl2.c (temp_name_counter): Remove. + * init_c (current_base_init_list): Likewise. + (current_member_init_list): Likewise. + (base_init_expr): Likewise. + * method.c (static_labelno): Likewise. + * pt.c (last_tree): Likewise. + * semantics.c (expanding_p): Likewise. + (stmts_are_full_exprs_p): Likewise. + (last_expr_type): Likewise. + * typeck.c (dtor_label): Likewise. + (ctor_label): Likewise. + +1999-09-01 Alex Samuel + + * decl2.c (arg_assoc_template_arg): New prototype. New function. + (arg_assoc_class): Use arg_assoc_template_arg for template + arguments. + (arg_assoc): Likewise. + * pt.c (mangle_class_name_for_template): Allow member template + template arguments. + +1999-09-02 Nathan Sidwell + + * call.c (build_conditional_expr): Warn on enum mismatches. + (convert_arg_to_ellipsis): Move non-pod check to after + conversion. + +1999-09-01 Kaveh R. Ghazi + + * gxx.gperf (hash, is_reserved_word): Add prototypes. + + * init.c (build_vec_init): Initialize variable `try_block'. + + * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts. + Likewise for bzero/memset. + (token_getch, token_put_back): Add static prototypes. Remove + `inline' from the definitions. + (retrofit_lang_decl): Call memset, not bzero, to avoid casts. + +1999-09-01 Mark Mitchell + + * cp-tree.h (lang_type): Move align into type_flags. + (CLASSTYPE_ALIGN): Adjust accordingly. + * call.c (direct_reference_binding): Remove misleading comment. + +1999-08-30 Kaveh R. Ghazi + + * parse.y (language_string): Constify. + +1999-08-30 Kaveh R. Ghazi + + * repo.c (getpwd): Don't prototype. + * xref.c (getpwd): Likewise + +1999-08-30 Kaveh R. Ghazi + + * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a. + Remove hacks for stuff which now comes from libiberty. + +1999-08-30 Jason Merrill + + * cp-tree.h (IS_AGGR_TYPE_2): Fix typo. + +1999-08-30 Mark Mitchell + + * cp-tree.h (begin_init_stmts): Declare. + (finish_init_stmts): Likewise. + * cvt.c (build_up_reference): Wrap the declaration of a temporary + in a statement-expression so that we will see it when expanding + tree structure later. + * init.c (begin_init_stmts): Don't make it static. + (finish_init_stmts): Likewise. + + * cp-tree.h (start_handler_parms): New function. + (expand_start_catch_block): Take only one parameter. + (start_handler_parms): New function. + * decl.c (start_handler_parms): Define it. + * except.c (process_start_catch_block): Take only one parameter. + Don't call grokdeclarator here. + (expand_start_catch_block): Don't call grokdeclarator here, + either. + * parse.y (handler_args): Adjust call to + expand_start_catch_block. Use start_handler_parms. + * pt.c (push_template_decl_real): Make permanent lists have + permanent elements. + (tsubst_expr): Adjust calls to expand_start_catch_block + appropriately. + * semantics.c (expand_stmt): Likewise. + +1999-08-29 Alex Samuel + + * pt.c (push_template_decl_real): Use template declaration from + class type if it exists. + +1999-08-29 Mark Mitchell + + * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition. + (maybe_inject_for_scope_var): Declare it. + (initialize_local_var): Likewise. + * decl.c (maybe_inject_for_scope_var): Make it global. + (initialize_local_var): Likewise. Move cleanup handling here, + from cp_finish_decl. + (make_rtl_for_nonlocal_decl): Use + push_obstacks_nochange/pop_obstacks, rather than + end_temporary_allocation/resume_temporary_allocation. + (cp_finish_decl): Try to complete the type of a variable when it + is declared. Move cleanup-handling to initialize_local_var. + (expand_static_init): Use tree-building code, rather than + RTL-building code. + * decl2.c (get_temp_name): Assert non-initializedness of + temporaries. + * init.c (create_temporary_var): Move RTL-assigning code to ... + (get_temp_regvar): Here. + * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here. + * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just + call initialize_local_var to generate initialization code. + +1999-08-29 Kaveh R. Ghazi + + * cp-tree.h (fndecl_as_string, type_as_string, + type_as_string_real, args_as_string, decl_as_string, + expr_as_string, code_as_string, language_as_string, + parm_as_string, op_as_string, assop_as_string, cv_as_string, + lang_decl_name, cp_file_of, lang_printable_name): Constify a char*. + + * errfn.c (cp_printer): Likewise. + + * error.c (cp_printer, fndecl_as_string, type_as_string_real, + type_as_string, expr_as_string, decl_as_string, lang_decl_name, + cp_file_of, code_as_string, language_as_string, parm_as_string, + op_as_string, assop_as_string, args_as_string, cv_as_string): + Likewise. + + * tree.c (lang_printable_name): Likewise. + +1999-08-28 Richard Henderson + + * decl2.c (arg_assoc_class): Bail if the class is a builtin type. + +1999-08-28 Mark Mitchell + + * cp-tree.h (strip_array_types): New function. + * decl.c (maybe_deduce_size_from_array_init): New function, split + out from cp_finish_decl. + (layout_var_decl): Likewise. + (maybe_commonize_var): Likewise. + (maybe_inject_for_scope_var): Likewise. + (initialize_local_var): Likewise. + (build_cleanup_on_safe_obstack): Likewise. + (check_initializer): Likewise. + (make_rtl_for_nonlocal_decl): Likewise. + (cp_finish_decl): Use them. + * typeck.c (strip_array_types): New function. + + * cp-tree.def (LABEL_STMT): New tree node. + * cp-tree.h (LABEL_STMT_LABEL): New macro. + (shadow_label): Remove. + (declare_local_label): New function. + (finish_label_decl): Likewise. + * decl.c (make_label_decl): New function, split out from + lookup_label. + (shadowed_labels): Remove. + (binding_level): Add shadowed_labels. + (clear_binding_level): Remove. + (push_binding_level): Just bzero the new binding level. + (pushlevel): Fix indentation. + (pop_label): New function. + (pop_labels): Likewise, split out from poplevel. + (poplevel): Pop local labels. Use pop_labels. + (maybe_push_to_top_level): Don't clear shadowed_labels. + (lookup_label): Use make_label_decl. + (shadow_label): Remove. + (declare_local_label): New function. + (define_label): Simplify. + (start_function): Don't clear shadowed_labels. + (cp_function): Remove shadowed_labels. + (push_cp_function_context): Don't save shadowed_labels. + (pop_cp_function_context): Don't restore it. + * dump.c (dequeue_and_dump): Handle LABEL_STMT. + * parse.y (label_decl): Use finish_label_decl. + * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label + declarations. + * semantics.c (finish_label_stmt): Add a LABEL_STMT when + building_stmt_tree. + (finish_label_decl): New function. + (expand_stmt): Handle LABEL_STMTs and local label declarations. + +1999-08-26 Mark Mitchell + + * decl.c (lookup_label): Build labels on the permanent obstack + when building statement trees. Don't build RTL for labels when + building statement trees. + * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when + building statement trees. + (finish_label_stmt): Likewise. + (expand_stmt): Adjust accordingly. + * pt.c (tsubst_expr); Likewise. + (do_decl_instantiation): Robustify. + + * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro. + * tree.c (build_cplus_new): Set it. + * expr.c (cplus_expand_expr): Use it. + * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR. + + * decl.c (store_parm_decls): Reset immediate_size_expand. + (finish_function): Likewise. + + * tree.c (cplus_unsave_expr_now): Don't return a value. + + * semantics.c (do_poplevel): Always initialize the return value. + +1999-08-26 Gavin Romig-Koch + + * cp-tree.h (cplus_unsave_expr_now) : Correct return type. + * tree.h (cplus_unsave_expr_now) : Same. + +1999-08-25 Mark Mitchell + + * decl.c (grokdeclarator): Amend comment. + * except.c (expand_start_catch_block): Call push_template_decl for + catch-block parameters. + * method.c (synthesize_method): Build an empty compound statement + for the body of a constructor. + +1999-08-25 Jason Merrill + + * tree.c (cp_build_qualified_type_real): If we're asking for the + same quals we already have, just return. + +1999-08-25 Mark Mitchell + + * cp-tree.def (SUBOBJECT): New tree node. + * cp-tree.h (CLEANUP_P): New macro. + (SUBOBJECT_CLEANUP): Likewise. + (keep_next_level): Add parameter. + (get_temp_regvar): Don't declare. + (emit_base_init): Remove parameter. + (expand_aggr_init): Rename to build_aggr_init. + (expand_vec_init): Rename to build_vec_init. + (do_pushlevel): Remove. + (do_poplevel): Likewise. + (finish_cleanup): New function. + (finish_subobject): Likewise. + (stmts_are_full_exprs_p): New variable. + * decl.c (keep_next_level): Add parameter. + (cp_finish_decl): Use build_aggr_init, not + expand_aggr_init. Use finish_expr_stmt to expand the code. + (expand_static_init): Use tree-generating, not RTL-generating, + functions to handle the initialization. + (start_function): Remove dead code. Always have a momentary + obstack inside the function, even before hitting the first curly + brace. + (cplus_expand_expr_stmt): Move calls to + expand_{start,end}_target_temps into semantics.c. + (cp_function): Add stmts_are_full_exprs_p. + (push_cp_function_context): Save it. + (pop_cp_function_context): Restore it. + * decl2.c (get_temp_regvar): Move to init.c. + (do_static_initialization): Use build_{aggr,vec}_init. + (do_static_destruction): Fix typo in comment. + * dump.c (dequeue_and_dump): Handle INIT_EXPR. + * except.c (expand_throw): Use create_temporary_var. + * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init. + * init.c (expand_vec_init_try_block): Remove. + (expand_vec_init_catch_clause): Likewise. + (get_temp_regvar): New function. + (begin_init_stmts): Likewise. + (finish_init_stmts): Likewise. + (perform_member_init): Use build_{aggr,vec}_init. Build up tree + structure here. + (emit_base_init): Likewise. Remove unused parameter. + (expand_virtual_init): Likewise. + (expand_cleanup_for_base): Use finish_subobject. + (expand_aggr_vbase_init_1): Simplify. + (construct_virtual_bases): Use tree-generating functions to build + up initialization. + (expand_aggr_init): Likewise. Rename to build_aggr_init. + (expand_default_init): Likewise. + (expand_aggr_init_1): Likewise. + (expand_vec_init): Rename to build_vec_init. + * method.c (do_build_copy_constructor): Use tree-generating + functions. Don't call clear_last_expr. + (do_build_assign_ref): Likewise. + (synthesize_method): Call clear_last_expr here. + * parse.y (base_init): Don't call clear_last_expr here. + (nodecls): Likewise. + * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set. + * semantics.c (do_pushlevel): Move to here. + (do_poplevel): Likewise. + (stmts_are_full_exprs_p): New variable. + (finish_expr_stmt): Handle logic for temoprary cleanup here. + (finish_for_stmt): Use finish_expr_stmt. + (finish_cleanup): New function. + (finish_function_try_block): Fix indentation. + (finish_subobject): New function. + (setup_vtbl_ptr): Call keep_next_level here. + (finish_stmt_expr): Handle a block with no scope inside the + statement-expression. + (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle + SUBOBJECT. + * tree.c (search_tree): Handle INIT_EXPR. + (mapcar): Likewise. + * typeck.c (build_modify_expr): Don't build an RTL_EXPR. + * typeck2.c (store_init_value): Change expand_aggr_init to + build_aggr_init in comment. + +1999-08-25 Mark Mitchell + + * dump.c (dequeue_and_dump): Dump TARGET_EXPRs. + +1999-08-25 Nathan Sidwell + + * decl2.c (handle_class_head): Be graceful about additional + scope qualifiers. Adjust comments to reflect reality. + +1999-08-24 Jason Merrill + + * call.c (build_conditional_expr): Fix typo. + * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an + lvalue before trying to mess with the sides. + + * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly. + +Mon Aug 23 22:17:20 1999 Mumit Khan + + * g++spec.c (lang_specific_driver): Add room for NULL in arglist. + +1999-08-23 Jason Merrill + + * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2. + Return arbitrary pointer or NULL. + (check_eh_spec): Call __throw_type_match_rtti_2. + * tinfo.h (*::dcast): Return int. Add valp parm. + * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers. + * tinfo2.cc (__throw_type_match_rtti_2): Likewise. + (__throw_type_match_rtti): Now just a wrapper. + + * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind. + (init_exception_processing): Don't initialize them. + +1999-08-23 Paul Burchard + + * decl.c (check_default_argument): Fix typo. + +1999-08-22 Mark Mitchell + + * cp-tree.def (STMT_EXPR): Fix typo in node name. + + * dump.c (dump_next_stmt): New function. + (dequeue_and_dump): Use it. + + * pt.c (tsubst_copy): Make sure to initialize return value for a + STMT_EXPR, even when processing_template_decl. + * semantics.c (finish_stmt_expr): A statement-expression whose + last statement is not an expression-statement has type `void'. + +1999-08-20 Mark Mitchell + + * semantics.c (finish_stmt_expr): Fix typo in comment. + * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR. + (mapcar): Likewise. + * init.c (build_vec_delete_1): Make the children of a permanent + BIND_EXPR permanent. + * pt.c (register_specialization): Don't register a specialization + more than once. + +1999-08-18 Andrew Haley + + * method.c (process_overload_item): Call build_mangled_C9x_name () + for all integer parameter types larger than long long. + +1999-08-19 Mark Mitchell + + * pt.c (redeclare_class_template): Merge default template + arguments in both directions. + + * typeck.c (common_type): Undo 1999-08-18 change. Remove + compiler_error message. + +1999-08-19 Jason Merrill + + * cp-tree.h: Declare flag_use_repository. + * pt.c (do_decl_instantiation): Don't complain about duplicate + instantiation with -frepo. + (do_type_instantiation): Likewise. + + * pt.c (push_template_decl_real): Complain about everything + that isn't a valid template. + + * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't + affect inlines. + +1999-08-19 Mark Mitchell + + * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code. + * decl2.c (build_expr_from_tree): Handle it. + * error.c (dump_expr): Likewise. + * pt.c (for_each_template_parm): Likewise. + (tsubst_copy): Likewise. + * tree.c (search_tree): Likewise. + * semantics.c (finish_pseudo_destructor_call): Create it. + +1999-08-18 Mark Mitchell + + * search.c (setup_class_bindings): Robustify. + * typeck.c (common_type): Use same_type_p, not pointer equality, + to compare types. + + * cp-tree.h (build_lang_field_decl): Remove. + * class.c (build_vtable): Replace calls to build_lang_field_decl + with build_lang_decl. + (prepare_fresh_vtable): Likewise. + (finish_struct_1): Likewise. + (init_class_processing): Likewise. + * decl.c (push_using_decl): Likewise. + (init_decl_processing): Likewise. + (grokvardecl): Likewise. + (build_ptrmemfunc_type): Likewise. + (grokdeclarator): Likewise. + (build_enumerator): Likewise. + * decl2.c (grok_x_components): Likewise. + (do_class_using_decl): Likewise. + * except.c (call_eh_info): Likewise. + * init.c (init_init_processing): Likewise. + * rtti.c (expand_class_decl): Likewise. + * tree.c (build_base_fields): Likewise. + (build_vbase_pointer_fields): Likewise. + * lex.c (build_lang_decl): Build declarations on the permanent + obstack if we're building statmeent trees. + (retrofit_lang_decl): Handle both the full lang_decl and also the + smaller lang_decl_flags here. + (build_lang_field_decl): Remove. + * pt.c (push_template_decl_real): Issue errors for variable + declarations that are not static members. + +1999-08-18 Richard Henderson + + * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too. + (mapcar): Likewise. + +1999-08-17 Mark Mitchell + + * cp-tree.h (back_end_hook): New variable. + * decl2.c (back_end_hook): Define it. + (finish_file): If it's non-NULL, call it. + + * decl.c (add_decl_to_level): New function. + (push_local_binding): Use it. + (find_binding): Fix typo in comment. + (pushdecl): Use add_decl_to_level. Put templates on the + corresponding namespace-scope binding levels. + * dump.c (dequeue_and_dump): Print the specializations of a + template. + * pt.c (push_template_decl_real): Don't push a template multiple + times. + +1999-08-17 Mark Mitchell + + * cp-tree.h (CALL_DECLARATOR_PARMS): New macro. + (CALL_DECLARATOR_QUALS): Likewise. + (CALL_DECARATOR_EXCEPTION_SPEC): Likewise. + * decl.c (grokdeclarator): Adjust to use them. + * decl2.c (grokfield): Likewise. + (reparse_absdcl_as_casts): Likewise. + * lex.c (make_call_declarator): Likewise. + (set_quals_and_spec): Likewise. + * pt.c (tsubst): Likewise. + * tree.c (mapcar): Remove special hack to handle third operand of + a CALL_EXPR. + +1999-08-16 Mark Mitchell + + * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro. + * class.c (build_vtable): Use build_lang_field_decl to build the + VAR_DECLs for vtables. + (prepare_fresh_vtable): Likewise. + * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if + CAN_HAVE_FULL_LANG_DECL_P. + (push_using_decl): Use build_lang_decl to build USING_DECLs. + (grokdeclarator): Use build_lang_decl to build TYPE_DECLs. + * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P. + (build_lang_field_decl): Likewise. + (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much + to copy. + + * cp-tree.def (STMT_EXPR): New tree node. + * cp-tree.h (STMT_EXPR_STMT): New macro. + (store_return_init): Change prototype. + (finish_named_return_value): New function. + (expand_stmt): Likewise. + (expand_body): Likewise. + (begin_stmt_tree): Likewise. + (finish_stmt_tree): Likewise. + (expanding_p): New variable. + (last_expr_type): Likewise. + (building_stmt_tree): New macro. + * decl.c (start_function): Use building_stmt_tree, not + processing_template_decl, where appropriate. + (store_parm_decls): Likewise. + (store_return_init): Move most of the body to semantics.c. + (finish_function): Use building_stmt_tree. + (finish_stmt): Clear last_expr_type here. + (cp_function): Add expanding_p, last_tree, last_expr_type. + (push_cp_function_context): Save them. + (pop_cp_function_context): Restore them. + * decl2.c (setup_vtbl_ptr): Move to semantics.c. + * error.c (dump_expr): Handle STMT_EXPR. + * except.c (expand_start_catch_block): Use building_stmt_tree. + Use add_decl_stmt. + * expr.c (cplus_expand_expr): Handle STMT_EXPR. + (do_case): Move add_tree call to semantics.c. + * parse.y (return_init): Use finish_named_return_value. + (for.init.statement): Use finish_expr_stmt. + * parse.c: Regenerated. + * pt.c (do_pushlevel): Move to semantics.c. + (do_poplevel): Likewise. + (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR. + (tsubst_expr): Don't expand all the way to RTL here. Handle + RETURN_INIT and CTOR_INITIALIZER. + (instantiate_decl): Call expand_body after tsubst'ing into + DECL_SAVED_TREE. + * semantics.c (expand_stmts): New function. + (expanding_p): New variable. + (last_expr_type): Likewise. + (finish_expr_stmt): Use building_stmt_tree. + (begin_if_stmt): Likewise. + (finish_if_stmt_cond): Likewise. + (finish_then_clause): Likewise. + (begin_else_clause): Likewise. + (finish_else_clause): Likewise. + (begin_while_stmt): Likewise. + (finish_while_stmt_cond): Likewise. + (finish_while_stmt): Likewise. + (finish_do_body): Likewise. + (finish_do_stmt): Likewise. + (finish_return_stmt): Likewise. + (begin_for_stmt): Likewise. + (fnish_for_init_stmt): Likewise. + (finish_for_cond): Likewise. + (finish_for_expr): Likewise. + (finish_for_stmt): Likewise. + (finish_break_stmt): Likewise. + (finish_continue_stmt): Likewise. + (finish_switch_cond): Likewise. + (finish_switch_stmt): Likewise. + (finish_case_label): Call add_tree here if necessary. + (finish_goto_statement): Use building_stmt_tree. + (begin_try_block): Likewise. + (begin_function_try_block): Likewise. + (finish_try_block): Likewise. + (finish_function_try_block): Likewise. + (finish_handler_sequence): Likewise. + (finish_function_handler_sequence): Likewise. + (begin_handler): Likewise. + (finish_handler_parms): Likewise. + (finish_handler): Likewise. + (begin_compound_stmt): Likewise. + (finish_compound_stmt): Likewise. + (finish_asm_stmt): Likewise. + (finish_label_stmt): Likewise. + (finish_named_return_value): New function. + (setup_vtbl_ptr): Moved here from decl2.c. + (do_pushlevel): Moved here from pt.c. + (do_poplevel): Likewise. + (begin_stmt_expr): Use building_stmt_tree. + (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR, + when building_stmt_tree. + (begin_stmt_tree): New function. + (finish_stmt_tree): Likewise. + (expand_stmt): Likewise. + (expand_body): Likewise. + * tree.c (build_cplus_method_type): Make sure the argument types + end up on the same obstack as the METHOD_TYPE. + (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR, + THROW_EXPR, STMT_EXPR. + (mapcar): Break out common cases. Handle COMPOUND_EXPR, + MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than + sorry, if an unsupported node is encountered. + * typeck.c (require_complete_type_in_void): Handle BIND_EXPR. + (c_expand_return): Don't call add_tree here. + +1999-08-15 Mark Mitchell + + * pt.c (check_default_tmpl_args): Don't check in local scopes. + (tsubst_decl): Make sure the declaration is on a saveable + obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local + variable. + (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs. + +1999-08-14 Jason Merrill + + Speed up Koenig lookup. + * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm + to return namespaces we've looked at. + * decl2.c (lookup_using_namespace): Likewise. + (add_function): Don't call ovl_member. + (lookup_arg_dependent): Initialize k.namespaces to the list of + namespaces seen in unqualified lookup. + * call.c (equal_functions): Move here from tree.c. + (joust): Use it to handle duplicate candidates. + * tree.c (ovl_member): Use ==. + +1999-08-13 Mark Mitchell + + * cp-tree.def (DECL_STMT): Make it smaller. + * cp-tree.h (lang_decl_flags): Move saved_tree to ... + (lang_decl): ... here. Add next. + (DECL_SAVED_TREE): Adjust accordingly. + (DECL_IMPLICIT_TYPEDEF_P): New macro. + (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. + (DECL_STMT_DECL): Likewise. + (create_implicit_typedef): New function. + (maybe_push_decl): Likewise. + (tsubst_default_argument): New function. + (at_function_scope_p): Likewise. + (add_decl_stmt): Likewise. + (push_permanent_obstack): Likewise. + * call.c (convert_default_arg): Use tsubst_default_argument. + * class.c (add_method): Use push_permanent_obstack. + (build_self_reference): Create a TEMPLATE_DECL for the + self-reference, if necessary. + * decl.c (pseudo_global_level_p): Only look at the current binding + level. + (push_binding): Use push_permanent_obstack. + (create_implicit_typedef): New function. + (pushtag): Use it. + (duplicate_decls): Use push_permanent_obstack. + (maybe_push_decl): New function. + (start_decl): Use it. Remove dead code. Use add_decl_stmt. + (start_decl_1): Remove dead code. + (cp_finish_decl): Remove DECL_STMT handling here. Don't use + pseudo_global_level_p. + (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a + template. + (grokdeclarator): Likewise, for TYPE_DECLs. Don't use + pseudo_global_level_p. + * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in + a template. + (get_sentry): Use push_permanent_obstack. + * dump.c (dequeue_and_dump): Enable DECL_STMT. + * except.c (call_eh_info): Use push_permanent_obstack. + (build_eh_type_ref): Likewise. + (do_pop_exception): Likewise. + (expand_eh_spec): Likewise. + (alloc_eh_object): Likewise. + (expand_throw): Likewise. + * init.c (build_java_class_ref): Likewise. + * lex.c (get_time_identifier): Likewise. + (free_lang_decl_chain): Correct type. + (retrofit_lang_decl): Adjust accordingly. + (build_lang_field_decl): Likewise. + * lex.h (free_lang_decl_chain): Likewise. + * parse.y (lang_extdef): Don't use pseudo_global_level_p. + * parse.c: Regenerated. + * pt.c (tsubst_default_arguments): New function. + (retrieve_local_specialization): Likewise. + (register_local_specialization): Likewise. + (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use + pseudo_global_level_p to determine whether or not a template is + primary. + (lookup_template_class): Likewise. Use create_implicit_typedef. + (instantiate_class_template): Call tsubst_default_arguments for + member functions, if appropriate. + (tsubst_default_argument): New function. + (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs. + * search.c (at_function_scope_p): New function. + * semantics.c (finish_asm_stmt): Use push_permanent_obstack. + (finish_label_stmt): Likewise. + (add_decl_stmt): New function. + (begin_class_definition): Likewise. + (finish_typeof): Likewise. + * tree.c (copy_template_template_parm): Likewise. + (copy_to_permanent): Likewise. + (push_permanent_obstack): Define. + (mark_addressable): Use it. + * typeck.c (mark_addressable): Likewise. + +1999-08-13 Gavin Romig-Koch + + * cp-tree.h (init_cplus_unsave): New. + (cplus_unsave_expr_now): New. + * lex.c (init_parse): Call init_cplus_unsave. + * tree.c (init_cplus_unsave): New. + (cplus_unsave_expr_now): New. + +1999-08-13 Mark Mitchell + + * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and + decl_constant_value to simplify array bounds. + +1999-08-11 Jason Merrill + + * lang-options.h: Add -fms-extensions. + * cp-tree.h: Declare flag_ms_extensions. + * decl2.c: Define it. + * class.c (instantiate_type): Don't complain about taking the address + of a bound member function if -fms-extensions. + * typeck.c (build_unary_op): Likewise. + * decl.c (grokdeclarator): Or about implicit int. + * init.c (resolve_offset_ref): Or about implicit '&'. + +1999-08-11 Mark Mitchell + + * cp-tree.h (minimal_parse_mode): Remove. + (finish_label_stmt): New function. + * decl.c (saved_scope): Remove minimal parse mode. + (maybe_push_to_top_level): Don't save it. + (pop_from_top_level): Don't restore it. + (define_label): Split out template-handling code to semantics.c. + (start_decl): Don't use minimal_parse_mode. + (cp_finish_decl): Likewise. + (start_function): Don't increment it. + (store_return_init): Don't use it. + (finish_function): Don't decrement it. + * parse.y (label_colon): Use finish_label_stmt throughout. + * parse.c: Regenerated. + * pt.c (minimal_parse_mode): Don't define it. + (tsubst_expr): Use finish_label_stmt. + * semantics.c (finish_label_stmt): New function. + + * dump.c (queue): Be careful when computing bitmasks. + (dequeue_and_dump): Describe binfos as binfos, not as + vectors. + + * parse.y (pedantic): Give it itype. Adjust usage accordingly + throughout. + * parse.c: Regenerated. + + * Make-lang.in (CXX_SRCS): Remove sig.c. + * Makefile.in (CXX_OBJS): Remove sig.o. + (sig.o): Remove. + * cp-tree.h (CPTI_OPAQUE_TYPE): Remove. + (CPTI_SIGNATURE_TYPE): Likewise. + (CPTI_SIGTABLE_ENTRY_TYPE): Likewise. + (opaque_type_node): Likewise. + (signature_type_node): Likewise. + (sigtable_entry_type): Likewise. + (flag_handle_signatures): Likewise. + (lang_type): Remove is_signature, is_signature_pointer, + is_signature_reference, has_opaque_typedecls, + sigtables_has_been_generated. Adjust dummy. Remove signature, + signature_pointer_to, signature_reference_to. + (IS_SIGNATURE): Remove. + (SET_SIGNATURE): Remove. + (CLEAR_SIGNATURE): Remove. + (IS_SIGNATURE_POINTER): Remove. + (IS_SIGNATURE_REFERENCE): Remove. + (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove. + (SIGTABLE_HAS_BEEN_GENERATED): Remove. + (CLASSTYPE_SIGNATURE): Remove. + (SIGNATURE_TYPE): Remove. + (SIGNATURE_METHOD_VEC): Remove. + (SIGNATURE_POINTER_TO): Remove. + (SIGNATURE_REFERENCE_TO): Remove. + (lang_decl_flags): Remove is_default_implementation. Rename + memfunc_pointer_to to saved_tree. + (IS_DEFAULT_IMPLEMENTATION): Remove. + (DECL_MEMFUNC_POINTER_TO): Remove. + (DECL_MEMFUNC_POINTING_TO): Remove. + (DECL_SAVED_TREE): Adjust definition. + (tag_types): Remove signature_type_node. + (SIGNATURE_FIELD_NAME): Remove. + (SIGNATURE_FIELD_NAME_FORMAT): Likewise. + (SIGNATURE_OPTR_NAME): Likewise. + (SIGNATURE_SPTR_NAME): Likewise. + (SIGNATURE_POINTER_NAME): Likewise. + (SIGNATURE_POINTER_NAME_FORMAT): Likewise. + (SIGNATURE_REFERENCE_NAME): Likewise. + (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise. + (SIGTABLE_PTR_TYPE): Likewise. + (SIGTABLE_NAME_FORMAT): Likewise. + (SIGTABLE_NAME_FORMAT_LONG): Likewise. + (SIGTABLE_TAG_NAME): Likewise. + (SIGTABLE_VB_OFF_NAME): Likewise. + (SIGTABLE_VT_OFF_NAME): Likewise. + (finish_base_specifiers): Change prototype. + (build_signature_pointer_type): Remove. + (build_signature_reference_type): Remove. + (build_signature_pointer_constructor): Remove. + (build_signature_method_call): Remove. + (build_optr_ref): Likewise. + (append_signature_fields): Likewise. + (signature_error): Likewise. + * call.c (build_this): Remove signature support. + (build_over_call): Likewise. + (build_new_method_call): Likewise. + * class.c (add_implicitly_declared_members): Likewise. + (finish_struct_1): Likewise. + (finish_struct): Likewise. + * cvt.c (cp_convert_to_pointer): Likewise. + (convert_to_pointer_force): Likewise. + (ocp_convert): Likewise. + * decl.c (sigtable_decl_p): Remove. + (init_decl_processing): Remove support for signatures. + (cp_finish_decl): Likewise. + (grokdeclarator): Likewise. + (grokparms): Likewise. + (xref_tag): Likewise. + (start_function): Likewise. + (start_method): Likewise. + * decl2.c (finish_sigtable_vardecl): Remove. + (flag_handle_signatures): Remove. + (lang_f_options): Remove handle-signatures. + (grokfield): Remove support for signatures. + (grokbitfield): Likewise. + (finish_file): Likewise. + (reparse_absdcl_as_casts): Likewise. + * error.c (dump_type_real): Likewise. + (dump_function_decl): Likewise. + * friend.c (make_friend_class): Likewise. + * gxx.gperf: Remove __signature__, signature, __sigof__, sigof. + * hash.h: Regenerated. + * init.c (build_new_1): Remove support for signatures. + * lang-options.h: Remove -fhandle-signatures, + -fno-handle-signatures. + * lex.c (init_parse): Remove support for signatures. + (yyprint): Likewise. + * lex.h (rid): Remove RID_SIGNATURE. + * method.c (build_decl_overload_real): Remove support for + signatures. + (hack_identifier): Likewise. + * parse.y (base_class): Likewise. + (base_class.1): Likewise. + (access_specifier): Likewise. + * search.c (lookup_member): Likewise. + * semantics.c (finish_qualified_object_call_expr): Likewise. + (finish_template_type_parm): Likewise. + (begin_class_definition): Likewise. + (finish_base_specifier): Likewise. + * sig.c: Remove. + * tree.c (build_cplus_method_type): Remove support for signatures. + * typeck.c (require_complete_type): Likewise. + (c_sizeof): Likewise. + (c_alignof): Likewise. + (build_object_ref): Likewise. + (build_component_ref): Likewise. + (build_indirect_ref): Likewise. + (build_c_cast): Likewise. + (build_modify_expr): Likewise. + (convert_for_initialization): Likewise. + * typeck2.c (signature_error): Remove. + (store_init_value): Remove support for signatures. + (digest_init): Likewise. + (build_x_arrow): Likewise. + (build_functional_cast): Likewise. + * xref.c (GNU_xref_decl): Likewise. + +1999-08-10 Martin v. Loewis + + * lex.c (do_identifier): Remove unnecessary lookup of class field. + +1999-08-09 Martin v. Loewis + + * decl2.c (set_decl_namespace): Do not complain about non-matching + decls if processing a template. + +1999-08-09 Mark Mitchell + + * decl.c (build_ptrmemfunc_type): Handle qualified + pointer-to-member types here. + * tree.c (cp_build_qualified_type_real): Simplify handling here. + +1999-08-09 Kaveh R. Ghazi + + * lex.c (lang_identify): Likewise. + +1999-08-09 Bernd Schmidt + + * Makefile.in: Update dependencies. + * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with + NULL_RTX. + * decl.c: Include "function.h" + (cleanup_label, return_label): Delete declarations. + (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX. + (finish_function): Rename last_parm_insn variable to + fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX. + * decl2.c: Include "function.h". + (rtl_expr_chain): Delete declaration. + * method.c: Include "function.h" + * tree.c (build_vbase_pointer_fields): Don't initialize + DECL_SAVED_INSNS with NULL_RTX. + * typeck.c: Include "function.h" + +1999-08-09 Jason Merrill + + * semantics.c (begin_function_try_block, finish_function_try_block, + finish_function_handler_sequence): New fns. + * parse.y (function_try_block): Use them. + * pt.c (instantiate_decl): Likewise. + + * cp-tree.h: Declare in_function_try_handler. + * decl.c: Define it. + (start_function): Clear it. + (struct cp_function, push_cp_function_context): Save it. + (pop_cp_function_context): Restore it. + * parse.y (function_try_block): Set and clear it. + * except.c (expand_end_catch_block): Rethrow if we reach the end + of a function-try-block handler in a ctor or dtor. + * typeck.c (c_expand_return): Complain about returning from a + function-try-block handler of a ctor. + + * parse.y (function_try_block): Call end_protect_partials + before expand_start_all_catch. + +1999-08-08 Jason Merrill + + * decl.c (struct binding_level): Add eh_region field. + (push_binding_level): Set it. + (define_label): Complain about jumping into an EH block. + + * ptree.c (print_lang_type): Print the real type of a PMF. + Print what exceptions a fn type throws. + +1999-08-07 Kaveh R. Ghazi + + * class.c (count_fields, add_fields_to_vec): Add static prototype. + + * cp-tree.h (opname_tab, assignop_tab, operator_name_string, + get_id_2, composite_pointer_type, dump_node_to_file): Constify a + char*. + + * decl.c (named_label_list, cp_finish_decl, grokdeclarator): + Constify a char*. + + * decl2.c (finish_static_data_member_decl, grokfield): Constify a + char*. + + * dump.c (queue_and_dump_index, dump_int, dump_string, + dump_string_field, dequeue_and_dump, dump_node_to_file): Constify + a char*. + (dump_stmt): Add static prototype. + + * errfn.c (cp_thing): Constify a char*. + + * error.c (dump_unary_op, dump_binary_op, aggr_variety, + dump_aggr_type, dump_global_iord, dump_decl, dump_function_name, + dump_expr): Constify a char*. + + * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc, + read_line_number): Add static prototype. + (opname_tab, assignop_tab, operator_name_string): Constify a char*. + (real_yylex): Move label `letter' into the scope where it is used. + + * method.c (build_mangled_template_parm_index, build_overload_int, + build_decl_overload_real, get_id_2): Constify a char*. + + * search.c (check_final_overrider): Make static. + + * typeck.c (composite_pointer_type): Constify a char*. + +1999-08-06 Jason Merrill + + * pt.c (maybe_get_template_decl_from_type_decl): Make sure that + we're looking at a class. + + * decl.c (lookup_name_real): Set the complain flag if we're + looking for a namespace member. + + * lex.c (real_yylex): We can have a number with no digits. + + * cvt.c (cp_convert_to_pointer): Don't force pmf conversions. + + * search.c (binfo_from_vbase): New fn. + * cp-tree.h: Declare it. + * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion + from pointer to member of virtual base. + * typeck.c (get_delta_difference): Likewise. + +1999-08-06 Alexandre Oliva + + * pt.c (tsubst): Use build_index_type to build in-template array + index type. Fixes g++.oliva/dwarf1.C. + * decl.c (grokdeclarator): Likewise, just for consistency, as it + doesn't seem to trigger the bug without it. + +1999-08-06 Jason Merrill + + * typeck2.c (add_exception_specifier): Use complete_type. + +1999-08-06 Mark Mitchell + + * error.c (dump_expr): Handle EXACT_DIV_EXPR. + (dump_binary_op): Bulletproof. + * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR]. + * tree.c (search_tree): Don't enumerate all the nodes of classes + `1', `2', and `<'; handle them generically. Don't be sorry about + "unrecognized tree codes"; just abort. + (no_linkage_check): Don't do linkage checks for templates. + + * tree.c (cp_build_qualified_type_real): Handle + pointer-to-member-function types correctly. + +1999-08-05 Jason Merrill + + * decl.c (pushdecl): Only give an error for shadowing a parm + from *this* function. + +Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com) + + * typeck2.c: Update URLs and mail addresses. + +1999-08-04 Nathan Sidwell + + * cp-tree.h (empty_except_spec): New global var. + (compexcepttypes): Remove prototype. + (comp_except_specs): Prototype new global function. + (add_exception_specifier): Prototype new global function. + * decl.c (empty_except_spec): Define new global var. + (duplicate_decls): Use comp_except_specs, reword error message. + (init_decl_processing): Initialize empty_except_spec. + Adjust build_exception_variant calls. + * parse.y (exception_specification_opt): Use empty_except_spec. + (ansi_raise_identifier): Call check_for_new_type. + (ansi_raise_identifiers): Use add_exception_specifier. + * pt.c (tsubst): Use add_exception_specifier to build exception + specifier. + * search.c (check_final_overrider): New static function, broken + out of get_matching_virtual. Check throw specifiers, reword + diagnostics. + (get_matching_virtual): Use check_final_overrider. + * tree.c (build_exception_variant): Use comp_except_specs. + * typeck.c (compexcepttypes): Remove. + (comp_except_types): New static function, helper for + comp_except_specs. Compare two types as exception specifiers. + (comp_except_specs): New global function, compare two exception + specifiers. + (comptypes): Adjust for comp_except_specs. + * typeck2.c (add_exception_specifier): New global function. + + * class.c (check_for_override): Reword error message. + +1999-08-03 Nathan Sidwell + + * call.c (convert_arg_to_ellipsis): Use pod_type_p. + * cp-tree.h (struct lang_type): Added non_pod_class flag. + (CLASSTYPE_NON_POD_P): New macro to access it. + * class.c (finish_struct_1): Determine non-PODness. + Check for arrays of pointers (-Weffc++). + Remove array inspection duplicated code. + * tree.c (pod_type_p): Detect non-pod non-aggregate types. + Use CLASSTYPE_NON_POD_P. + +1999-08-03 Nathan Sidwell + + * class.c (duplicate_tag_error): Preserve template information. + +1999-08-03 Nathan Sidwell + + * decl.c (start_enum): Show location of previous definition. + * parse.y (enumlist_opt): New reduction. + (structsp): Simplify enum rules to use enumlist_opt. + +1999-08-03 Jason Merrill + + * lex.c (yyprint): Handle PFUNCNAME. + + * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only + build_expr_from_tree on the args of a TEMPLATE_ID_EXPR. + +1999-08-03 Mumit Khan + + * decl.c (start_decl): Set attributes before duplicate_decls call. + +1999-08-02 Mark Mitchell + + * Make-lang.in (CXX_SRCS): Add dump.c. + * Makefile.in (CXX_OBJS): Add dump.o. + (dump.o): New target. + * cp-tree.h (DECL_CONV_FN_P): Document. + (DECL_OVERLOADED_OPERATOR_P): New function. + (TYPE_PTRMEM_CLASS_TYPE): New macro. + (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. + (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE. + (ASM_VOLATILE_P): New macro. + (STMT_LINENO): Likewise. + (cp_namespace_decls): New function. + (dump_node_to_file): New function. + * decl.c (cp_namespace_decls): New function. + (walk_namespaces_r): Use it. + (wrapup_globals_for_namespace): Likewise. + * decl2.c (flag_dump_translation_unit): New variable. + (lang_decode_option): Handle -fdump-translation-unit. + (finish_file): If flag_dump_translation_unit is set, dump the + translation unit. + * dump.c: New file. + * lang-options.h: Add -fdump-translation-unit. + * pt.c (tsubst_template_parms): Robustify. + (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P. + (tsubst_expr): Use STMT_LINENO. + * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check + for invalid cv-qualifiers even while building templates. + +1999-08-02 Richard Henderson + + * call.c: Include defaults.h instead of expr.h. + * decl.c: Likewise. + * pt.c: Likewise. + * typeck.c: Include defaults.h. + +1999-08-02 Mark Mitchell + + * lex.c (errorcount, sorrycount): Don't declare. + * repo.c (errorcount, sorrycount): Likewise. + * typeck2.c (errorcount, sorrycount): Likewise. + +1999-08-02 Jakub Jelinek + + * call.c (convert_default_arg, build_over_call): Change all uses of + PROMOTE_PROTOTYPES, so that it tests it as a C expression. + Ensure expr.h is included. + * decl.c (grokparams): Ditto. + * pt.c (tsubst_decl): Ditto. + * typeck.c (convert_arguments): Ditto. + +1999-08-02 Jason Merrill + + * class.c (mark_overriders): Fix order of args to overrides. + (warn_hidden): Likewise. Fix for having virtual and non-virtual + functions with the same name. + +1999-08-02 Richard Henderson + + * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null. + +1999-08-01 Mark Mitchell + + * call.c (build_conditional_expr): Fix typo in comment. + +1999-08-01 Bernd Schmidt + + * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack, + case_stack; use in_control_zone_p. + * typeck.c (c_expand_return): Likewise. + +1999-07-31 Bernd Schmidt + + * except.c (catch_clauses): Delete declaration. + +1999-07-30 Mark Mitchell + + * call.c (build_conditional_expr): Call convert_from_reference to + avoid reference/non-reference type confusion. Fix typo. + +1999-07-30 Richard Henderson + + * typeck2.c (initializer_constant_valid_p): Moved to c-common.c. + * cp-tree.h (initializer_constant_valid_p): Remove. + +1999-07-28 Mark Mitchell + + * call.c (conditional_conversion): Don't build BASE_CONVs for + conversions between things that have the same type. + (build_conditional_expr): Tweak. + (convert_like): Some BASE_CONVs really do require the generation + of code. + + * init.c (perform_member_init): Don't go through build_modify_expr + for simple initializations. + +1999-07-27 Jason Merrill + + * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro. + * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for + virtual functions and MI. Simplify. + + * method.c: Remove prototype for largest_union_member. + * pt.c (determine_specialization): Fix uninitialized warning. + * lex.c (real_yylex): Likewise. + +1999-07-27 Mark Mitchell + + * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS + here too. + + * cp-tree.h (BINFO_VIRTUALS): Document new format. + * class.c (modify_one_vtable): Change prototype accordingly. + (modify_all_vtables): Likewise. + (modify_all_direct_vtables): Likewise. + (modify_all_indirect_vtables): Likewise. + (build_vtable_entry_for_fn): New function. + (set_rtti_entry): Simplify for new BINFO_VIRTUALS format. + (modify_vtable_entry): Likewise. + (add_virtual_function): Likewise. + (build_vtbl_initializer): New function. + (finish_vtbls): Simplify for new BINFO_VIRTUALS format. + (fixup_vtable_deltas1): Likewise. + (fixup_vtable_deltas): Likewise. + (override_one_vtable): Likewise. + (finish_struct_1): Likewise. + + * error.c (dump_expr): Likewise. + * search.c (get_abstract_virtuals_1): Likewise. + (get_abstract_virtuals): Likewise. + (expand_upcast_fixups): Likewise. + * tree.c (debug_binfo): Likewise. + * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to + __pure_virtual here. + +1999-07-26 Mark Mitchell + + * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error + as per 1999-07-26 change. + + * typeck.c (c_sizeof): Don't allow non-static data members. + (expr_sizeof): Likewise. + +1999-07-26 Jason Merrill + + * input.c (feed_input): Only touch lineno and input_filename + if !USE_CPPLIB. Save the old values before setting the new ones. + + * input.c (feed_input): Add file, line parms. + * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust. + (real_yylex): Check linemode before input_redirected(). + + * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL + from op new to warning. + +1999-07-26 Mark Mitchell + + * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion. + * call.c: All uses changed. + * typeck.c: Likewise. + +1999-07-26 Nathan Sidwell + + * exception.cc (__cplus_type_matcher): Match __eh_matcher + prototype. + +1999-07-26 Mark Mitchell + + * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro. + (ARITHMETIC_TYPE_P): Adjust definition for standard conformance. + (strip_top_quals): Declare. + (ncp_convert): Likewise. + (type_after_usual_arithmetic_conversions): Likewise. + (composite_pointer_type): Likewise. + * call.c (strip_top_quals): Don't make it static. + (promoted_arithmetic_type_p): New function. + (conditional_conversion): Likewise. + (null_ptr_cst_p): Allow `false' as a NULL pointer constant. + (standard_conversion): Use same_type_p. Don't build BASE_CONVs + for converting a type to itself. + (reference_binding): Honor LOOKUP_NO_TEMP_BIND. + (implicit_conversion): Make sure the from and to types are + complete. + (add_builtin_candidate): Correct handling of ?: operator. + (add_builtin_candidates): Improve documentation. + (build_conditional_expr): New function. + (can_convert): Implement in terms of can_convert_arg. + (ncp_convert): New function. + * typeck.c (type_after_usual_arithmetic_conversions): New + function, split out from common_type. + (composite_pointer_type): New function, split out from + build_conditional_expr. + (common_type): Use type_after_usual_arithmetic_conversions. + Remove redundant attribute merging. + (comptypes): Tidy. Handle COMPLEX_TYPE. + (build_binary_op_nodefault): Use null_ptr_cst_p. + (build_conditional_expr): Remove. + (convert_for_assignment): Use new conversion functions. + + * cp-tree.h (abstract_virtuals_error): Change declaration. + * typeck2.c (abstract_virtuals_error): Check to see if an error + occurred, and return a boolean value accordingly. + (build_functional_cast): Adjust accordingly. + * class.c (finish_struct_1): Likewise. + * cvt.c (ocp_convert): Likewise. + * decl.c (cp_finish_decl): Likewise. + (grokparams): Likewise. + (grok_op_properties): Likewise. + (start_function): Likewise. + * init.c (build_new_1): Likewise. + + * pt.c (unify): Don't get confused by pointers-to-member functions. + + * search.c (build_cplus_new): Robustify. + +1999-07-24 Richard Henderson + + * gxx.gperf (__builtin_va_arg): New. + * parse.y (VA_ARG): New token. + (unary_expr): Recognize it. + +Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com) + + * g++FAQ.texi: Deleted per Joe Buck's request. + * Makefile.in: Corresponding changes. + +1999-07-23 Jason Merrill + + * lex.c: Sync with C frontend. + (whitespace_cr): New fn. + (skip_white_space): Use it. + (init_parse): Reorder. + (yyprint): Support CONSTANT. + (pragma_getc, pragma_ungetc): Bring back. + (read_line_number): Change in_system_header directly. + (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file. + (parse_float): Update to C version. + (yylex): Handle '$' under the letter case. + Remove looking_for_typename handling. + Support hex floating point constants. + Follow C's lead for choosing type of integer constants. + Rearrange stuff to match C frontend. + (yyungetc, reinit_parse_for_block, yylex): Support indent_level. + * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC. + +1999-07-23 Mark Mitchell + + * call.c (reference_binding): Tweak. + (mayble_handle_implicit_object): Use direct_reference_binding to + create the right implicit conversion sequence. + +1999-07-22 Mark Mitchell + + * pt.c (convert_nontype_argument): Don't call decl_constant_value + if we're converting to a reference type. + + * call.c (NEED_TEMPORARY_P): New macro. + (standard_conversion): Set it, for derived-to-base conversions. + (reference_related_p): New function. + (reference_compatible_p): Likewise. + (convert_class_to_reference): Likewise. + (direct_reference_binding): Likewise. + (reference_binding): Rework for standards-compliance. + (convert_like): Adjust accordingly. + (maybe_handle_ref_bind): Simplify; the right conversion sequences + are now built up in reference_binding. + (initialize_reference): New function. + * cp-tree.h (ICS_USER_FLAG): Document. + (ICS_THIS_FLAG): Likewise. + (ICS_BAD_FLAG): Likewise. + (NEED_TEMPORARY_P): Likewise. + (cp_lvalue_kind): New type. + (real_lvalue_p): Return it. + * error.c (dump_expr): Provide more accurate representation for + AGGR_INIT_EXPRs. + * init.c (expand_default_init): Do not try to perform implicit + conversions for a brace-enclosed initializer. + * search.c (lookup_conversions): Document. + * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate + appropriately. + (real_lvalue_p): Adjust accordingly. + (lvalue_p): Likewise. + (build_cplus_new): Don't allow the creation of an abstract class. + * typeck.c (convert_for_initialization): Use initialize_reference. + +1999-07-21 Gavin Romig-Koch + + * lex.c (real_yylex) : Correct the test for overflow when lexing + integer literals. + +1999-07-20 Jason Merrill + + * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL, + not DECL_BUILT_IN, to determine if a function is internally declared. + (duplicate_decls): Likewise. Improve handling of builtins. + (push_overloaded_decl): Remove special handling of builtins. + + * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P. + + * decl.c (grokdeclarator): Pull out decl_constant_value in + templates, too. + + * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm. + * cp-tree.h, pt.c, semantics.c: Adjust. + * method.c (largest_union_member): Remove. + + * lang-specs.h (c++-cpp-output): Pass -fpreprocessed. + + * lex.c (token_getch, token_put_back): New fns. + (real_yylex): Use them. + + * lex.c (lang_init): Generalize. + (lang_init_options): Tell cpplib this is C++. + (nextchar): Remove. Replace uses with put_back. + (skip_white_space): Handle linemode here. Optimize for cpplib. + (extend_token_buffer_to): New fn. + (extend_token_buffer): Use it. + (read_line_number, check_newline): Just deal with tokens. + (real_yylex): More cpplib optimizations. Simplify. Don't produce + EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here. + * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING. + * parse.y (PAREN_STAR_PAREN): Remove. + * input.c: Don't use the putback machinery with cpplib. + (sub_getch): Fold back into getch. + (getch): Don't handle linemode here. + (feed_input): Unget any text in the token buffer. + + * lex.c (set_typedecl_interface_info, set_vardecl_interface_info, + nextyychar, nextyylval): Remove. + +1999-07-20 Michael Tiemann + Jason Merrill + + * lex.c (indent_level): New variable. + (init_parse): Set cpp_token to CPP_DIRECTIVE. + (consume_string): Make this smart about USE_CPPLIB. + (yyungetc): Use put_back function. + (pragma_getc, pragma_ungetc): Functions deleted. + (check_newline): Rewrite to be intelligent about USE_CPPLIB. + Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and + pragma_ungetc. + (real_yylex): Rewrite to be intelligent about USE_CPPLIB. + Also, clean up cases where we redundantly set token_buffer[0]. + (read_line_number): New fn. + * input.c (feed_input): Use integrated cpplib if USE_CPPLIB. + (end_input): Call cpp_pop_buffer if USE_CPPLIB. + (sub_getch): Conditionalize out code that's not appropriate if + USE_CPPLIB. + (put_back): Rewrite in case USE_CPPLIB is defined. + (input_redirected): Ditto. + +Tue Jul 20 11:24:19 1999 Bernd Schmidt + + * cp-tree.h: Delete lots of declarations of tree nodes; replaced by + c_global_trees and accessor macros defined in c-common.h. + (cp_tree_index): New enumeration. + (cp_global_trees): Declare new array. Add accessor macros for it, and + delete declarations of tree nodes replaced by it. + (builtin_function): Delete macro, add declaration for new function. + Include c-common.h. + * decl.c: Delete definitions for tree nodes that were replaced by + cp_global_trees and c_global_trees. + (init_decl_processing): Call c_common_nodes_and_builtins; delete code + to generate the common builtins here. + (builtin_function): New function. + * decl2.c (abort_fndecl): Delete declaration. + * except.c (expand_builtin_return_address): Delete declaration. + (builtin_return_address_fndecl): Delete variable. + (const_ptr_type_node): Delete declaration. + * lex.c (cons_up_default_function): Delete declaration of + void_list_node. + * parse.y (void_list_node): Delete declaration. + * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type): + Delete variables. + (const_string_type_node): Delete declaration. + * search.c (abort_fndecl): Delete declaration. + * Makefile.in: Update dependencies. + +1999-07-19 Mark Mitchell + + * pt.c (check_default_tmpl_args): Move test for missing default + arguments here, from ... + (end_template_parm_list): Here. + +1999-07-18 Mark Mitchell + + * decl.c (lookup_nested_type): Remove. + (pushtag): Don't call it. + +Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (INTERFACE): Bump to 2. + +1999-07-17 Alexandre Oliva + + * typeck2.c (my_friendly_abort): Updated URL with bug reporting + instructions to gcc.gnu.org. Removed e-mail address. + +1999-07-17 Mark Mitchell + + * pt.c (determine_specialization): Tighten error-checking. + (end_template_parm_list): Likewise. + +1999-07-14 Mark Mitchell + + * pt.c (check_default_tmpl_args): Handle friends defined in the + class just like member functions defined in the class. + +1999-07-09 Michael Tiemann + Jason Merrill + + * cp-tree.h (struct lang_decl): Added field for storing sorted + FIELD_DECLs (used in TYPE_DECLs). + (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union. + (DECL_SORTED_FIELDS): New macro. + * class.c (method_name_cmp): New function. + (finish_struct_methods): Modified to support sorting and searching + methods. + (finish_struct_anon): Changed code in inner loop to use ELT rather + than UELT (which required an extra indirection for every reference). + (field_decl_cmp): New function to support sorting FIELD_DECLs. + (finish_struct_1): Sort fields. + * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them. + (lookup_fnfields_1): Search sorted methods in METHOD_VEC. + Also, switch to using array indexing rather than a changing pointer. + * ptree.c (print_lang_decl): Handle TYPE_DECLs that have + DECL_SORTED_FIELDS. + +1999-07-09 Jason Merrill + + * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style + casts in system headers or extern "C" blocks. + + * pt.c (do_decl_instantiation): Downgrade duplicate instantiation + errors to pedwarn. + +1999-07-09 Michael Tiemann + + * decl2.c (write_virtuals): Deleted declaration. + * cp-tree.h (write_virtuals): Deleted extern declaration. + * class.c (finish_struct_1): Removed #if 0'd code that mentions + write_virtuals. + * semantics.c (begin_class_definition): Rewrite code to not depend + on write_virtuals. + + * lex.c (cp_pragma_interface): New function. + (cp_pragma_implementation): Likewise. + (handle_cp_pragma): Call them. + + * typeck.c (comptypes): Simplify C code in look_hard. + + * xref.c (PALLOC): Use xcalloc, not calloc. + (SALLOC): Use xmalloc, not malloc. + + * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary. + + * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS + is NO_DEBUG. + + * decl.c (duplicate_decls): If a redeclaration doesn't match the + initial declaration, then don't save the inline info and by all + means don't mark the function as a builtin function. + + * decl.c (lookup_name_real): Set NONCLASS to 1 if + CURRENT_CLASS_TYPE is 0. + + * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to + NULL_TREE. + + * ptree.c (print_lang_type): Added vtable-needs-writing. + +Wed Jul 7 01:26:47 1999 Alexandre Oliva + + * decl2.c (mark_vtable_entries): Fix check for rtti offset. + +1999-07-06 Gavin Romig-Koch + + * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : + Merged into c-common. + +1999-07-05 Dave Brolley + + * lex.c (errorcount): Declare it. + (finish_parse): Update errorcount for when using CPPLIB. + +1999-07-05 Mark Mitchell + + * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template + parameters. + (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro. + * decl.c (push_class_binding): Use it. + (lookup_name_real): Likewise. + +1999-07-02 Gavin Romig-Koch + + * cp-tree.h (widest_integer_literal_type_node, + widest_unsigned_literal_type) : New. + * decl.c (widest_integer_literal_type_node, + widest_unsigned_literal_type) : New. + (init_decl_processing): Handle/use the two new types. + * lex.c (real_yylex): Same. + * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : + Same. + +1999-07-01 Mark Mitchell + + * decl.c (grokdeclarator): Don't give names "for linkage purposes" + to anonymous cv-qualified types. + +1999-07-01 Gavin Romig-Koch + + * lex.c (real_yylex) : Change integer literal overflow handling to + be like c-lex.c. + + * lex.c (real_yylex): Improve 'integer constant out of range' messages. + +1999-06-28 Richard Henderson + + * decl.c (cp_finish_decl): Fix typo in cp_warning_at call. + +1999-06-28 Jason Merrill + + * error.c (dump_type_real): Handle TREE_LIST again. + + * typeck.c (comp_target_parms): Don't complain about + converting from () to (...) if !flag_strict_prototype. + + * decl.c (grokdeclarator): Update the names of all variants when + de-anonymizing. + +1999-06-21 Mark Mitchell + + * init.c (expand_aggr_vbase_init): Rename to + construct_virtual_bases. Conditionalize construction here, + rather than ... + (emit_base_init): Here. + +1999-06-19 Mark Mitchell + + * semantics.c (finish_asm_stmt): Apply decay conversions to + input operands. + + * decl.c (expand_static_init): When building an anonymous function + for use with atexit, compute its body before and after entering + the function. + + * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and + EXIT_EXPR. + +1999-06-18 Mark Mitchell + + * init.c (expand_aggr_vbase_init): Add flag parameter. + (build_partial_cleanup_for): Remove, inlining into .. + (expand_cleanup_for_base): ... here. Take flag parameter. + (emit_base_init): Pass the in_chrg parameter to + emit_aggr_vbase_init. + (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base. + +1999-06-16 Mark Mitchell + + * decl2.c (import_export_decl): Use same_type_p, rather than + relying on pointer-equality for types. + + * method.c (do_build_copy_constructor): Simplify. + + * call.c (build_method_call): Remove bogus code for two-argument + delete. + * init.c (build_new_1): Expand on comment, and remove dead code. + + * init.c (expand_cleanup_for_base): New function, split out + from ... + (emit_base_init): Here. + (expand_aggr_vbase_init): Use it. + +1999-06-15 Mark Mitchell + + * cp-tree.h (class_cache_firstobj): Declare. + (maybe_push_cache_obstack): Rename to push_cache_obstack. + * class.c (permanent_obstack): Remove declaration. + (class_cache_firstobj): Make it global. + (add_method): Don't use permanent_obstack directly. + (pushclass): Only free the class_cache_obstack if we know how far + back to free it. + (maybe_push_cache_obstack): Rename to push_cache_obstack. + * decl.c: Remove dead comment. + (saved_scope): Add class_cache_firstobj. + (push_to_top_level): Save it. + (pop_from_top_level): Restore it. + (push_class_level_binding): Use push_cache_obstack, not + maybe_push_cache_obstack. + * search.c (push_class_decls): Likewise. + +1999-06-14 Martin von Löwis + + * pt.c (tsubst_friend_function): Push into namespace of friend + function before pushdecl'ing it. + +1999-06-14 Nathan Sidwell + + * call.c (build_new_op): Remove REF_BIND from all operands. + +1999-06-13 Alexandre Oliva + + * init.c (build_new_1): Look up operator delete even if there was + no explicit new placement. + +1999-06-08 Nathan Sidwell + + * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out + of ... + (build_throw): ... here. Call it. + (process_start_catch_block): Call it. + +1999-06-07 Mark Mitchell + + * search.c (convert_pointer_to_single_level): Reimplement without + using get_binfo. + +1999-06-06 Mark Mitchell + + * method.c (is_back_referenceable_type): Back-reference bools when + not squangling. + +1999-06-07 Dave Brolley + + * lex.c (real_yylex): Replace unused bytes from bad multibyte char. + * input.c (putback_buffer): New structure type. + (putback): Replaces putback_char member. + (putback): Replaces putback_char static variable. + (feed_input): Use putback. + (end_input): Use putback. + (sub_getch): Use putback. + (put_back): Use putback. + +1999-06-05 Mark Mitchell + + * decl.c (grokdeclarator): Fix typo in last change. + +1999-06-04 Jason Merrill + + * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack. + (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise. + +1999-06-04 Nathan Sidwell + + * except.c (build_throw): Check throw expression validity. + +1999-06-03 Mark Mitchell + + * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned + just because flag_signed_bitfields is false. + +1999-06-03 Nathan Sidwell + + * semantics.c (begin_class_definition): Update the struct's + location here ... + * class.c (finish_struct): ... rather than here. + + * decl.c (make_typename_type): Don't rely on uninitialized + variable. + +1999-05-31 Kaveh R. Ghazi + + * Makefile.in (ALL_CFLAGS): Add '-W -Wall'. + +1999-05-31 Mark Mitchell + + * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange + and friends rather than messing with current_obstack directly. + (cp_build_qualified_type_real): Rework ARRAY_TYPE + allocation to match practice throughout the rest of the + compiler. + +1999-05-30 Mark Mitchell + + * lex.c (make_lang_type): Create TYPE_BINFO for + TEMPLATE_TYPE_PARMs just like for non-template types. + + * decl.c (start_decl): Move checks on initialization to ... + (cp_finish_decl): Here. Tidy formatting slightly. + +1999-05-28 Mark Mitchell + + * decl.c (add_binding): Don't complain about a redeclaration of a + semantically identical typedef in a local scope. + +1999-05-28 Nathan Sidwell + + * decl.c (complete_array_type): Allocate off same obstack. Fix + DO_DEFAULT comment to match reality. + + * friend.c (make_friend_class): Fix diagnostic typo. + +1999-05-28 Mark Mitchell + + * decl.c (lookup_namespace_name): Handle getting a + TEMPLATE_ID_EXPR. + (expand_static_init): Don't call pushdecl for implicitly declared + `atexit' used to register destructors. + +1999-05-25 Mark Mitchell + + * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to + initialize a vtable. + + * cp-tree.h (NAMESPACE_LEVEL): Reformat. + (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes + by combining TEMPLATE_INFO and LEVEL into a single union. + (DECL_TEMPLATE_INFO): Reformat. + (DECL_SAVED_TREE): Document. + (DECL_TEMPLATE_INJECT): Remove. + * class.c (finish_struct): Remove code to deal with + DECL_TEMPLATE_INJECT. + + * decl.c (maybe_process_template_type_declaration): Handle all new + types in templates uniformly. + * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not + DECL_CONTEXT. + * pt.c (lookup_template_class): Inject template instantiations of + forward-declarations. + (instantiate_class_template): Remove code processing + DECL_TEMPLATE_INJECT. + + * pt.c (lookup_template_class): Tweak lookup to find member + templates. + + * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into + ASM_CV_QUAL. + * semantics.c (finish_asm_stmt): Make strings permanent if they're + used in a template. + +1999-05-25 Jason Merrill + + * typeck.c (casts_away_constness, casts_away_constness_r): Strip both + parts of pointer to data member types. + +1999-05-24 Mark Mitchell + + * decl2.c (mark_vtable_entries): Don't make a copy of a function, + and then make it look like `abort'. Just use `abort' instead. + + * typeck.c (build_static_cast): Don't allow static_casts that cast + away constness. + (casts_away_constness_r): New function. + (casts_away_constness): Likewise. + + * decl.c (lookup_tag): Remove code no longer needed after + name-lookup improvements. + * decl2.c (handle_class_head): Make error-recovery more robust. + * friend.c (make_friend_class): Reject templated typename types. + * lex.c (is_global): A template parameter isn't global. + * parse.y (class_head): Robustify. + * parse.c: Regenerated. + +1999-05-22 Mark Mitchell + + * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs, + INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs. + + * cp-tree.h (push_nested_namespace): Declare. + (pop_nested_namespace): Likewise. + * decl.c (push_nested_namespace): New function. + (pop_nested_namespace): Likewise. + * pt.c (instantiate_class_template): Use them. + + * tree.c (mapcar): Handle NON_LVALUE_EXPR. + + * cp-tree.h (cplus_expand_constant): Declare. + * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're + converted from one pointer-to-object type to another. + * expr.c (cplus_expand_constant): Don't make it static. + * typeck.c (build_component_ref): Don't crash when presented with + a component which is a TEMPLATE_DECL. + (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a + cast from a pointer-to-member constant to its own type does not + result in a valid non-type template argument. + +1999-05-21 Mark Mitchell + Nathan Sidwell + + * Make-lang.in (cc1plus): Make it depend on gxx.gperf. + * cp-tree.h: Fix typo in documentation on pointers-to-members. + (cp_build_qualified_type): Make it a macro. + (cp_build_qualified_type_real): Declare. + * decl.c (grokdeclarator): Remove misleading comment. Avoid + problem with template parameters and restrict-qualification. + * gxx.gperf: Replace NORID with RID_UNUSED throughout. + * hash.h: Regenerated. + * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into + the enumeration. + (NORID): Remove definition. + * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real. + (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs. + (fn_type_unification): Check that the function type resulting from + the deduction is legal. + (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially. + (unify): Use cp_build_qualified_type_real. + * tree.c (build_cplus_array_type_1): Handle error_marks as inputs. + (cp_build_qualified_type): Rename to ... + (cp_build_qualified_type_real): Add additional COMPLAIN parameter + and modify appropriately. + + * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to + reveal optimization opportunities. + + * pt.c (tsubst): Don't issue error messages when we're not + complaining, even if we see a qualified function type. + (check_cv_quals_for_unify): Don't allow a qualified function + type. + +1999-05-20 Jason Merrill + + * class.c (instantiate_type): Downgrade errors for object-dependent + memfn refs to pedwarn. + +1999-05-20 Mark Mitchell + + * decl.c (grokdeclarator): Don't treat [] as indicating a + zero-sized array in a typedef. + + * call.c (build_object_call): Don't look at DECL_NAME for a type. + (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK. + (typeck.c): Or TYPE_MAIN_VARIANT for a type. + + * pt.c (for_each_template_parm): Rework to match documentation. + Don't be fooled by a COMPONENT_REF with no TREE_TYPE. + +1999-05-20 Jason Merrill + + * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P. + + * class.c (finish_base_struct): Allow non-COM bases for COM classes + except at the leftmost position. + (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable): + Pass the binfo's class, not the most derived, to skip_rtti_stuff. + * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise. + + * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue. + (build_cplus_new): Make sure that what we return is of the right type. + +1999-05-20 Mark Mitchell + + * cp-tree.h (make_ptrmem_cst): New function. + * expr.c (cplus_expand_constant): Split out from ... + (cplus_expand_expr): Here. Use cplus_expand_constant. + (init_cplus_expand): Set lang_expand_constant. + * pt.c (convert_nontype_argument): Use make_ptrmem_cst. + + * tree.c (make_ptrmem_cst): Define. + * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst. + * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst. + +1999-05-19 Mark Mitchell + + * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P. + + * decl2.c (start_static_storage_duration_function): Fix comment. + (finish_file): Create static storage duration functions lazily. + +1999-05-19 Jason Merrill + + Implement anonymous structs. + * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P. + * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust. + * class.c (finish_struct_1): Remove redundant check for anon struct. + * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union. + (check_tag_decl): Check for anonymous struct here. + * decl2.c (build_anon_union_vars): Catch anon struct at file scope. + * init.c (sort_member_init, emit_base_init): Handle getting fields + as well as names in current_member_init_list. + (perform_member_init): Handle getting an anon aggr. + * method.c (do_build_assign_ref): Don't descend into anon aggrs. + (do_build_copy_constructor): Likewise. + +1999-05-19 Mark Mitchell + + * tree.c (cp_build_qualified_type): Don't allow qualified function + types. + +Wed May 19 02:50:53 1999 Arvind Sankar + + * gxxint.texi: Fix typo. + +1999-05-19 Jason Merrill + + * call.c (find_scoped_type, resolve_scope_to_name): Lose. + * class.c (finish_struct_1): Use CLASS_TYPE_P. + * ptree.c (print_lang_type): Likewise. + * typeck.c (build_modify_expr, c_expand_asm_operands): Use + IS_AGGR_TYPE_CODE. + * typeck2.c (digest_init): Likewise. + +1999-05-18 Jason Merrill + + * call.c (joust): Compare the types of the conv ops, not the + target types of the conversions. + +Tue May 18 00:21:34 1999 Zack Weinberg + + * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc + was not given. + +1999-05-17 Mark Mitchell + + * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation. + * decl.c (grokfndecl): Don't allow inline declarations of friend + template specializations, or friend template specializations with + default arguments. + * pt.c (tsubst): Handle substitution into array types that does + not yield a fixed upper bound, even when not processing a + template. + (tsubst_copy): Deal with the fact that the second operand to a + TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC. + * search.c (marked_pushdecls_p): Don't descend into + TEMPLATE_TYPE_PARMs and the like. + (unmarked_pushdecls_p): Likewise. + + * call.c (build_over_call): Don't throw away + initializations/copies of empty classes; use MODIFY_EXPR and + INIT_EXPR as for non-empty classes. + * class.c (finish_struct_1): Put the padding byte for an empty + class on the TYPE_NONCOPIED_PARTS list for the class. + +1999-05-16 Mark Mitchell + + * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that + indicate a reference to a field that is a qualified name. + +1999-05-16 Jason Merrill + + * decl2.c (finish_objects): Don't use .?tors.* if we don't have + ASM_OUTPUT_CONSTRUCTOR. + + * friend.c (do_friend): Add attrlist arg. Remove support for + getting a non-decl as 'decl'. + * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or + rtl. + (grokdeclarator): Adjust. + * cp-tree.h: Adjust. + +1999-05-16 Mark Mitchell + + * cp-tree.h (permanent_p): New function. + * init.c (build_new_1): Use mapcar, not copy_node, to copy a + possibly complex tree node. + * tree.c (mapcar): Adjust comments, and follow coding standards in + conditional. + (permanent_p): New function. + +1999-05-13 Per Bothner + + * class.c (push_lang_context): Turn off DECL_IGNORED_P for + primitive Java types, if we actually see `extern "Java"'. + +1999-05-10 18:21 -0400 Zack Weinberg + + * lang-specs.h: Pass -$ to the preprocessor. + +1999-05-10 Jason Merrill + + * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too. + Don't bother wrapping an OFFSET_TYPE around unknown_type_node. + (resolve_offset_ref): Don't handle a raw baselink. + * cvt.c (build_expr_type_conversion): Likewise. + * typeck.c (decay_conversion, build_c_cast, convert_for_assignment, + convert_for_initialization): Likewise. + * class.c (instantiate_type): Handle seeing a baselink under an + OFFSET_REF. + * error.c (dump_expr): Likewise. + * pt.c (for_each_template_parm): Likewise. + (resolve_overloaded_unification): Likewise. + * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise. + * typeck.c (expr_sizeof): Also complain about other permutations + of overloaded functions. + +1999-05-07 Jason Merrill + + * init.c (resolve_offset_ref): Don't return a raw method. + Use BASELINK_P. + * typeck.c (decay_conversion): Don't handle a raw method. + Resolve all OFFSET_REFs. + (get_member_function_from_ptrfunc): 0 is a valid vtable index. + (build_binary_op_nodefault): Handle resolving overloaded fns. Use + same_type_p for pmf bits. Don't use build_binary_op to compare + raw pointers to methods. + (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE, + to decide when to call resolve_offset_ref. + (build_c_cast, convert_for_initialization): Likewise. + * cvt.c (build_expr_type_conversion): Likewise. + +1999-05-06 Nathan Sidwell + + * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class. + +1999-05-05 Mark Mitchell + + * decl2.c (start_objects): Don't let static constructors and + destructors get inlined. + + * parse.y (nested_name_specifier): Make sure ordinary types are + complete, just like template types. + * parse.c: Regenerated. + + * pt.c (check_explicit_specialization): Improve error messages. + +1999-05-04 Martin von Löwis + + * typeck.c (string_conv_p): Use same_type_p to check whether we + try to convert between char and wchar_t. + +1999-05-03 Mark Mitchell + + * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous + lookup to error_mark_node here. + (lookup_member): Revise documentation. Add comments. Don't set + the TREE_TYPE to error_mark_node here, and don't build up an extra + TREE_LIST for ambiguous lookups. + (setup_class_bindings): Adjust accordingly. + (push_class_decls): Revise out-of-date comments. + + * typeck.c (build_const_cast): Tighten checks for legality. + +1999-05-02 Martin von Löwis + + * init.c (build_member_call): Lookup names coming from + namespace-scoped LOOKUP_EXPR. + +1999-05-03 Jim Blandy + + * gxxint.texi: Add documentation for 'I'. + +1999-05-02 Martin von Löwis + + * tinfo.cc (operator==): Qualify type_info with std::. + +1999-05-02 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy. + (DECL_COMDAT): Remove definition. + +1999-05-01 Mark Mitchell + + * decl.c (wrapup_globals_for_namespace): Fix thinko in previous + change. + +1999-04-30 Mark Mitchell + + * class.c (build_vtable): Use build_lang_decl when building + vtables, not just build_decl. + (prepare_fresh_vtable): Likewise. + * decl.c (wrapup_globals_for_namespace): Mark vtables as + DECL_EXTERNAL when calling wrapup_global_declarations. + * decl2.c (priority_info_s): Add initializations_p and + destructions_p members. + (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED, + when deciding what vtables to write out. + (ssdf_decls): New variable. + (ssdf_decls_used): Likewise. + (start_static_storage_duration_function): Deal with being called + multiple times. Avoid inlining this function. + (generate_inits_for_priority): Deal with reuse of priority map. + (get_priority_info): Clear initializations_p and destructions_p. + (do_static_initialization): Tweak comment. + (do_static_destruction): Likewise. Fix condition on sentries for + destruction. + (generate_ctor_or_dtor_function): Call all of the static storage + duration functions. + (generate_ctor_or_dtor_function_for_priority): Check + initializations_p and destructions_p to see what priorities need + initialization functions. + (finish_file): Rework to generate multiple static storage duration + functions, rather than just one. + + * typeck.c (build_const_cast): Tweak last change to handle + templates correctly. + + * typeck.c (build_const_cast): Disallow use of const_cast to + anything but a pointer or reference type. + +1999-04-30 Nathan Sidwell + + * decl.c (cp_finish_decl): Don't permit arrays of abstract or + signature type. + +1999-04-29 Mark Mitchell + + * decl2.c (do_static_destruction): Remove obsolete FIXME comment. + (finish_file): Indent comments properly. + +1999-04-29 Richard Henderson + + * decl2.c (do_static_initialization): Call do_pending_stack_adjust. + (do_static_destruction): Likewise. + +1999-04-29 Nathan Sidwell + + * cp-tree.h (TYPE_NOTHROW_P): New macro. + * decl2.c (delete_sanity): Warn on deleting void *. + * init.c (build_new_1): Use TYPE_NOTHROW_P. + * typeck.c (c_expand_return): cp_pedwarn on returning NULL from + throwing operator new. + +1999-04-28 Nathan Sidwell + + * cp-tree.h (build_component_addr): Remove prototype. + * typeck.c (build_component_addr): Make static. Remove MSG + argument. + (build_component_addr): Remove MSG parameter, clean up + comment. + (build_x_function_call): Use cp_error. + (build_unary_op): Adjust call of build_component_addr. + +1999-04-28 Mark Mitchell + + * pt.c (tsubst_friend_class): Check for NULL. + +Wed Apr 28 11:42:22 1999 Andreas Schwab + + * search.c (binfo_for_vtable): Initialize bfvi.var. + +1999-04-27 Nathan Sidwell + + * rtti.c (build_x_typeid): Check rtti is enabled. + +1999-04-26 Mark Mitchell + + * search.c (is_subobject_of_p): Make sure we're looking at the + right baseclasses. + +1999-04-26 Marc Espie + + * Make-lang.in (cplib2.ready): Don't depend on phony targets. + +1999-04-23 Mark Mitchell + + * decl2.c (finish_file): Tweak handling of extern inlines so that + they are not unnecessarily put out. + + * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and + such as base classes. + +1999-04-22 Brendan Kehoe + + * tree.c (build_exception_variant): Fix typo: use the chain of U, + not trying V, while cycling through U. + +1999-04-22 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Remove returns_first_arg and + preserves_first_arg. Enlarge dummy accordingly. + (DECL_TINFO_FN_P): New macro. + (SET_DECL_TINFO_FN_P): Likeiwse. + (DECL_RETURNS_FIRST_ARG): Remove. + (DECL_PRESERVES_THIS): Likewise. + (DECL_INIT_PRIORITY): New macro. + (finish_struct_1): Change prototype. + (cat_namespace_levels): Remove prototype. + (vtable_decl_p): New prototype. + (vtype_decl_p): Likewise. + (sigtable_decl_p): Likewise. + (walk_globals_pred): New typedef. + (walk_globals_fn): Likewise. + (walk_globals): New prototype. + (walk_namespaces_fn): New typedef. + (walk_namespaces): New prototype. + (wrapup_globals_for_namespace): Likewise. + (walk_vtables): Remove prototype. + (walk_sigtables): Likewise. + (instantiate_pending_templates): New prototype. + * class.c (finish_struct_1): Don't return a value. + * decl.h (pending_statics): Remove declaration. + * decl.c (walk_namespaces_r): New function. + (walk_globals_r): Likewise. + (vtable_decl_p): Likewise. + (vtype_decl_p): Likewise. + (sigtable_decl_p): Likewise. + (walk_namespaces): Likewise. + (walk_globals_data): New type. + (walk_globals): New function. + (wrapup_globals_for_namespace): Likewise. + (expand_static_init): Remove assertion. Remove redundancy in + conditional. Don't put static data members in static_aggregates + Tidy. + (finish_function): Remove redundancy in conditional. Don't set + DECL_RETURNS_FIRST_ARG. + (cat_namespace_levels): Remove. + * decl2.c: Include splay-tree.h and varray.h. + (priority_info_s): New structure. + (finish_vtable_vardecl): Change prototype. Adjust for new calling + conventions. + (prune_vtable_vardecl): Likewise. + (finish_sigtable_vardecl): Likewise. + (setup_initp): Remove. + (do_dtors): Remove. + (do_ctors): Remove. + (start_static_storage_duration_function): New function. + (generate_inits_for_priority): Likewise. + (finish_static_storage_duration_function): Likewise. + (get_priority_info): Likewise. + (do_static_initialization): Likewise. + (do_static_destruction): Likewise. + (do_static_initialization_and_destruction): Likewise. + (generate_ctor_or_dtor_function): Likewise. + (generate_ctor_and_dtor_functions_for_priority): Likewise. + (pending_statics): Make it a varray. + (pending_statics_used): New variable. + (saved_inlines): Make it a varray. + (saved_inlines_used): New variable. + (finish_static_data_member): Change method of updating + pending_statics. + (mark_inline_for_output): Remove #if 0'd code. Change method of + updating saved_inlines. + (walk_vtables): Remove. + (walk_sigtables): Likewise. + (import_export_decl): Use DECL_TINFO_FN_P. + (pending_templates): Remove declaration. + (maybe_templates): Likewise. + (static_aggregates_initp): Likewise. + (setup_initp): Likewise. + (finish_objects): Simplify. + (INITIALIZE_P_IDENTIFIER): New macro. + (PRIORITY_IDENTIFIER): New macro. + (SSDF_IDENTIFIER): New macro. + (initialize_p_decl): New variable. + (priority_decl): Likewise. + (ssdf_decl): Likewise. + (priority_info_map): Likewise. + (finish_file): Recode output of static intializers and other + file-scope finalization tasks. + * error.c (OB_END_TEMPLATE_ID): New macro. + (dump_type_real): Use it. + (dump_decl): Likewise. + (dump_function_name): Likewise. + * lex.c (set_typedecl_interface_info): Adjust for new walk_globals + interface. + (check_newline): Use walk_globals, not walk_vtables. + * pt.c (pending_tempalte_expansions): Remove. + (set_vardecl_interface_info): Likewise. + (pending_templates): Make static. + (maybe_templates): Likewise. + (instantiate_class_template): Adjust call to finish_struct_1. + (instantiate_pending_templates): New function. + * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P. + * tree.c (static_aggregates_initp): Remove. + (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY + instead. + * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h. + + * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes + with the RTL code RETURN. + * hash.h: Regenerated. + * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD. + * parse.y: Replace RETURN with RETURN_KEYWORD throughout. + * parse.c: Regenerated. + * pt.c: Include varray.h. Include rtl.h since varray.h requires + it. + (inline_parm_levels): New variable. + (inline_parm_levels_used): Likewise. + (maybe_begin_member_template_processing): Update them. + (maybe_end_member_template_processing): Use them, rather than + guessing how many levels to pop. + + * decl.c (make_typename_type): Tighten error-checking. + +1999-04-20 Mark Mitchell + + * cp-tree.h (build_binary_op): Remove unneeded parameter. + * class.c (build_vrable_entry_ref): Adjust call to + build_binary_op. + * decl.c (expand_static_init): Likewise. + (grokdeclarator): Likewise. + (finish_function): Likewise. + * decl2.c (delete_sanity): Likewise. + (do_dtors): Likewise. + (do_ctors): Likewise. + * error.c (dump_type_suffix): Likewise. + * expr.c (cplus_expand_expr): Likewise. + * init.c (resolve_offset_ref): Likewise. + (build_new): Likewise. + (build_new_1): Likewise. + (build_vec_delete_1): Likewise. + (expand_vec_init_catch_clause): Likewise. + (build_delete): Likewise. + * pt.c (tsubst): Likewise. + * rtti.c (synthesize_tinfo_fn): Likewise. + * search.c (expand_upcast_fixups): Likewise. + (expand_direct_vtbls_init): Likewise. + * typeck.c (get_member_function_from_ptrfunc): Likewise. + (build_binary_op_nodefault): Likewise. + (point_int_sum): Likewise. + (pointer_diff): Likewise. + (build_unary_op): Likewise. + (build_modify_expr): Likewise. + (get_delta_difference): Likewise. + (build_ptrmemfunc): Likewise. + (expand_ptrmemfunc_cst): Likewise. + +1999-04-20 Jason Merrill + + * decl.c (grokfndecl): Always call cplus_decl_attributes. + * decl2.c (grokfield): Pass attrlist to grokdeclarator. + +1999-04-19 Mark Mitchell + + * cp-tree.h (finish_static_data_member_decl): New function. + * decl2.c (finish_static_data_member_decl): Split out from ... + (grokfield): Here. + * pt.c (instantiate_class_template): Use it here instead of + trying to fake it. + (tsubst_decl): Don't set DECL_ASSEMBLER_NAME; + finish_static_data_member_decl will do that. Explicit set + DECL_EXTERNAL to match non-template processing. + +1999-04-18 Mark Mitchell + + * cp-tree.h (finish_class_definition): Add parameter. + * parse.y (structsp): Use it. Don't call pop_scope here. + * parse.c: Regenerated. + * semantics.c (finish_class_definition): Pop it here. + +1999-04-17 Mark Mitchell + + * decl.c (xref_tag): Revise handling of nested template + declarations. + * pt.c (check_explicit_specialization): Tweak handling of friend + templates in template classes. + (tsubst_friend_class): Handle friend declarations for nested + member template classes. + +1999-04-16 Mark Mitchell + + * class.c (finish_struct): Remove unused variable. + (pushclass): Likewise. + (invalidate_class_lookup_cache): Likewise. + * cp-tree.def (TYPENAME_TYPE): Improve documentation. + * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME + doesn't get obliterated. + (make_typename_type): Handle template classes correctly. + + * cp-tree.h (TREE_NONLOCAL_FLAG): Remove. + (storetags): Declare. + * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG. + (pushclass): Likewise. Use storetags to install tag declarations, + not pushtag. + (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG. + * decl.c (storetags): Make it global. + (push_class_binding): Set INHERITED_VALUE_BINDING_P for an + implicit typename declaration. + (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG. + * method.c (hack_identifier): Likewise. + * search.c (lookup_member): Likewise. + + * decl.c (warn_about_implicit_typename_lookup): New function. + (lookup_name_real): Use it. Rework handling of implicit typename + extension. + +1999-04-15 Mark Mitchell + + * cp-tree.h (lookup_nested_field): Remove. + * class.c (push_nested_class): Handle UNION_TYPEs. + (pop_nested_class): Likewise. + * decl.c (lookup_name_real): Don't call lookup_nested_field. + (start_decl): Use push_nested_class, not just pushclass. + (cp_finish_decl): Use pop_nested_class, not just popclass. + * search.c (lookup_nested_field): Remove. + + * cp-tree.h (lang_type): Add documentation. + * decl2.c (handle_class_head): Create template declarations here, + as appropriate. + * parse.y (class_head): Return whether or not we entered a new + scope, as well as the type named. + (named_class_head): Likewise. + (named_complex_class_head_sans_basetype): Likewise. + (structsp): Adjust accordingly. Pop scope when required. + * parse.c: Regenerated. + * pt.c (check_default_tmpl_args): Robustify. + (redeclare_class_template): Likewise. + (instantiate_class_template): An instantiation of an + anonymous union is itself an anonymous union. + * semantics.c (begin_class_definition): Don't create template + declarations here. + +1999-04-15 Jason Merrill + + * parse.y (after_type_declarator_intern): New nonterminal. + (after_type_declarator): Use it. + (direct_after_type_declarator): Likewise. Move above + nonnested_type to fix reduce/reduce conflict resolution. + (declmods): Reducing from just 'attributes' has EMPTY precedence. + * Makefile.in (CONFLICTS): Update. + + * decl.c (define_label): Downgrade error for jumping over a + non-POD decl to pedwarn. + +1999-04-14 Mark Mitchell + + * cp-tree.h (popclass): Change declaration. + (pop_nested_class): Likewise. + (poplevel_class): Remove declaration. + * call.c (convert_default_argument): Pass no arguments to + popclass. + * class.c (finish_struct_1): Likewise. + (finish_struct): Likewise. + (popclass): Remove argument. Simplify code accordingly. + (pop_nested_class): Likewise. + * decl.c (poplevel_class): Declare it here, and make it static. + (poplevel): Handle class scopes. + (poplevel_class): Don't take an rgument. Simplify. + (pop_everything): Pass no arguments to pop_nested_class. + (cp_finish_decl): Pass no arguments to popclass. + (grokdeclarator): Pass no arguments to pop_nested_class. + (finish_function): Likewise. + * decl2.c (grokfield): Likewise. + (pop_scope): Pass no arguments to popclass. + * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class. + * pt.c (instantiate_class_template): Move call to pushclass, and + document. Pass no arguments to popclass. + (regenerate_decl_from_template): Likewise. + +1999-04-14 Jason Merrill + + * typeck.c (build_unary_op): Handle taking the address of a unique + bound non-static member function. + +1999-04-13 Martin von Loewis + + * lang-options.h (-Wdeprecated): New flag. + * decl2.c (warn_deprecated): New flag. + (lang_decode_option): Deprecated this-is-variable, + external-templates, alt-external-templates. + Support -Wdeprecated. + * errfn.c (cp_deprecated): New function. + +1999-04-13 Jason Merrill + + * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead + of the decls themselves. + + * pt.c (tsubst_function_type): Copy attributes over. + + * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority + and com_interface. + * cp-tree.h: Add prototype. + * decl.c (init_decl_processing): Set valid_lang_attribute. + +1999-04-13 Mark Mitchell + + * class.c (finish_struct_1): Look at the const-ness of the field's + type, not the TREE_READONLY-ness of the declaration. + * method.c (synthesize_method): Likewise. + * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when + creating new declarations. + +1999-04-13 Mike Stump + + * decl2.c (import_export_decl): Because vtables always reference + virtual functions, even if they are inlined, don't allow + -fno-implement-inlines to not emit them, instead, emit them with + the vtable. + * decl.c (start_function): Likewise. + +1999-04-12 Jason Merrill + + * cp-tree.h (struct lang_type): Add com_interface. + (CLASSTYPE_COM_INTERFACE): New macro. + * class.c (set_rtti_entry): COM interface classes have no RTTI + entries in their vtables; adjust. + (add_virtual_function, finish_base_struct, skip_rtti_stuff, + modify_one_vtable, fixup_vtable_deltas1, override_one_vtable, + finish_struct_1): Likewise. + * decl2.c (mark_vtable_entries): Likewise. + * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise. + * search.c (get_abstract_virtuals_1, get_abstract_virtuals, + expand_upcast_fixups): Likewise. + * tree.c (debug_binfo): Likewise. + + * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro. + * typeck.c (comptypes): If we get it, ignore attributes. + * class.c (instantiate_type): Use BASELINK_P. Change complain + parameter to flags; 2 means ignore attributes. + * call.c (build_op_delete_call): Pass it. + + * decl.c (xref_tag): Only complain once about using a typedef-name + with 'struct'. Downgrade to pedwarn. + + * decl.c (grokdeclarator): Allow [] syntax for zero-length array. + + * parse.y (absdcl_intern): New nonterminal. + (absdcl, direct_abstract_declarator): Use it. + + * pt.c (lookup_template_class): Look through implict typename. + +1999-04-11 Mark Mitchell + + * friend.c (add_friend): Deal gracefully with error_mark_node. + * method.c (build_overload_value): Handle pointers-to-members as + template parameters. + + * decl.c (push_binding): Fix typo in comment. + +1999-04-10 Mark Mitchell + + * error.c (dump_type_real): If a typename is a template-id, put + out the template arguments. + (dump_expr): Handle TEMPLATE_ID_EXPR. + * pt.c (lookup_template_class): Now that full arguments are + available everywhere, remove code that tried to guess them. + +1999-04-09 Mark Mitchell + + * decl.c (make_typename_type): Complain if we don't find a type + when trying to make a typename type for a non-template type. + +1999-04-09 Jason Merrill + + * decl.c (start_decl): Pass attributes to grokdeclarator. + (grokdeclarator): Handle attributes on constructor-syntax + initializers. + +1999-04-08 Mark Mitchell + + * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands + don't have types. + + * search.c (template_self_reference_p): Tweak. + +1999-04-07 Mark Mitchell + + * init.c (build_offset_ref): Don't build yet another weird data + structure to describe overloaded functions. + +1999-04-06 Mark Mitchell + + * cp-tree.h (BASELINK_P): New macro. + (SET_BASELINK_P): Likewise. + * init.c (build_member_call): Remove needless assignment in if + statement. + * search.c (lookup_field_r): Fix handling when we are looking + specifically for a type; these are not hidden by functions and + variables. + (lookup_member): Use SET_BASELINK_P. + * tree.c (is_overloaded_fn): Use BASELINK_P. + (really_overloaed_fn): Likewise. + (get_first_fn): Likewise. + +1999-04-05 Mark Mitchell + + * decl.c (lookup_name_current_level): Tweak, and improve + documentation. + + * class.c (maybe_fixup_vptrs): Remove declaration. + (build_class_init_list): Likewise. + * decl.c (pushdecl_class_level): Call check_template_shadow here + ... + (push_class_level_binding): ... not here. + * search.c (dfs_push_type_decls): Only avoid + template-self-reference TYPE_DECLs if they are from base classes. + +1999-04-04 Mark Mitchell + + * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL + nodes. Tidy. + +1999-04-03 Jason Merrill + + * class.c (maybe_fixup_vptrs, build_class_init_list): Lose. + (finish_struct_1): Don't call build_class_init_list. + +1999-04-02 Mark Mitchell + + * tinfo.h (__class_type_info): Fix illegal declaration. + + * cp-tree.def (TEMPLATE_ID_EXPR): Update comment. + * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro. + (IDENTIFIER_CLASS_VALUE): Improve documentation. + (is_properly_derived_from): Declare. + (invalidate_class_lookup_cache): Likewise. + (maybe_maybe_note_name_used_in_class): Likewise. + (note_name_declared_in_class): Likewise. + (push_using_decl): Remove duplicate declaration. + (id_in_current_class): Remove declaration. + (push_class_binding): Change prototype. + (clear_identitifer_class_values): Declare. + * call.c (is_properly_derived_from): Make it global. + (build_new_function_call): Be careful about updating candidates. + (build_new_method_call): Handle COMPONENT_REFs. Don't crash when + asked to make illegal calls. + * class.c: Include splay-tree.h. + (class_stack_node): Add names_used slot. + (check_member_decl_is_same_in_complete_scope): Remove. + (add_method): Fix comment. Push the declaration into class + scope. + (finish_struct_1): When popping the class, pop the bindings too. + Remove check for data member/function member conflict. + (finish_struct): Remove calls to + check_member_decl_is_same_in_complete_scope. Change calls to + popclass. + (pushclass): Clear names_used in the class stack entry. + Use invalidate_class_lookup_cache to remove cached entries, rather + than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE + before entering a new class. Remove dead code. Don't mess with + current_function_decl when pushing declarations. + (invalidate_class_lookup_cache): New function, split out from ... + (popclass): Here. Clean up names_used on our way out. + (instantiate_type): Adjust. + (build_self_reference): Don't push the declaration here. + (maybe_note_name_used_in_class): New function. + (note_name_declared_in_class): Likewise. + * decl.c (add_binding): Change prototype. + (find_class_binding_level): New function. + (innermost_nonclass_level): Likewise. + (current_binding_level): Update documentation. + (inner_binding_level): Remove. Replace with current_binding_level + throughout. + (push_binding_level): Remove special handling of + class_binding_level. + (pop_binding_level): Likewise. Use find_class_binding_level. + (suspend_binding_level): Likewise. + (global_bindings_p): Use innermost_nonclass_level. + (toplevel_bindings_p): Likewise. + (namespace_bindings_p): Likewise. + (pseudo_global_level_p): Likewise. + (push_binding): Clear INHERITED_VALUE_BINDING_P. + (add_binding): Check for illegal multiple declarations. Return a + value indicating whether or not the new binding was legal. + (push_local_binding): Skip over class binding levels. Check + return value from add_binding. + (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call + note_name_declared_in_class. + (pushlevel_class): Remove "fake out the rest of the compiler" + code. + (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs. + (clear_identifier_class_values): New function. + (pop_from_top_level): Use it. + (pop_everything): Tweak. + (maybe_process_template_type_declaration): Don't push the + declaration for the template here. + (pushtag): Don't push tag declarations into class scope here. + (pushdecl): Apply DeMorgan's law for readability. + (pushdecl_class_level): Remove special-case code for + TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions. + (push_class_level_bindng): Deal with inherited bindings. + (lookup_name_real): Remove special-case code for + TYPE_BEING_DEFINED, and some implicit typename magic. + (grokdeclarator): Handle COMPONENT_REF for a template function. + (build_enumerator): Don't call pushdecl_class_level here. + (id_in_current_class): Remove. + * decl2.c (grokfield): Don't call pushdecl_class_level or + check_template_shadow. + * errfn.c (cp_file_of): Don't declare. + (cp_line_of): Likewise. + * error.c (dump_decl): Handle an OVERLOAD. + (cp_file_of): Likewise. + (cp_line_of): Likewise. + * init.c (build_member_call): Handle a COMPONENT_REF. + * lex.c (do_identifier): Call maybe_note_name_used_in_class, not + pushdecl_class_level. + * method.c (hack_identifier): Build COMPONENT_REFs for references + to member templates as well as member functions. Remove dead + code. + * parse.y (left_curly): Remove. + (nonnested_type): Call maybe_note_name_used_in_class, not + pushdecl_class_level. + * parse.c: Regenerated. + (nested_name_specifier_1): Likewise. + * pt.c (check_explicit_specialization): Adjust, for robustness. + (check_template_shadow): Handle OVERLOADs. + (build_template_decl): Set DECL_CONSTRUCTOR_P on the + TEMPLATE_DECL, if appropriate. + * search.c (envelope_add_decl): Remove. + (dfs_pushdecls): Likewise. + (dfs_compress_decls): Likewise. + (dfs_push_decls): New function. + (dfs_push_type_decls): Likewise. + (setup_class_bindings): Likewise. + (template_self_reference_p): Likewise. + (lookup_field_r): Use it. + (looup_member): Remove old comment. Deal with ambiguity. + (push_class_decls): Use dfs_push_decls and dfs_push_type_decls, + and remove envelope processing. + * semantics.c (begin_class_definition): Let pushclass push + declarations for base classes. + (finish_member_declaration): Push declarations into class scope. + * typeck.c (build_component_ref): Just put an OVERLOAD into the + COMPONENT_REF, not a TREE_LIST of an OVERLOAD. + (build_x_function_call): Deal with OVERLOAD. Handle template-ids. + * Makefile.in (class.o): Depend on splay-tree.h. + +Wed Mar 31 11:30:43 1999 Nathan Sidwell + + * cvt.c (convert_pointer_to_real): Use same_type_p. + * typeck.c (comp_target_types): Use same_type_p. + +1999-03-31 Jason Merrill + + * semantics.c (begin_inline_definitions, + finish_inline_definitions): Rename from finish_default_args and + begin_inline_definitions, respectively, to something that isn't a + total lie. :) + * parse.y (structsp): Adjust. + + * tree.c (hash_tree_cons): Remove obsolete via_* parms. + (list_hash_lookup): Likewise. + (hash_tree_chain): Adjust. + * pt.c (tsubst): Adjust. + (tsubst_arg_types): Use plain hash_tree_cons. + * cp-tree.h (hash_tree_cons_simple): Lose. + * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons. + +Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi + + * Makefile.in (hash.h): Generate using gperf language 'C', not + 'KR-C', so gperf uses the `const' keyword on strings. + + * gxx.gperf (resword): Const-ify a char*. + +1999-03-30 Jason Merrill + + * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST, + CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES, + CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH, + CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST, + CLASSTYPE_BINFO_AS_LIST): Remove cruft. + * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c, + tree.c: Adjust. + +1999-03-29 Jason Merrill + + * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall. + +1999-03-28 Jason Merrill + + * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops. + +1999-03-27 Mark Mitchell + + * cp-tree.h (add_friend): Declare. + (add_friends): Likewise. + * friend.c (add_friend): Make it global. Don't add to + DECL_BEFRIENDING_CLASSES if the befriending class is a template. + (add_friends): Make it global. + (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the + befriending class is a template. + * parse.y (component_decl_1): Fix typo in comment. + * parse.c: Regenerated. + * pt.c (instantiate_class_template): Use add_friend and + add_friends rather that duplicating some of their functionality + here. + +1999-03-27 Jason Merrill + + * call.c (build_field_call): Unify 'this' and non-'this' cases. + + * typeck.c (build_indirect_ref): Check for 'this' sooner. + +Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi + + * call.c (op_error): Const-ify a char*. + (add_candidate, source_type, add_warning): Add static prototype. + (print_z_candidates): Const-ify a char*. + + * class.c (resolve_address_of_overloaded_function, + fixed_type_or_null, build_vtable_entry_ref): Add static prototype. + (get_vtable_name, finish_struct_1): Const-ify a char*. + + * cvt.c (convert_to_reference): Likewise. + + * decl.c (redeclaration_error_message, record_builtin_type, + record_unknown_type, member_function_or_else, bad_specifiers): + Likewise. + (find_binding, select_decl, unqualified_namespace_lookup, + lookup_flags, qualify_lookup, record_builtin_java_type, tag_name): + Add static prototype. + (warn_extern_redeclared_static, duplicate_decls, pushdecl, + implicitly_declare, record_builtin_java_type, define_function, + grok_op_properties, tag_name): Const-ify a char*. + + * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const. + (define_function, finish_builtin_type): Const-ify a char*. + (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn, + cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args. + (file_name_nondirectory): Const-ify a char*. + (init_filename_times): Don't prototype. + (compiler_error): Prototype. + (yyerror, init_repo): Const-ify a char*. + (build_srcloc): Don't prototype. + (build_x_indirect_ref, build_indirect_ref, build_component_addr): + Const-ify a char*. + (warn_for_assignment): Don't prototype. + (convert_for_initialization, readonly_error, check_for_new_type, + GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call): + Const-ify a char*. + + * decl2.c (acceptable_java_type, output_vtable_inherit, + setup_initp, start_objects, finish_objects, do_dtors, do_ctors, + merge_functions, decl_namespace, validate_nonmember_using_decl, + do_nonmember_using_decl): Add static prototype. + (lang_f_options): Const-ify a char*. + (finish_builtin_type): Likewise. + (add_function, arg_assoc_namespace, arg_assoc_class): Add static + prototype. + + * errfn.c: Include cp-tree.h. + (cp_thing): Add static prototype. + (compiler_error): Don't protoptype. + (cp_compiler_error): Cast `compiler_error' to `errorfn' before + passing it to `cp_thing'. + + * error.c (interesting_scope_p): Add static prototype. + + * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify + a char*. + + * init.c (compiler_error): Don't prototype. + (member_init_ok_or_else): Const-ify a char*. + (build_java_class_ref): Add static prototype. + + * lex.c (compiler_error): Don't prototype. + (get_time_identifier, interface_strcmp, extend_token_buffer, + handle_cp_pragma): Const-ify a char*. + (is_global, init_filename_times): Add static prototype. + (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*. + (compiler_error): Change from fixed args to variable args. + (yyerror): Const-ify a char*. + + * parse.y (cond_stmt_keyword): Const-ify a char*. + (parse_decl): Add static prototype. + + * pt.c (template_args_equal, print_template_context): Likewise. + (print_candidates, check_default_tmpl_args): Const-ify a char*. + (instantiate_class_template): Likewise. + + * repo.c (get_base_filename, open_repo_file, init_repo): Likewise. + + * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc, + expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise. + + * search.c (lookup_field_info, lookup_member): Likewise. + (lookup_member): Cast the first argument of `bzero' to a PTR. + + * sig.c (compiler_error): Don't prototype. + (build_signature_pointer_or_reference_nam): Const-ify a char*. + (get_sigtable_name, build_member_function_pointer): Likewise. + + * tree.c (compiler_error): Don't prototype. + (no_linkage_helper, build_srcloc): Add static prototype. + (build_vbase_pointer_fields): Const-ify a char*. + (__eprintf): Don't unnecessarily handle `const' when !__STDC__. + + * typeck.c (compiler_error): Don't prototype. + (convert_for_assignment): Const-ify a char*. + (comp_cv_target_types): Add static prototype. + (build_x_indirect_ref, build_indirect_ref, convert_arguments, + build_component_addr, build_unary_op, convert_for_initialization): + Const-ify a char*. + + * typeck2.c (ack): Add static prototype and change from fixed args + to variable args. + (readonly_error, check_for_new_type): Const-ify a char*. + + * xref.c (_XREF_FILE, find_file, filename, fctname, declname, + fixname, open_xref_file, classname, GNU_xref_begin): Likewise. + (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'. + (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call, + gen_assign, GNU_xref_member): Const-ify a char*. + +1999-03-25 Martin von Löwis + + * gxxint.texi: Remove old discussion on copying virtual bases. + +1999-03-25 Zack Weinberg + + * Make-lang.in: Remove all references to g++.o/g++.c. + Link g++ from gcc.o. + +1999-03-25 Jason Merrill + + * decl2.c (comdat_linkage): Treat vtables like functions. + +1999-03-25 Mark Mitchell + + * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES. + +1999-03-25 Nathan Sidwell + + * decl.c (init_decl_processing): Add `signed' type as a synonym + for `int'. + +1999-03-25 Jason Merrill + + * typeck.c (common_type): Handle cv-qual unification for pointers + to members. + + * decl.c (unqualified_namespace_lookup): Return error_mark_node + on error. + (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing. + * lex.c (do_identifier): If we got error_mark_node, call + lookup_name again. + +1999-03-24 Martin von Löwis + + * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty + classes. + +1999-03-24 Jason Merrill + + * decl.c (lookup_name_real): Do nested field lookup regardless of + TYPE_BEING_DEFINED. + +1999-03-24 Mark Mitchell + + * cp-tree.h (lang_type): Remove has_assignment and + has_real_assignment. Add befriending_classes. + (TYPE_HAS_ASSIGNMENT): Remove. + (TYPE_HAS_REAL_ASSIGNMENT): Likewise. + (CLASSTYPE_BEFRIENDING_CLASSES): New macro. + (lang_decl): Document. + (DECL_BEFRIENDING_CLASSES): New macro. + (FRIEND_NAME): Move declaration to more obvious location. + (FRIEND_DECLS): Likewise. + * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT. + * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES. + (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT. + (grok_op_properties): Likewise. + * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS. + (add_friend): Likewise. Don't do weird things with assignment + operators. Update DECL_BEFRIENDING_CLASSES. + (add_friends): Don't do weird things with assignment operators. + (make_friend_class): Likewise. Update + CLASSTYPE_BEFRIENDING_CLASSES. + * pt.c (instantiate_class_template): Don't set + TYPE_HAS_ASSIGNMENT. + (tsubst_copy): Substitute the TREE_TYPE for more unary + expressions. + * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT. + * search.c (protected_accessible_p): New function. + (friend_accessible_p): Likewise. + (accessible_p): Use them. + +1999-03-23 Mark Mitchell + + * pt.c (convert_nontype_argument): Don't create things that aren't + PTRMEM_CSTs when applying a qualification conversion to a + PTRMEM_CST. + +1999-03-23 Mark Mitchell + + * Makefile.in (OBJS): Don't mention hash.o. + (OBJDEPS): Likewise. + +1999-03-23 Jason Merrill + + * decl2.c (finish_file): Set at_eof to 2 after expanding ctors. + * decl.c (expand_static_init): Make sure we don't add any after + then. + + * decl.c (cp_finish_decl): Move intelligence about handling + DECL_COMDAT for variables from here... + * decl2.c (comdat_linkage): ...to here. + (maybe_make_one_only): Tweak. + (import_export_decl): Call comdat_linkage for variables, too. + (finish_file): Handle template statics properly. + +1999-03-22 Mark Mitchell + + * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG. + Document internals of pointer-to-member-functions. + (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc. + (PFN_FROM_PTRMEMFUNC): Likewise. + (build_type_conversion): Remove unused parameter. + (build_ptrmemfunc1): Declare. + (expand_ptrmemfunc_cst): New function. + (delta2_from_ptrmemfunc): Likewise. + (pfn_from_ptrmemfunc): Likewise. + * cvt.c (cp_convert_to_pointer): Remove unused parameter to + build_type_conversion. Use TYPE_PTRMEM_P for readability. + (convert_to_reference): Remove unused parameter to + build_type_conversion. + (ocp_convert): Likewise. + (build_user_type_conversion): Likewise. + * error.c (dump_expr): Handle NULL pointer-to-member functions. + * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions. + * method.c (build_overload_value): Don't go splitting CONSTRUCTORs + open when handling pointer-to-member functions. + * pt.c (convert_nontype_argument): Clean up error messages. Be + more stringent with pointers-to-members. + * typeck.c (build_ptrmemfunc1): Don't declare. Make it global. + (build_unary_op): Tidy ever-so-slightly. + (build_conditional_expr): Remove extra parameter to + build_type_conversion. + (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function + we're using. + (expand_ptrmemfunc_cst): Define. + (delta2_from_ptrmemfunc): Likewise. + (pfn_from_ptrmemfunc): Likewise. + +1999-03-19 Mark Mitchell + + * init.c (build_member_call): Handle template-id expressions + correctly. + * typeck.c (build_x_function_call): Likewise. + +1999-03-19 Chip Salzenberg + + * friend.c (make_friend_class): Avoid core dump when + not-yet-defined friend type lacks TYPE_LANG_SPECIFIC(). + +1999-03-18 Jason Merrill + + * decl.c (start_function): Suppress normal linkage heuristics + for #pragma interface under MULTIPLE_SYMBOL_SPACES. + +1999-03-19 Alexandre Oliva + + * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c. + ($(srcdir)/cp/parse.c): Moved from ../Makefile.in. + +1999-03-17 Martin von Löwis + + * parse.y (named_complex_class_head_sans_basetype): + Do not push a scope for error_mark_node. + (maybe_base_class_list): Likewise. + + * decl.c (start_decl): Check for error_mark_node as a type. + Detected by g++.brendan/array-refs.C. + (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C. + (maybe_build_cleanup_1): Likewise. Detected by + g++.jason/incomplete1.C. + + * tree.c (build_dummy_object): Use void_zero_node instead of the + error_mark_node. + (is_dummy_object): Check for such a node. + Detected by g++.bob/inherit1.C + +1999-03-16 Jason Merrill + + * method.c (old_backref_index): Split out... + (flush_repeats): From here. Rename back from try_old_backref. + (build_mangled_name): Put back some old-style repeat handling. + +Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi + + * lex.c: Don't include setjmp.h. + (parse_float): New static function. + (pf_args): New struct. + (real_yylex): Use them in call to `do_float_handler'. + +1999-03-15 Mark Mitchell + + * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here. + * tree.c (layout_basetypes): Not here. + * search.c (dfs_search): Remove; no longer used. + +1999-03-12 Mark Mitchell + + * decl2.c (validate_nonmember_using_decl): Issue sensible + error-messages on bogus qualifiers. + +1999-03-14 Jason Merrill + + * call.c (add_function_candidate): Fix uninitialized variable. + + * Makefile.in (search.o): Add dependency on varray.h. + +1999-03-13 Jason Merrill + + * decl.c (duplicate_decls): Use same_type_p. + * method.c (try_old_backref): Renamed from flush_repeats. Use + same_type_p. Don't try to handle repeats. Return success. + (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support + calls from old-style code, too. + (check_ktype): Use same_type_p. + (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT. + (build_qualified_name): Simplify logic. + (process_overload_item): Strip typedefs and quals at the top. + (build_mangled_name_for_type_with_Gcode): Remove call to + type_canonical_variant. + (build_mangled_name): Likewise. Remove support for old-style + repeats, which have been disabled since 2.7.2. Don't mess with + TREE_USED. + (build_decl_overload_real): Don't mess with TREE_USED. + +1999-03-13 Nathan Sidwell + + * error.c (cp_printers): Add 'F' escape character. + (dump_type_real): Remove TREE_LIST (fnargs) printing. + Functionality moved to dump_parameters. + (dump_type_suffix): Use dump_parameters and dump_exception_spec. + (dump_function_decl): Extend meaning of V parameter. Use + dump_parameters and dump_exception_spec. + (dump_parameters): New static function. + (dump_exception_spec): New static function. + (fndecl_as_string): Change argument semantics. Use + dump_function_decl directly. + + * sig.c (build_signature_table_constructor): Use cp_error. + +1999-03-13 Martin von Löwis + + * semantics.c (finish_switch_cond): Handle error cases gracefully. + Detected by g++.law/enum5.C. + + * typeck.c (build_modify_expr): Check for errors after resolving + offsets. Detected by g++.brendan/static1.C. + + * decl.c (complete_array_type): Ignore initial_value if it is an + error. Detected by g++.benjamin/17930.C. + + * typeck2.c (process_init_constructor): Return error if one argument + is in error. Detected by g++.benjamin/13478.C. + +1999-03-12 Martin von Löwis + + * decl.c (select_decl): Allow class templates when we need types. + * decl2.c (ambiguous_decl): Likewise. + +1999-03-12 Mark Mitchell + + * lex.c (do_identifier): Correct call to enforce_access. + * search.c (accessible_p): Tweak comment. + +1999-03-10 Mark Mitchell + + * semantics.c (begin_class_definition): Call build_self_reference. + (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs. + + * search.c (assert_canonical_unmarked): Fix typo in prototype. + + * search.c (dfs_canonical_queue): New function. + (dfs_assert_unmarked_p): Likewise. + (assert_canonical_unmarked): Likewise. + (access_in_type): Use it. + (accessible_p): Likewise. Walk the whole tree when umarking. + + * sig.c (build_signature_table_constructor): Use accessible_p + instead of compute_access. + +1999-03-09 Jason Merrill + + * call.c (add_builtin_candidates): Handle overloaded conversion ops. + +1999-03-09 Mark Mitchell + + * cp-tree.h (flag_access_control): Declare. + (TREE_VIA_PPUBLIC): Document. + (DECL_NONSTATIC_MEMBER_P): New macro. + (enforce_access): Return an indication of whether or not access + was permitted. + (build_self_reference): Change prototype. + (compute_access): Replace with ... + (accessible_p): New function. + (dfs_walk): Change prototype. + (dfs_unmark): Likewise. + (markedp): Likewise. + * call.c (enforce_access): Use accessible_p. + * class.c (build_self_reference): Insert the declaration into the + list of members for this type, and make it public. + * decl.c (xref_basetypes): Avoid ill-timed recursion. + * init.c (build_offset_ref): Use lookup_member, not three separate + name-lookups. Call enforce_access rather than checking for + illegal accesses here. + (resolve_offset_ref): Likewise. + * lex.c (do_identifier): Likewise. + * method.c (hack_identifier): Likewise. + * parse.y (self_reference): Remove. + (opt_component_decl_list): Don't use it. + * parse.c: Regenerated. + * pt.c (print_candidates): Generalize to handle lists of + overloaded functions. + (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's + not set. + (get_template_base): Use new calling convention for dfs_walk. + * search.c: Include varray.h. Add prototypes. + (dfs_walk): Accept a data pointer to pass to the work functions. + All callers changed. All work functions changed. + (breadth_first_search): Rename to bfs_walk, and make consistent + with dfs_walk. + (dfs_walk_real): New function. + (canonical_binfo): New function. + (context_for_name_lookup): Likewise. + (shared_marked_p): Likewise. + (shared_unmarked_p): Likewise. + (lokup_field_queue_p): Likewise. + (lookup_field_r): Generalize to handle both functions and fields. + (lookup_field): Just call lookup_member. + (lookup_fnfields): Likewise. + (lookup_member): Move body of lookup_field here and generalize. + (dfs_accessible_queue_p): Likewise. + (dfs_accessible_p): Likewise. + (dfs_access_in_type): Likewise. + (access_in_type): Likewise. + (compute_access): Remove, and replace with ... + (accessible_p): New function. + (vbase_types): Remove. + (vbase_decl_ptr_intermediate): Likewise. + (vbase_decl_ptr): Likewise. + (vbase_init_result): Likewise. + (closed_envelopes): Likewise. + (bvtable): Likewise. + +1999-03-09 Jason Merrill + + * call.c (add_function_candidate): Check for proper number of args + before checking the validity of those args. + +1999-03-06 Jason Merrill + + * cp-tree.h (struct lang_type): Add anon_union field. + (ANON_UNION_TYPE_P): Use it instead of examining type. + (SET_ANON_UNION_TYPE_P): New macro. + * decl.c (check_tag_decl): Use it. + + * search.c (compute_access): Handle non-type contexts earlier, and + handle NULL_TREE. + + * tree.c (build_exception_variant): Use copy_to_permanent. + + * decl2.c (setup_initp): Give statics with no priority the default + priority here. + (do_dtors, do_ctors, finish_file): Remove special handling of + non-prioritized statics. + +1999-03-05 Mark Mitchell + + * cp-tree.h (ANON_UNION_TYPE_P): Robustify. + * decl.c (make_typename_type): Don't issue an error if an + immediate lookup fails; it migt be resolved later. + * friend.c (is_friend): Add comment. + * search.c (breadth_first_search): Add POSTFN and DATA + parameters. Tidy. All callers changed. + (lookup_field_queue_p): New function. + (lookup_field_r): Likewise. + (lookup_field_post): Likewise. + (lookup_field): Use them, via breadth_first_search, instead of + duplicating logic. + (compute_access): Robustify. + (lookup_fnfield_info): New structure. + +1999-03-05 Jason Merrill + + * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again. + +1999-03-03 Jason Merrill + + * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4 + cc happy. + + * decl2.c (import_export_class): Also return if + CLASSTYPE_INTERFACE_ONLY is set. + +1999-03-03 Martin von Löwis + + * decl.c (push_overloaded_decl): Only overwrite the old binding if + there was one. + * decl2.c (do_local_using_decl): Fix loop termination. + +1999-03-02 Mark Mitchell + + * cp-tree.h (determine_specialization): Don't declare. + * pt.c (determine_specialization): Make it static. Eliminate + complain parameter. Note that decl is always non-NULL now, and + simplify accordingly. + + * decl.c (maybe_push_to_top_level): Always call + push_cp_function_context. + (pop_from_top_level): Always call pop_cp_function_context. + +1999-02-26 Nathan Sidwell + + * typeck.c (complete_type_or_else): Add VALUE arg, for helpful + diagnostics. + * cp-tree.h (complete_type_or_else): Added VALUE parameter. + * init.c (build_new_1): Extra arg to complete_type_or_else. + (build_delete): Likewise. + * typeck.c (require_complete_type): Likewise. + (pointer_int_sum): Likewise. + (pointer_diff): Likewise. + (build_component_ref): Likewise. + + * typeck2.c (incomplete_type_error): Always use cp_error. + Show declaration of undefined type, if appropriate. + Deal with UNKNOWN_TYPE nodes. + + * typeck.c (require_complete_type): Use TYPE_SIZE as + size_zero_node to mean incomplete type. + (require_complete_type_in_void): New function. + (build_compound_expr): Call complete_type_in_void for LHS. + (build_c_cast): Call complete_type_in_void for void cast. + * cvt.c (ocp_convert): Call complete_type_in_void for void cast. + * decl.c (cplus_expand_expr_stmt): Void expression checks moved to + require_complete_type_in_void. Call it. + * cp-tree.h (require_complete_type_in_void): Prototype new function. + + * typeck.c (convert_arguments): Use alternative format for + function decls. Don't require_complete_type here. Simplify + diagnostic printing. + (convert_for_initialization): Don't require_complete_type on RHS yet. + * call.c (convert_arg_to_ellipsis): Call require_complete_type. + + * call.c (build_over_call): Cope with qualified void return type. + * semantics.c (finish_call_expr): Likewise. + * typeck.c (build_function_call_real): Likewise. + (c_expand_return): Likewise. + * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type. + + * call.c (print_z_candidates): Use alternate print format, to be + consistent with (pt.c) print_candidates. + * method.c (hack_identifier): List candidate members. + * search.c (lookup_field): Build ambiguous list, and show it, if + ambiguous. + +1999-02-26 Mark Mitchell + + * typeck.c (decay_conversion): Don't confuse constant array + variables with their initializers. + + * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when + merging decls. + * pt.c (regenerate_decl_from_template): Tweak for clarity. + (instantiate_decl): Mark a decl instantiated before regenerating + it to avoid recursion. + * tree.c (mapcar): Don't call decl_constant_value unless we know + something is TREE_READONLY_DECL_P. + + * class.c (check_for_override): Don't stop checking when we find + the first overridden function. Delete #if 0'd code. + * search.c (get_matching_virtual): Likewise. + +1999-02-25 Richard Henderson + + * lang-specs.h: Define __FAST_MATH__ when appropriate. + +1999-02-24 Mike Stump + + * typeck.c (convert_for_assignment): Allow boolean integral constant + expressions to convert to null pointer. + +1999-02-24 Martin von Loewis + + * decl.c (lookup_namespace_name): Resolve namespace aliases. + + * class.c (push_nested_class): Allow namespaces. + + * decl2.c (set_decl_namespace): Add friendp parameter. + * decl.c (grokfndecl): Pass it. + (grokvardecl): Likewise. + * cp-tree.h: Change declaration. + +1999-02-24 Jason Merrill + + * pt.c (tsubst): Allow an array of explicit size zero. + +1999-02-23 Jason Merrill + + * errfn.c: Change varargs code to look like toplev.c. + + * method.c (process_modifiers): Don't prepend 'U' for char or + wchar_t. + +1999-02-20 Craig Burley + + * Make-lang.in (cplib2.ready): Don't consider updating + cplib2 stuff if the current directory isn't writable, as + it won't work (such as during a `make install'). + +Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org) + + * decl2.c (start_objects): Make file scope constructors and + destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and + ASM_OUTPUT_DESTRUCTOR are defined. + +1999-02-19 Mark Mitchell + + * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment. + (fn_type_unification): Adjust prototype. + (lookup_fnfields_1): Declare. + * call.c (add_template_candidate_real): Adjust call to + fn_type_unification. + * class.c (add_method): Don't allow duplicate declarations of + constructors or destructors. + (resolve_address_of_overloaded_function): Remove unused variable. + Adjust call to fn_type_unification. + * decl.c (grokfndecl): Be more robust in the face of illegal + specializations. + * decl2.c (check_classfn): Remove hokey handling of member + templates. + * pt.c (determine_specialization): Improve comments. Adjust to + handle template argument deduction as per the standard. + (check_explicit_specialization): Fix comment spacing. Handle + type-conversion operators correctly. Improve error-recovery. + (fn_type_unification): Remove EXTRA_FN_ARG parameter. + (get_bindings_real): Simplify handling of static members. + * search.c (lookup_fnfields_1): Make it have external linkage. + * typeck.c (compparms): Fix comment. + (build_unary_op): Don't try to figure out which template + specialization is being referred to when when the address-of + operator is used with a template function. + +Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi + + * cp-tree.h (lvalue_or_else): Qualify a char* with the `const' + keyword to match an analogous change at the top level. + + * tree.c (lvalue_or_else): Likewise. + +1999-02-17 Mark Mitchell + + * decl.c (xref_basetypes): Comment. + * pt.c (instantiate_class_template): Use xref_basetypes. + +1999-02-16 Mark Mitchell + + * cp-tree.h (tsubst): Change prototype. + (tsubst_expr): Likewise. + (tsubst_copy): Likewise. + (type_unification): Remove prototype. + * call.c (convert_default_arg): Adjust call to tsubst_expr. + * class.c (resolve_address_of_overloaded_function): Just use + fn_type_unification. + * decl.c (grokdeclarator): Adjust call to tsubst. + * method.c (build_template_parm_names): Likewise. + * pt.c (GTB_VIA_VIRTUAL): New macro. + (GTB_IGNORE_TYPE): Likewise. + (resolve_overloaded_unification): Add `complain' parameter. + (try_one_overload): Likewise. + (tsubst_template_arg_vector): Likewise. + (tsubst_template_parms): Likewise. + (tsubst_aggr_type): Likewise. + (tsubst_arg_types): Likewise. + (tsubst_call_declarator_parms): Likewise. + (unify): Remove explicit_mask. + (type_unification_real): Likewise. + (get_template_base_recursive): Likewise. + (coerce_template_template_parms): Provide prototype. + (tsubst_function_type): Likewise. + (try_class_unification): New function. + All callers changed to use new complain parameter. + (get_template_base): Use try_class_unification. + (unify): Adjust handling of classes derived from template types. + (fn_type_unification): Substitute explicit arguments before + unification. + +1999-02-16 Kriang Lerdsuwanakij + + * decl.c (pushdecl): Remove dead code. + +1999-02-16 Jason Merrill + + * decl2.c (finish_objects): Fix code I missed in previous change. + +1999-02-13 Jason Merrill + + * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node. + (grokdeclarator): Don't expect error_mark_node from grokfndecl. + + * pt.c (maybe_process_partial_specialization): Complain about + 'template <>' on non-specialization. + +1999-02-10 Jason Merrill + + * decl.c (grokdeclarator): Catch weird declarators. + * decl2.c (finish_file): Don't abort because of namespace parsing + failure. + (check_decl_namespace): Remove. + +1999-02-09 Mark Mitchell + + * cp-tree.h (get_template_base): Don't declare. + (dfs_walk): Declare. + (dfs_unmark): Likewise. + (markedp): Likewise. + * pt.c (unify): Remove duplicate declaration. Pass tparms and + targs to get_template_base. + (get_template_base_recursive): Move here from search.c. Check to + see that the base found can be instantiated to form the desired + type. + (get_template_base): Likewise. + (get_class_bindings): Simplify. + * search.c (get_template_base_recursive): Move to pt.c. + (get_template_base): Likewise. + (markedp): Make it global. + (dfs_walk): Likewise. + (dfs_unmark): Likewise. + +1999-02-07 Jason Merrill + + * pt.c (maybe_process_partial_specialization): Complain about + specialization in wrong namespace. + * tree.c (decl_namespace_context): New fn. + +1999-02-06 Kriang Lerdsuwanakij + + * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM. + * pt.c (coerce_template_template_parms): Handle nested + template template parameters. + +Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com) + + * typeck2.c: Update email addresses. + +1999-02-04 Kriang Lerdsuwanakij + + * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag + turned off. + +1999-02-04 Jason Merrill + + * lex.c (retrofit_lang_decl): Split out... + (build_lang_decl): From here. + * decl.c (pushdecl): Call it for functions generated by the middle + end that don't have DECL_LANG_SPECIFIC. + * cp-tree.h: Declare it. + + * decl2.c: Remove flag_init_priority. Always enable initp stuff. + (start_objects, finish_objects): Only use special + init_priority code if the user specified a priority. + (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp + objects. + +Wed Feb 3 22:50:17 1999 Marc Espie + + * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and + mkstemp.o. Get them from libiberty now. + (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o. + +Tue Feb 2 22:38:48 1999 Theodore Papadopoulo + + * decl2.c (lang_decode_option): Use read_integral_parameter. + +1999-02-01 Mark Mitchell + + * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED + before calling complete_type_or_else. + +Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi + + * input.c (inline): Don't define, its handled by system.h. + +Sun Jan 31 20:34:29 1999 Zack Weinberg + + * decl2.c: Don't define flag_no_ident here. Don't process + -f(no-)ident here. + * cp-tree.h: Don't declare flag_no_ident here. + * lang-specs.h: Map -Qn to -fno-ident. + +1999-01-28 Jason Merrill + + * cp-tree.h (struct tree_binding): Replace scope field with a union. + (BINDING_SCOPE): Adjust. + * decl.c (BINDING_LEVEL): Adjust. + +1999-01-26 Jason Merrill + + * pt.c (instantiate_class_template): Set up the DECL_INITIAL of + member constants. + + * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in + a ctor initializer. + + * tree.c (equal_functions): Fix name in prototype. + + * decl.c (push_local_binding): Add FLAGS argument. + (pushdecl, push_overloaded_decl): Pass it. + * decl2.c (do_local_using_decl): Likewise. + * cp-tree.h: Adjust prototype. + * decl.c (poplevel): Fix logic. + + * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST. + (poplevel): Handle that. Fix logic for removing TREE_LISTs. + (cat_namespace_levels): Don't loop forever. + +1999-01-25 Richard Henderson + + * typeck.c (build_reinterpret_cast): Fix typo in duplicated test. + +1999-01-25 Jason Merrill + + * class.c (resolve_address_of_overloaded_function): Mark the + chosen function used. + + * call.c (build_call): Make sure that a function coming in has + been marked used already. + * decl.c (expand_static_init): Call mark_used instead of + assemble_external. + * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec, + alloc_eh_object, expand_throw): Likewise. + * init.c (build_builtin_delete_call): Likewise. + * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1, + expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, + expand_generic_desc): Likewise. + +1999-01-25 Martin von Löwis + + * tree.c (equal_functions): New function. + (ovl_member): Call it. + +1999-01-24 Jason Merrill + + * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf. + +1999-01-25 Martin von Loewis + + * decl.c (decls_match): Return 1 if old and new are identical. + (push_overloaded_decl): Set OVL_USED when PUSH_USING. + +1999-01-24 Jason Merrill + + * decl.c (start_function): Make member functions one_only on windows. + * decl2.c (import_export_decl): Likewise. + + * decl.c (grokdeclarator): Don't complain about implicit int in + a system header. Change same-name field check to not complain in + a system header instead of within extern "C". + +1999-01-21 Mark Mitchell + + * cp-tree.h (PUSH_GLOBAL): New macro. + (PUSH_LOCAL): Likewise. + (PUSH_USING): Likewise. + (namespace_bindings_p): Declare. + (push_overloaded_decl): Likewise. + * decl.c (push_overloaded_decl): Don't make it static. Check for + illegal declarations after using declarations here. + (namespace_bindings_p): Likewise. + (duplicate_decls): Don't consider declarations from different + namespaces to be the same. + (pushdecl): Use symbolic PUSH_ constants in calls to + push_overloaded_decl. + (push_overloaded_decl_1): Likewise. + * decl2.c (validate_nonmember_using_decl): Tweak `std' handling. + (do_nonmember_using_decl): Check for illegal using declarations + after ordinary declarations here. + (do_local_using_decl): Call pushdecl to insert declarations. + +1999-01-21 Jason Merrill + + * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo. + +1999-01-21 Mark Mitchell + + * tree.c (build_cplus_array_type_1): Don't call build_array_type + for types involving template parameters. + + * cp-tree.h (PARM_DECL_EXPR): Delete. + (convert_default_arg): Change prototype. + (check_default_argument): Declare. + (search_tree): Likewise. + * call.c (convert_default_arg): Take the function to which the + default argument belongs as a parameter, and do any necessary + instantiation here, instead of ... + (build_over_call): Here. + * decl.c (local_variable_p): New function. + (check_default_argument): Likewise, split out and tidied from ... + (grokparms): Here. + * error.c (dump_expr): Don't set PARM_DECL_EXPR. + * pt.c (tsubst_call_declarator_parms): New function. + (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing + with CALL_EXPRs, rather than trying to be clever. + (tsubst): Use tsubst_call_declarator_parms. + * tree.c (search_tree): Don't make it static. + * typeck.c (convert_arguments): Use new interface to + convert_default_arg. + +1999-01-20 Mark Mitchell + + * error.c (dump_function_decl): Don't print the argument types for + a function when the verbosity level is negative. + + * call.c (build_over_call): Check format attributes at call-time. + + * pt.c (tsubst_copy): Fix comment. + (unify): Don't allow unification with variable-sized arrays. + + * semantics.c (finish_stmt_expr): When processing a template make + the BIND_EXPR long-lived. + +1999-01-19 Jason Merrill + + * decl2.c (finish_vtable_vardecl): Make vtables comdat here. + (import_export_vtable): Not here. + +1999-01-18 Jason Merrill + + * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique + non-static member function. + +1999-01-18 Nathan Sidwell + + * class.c (instantiate_type): Only diagnose illegal address of member + function if complaining. + + * decl.c (lookup_name_real): Remove duplicate code. + +1999-01-18 Jason Merrill + + * tree.c (copy_template_template_parm): Use permanent_obstack. + +1999-01-18 Kriang Lerdsuwanakij + + * pt.c (unify): Remove restrictions on deduction of argument + of template template parameters. + +1999-01-18 Nathan Sidwell + + * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs. + + * class.c (resolve_address_of_overloaded_function): Show list of + all candidates, when none of them match. + +1999-01-18 Chip Salzenberg + + * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up + definition of 'casting away const' in reinterpret_cast<>. + +1999-01-18 Graham + + * cvt.c: Add include for decl.h, remove extern for + static_aggregates which is now provided by decl.h. + + * Makefile.in (cvt.o): Add dependency for decl.h and missing + dependencies for convert.h and flags.h. + +1999-01-18 Nathan Sidwell + + * decl2.c (do_dtors): Set current location to that of the + decl, for sensible diagnostics and debugging. + (check_classfn): Issue `incomplete type' error, if + class is not defined. + +1999-01-16 Jason Merrill + + * cp-tree.h: Add prototype for bound_pmf_p. + +1999-01-16 Jason Merrill + Manfred Hollstein + + * decl.c (grokdeclarator): Don't make 'main(){}' an error with only + -Wreturn-type. + +1999-01-16 Nathan Sidwell + + * cp-tree.h (struct lang_type): Added has_mutable flag. + (CLASSTYPE_HAS_MUTABLE): New macro to access it. + (TYPE_HAS_MUTABLE_P): New macro to read it. + (cp_has_mutable_p): Prototype for new function. + * class.c (finish_struct_1): Set has_mutable from members. + * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if + it contains a mutable. + * typeck.c (cp_has_mutable_p): New function. + +1999-01-15 Mark Mitchell + + * pt.c (process_template_parm): Ignore top-level qualifiers on + non-type parameters. + + * decl.c (start_function): Use current_function_parms in the call + to require_complete_type_for_parms, not the probably empty + DECL_ARGUMENTS. + +1999-01-14 Jason Merrill + + * semantics.c (finish_asm_stmt): Don't warn about redundant volatile. + + * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means + that we don't suppress the other copies. + * lex.c (handle_cp_pragma): Likewise. + +1999-01-13 Mark Mitchell + + * decl.c (grokdeclarator): Undo 1998-12-14 change. + * tree.c (build_cplus_array_type_1): Likewise. + * pt.c (instantiate_class_template): Remove misleading comment. + (tsubst_aggr_type): Substitute if there are template parameters, + regardless of whether or not they use template arguments. + (unify): Likewise, but for unification. + +1999-01-12 Richard Henderson + + * cp-tree.h (flag_permissive): Declare extern. + +1999-01-06 Mark Mitchell + + * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT + here. + (lang_type): Add is_partial_instantiation. Decrease width of + dummy. + (PARTIAL_INSTANTIATION_P): New macro. + (OPERATOR_TYPENAME_P): Remove. + * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not + OPERATOR_TYPENAME_P. + (grok_op_properties): Likewise. + * friend.c (do_friend): Handle friends that are member functions + correctly. + * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT. + * pt.c (instantiate_class_template): Rework for clarity. Avoid + leaving TYPE_BEING_DEFINED set in obscure cases. Don't do + any more partial instantiation than is absolutely necessary for + implicit typename. Set PARTIAL_INSTANTIATION_P. + (tsubst_decl): Use IDENTIFIER_TYPENAME_P. + * semantics.c (begin_class_definition): Handle partial + specializations of a type that was previously partially + instantiated. + +Wed Jan 6 03:18:53 1999 Mark Elbrecht + + * Make-lang.in (g++.o): Depend on prefix.h. + +1999-01-04 Jason Merrill + + * tree.c (bound_pmf_p): New fn. + * typeck.c (build_c_cast): Use it. + + * decl.c (grok_op_properties): Use same_type_p. diff --git a/gcc/cp/ChangeLog-2000 b/gcc/cp/ChangeLog-2000 new file mode 100644 index 0000000..4855669 --- /dev/null +++ b/gcc/cp/ChangeLog-2000 @@ -0,0 +1,7274 @@ +2000-12-29 Jakub Jelinek + + * decl.c (init_decl_processing): Fix sign of wchar_type_node. + +2000-12-29 Mark Mitchell + + * class.c (pushclass): Remove #if 0'd code. + * cp-tree.h (overload_template_name): Remove. + * decl.c (store_bindings): Simplify. + (pop_from_top_level): Likewise. + * pt.c (overload_template_name): Remove. + (instantiate_decl): Don't call push_to_top_level if it's not + needed. + +2000-12-28 Mark Mitchell + + * pt.c (register_local_specialization): Don't return a value. + (lookup_template_class): Use move-to-front heuristic when looking + up template instantiations. + (instantiate_decl): Only push_to_top_level when we're actually + going to instantiate the template. + +2000-12-29 Hans-Peter Nilsson + + * search.c (binfo_for_vtable): Return least derived class, not + most. Handle secondary vtables. + +2000-12-22 Jason Merrill + + * pt.c (more_specialized): Don't optimize len==0. + (fn_type_unification): If we're adding the return type, increase len. + + * typeck.c (build_binary_op): Fix pmf comparison logic. + + * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not + DECL_STATIC_FUNCTION_P. + + * semantics.c (genrtl_finish_function): Don't try to jump to + return_label unless it exists. + + In partial ordering for a call, ignore parms for which we don't have + a real argument. + * call.c (joust): Pass len to more_specialized. + (add_template_candidate_real): Strip 'this', pass len. + * pt.c (more_specialized): Pass len down. Lose explicit_args parm. + (get_bindings_order): New fn. Pass len down. + (get_bindings_real): Strip 'this', pass len. + (fn_type_unification): Likewise. + (type_unification_real): Succeed after checking 'len' args. + (most_specialized_instantiation): Lose explicit_args parm. + * class.c (resolve_address_of_overloaded_function): Strip 'this', + pass len. + +2000-12-21 Jason Merrill + + * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not + DECL_TEMPLATE_RESULT. + + * search.c (lookup_field_r): Call lookup_fnfields_1, not + lookup_fnfields_here. + + * parse.y (typename_sub2): Return the TYPE_DECL, not the type. + + * call.c (build_object_call): Also allow conversions that return + reference to pointer to function. + (add_conv_candidate): Handle totype being ref to ptr to fn. + (build_field_call): Also allow members of type reference to function. + Lose support for calling pointer to METHOD_TYPE fields. + + * error.c (dump_expr): Handle *_CAST_EXPR. + + * typeck2.c (build_scoped_ref): Always convert to the naming class. + + * tree.c (break_out_cleanups): Lose. + * cp-tree.h: Remove prototype. + * typeck.c (build_component_ref): Don't break_out_cleanups. + (build_compound_expr): Likewise. + * semantics.c (finish_expr_stmt): Likewise. + +2000-12-20 Richard Henderson + + * cp-tree.h: Update declarations. + * decl.c (finish_case_label): Return the new stmt node. + * semantics.c (finish_goto_stmt): Likewise. + (finish_expr_stmt, finish_return_stmt): Likewise. + (finish_break_stmt, finish_continue_stmt): Likewise. + (finish_asm_stmt): Likewise. + * parse.y (already_scoped_stmt): Set STMT_LINENO. + (compstmt, implicitly_scoped_stmt, stmt): Likewise. + (simple_if, simple_stmt): Return the new stmt node. + (save_lineno): New. + +2000-12-18 Joseph S. Myers + + * cp-tree.h: Don't declare warn_long_long. + +2000-12-15 Kriang Lerdsuwanakij + + * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of + IS_AGGR_TYPE. + +2000-12-15 Kriang Lerdsuwanakij + + * pt.c (unify): Handle when both ARG and PARM are + BOUND_TEMPLATE_TEMPLATE_PARM. + +2000-12-15 Kriang Lerdsuwanakij + + * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and + DECL_TEMPLATE_PARM_P. + +2000-12-15 Jason Merrill + + * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs! + + * init.c (build_new_1): Don't strip quals from type. + + * decl.c (pushdecl): Don't check for linkage on a non-decl. + + * call.c (build_op_delete_call): See through ARRAY_TYPEs. + + * call.c (build_new_function_call): Lose space before paren in + error message. + (build_new_method_call): Likewise. + + * typeck2.c (build_m_component_ref): Propagate quals from datum. + +2000-12-14 Kriang Lerdsuwanakij + + * pt.c (check_explicit_specialization): Propagate default + function arguments to explicit specializations. + +2000-12-13 DJ Delorie + + * typeck.c (build_binary_op): Do signed/unsigned warnings for >? + and + + * error.c (dump_function_name): Don't let the user see __comp_ctor. + + Clean up copy-initialization in overloading code. + * call.c (build_user_type_conversion_1): Die if we are asked to + convert to the same or a base type. + (implicit_conversion): Avoid doing so. Lose reference binding code. + (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit + direct-initialization. Also do direct-init part of copy-init. + (build_user_type_conversion): Don't provide context to convert_like. + * cvt.c (ocp_convert): build_user_type_conversion will now provide + the constructor call for copy-init. + + * pt.c (tsubst_decl): Call clone_function_decl here if this is an + instantiation of a member template. + (do_decl_instantiation): Not here. + +2000-12-07 Nathan Sidwell + + * class.c (check_field_decls): Don't special case anonymous + fields in error messages. + (note_name_declared_in_class): Use %D on diagnostic. + + * tree.c (pod_type_p): Use strip_array_types. + (cp_valid_lang_attribute): Likewise. + * typeck.c (cp_type_quals): Strip arrays separately, to avoid + multiple evaluations. + (cp_has_mutable_p): Use strip_array_types. + +2000-12-07 Nathan Sidwell + + * cp-tree.h (sufficient_parms_p): Declare new function. + * call.c (sufficient_parms_p): New function, broken out of ... + (add_function_candidate): ... here. Use it. + (add_conv_candidate): Use it. + * decl.c (grok_ctor_properties): Use it. + +2000-12-07 Jakub Jelinek + + * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. + +2000-12-07 Joseph S. Myers + + * decl2.c (lang_decode_option): Handle -Wformat-security. + +2000-12-06 Kriang Lerdsuwanakij + + * pt.c (verify_class_unification): New function. + (get_class_bindings): Use it. + (try_class_unification): Tidy. + (unify): Handle when argument of a template-id is not + template parameter dependent. + (template_args_equal): Handle when TREE_CODE's do not match. + +2000-12-06 Alexandre Oliva + + * lang-specs.h (c++): When invoking the stand-alone preprocessor + for -save-temps, pass all relevant -Defines to it, and then don't + pass them to cc1plus. + +2000-12-05 Will Cohen + + * decl.c (finish_case_label): Cleared + more_cleanups_ok in surrounding function scopes. + (define_label): Likewise. + +2000-12-05 Nathan Sidwell + + * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document. + (get_matching_virtual): Remove. + (look_for_overrides): Declare new function. + * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or + DECL_VINDEX here. + * class.c (check_for_override): Move base class iteration code + to look_for_overrides. + * search.c (next_baselink): Remove. + (get_virtuals_named_this): Remove. + (get_virtual_destructor): Remove. + (tree_has_any_destructors_p): Remove. + (struct gvnt_info): Remove. + (check_final_overrider): Remove `virtual' from error messages. + (get_matching_virtuals): Remove. Move functionality to ... + (look_for_overrides): ... here, and ... + (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found + to be overriding. + +2000-12-05 Nathan Sidwell + + * typeck.c (get_delta_difference): If via a virtual base, + return zero. + * cvt.c (cp_convert_to_pointer): If via a virtual base, do no + adjustment. + +2000-12-04 Richard Henderson + + * error.c (dump_tree): Use output_add_string not OB_PUTS. + +2000-12-04 Jason Merrill + + * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". + (write_builtin_type): Pass intSI_type_node and the like through + type_for_mode. + * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. + Pass intSI_type_node and the like through type_for_mode. + * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. + * pt.c (tsubst, unify): Likewise. + * tree.c (walk_tree): Likewise. + * error.c (dump_type): Likewise. + (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. + + * Make-lang.in: Tweak top comment for emacs. + (cp/TAGS): Restore. + + * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. + + * class.c (clone_function_decl): Robustify. + +2000-12-04 Michael Matz + + * decl.c (store_bindings): Only search in the non modified + old_bindings for duplicates. + +2000-12-04 Nathan Sidwell + + * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not + TYPE_POLYMORPHIC_P. + + * typeck.c (build_static_cast): Remove unused variable. + +2000-12-01 Kriang Lerdsuwanakij + + * pt.c: Fix typo in comment. + +2000-12-01 Joseph S. Myers + + * decl2.c (warn_format): Remove definition. + (lang_decode_option): Handle -Wformat-nonliteral, + -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat. + +2000-12-01 Joseph S. Myers + + * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. + (init_decl_processing): Don't create string_type_node, + const_string_type_node, wint_type_node, intmax_type_node, + uintmax_type_node, default_function_type, ptrdiff_type_node and + unsigned_ptrdiff_type_node. Adjust position of call to + c_common_nodes_and_builtins. + (identifier_global_value): New function. + +2000-12-01 Nathan Sidwell + + * call.c (standard_conversion): Reject pointer to member + conversions from ambiguous, inaccessible or virtual bases. + * typeck.c (build_static_cast): Don't check pointers to members + specially. + +2000-11-30 Nathan Sidwell + + * method.c (do_build_copy_constructor): Preserve cv + qualifications when accessing source object members. + (do_build_assign_ref): Likewise. Remove separate diagnostics for + unnamed fields. + +2000-11-30 Nathan Sidwell + + * method.c (do_build_assign_ref): Construct appropriately + CV-qualified base reference. Don't allow const casts in base + conversion. + +2000-11-30 Nathan Sidwell + + * call.c (build_over_call): Use VOID_TYPE_P. Don't die on + incomplete return type. + +2000-11-28 Nathan Sidwell + + * parse.y (base_class.1): Produce a _TYPE not a _DECL. + * semantics.c (finish_base_specifier): Accept a _TYPE not a + _DECL. + +2000-11-28 Nathan Sidwell + + * spew.c (yyerror): Cope if yylval.ttype is NULL. + +2000-11-28 Nathan Sidwell + + * decl.c (grokdeclarator): Diagnose undefined template contexts. + +2000-11-28 Nathan Sidwell + + * decl.c (grokdeclarator): Do type access control on friend + class. + +2000-11-27 Nathan Sidwell + + * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by + bison parser ickiness. + * pt.c (tsubst_friend_function): Enter namespace scope when + tsubsting the function name. + * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. + +2000-11-27 Nathan Sidwell + + * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo. + * cvt.c (cp_convert_to_pointer): Add force parameter. + Allow conversions via virtual base if forced. + (convert_to_pointer_force): Adjust call to cp_convert_to_pointer. + (ocp_convert): Likewise. + * search.c (binfo_from_vbase): Return the virtual base's binfo. + * typeck.c (get_delta_difference): Adjust handling of virtual + bases. + +2000-11-26 Mark Mitchell + + * tree.c (struct list_hash): Remove. + (list_hash_table): Make it be an htab. + (struct list_proxy): New type. + (list_hash_eq): New function. + (list_hash_pieces): Renamed from ... + (list_hash): ... this. + (list_hash_lookup): Remove. + (list_hash_add): Remove. + (hash_tree_cons): Use the generic hashtable. + (mark_list_hash): Remove. + (init_tree): Create the hashtable. + +2000-11-25 Joseph S. Myers + + * method.c (build_mangled_C9x_name): Rename to + build_mangled_C99_name. Change C9X references in comments to + refer to C99. + +2000-11-24 Nathan Sidwell + + * parse.y (unary_expr): Move VA_ARG from here ... + (primary): ... to here. + +2000-11-24 Nathan Sidwell + + * semantics.c (finish_id_expr): If type is error_mark, return + error_mark. + +2000-11-23 Nathan Sidwell + + * pt.c (lookup_template_class): Simplify loop exit constructs. + Cope when there is no partial instantiation of a template + template member. + +2000-11-23 J"orn Rennecke + + * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). + +2000-11-22 Mark Mitchell + + * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' + prefix. + + * pt.c (do_decl_instantiate): Explicitly clone constructors and + destructors that haven't already been cloned. + +2000-11-20 Richard Henderson + + * parse.y (yyparse_1): Rename the parser entry point. + +2000-11-20 Alex Samuel + + * mangle.c (write_name): Use for names directly in + function scope. + (write_unscoped_name): Accept names directly in function scope. + +2000-11-20 Nathan Sidwell + + * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. + * parse.y (extdef): Add EXPORT reduction. + * spew.c (yylex): Don't skip export here. + +2000-11-19 Mark Mitchell + + * decl.c (init_decl_processing): Correct name of pure virtual + function under the new ABI. + * rtti.c (throw_bad_cast): Likewise, for bad cast function. + (throw_bad_typeid): Likewise for bad typeid function. + +2000-11-18 Mark Mitchell + + * decl.c (grokparms): Don't even function types of `void' type, + either. + * mangle.c (write_type): Don't crash when confronted with the + error_mark_node. + + * decl.c (grokparms): Don't create parameters of `void' type. + +2000-11-17 Zack Weinberg + + * lex.c (mark_impl_file_chain): Delete. + (init_parse): Remove call to ggc_add_string_root. No need to + ggc_strdup a string constant. Do not add impl_file_chain to GC + roots. + (handle_pragma_implementation): No need to ggc_strdup main_filename. + +2000-11-17 Nathan Sidwell + + * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. + +2000-11-17 Nathan Sidwell + + * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. + * decl.c (grokdeclarator): Don't reject void parms here. + (require_complete_types_for_parms): Simplify, use + complete_type_or_else. + (grokparms): Remove bitrot. Remove funcdef parm. + Deal with ellipsis parm lists here. + * semantics.c (finish_parmlist): Don't append void_list_node + here. Set PARMLIST_ELLIPSIS_P. + +2000-11-17 Nathan Sidwell + + * typeck2.c (incomplete_type_error): Reorganize to avoid + excessive diagnostics. + +2000-11-16 Zack Weinberg + + * lex.c (struct impl_files, internal_filename): Constify a char *. + +2000-11-16 Mark Mitchell + + * mangle.c (write_special_name_constructor): Don't generate + assembler junk when confronted with an old-style constructor. + (write_special_name_destructor): Likewise. + (mangle_decl_string): Do it here instead. + +2000-11-16 Nathan Sidwell + + * call.c (op_error): Make error messages clearer. + +2000-11-15 Mark Mitchell + + * decl.c (wrapup_globals_for_namespace): Don't mark things + TREE_ASM_WRITTEN when they're not. + +2000-11-15 Jason Merrill + + * typeck2.c (friendly_abort): Uncount the error before handing + off to fancy_abort. + +2000-11-15 Nathan Sidwell + + * typeck.c (lookup_anon_field): Cope with qv qualifiers. + +2000-11-14 Mark Mitchell + + * class.c (build_vtbl_initializer): Fix typo in comment. + * typeck.c (expr_sizeof): Don't crash on errors. + +2000-11-14 Jim Wilson + + * lang-specs.h: Add %2 after %(cc1_options). + +2000-11-14 Richard Henderson + + * typeck.c (c_sizeof): Be strict about casting result value + back to c_size_type_node. + (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise. + +2000-11-13 Joseph S. Myers + + * typeck.c (build_unary_op): Use boolean_increment from + c-common.c, moving the relevant code there. + +2000-11-11 Jason Merrill + + * typeck.c (mark_addressable): Don't call put_var_into_stack. + + * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics + in inlines. + +2000-11-10 Kaveh R. Ghazi + + * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. + * lex.c (copy_lang_decl): Likewise. + +2000-11-09 Mark Mitchell + + * dump.c (cp_dump_tree): Don't dump function bodies here. + + * Make-lang.in (CXX_C_OBJS): Add c-dump.o. + (dump.o): Update dependency list. + * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. + (flag_dump_translation_unit): Likewise. + (CP_TYPE_QUALS): Adjust definition. + (DECL_C_BIT_FIELD): Remove. + (SET_DECL_C_BIT_FIELD): Likewise. + (CLEAR_DECL_C_BIT_FIELD): Likewise. + (add_maybe_template): Likewise. + (strip_array_types): Likewise. + (dump_node_to_file): Likewise. + (cp_dump_tree): New function. + * decl.c (init_decl_processing): Set lang_dump_tree. + * decl2.c (flag_dump_translation_unit): Remove. + * dump.c: Move most of it to ../c-dump.c. + (cp_dump_tree): New function. + * pt.c (add_maybe_template): Remove. + * typeck.c (strip_array_types): Likewise. + +2000-11-07 Eric Christopher + + * decl.c (init_decl_processing): Change definition of + __wchar_t to wchar_t. Remove artificial declaration of + wchar_t. + * lex.c: Change instances of __wchar_t to wchar_t. + +2000-11-09 Nathan Sidwell + + * lex.c (do_identifier): Don't lookup_name for operators. + * parse.y (operator): Save looking_for_typename. + (unoperator): Restore it. + * spew.c (frob_opname): Use nth_token for lookahead. + +2000-11-08 Nathan Sidwell + + * decl.c (grok_op_properties): Always use coerce_new_type and + coerce_delete_type. + * decl2.c (coerce_new_type): Use c_size_type_node. Preserve + exception specification. Tidy up. + (coerce_delete_type): Preserve exception specification. Tidy up. + +2000-11-07 Joseph S. Myers + + * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c + (push_binding_level), error.c (cp_tree_printer), pt.c + (process_partial_specialization, tsubst_template_arg_vector), + search.c (lookup_member): Use memset () instead of bzero (). + +2000-11-07 Nathan Sidwell + + * decl.c (build_ptrmemfunc_type): Allow error_mark_node. + +2000-11-05 Joseph S. Myers + + * Make-lang.in (c++.distdir): Remove. + +2000-11-04 Mark Mitchell + + * decl2.c (do_nonmember_using_decl): Allow `extern "C"' + declarations from different namespaces to be combined. + +2000-11-03 Zack Weinberg + + * decl.c: Include tm_p.h. + +2000-11-03 Joseph S. Myers + + * tree.c (cp_tree_equal): Use memcmp () instead of bcmp (). + +2000-11-02 Joseph S. Myers + + * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c + (build_overload_value), repo.c (open_repo_file), xref.c + (open_xref_file): Use strchr () and strrchr () instead of index () + and rindex (). + +2000-11-01 Bernd Schmidt + + * call.c (build_over_call): Call fold on the CALL_EXPR. + +2000-11-01 Gabriel Dos Reis + + * error.c (dump_template_decl): Separate template hearders with + space not comma. + +2000-10-31 Gabriel Dos Reis + + * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace + TS_* flags with corresponding TFF_*. Adjust prototypes of + functions (which used to take a tree_string_flags) to take an int. + + * cp-tree.h (enum tree_string_flags): Remove + (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, + TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, + TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, + TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, + TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, + TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. + (type_as_string, decl_as_string, expr_as_string, + context_as_string): Adjust prototype. + + * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER + instead of TS_PLAIN. + + * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF + instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of + plain `0'. + +2000-10-30 Mark Mitchell + + * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. + (linkage_kind): New enumeration. + (decl_linkage): New function. + * decl2.c (comdat_linkage): Extend comment. + * error.c (dump_function_decl): Print the arguments used to + instantiate a template, even when not printing the type of the + function. + * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, + not TREE_PUBLIC, to test for external linkage. + * tree.c (decl_linkage): New function. + +2000-10-28 Mark Mitchell + + * pt.c (instantiate_decl): Always instantiate static data members + initialized in-class. + +2000-10-27 Zack Weinberg + + * Make-lang.in: Move all build rules here from Makefile.in, + adapt to new context. Wrap all rules that change the current + directory in parentheses. Expunge all references to $(P). + When one command depends on another and they're run all at + once, use && to separate them, not ;. Add OUTPUT_OPTION to + all object-file generation rules. Delete obsolete variables. + + * Makefile.in: Delete. + * config-lang.in: Delete outputs= line. + +2000-10-26 Gabriel Dos Reis + + * error.c (dump_function_decl): Print no space between + `ptr-operator' the `type-specifier' of the return type. + (dump_type_prefix): Make sure we put space at the appropriate + place. + +2000-10-23 Jason Merrill + + * call.c (equal_functions): Also call decls_match for extern "C" fns. + +2000-10-22 Jason Merrill + + * call.c (build_conditional_expr): Use ocp_convert to force + rvalue conversion. + +2000-10-22 Mark Mitchell + + * call.c (standard_conversion): Use RVALUE_CONVs for all + expressions that satisfy lvalue_p, not just those that satisfy + real_lvalue_p. + + * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. + + * typeck.c (c_sizeof): Return an expression of `size_t' type, + not one with TYPE_IS_SIZETYPE set. + (dubious_conversion_warnings): Remove special-case code. + +2000-10-21 Geoffrey Keating + + * decl2.c (arg_assoc_type): Handle VECTOR_TYPE. + * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. + (dump_type_prefix): Print vector-of-int as 'int vector'. + (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. + * tree.c (walk_tree): Handle VECTOR_TYPE. + + * decl.c (init_decl_processing): Call MD_INIT_BUILTINS. + +2000-10-21 Jason Merrill + + * parse.y (operator): Set got_object from got_scope. + Set looking_for_typename. + * decl.c (lookup_name_real): Clear val after setting from_obj. + Reorganize diagnostic. + +2000-10-20 Jason Merrill + + * tree.c (walk_tree): Don't walk into default args. + + * error.c (dump_expr): Use host_integerp. + +2000-10-20 David Edelsohn + + * typeck2.c (abstract_virtuals_error): Use "because" instead of + "since" in error message. + +2000-10-20 Richard Kenner + + * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. + +2000-10-20 Jeffrey Oldham + + * decl.c (revert_static_member_fn): Fixed typo. + +2000-10-19 Mark Mitchell + + * class.c (subobject_offset_fn): New type. + (dfs_record_base_offsets): Remove. + (record_base_offsets): Likewise. + (dfs_search_base_offsets): Likewise. + (record_subobject_offset): New function. + (check_subobject_offset): Likewise. + (walk_subobject_offsets): Likewise. + (record_subobject_offsets): Likewise. + (layout_conflict_p): Reimplement. + (layout_nonempty_base_or_field): Correct handling of type + conflicts during layout. + (layout_empty_base): Likewise. + (build_base_field): Adjust to handle new representation of empty + base offset table. + (build_base_fields): Likewise. + (layout_virtual_bases): Likewise. + (splay_tree_compare_integer_csts): New function. + (layout_class_type): Use a splay_tree, rather than a varray, to + represent the offsets of empty bases. + + * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. + * decl.c (select_decl): Don't return declarations that are + DECL_ANTICIPATED. + +2000-10-18 Mark Mitchell + + * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. + (fake_std_node): New macro. + * decl.c (in_std): Rename to ... + (in_fake_std): ... this. + (flag_no_builtin): Remove. + (flag_no_nonansi_builtin): Likewise. + (walk_namespaces_r): Use fake_std_node. + (push_namespace): Use std_identifier. + (pop_namespace): Use in_fake_std. + (lookup_name_real): Use fake_std_node. + (init_decl_processing): When -fhonor-std, create the `std' + namespace. Don't create a dummy fake_std_node in that case. + Adjust call to c_common_nodes_and_builtins. Use std_identifier. + (builtin_function): Put builtins whose names don't begin + with `_' in the std namespace. + * decl2.c (flag_no_builtin): Remove. + (flag_no_nonansi_builtin): Likewise. + (set_decl_namespace): Use fake_std_node. + (validate_nonmember_using_decl): Likewise. + (do_using_directive): Likewise. + (handle_class_head): Likewise. + * dump.c (dequeue_and_dump): Likewise. + * except.c (init_exception_processing): Use std_identifier. + * init.c (build_member_call): Use fake_std_node. + * rtti.c (init_rtti_processing): Use std_identifier. + +2000-10-17 Mark Mitchell + + * cp-tree.h (back_end_hook): Remove declaration. + * decl2.c (back_end_hook): Remove definition. + + * dump.c (dequeue_and_dump): Dump TREE_USED. + +2000-10-17 Brad Lucier + + * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int). + +2000-10-17 Joseph S. Myers + + * decl.c (WINT_TYPE): Define. + (init_decl_processing): Create types unsigned_ptrdiff_type_node, + c_size_type_node, signed_size_type_node and wint_type_node. + +2000-10-17 Joseph S. Myers + + * decl2.c (warn_missing_format_attribute): New variable. + (lang_decode_option): Decode -Wmissing-format-attribute. + +2000-10-16 Mark Mitchell + + * typeck.c (qualify_type): Remove. + (composite_pointer_type): Fix handling of conversions to `cv void*'. + +2000-10-14 Kaveh R. Ghazi + + * Makefile.in (parse.c, parse.h): Fix think-o in last patch. + +2000-10-13 Kaveh R. Ghazi + + * Makefile.in (parse.c, parse.h): Create atomically. + +2000-10-12 Mark Mitchell + + * class.c (current_obstack): Remove. + * decl.c (ggc_p): Remove. + (start_decl): Don't use decl_tree_cons. + (grokdeclarator): Don't use build_decl_list. + (start_function): Don't use decl_tree_cons. + (finish_function): Don't mess with obstacks. + * decl2.c (grok_x_components): Don't use build_decl_list. + * lex.c (make_call_declarator): Don't call decl_tree_cons. + (implicitly_declare_fn): Don't call build_decl_list. + * parse.y (frob_specs): Don't call build_decl_list or + decl_tree_cons. + (expr_or_declarator_intern): Don't call decl_tree_cons. + (primary): Don't call build_decl_list. + (fcast_or_absdcl): Likewise. + (typed_declspecs): Don't call decl_tree_cons. + (reserved_declspecs): Don't call build_decl_list. + (declmods): Likewise. + (reserved_typespecquals): Likewise. + (aggr): Likewise. + (new_type_id): Likewise. + (cv_qualifiers): Likewise. + (after_type_declarator_intern): Likewise. + (notype_declarator_intern): Likewise. + (absdcl_intern): Likewise. + (named_parm): Likewise. + * pt.c (most_specialized_class): Likewise. + * repo.c (temporary_obstack): Make it a structure, not a pointer. + (init_repo): Initialize it. + * search.c (current_obstack): Remove. + * typeck2.c (add_exception_specifier): Don't call build_decl_list. + +2000-10-09 Richard Henderson + + * Make-lang.in (CXX_EXTRA_HEADERS): Remove. + (c++ language support bits for libgcc): Remove. + (c++.clean): Remove cplib2.txt cleanup. + * config-lang.in (headers, lib2funcs): Remove. + + * exception.cc, new.cc, new1.cc, new2.cc: Remove files. + * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. + * inc/cxxabi.h, inc/exception, inc/new: Remove files. + * inc/new.h, inc/typeinfo: Remove files. + +2000-10-08 Joseph S. Myers + + * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already + defined. + (init_decl_processing): Initialize intmax_type_node and + uintmax_type_node. + +2000-10-06 Richard Henderson + + * cp-tree.h (struct cp_language_function): Remove x_result_rtx. + (original_result_rtx): Remove. + * decl.c (save_function_data): Don't clear x_result_rtx. + (mark_lang_function): Don't mark it either. + * expr.c (fixup_result_decl): Remove. + * semantics.c (genrtl_named_return_value): Frob the return decl + before calling emit_local_var. + (genrtl_finish_function): Don't call fixup_result_decl. + Always emit the jump to return_label. + +2000-10-06 Nathan Sidwell + + * pt.c (lookup_template_class): Set current access for enum. + (tsubst_enum): Set file & line for enum decl. + + * spew.c (yylex): Remove unused variable. + +2000-10-05 Richard Henderson + + * semantics.c (genrtl_finish_function): Don't init or check + can_reach_end; remove noreturn and return value checks. + +2000-10-05 Tom Tromey + + * init.c (build_java_class_ref): Use `build_static_name' with a + suffix, not a prefix, to build the class object's name. + +2000-10-05 Nathan Sidwell + + * cp-tree.h (access_kind): Fix comment typo. + * decl2.c (grokfield): Fix diagnostic typo. + * semantics.c (finish_template_type): Fix comment typo. + (finish_qualified_object_call_expr): Likewise. + +2000-10-05 Nathan Sidwell + + * pt.c (tsubst_expr, DECL_STMT case): Don't process if + tsubsting fails. + +2000-10-05 Nathan Sidwell + + * spew.c (frob_id): New static function. + (frob_opname): Use it. + (yylex): Use it. + +2000-10-01 Mark Mitchell + + * decl.c (lang_mark_false_label_stack): Remove. + * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. + +2000-09-30 Joseph S. Myers + + * gxxint.texi: Use @email for formatting email addresses. + +2000-09-29 Gabriel Dos Reis + + * error.c: Remove direct obstack manipulation. Replace with + output_buffer-based formatting. Adjust calls to removed macros. + (obstack_chunk_alloc, obstack_chunk_free): Remove. + (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, + OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. + +2000-09-24 Mark Mitchell + + * ir.texi: Move to ../c-tree.texi. + +2000-09-20 Jason Merrill + + * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P. + +2000-09-21 Andreas Jaeger + + * errfn.c: Move declaration of cp_printer and cp_printers to ... + * cp-tree.h: ... here. + + * error.c: Remove declaration of cp_printer. + +2000-09-20 Mark Mitchell + + * tree.c (mark_local_for_remap_r): Handle CASE_LABELs. + +2000-09-20 Hans-Peter Nilsson + + * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and + users. + +2000-09-18 Mark Mitchell + + * decl.c (start_function): Robustify. + +2000-09-18 Kaveh R. Ghazi + + * cp-tree.h (check_function_format): Accept a `status' parameter. + + * call.c, typeck.c: Updates calls to `check_function_format'. + +2000-09-17 Geoffrey Keating + + * decl2.c (handle_class_head): Always push some scope even + in the error case. + +2000-09-16 Mark Mitchell + + * cp-tree.h (struct cp_language_function): Remove + x_scope_stmt_stack and name_declared. + (current_scope_stmt_stack): Remove. + (function_name_declared_p): New macro. + (struct lang_decl_flags): Use c_lang_decl as a base class. + (context): Remove. + (struct lang_decl): Replace saved_tree with context. + (DECL_FRIEND_CONTEXT): Adjust accordingly. + (SET_DECL_FRIEND_CONTEXT): Likewise. + (DECL_VIRTUAL_CONTEXT): Likewise. + (DECL_SAVED_TREE): Remove. + (C_DECLARED_LABEL_FLAG): Likewise. + (cplus_expand_expr_stmt): Don't declare. + (add_decl_stmt): Likewise. + (add_scope_stmt): Likewise. + * decl.c (mark_stmt_tree): Remove. + (case_compare): Likewise. + (finish_case_label): Use c_add_case_label. + (init_decl_processing): Set more language-specific hooks. + (build_enumerator): Fix typo in comment. + (cplus_expand_expr_stmt): Remove. + (mark_lang_function): Use mark_c_language_function. + (lang_mark_tree): Use c_mark_lang_decl. + * decl2.c: Change order of inclusion. + * except.c: Likewise. + * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall + back on c_expand_expr. + * friend.c: Include expr.h. + * init.c: Change order of inclusion. + * Makefile.in: Update dependencies. + * lex.h (free_lang_decl_chain): Remove. + * optimize.c (maybe_clone_body): Use function_name_declared_p. + * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if + it doesn't exist. + (instantiate_decl): Use function_name_declared_p. + * semantics.c (lang_expand_expr_stmt): Remove. + (set_current_function_name_declared): Likewise. + (current_function_name_declared): Likewise. + (begin_compound_stmt): Use function_name_declared_p. + (add_decl_stmt): Remove. + (setup_vtbl_ptr): Use function_name_declared_p. + (add_scope_stmt): Remove. + (current_scope_stmt_stack): New function. + (cp_expand_stmt): Don't handle SCOPE_STMTs. + (expand_body): Use function_name_declared_p. + * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. + * typeck.c: Change order of includes. + (convert_sequence): Remove. + +2000-09-14 Joseph S. Myers + + * lex.c (reswords): Add _Complex. + +2000-09-14 Richard Kenner + + * Make-lang.in (cplib2.txt): Depend on cp/Makefile. + +2000-09-13 J. David Anglin + + * init.c (begin_init_stmts): Don't use // comments. + +2000-09-12 Jason Merrill + + * decl.c (maybe_deduce_size_from_array_init): Set do_default for + all non-extern arrays. + + * decl.c (grokdeclarator): Complain about 'friend T' for implicit + typenames, too. Downgrade complaint to pedwarn. + (xref_tag): Warn about surprising behavior of 'friend struct T'. + * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for + 'class This::Inherited'. + +2000-09-12 Mark Mitchell + + * decl.c (finish_case_label): Given the LABEL_DECL a + DECL_CONTEXT. + +2000-09-12 Gabriel Dos Reis + + * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, + TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF, + TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, + TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, + TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE): + New macros. + (sorry_for_unsupported_tree, print_scope_operator, + print_left_paren, print_right_paren, print_left_bracket, + print_right_bracket, print_whitespace): Likewise. + (aggr_variety): Rename to class_key_or_enum. + (print_type): Rename to print_type_id. + (print_type_specifier_seq, print_simple_type_specifier, + print_elaborated_type_specifier, + print_rest_of_abstract_declarator, + print_parameter_declaration_clause, print_exception_specification, + print_nested_name_specifier, print_template_id, + typedef_original_name, print_template_argument_list_start, + print_template_argument_list_end): New functions. + +2000-09-11 Gabriel Dos Reis + + * ir.texi: Add more documentation. + +2000-09-11 Mark Mitchell + + * cp-tree.h (struct saved_scope): Remove x_function_parms. + (current_function_parms): Don't define. + (struct cp_language_function): Remove parms_stored. + (current_function_just_assigned_this): Don't define. + (current_function_parms_stored): Likewise. + (static_ctors): Declare. + (static_dtors): Likewise. + (SF_EXPAND): Don't define. + (expand_start_early_try_stmts): Remove declaration. + (store_parm_decls): Likewise. + * decl.c (static_ctors): Don't declare. + (static_dtors): Likewise. + (struct binding_level): Remove this_block. + (poplevel): Remove dead code. + (set_block): Likewise. + (mark_binding_level): Don't mark this_block. + (mark_saved_scope): Don't mark x_function_parms. + (init_decl_processing): Don't add current_function_parms as a GC + root. + (check_function_type): Change prototype. + (start_function): Remove RTL-generation code. + (expand_start_early_try_stmts): Remove. + (store_parm_decls): Give it internal linkage. Remove + RTL-generation code. + (finish_function): Remove RTL-generation code. + * decl2.c (static_ctors): Fix formatting. + (static_dtors): Likewise. + * method.c (use_thunk): Don't call store_parm_decls. + (synthesize_method): Likewise. + * optimize.c (maybe_clone_body): Likewise. + * parse.y (fn.def2): Likewise. + (.set_base_init): Likewise. + (nodecls): Likewise. + * pt.c (instantiate_decl): Likewise. + * rtti.c (synthesize_tinfo_fn): Likewise. + * semantics.c (genrtl_try_block): Simplify. + (expand_body): Use genrtl_start_function and + genrtl_finish_function. + (genrtl_start_function): New function. + (genrtl_finish_function): Likewise. + +2000-09-11 Nathan Sidwell + + * error.c (cp_tree_printer, case 'P'): Append break. + +2000-09-11 Nathan Sidwell + + * cp-tree.h (frob_opname): Declare. + * parse.y (saved_scopes): New static variable. + (cp_parse_init): Adjust. + (do_id): If lastiddecl is NULL, do do_identifier. + (operator): Save scope information. + (unoperator): New reduction. Restore scope information. + (operator_name): Append unoperator. Call frob_opname. + * spew.c (frob_opname): Define. + +2000-09-10 Zack Weinberg + + * decl.c, rtti.c: Include defaults.h if not already included. + Don't define the *_TYPE_SIZE macros. + +2000-09-09 Mark Mitchell + + * cp-tree.h (push_switch): Change prototype. + (check_cp_case_value): Remove declaration. + (decl_constant_value): Likewise. + * decl.c (struct cp_switch): Add switch_stmt and cases. + (case_compare): New function. + (push_switch): Set switch_stmt. Initialize cases. + (pop_switch): Clean up cases. + (define_case_label): Rename to ... + (finish_case_label): ... this. Do semantic analysis for case + labels here. + (start_function): Correct comment. + * decl2.c (check_cp_case_value): Remove. + * expr.c (do_case): Remove. + * pt.c (tsubst_expr): Adjust call to finish_case_label. + * semantics.c (genrtl_do_poplevel): Remove declaration. + (RECHAIN_STMTS): Remove. + (finish_break_stmt): Use build_break_stmt. + (finish_continue_stmt): Use build_continue_stmt. + (finish_switch_cond): Adjust condition here, rater than in + c_expand_start_case. + (finish_case_label): Remove. + * typeck.c (c_expand_return): Remove. + (c_expand_start_case): Likewise. + +2000-09-07 Gabriel Dos Reis + + * ir.texi: Document type nodes. + +2000-09-06 Mark Mitchell + + * cp-tree.h (init_cp_semantics): Declare. + (genrtl_try_block): Don't declare. + (genrtl_handler): Likewise. + (genrtl_catch_block): Likewise. + (genrtl_ctor_stmt): Likewise. + (genrtl_subobject): Likewise. + (genrtl_do_poplevel): Likewise. + (genrtl_named_return_value): Likewise. + * lex.c (init_parse): Call init_cp_semantics. + * semantics.c (genrtl_try_block): Give it internal linkage. + (genrtl_handler): Likewise. + (genrtl_catch_block): Likewise. + (genrtl_ctor_stmt): Likewise. + (genrtl_subobject): Likewise. + (genrtl_do_poplevel): Likewise. + (genrtl_named_return_value): Likewise. + (lang_expand_stmt): Rename to ... + (cp_expand_stmt): ... this. Only handle C++-specific nodes. + (init_cp_semantics): Define. + + * decl.c (initialize_local_var): Remove RTL-generating code. + * semantics.c (genrtl_try_block): Fix formatting. + + Move statement-tree facilities from C++ to C front-end. + * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO. + (void_zero_node): Remove. + (stmt_tree): Likewise. + (scope_chain): Adjust. + (language_function): Rename to cp_language_function. + (cp_function_chain): Adjust. + (current_stmt_tree): Remove. + (last_tree): Likewise. + (last_expr_type): Likewise. + (struct lang_decl): Adjust. + (STMT_IS_FULL_EXPR_P): Remove. + (add_tree): Remove. + (begin_stmt_tree): Likewise. + (finish_stmt_tree): Likewise. + (walk_tree_fn): Likewise. + (walk_stmt_tree): Likewise. + * class.c (finish_struct): Replace use of add_tree with add_stmt. + * decl.c (mark_stmt_tree): Adjust type. + (init_decl_processing): Don't build void_zero_node. + (initialize_local_var): Adjust usage of current_stmt_tree. + (finish_enum): Use add_stmt, not add_tree. + (save_function_data): Adjust use of language_function. + (finish_constructor_body): Use add_stmt, not add_tree. + (finish_destructor_body): Likewise. + (push_cp_function_context): Adjust use of language_function. + (pop_cp_function_context): Likewise. + (mark_lang_function): Likewise. + (mark_cp_function_context): Likewise. + * init.c (build_aggr_init): Adjust use of current_stmt_tree. + (build_vec_init): Likewise. + * semantics.c (SET_LAST_STMT): Remove. + (RECHAIN_STMTS): Don't use it. + (stmts_are_full_exprs_p): Adjust use of current_stmt_tree. + (current_stmt_tree): Define. + (add_tree): Remove. + (finish_goto_stmt): Use add_stmt, not add_tree. + (finish_expr_stmt): Likewise. + (begin_if_stmt): Likewise. + (finish_then_clause): Likewise. + (begin_while_stmt): Likewise. + (begin_do_stmt): Likewise. + (finish_return_stmt): Likewise. + (begin_for_stmt): Likewise. + (finish_break_stmt): Likewise. + (finish_continue_stmt): Likewise. + (begin_switch_stmt): Likewise. + (finish_case_label): Likewise. + (begin_try_block): Likewise. + (begin_function_try_block): Likewise. + (begin_handler): Likewise. + (begin_catch_block): Likewise. + (begin_compound_stmt): Likewise. + (begin_asm_stmt): Likewise. + (finish_asm_stmt): Likewise. + (finish_label_stmt): Likewise. + (add_decl_stmt): Likewise. + (finish_subobject): Likewise. + (finish_decl_cleanup): Likewise. + (finish_named_return_value): Likewise. + (setup_vtbl_ptr): Likewise. + (add_scope_stmt): Likewise. + (finish_stmt_expr): Likewise. + (prune_unused_decls): Remove. + (begin_stmt_tree): Likewise. + (finish_stmt_tree): Likewise. + (prep_stmt): Adjust use of current_stmt_tree. + (lang_expand_stmt): Likewise. + * tree.c (statement_code_p): Remove. + (cp_statement_code_p): New function. + (walk_stmt_tree): Remove. + (init_tree): Set lang_statement_code_p. + +2000-09-06 Zack Weinberg + + Integrated preprocessor. + + * Make-lang.in, Makefile.in: Remove all references to input.c, + gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. + * gxx.gperf, hash.h, input.c: Delete. + * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is + initialized properly. + + * class.c (fixup_pending_inline): Take a tree, not a + struct pending_inline *. All callers changed. + (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, + RID_PROTECTED entries in ridpointers[] array here. + * decl.c (duplicate_decls): Do not refer to struct + pending_inline. + (record_builtin_type, init_decl_processing): Use RID_MAX not + CP_RID_MAX. + (grokdeclarator): Use C_IS_RESERVED_WORD. + * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of + cpplib. + (grok_x_components): Do not inspect pending_inlines chain. + + * cp-tree.h (struct lang_identifier): Add rid_code entry. + (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. + (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. + (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, + TIME_IDENTIFIER_FILEINFO): Kill. + Update prototypes. + * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a + single 32-bit word. + * parse.y: Call do_pending_inlines unconditionally. + reinit_parse_for_method is now snarf_method. fn.defpen is no + longer necessary. Remove unnecessary annotation on + SCOPE. Do not refer to end_of_file or struct pending_inline. + * semantics.c (begin_inline_definitions): Call + do_pending_inlines unconditionally. + + * lex.c: Remove all code now shared with C front end. + Initialize cpplib properly if USE_CPPLIB. Put reserved words + into the get_identifier table. Rewrite pragma handling to + work with the registry. Move code to save tokens for later + processing to spew.c. + + * spew.c: Rewrite everything in terms of token streams instead + of text. Move routines here from lex.c / input.c as + appropriate. GC-mark trees hanging off the pending inlines + chain. + +2000-09-06 Mark Mitchell + + * NEWS: Mention that the named return value extension has been + deprecated. + * cp-tree.h (original_result_rtx): Define. + (TREE_REFERENCE_EXPR): Remove. + (DECL_VPARENT): Likewise. + (pushdecl_nonclass_level): Likewise. + (store_return_init): Likewise. + (reinit_lang_specific): Likewise. + (genrtl_named_return_value): Change prototype. + * decl.c (original_result_rtx): Remove. + (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. + Do not generate RTL for local variables here. + (store_return_init): Remove. + * semantics.c (genrtl_named_return_value): Simplify. Fold in + store_return_init. + (finish_named_return_value): Adjust accordingly. Warn that this + extension is deprecated. + (lang_expand_stmt): Adjust call to genrtl_named_return_value. + +2000-09-06 Nathan Sidwell + + * pt.c (type_unification_real): Replace switch with if. + (unify): Tsubst non-type parms before comparing. + +2000-09-06 Nathan Sidwell + + * error.c (dump_typename): New function, broken out of ... + (dump_type): ... here. Use it. + * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE. + +2000-09-06 Nathan Sidwell + + * init.c (build_offset_ref): Deal with namespace scoped + TEMPLATE_ID_EXPRs. + +2000-09-06 Nathan Sidwell + + * class.c (resolve_address_of_overloaded_function): Add + explanation message. + * decl.c (define_case_label): Reformat explanation. + * decl2.c (finish_static_data_member_decl): Likewise. + (grokfield): Likewise. + * friend.c (do_friend): Likewise. + +2000-09-05 Zack Weinberg + + * tree.c (walk_tree): Expose tail recursion. + (walk_stmt_tree): New function. + * cp-tree.h: Prototype walk_stmt_tree. + * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not + the BLOCKs directly. If a BLOCK has no variables after + pruning, discard it. + (finish_stmt_tree): Use walk_stmt_tree. No need to save and + restore the line number. + +2000-09-05 Mark Mitchell + + * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. + (pt.o): Remove dependency on HTAB_H. + * cp-tree.h: Include hashtab.h. + (walk_tree): Change prototype. + (walk_tree_without_duplicates): New function. + * decl.c (check_default_argument): Use it. + * optimize.c (remap_decl): Adjust calls to walk_tree. + (copy_body): Likewise. + (expand_calls_inline): Likewise. + (calls_setjmp_p): Use walk_tree_without_duplicates. + * pt.c: Don't include hashtab.h. + (for_each_template_parm): Use walk_tree_without_duplicates. + * semantics.c (finish-stmt_tree): Likewise. + (expand_body): Likewise. + * tree.c (walk_tree): Add additional parameter. + (walk_tree_without_duplicates): New function. + (count_trees): Use it. + (verify_stmt_tree): Adjust call to walk_tree. + (find_tree): Use walk_tree_without_duplicates. + (no_linkage_check): Likewise. + (break_out_target_exprs): Adjust call to walk_tree. + (cp_unsave): Likewise. + +2000-09-04 Kriang Lerdsuwanakij + + * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code. + (TEMPLATE_TEMPLATE_PARM): Adjust comment. + * cp-tree.h (TYPE_BINFO): Adjust comment. + (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. + (TEMPLATE_TYPE_PARM_INDEX): Likewise. + (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. + (TYPE_TEMPLATE_INFO): Likewise. + (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise. + * class.c (push_nested_class): Likewise. + * decl.c (lookup_name_real): Likewise. + (grokdeclarator): Likewise. + (grok_op_properties): Likewise. + (xref_tag): Likewise. + (xref_basetypes): Likewise. + * decl2.c (constructor_name_full): Likewise. + (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case. + (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. + * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case. + (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM. + (dump_type_suffix): Likewise. + * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM + instead. + (get_aggr_from_typedef): Likewise. + * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case. + (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM. + (write_template_parm): Likewise. + (write_template_template_parm): Check tree code instead of + using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. + * method.c (build_overload_nested_name): Add + BOUND_TEMPLATE_TEMPLATE_PARM. + (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case. + * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM. + * pt.c (convert_template_argument): Check tree code instead of + using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. + (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case. + (for_each_template_parm): Adjust comment. + (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. + (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM. + (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use + template_args_equal to compare template template parameter cases. + * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM. + * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM + instead. + * tree.c (copy_template_template_parm): Decide whether to create + a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node. + (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM. + (copy_tree_r): Likewise. + * typeck.c (comptypes): Likewise. Check tree code instead of + using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. + +2000-09-04 Mark Elbrecht + + * decl.c (finish_function): Move the code for handling functions + marked with the constructor and destructor attributes inside the + expand_p block. + +2000-09-04 Nathan Sidwell + + * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR. + +2000-09-04 Nathan Sidwell + + * pt.c (lookup_template_class): Remove abort. + * tree.c (get_type_decl): Allow error_mark_node. + +2000-09-04 Nathan Sidwell + + * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside + TEMPLATE_ID_EXPRs. + +2000-09-03 Mark Mitchell + + * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change + new ABI mangling. + +2000-09-01 Nathan Sidwell + + * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify + union tag mismatch error reporting. + +2000-09-01 Nathan Sidwell + + * call.c (build_scoped_method_call): Check it is not a namespace. + +2000-08-30 Jason Merrill + + * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context. + + * tree.c (bot_manip): Check TREE_CONSTANT rather than + !TREE_SIDE_EFFECTS. Call break_out_target_exprs and + build_target_expr_with_type for the non-AGGR_INIT_EXPR case. + + * decl.c (start_function): Always call make_function_rtl. + +2000-08-29 Zack Weinberg + + * semantics.c (prune_unused_decls): New function. + (finish_stmt_tree): Call it via walk_tree. + +2000-08-29 Zack Weinberg + + * class.c (build_secondary_vtable): Constify a char *. + * decl.c (init_decl_processing): Initialize function_id_node, + pretty_function_id_node, and func_id_node. + * input.c (struct input_source): Constify 'str'. + (feed_input): Constify first argument. + * mangle.c (write_identifier): Constify argument. + * pt.c (mangle_class_name_for_template): Constify argument. + +2000-08-29 Mark Mitchell + + * typeck.c (mark_addressable): Remove code that pokes around in + RTL. + +2000-08-28 Jason Merrill + + * lex.c (file_name_nondirectory): Move to toplev.c. + + * cp-tree.h (LOCAL_CLASS_P): New macro. + * class.c (finish_struct_1): Use it. + +2000-08-27 Alex Samuel + + * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. + (write_encoding): Pass another argument to write_name. + (write_name): Add ignore_local_scope parameter. Fix handling of + local names. + (write_nested_name): Use write_unqualified_name. + (write_prefix): Likewise. Skip out on FUNCTION_DECLs. + (write_template_prefix): Use write_unqualified_name. + (write_component): Remove. + (write_local_name): Add parameter. Use direct local entity to + discriminator calculation. + (write_class_enum_type): Pass another argument to write_name. + (write_template_template_arg): Likewise. + (make_guard_variable): Likewise. + +2000-08-27 Jason Merrill + + * decl.c (pushdecl): Matching decls for local externs are found in + the current level. Propagate linkage information from previous + declarations. + +2000-08-26 Gabriel Dos Reis + + * ir.texi (Expressions): Fix typo. + +2000-08-25 Greg McGary + + * tree.c (init_tree): Use ARRAY_SIZE. + +2000-08-25 Gabriel Dos Reis + + * error.c (cp_tree_printer): Rework. + +2000-08-25 Mark Mitchell + + * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and + dyn-string.o. + (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c. + (cp-demangle.o): Remove target. + (dyn-string.o): Likewise. + + * decl.c (grokfndecl): Require that `main' return an `int'. + * mangle.c (write_encoding): Don't mangle return types for + conversion functions. + +2000-08-25 Gabriel Dos Reis + + * error.c (tree_formatting_info): New data type. + (tree_being_formatted): New macro. + (tree_formatting_flags): Likewise. + (put_whitespace): Likewise. + (print_tree_identifier): Likewise. + (print_identifier): Likewise. + (cp_tree_printer, print_function_argument_list, print_declaration, + print_expression, print_function_declaration, + print_function_parameter, print_type, print_cv_qualifier): New + functions. + (init_error): Initialize lang_printer. + +2000-08-24 Jason Merrill + + * typeck.c (build_ptrmemfunc): Just reinterpret if there's no + adjustment necessary. + +2000-08-24 Greg McGary + + * cp-tree.h (MAIN_NAME_P): Remove macro. + +2000-08-24 Gabriel Dos Reis + + * error.c (print_instantiation_context): Don't forget to flush the + buffer. + +2000-08-23 Jason Merrill + + * typeck.c (build_ptrmemfunc): Save the input pmf. + + * method.c (process_modifiers): Use same_type_p. + +2000-08-23 Mark Mitchell + + * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. + * mangle.c (write_function_type): Change prototype. + (write_encoding): Don't mangle return types for + constructors or destructors. + (write_type): Adjust call to write_function_type. + * pt.c (instantiate_template): Instantiate alternate entry points + when instantiating the main function. + +2000-08-23 Gabriel Dos Reis + + * error.c (cp_print_error_function): Don't use embedded '\n' in + output_printf. + +2000-08-23 Gabriel Dos Reis + + * decl.c (init_decl_processing): Remove bogus initialization. + * error.c (lang_print_error_function): Restore here. + (init_error): Initialize print_error_function. + +2000-08-22 Theodore Papadopoulo + + * decl2.c (arg_assoc): Revert my 2000-08-11 change. + +2000-08-22 Gabriel Dos Reis + + * Makefile.in (error.o): Depends on diagnostic.h + + * cp-tree.h (problematic_instantiation_changed, + record_last_problematic_instantiation, current_instantiation, + print_instantiation_context): Declare. + (maybe_print_template_context): Remove. + + * decl.c (init_decl_processing): Set print_error_function to NULL. + (lang_print_error_function): Remove, since we're using a new + machinery. + + * error.c: #include diagnostic.h + (function_category): New function. + (cp_diagnostic_starter): Likewise. + (cp_diagnostic_finalizer): Likewise. + (cp_print_error_function): Likewise. + (maybe_print_instantiation_context): Likewise. + (print_instantiation_full_context): Likewise. + (print_instantiation_partial_context): Likewise. + (print_instantiation_context): Define. + (init_error): Initialize diagnostic pager and finalizer. + + * pt.c (problematic_instantiation_changed): Define. + (record_last_problematic_instantiation): Likewise. + (current_instantiation): Likewise. + (maybe_print_template_context): Remove. + (print_template_context): Likewise. + (current_tinst_level): Make static to reflect Brendan Kehoe's + change of 1995-04-13. + (push_tinst_level): Call print_instantiation_context. + +2000-08-21 Nix + + * lang-specs.h: Do not process -o or run the assembler if + -fsyntax-only. + +2000-08-21 Joseph S. Myers + + * decl.c (flag_hosted, flag_noniso_default_format_attributes): New + variables. + * decl2.c (lang_decode_option): Disable gettext attributes for + -ansi. + +2000-08-21 Gabriel Dos Reis + + * lex.c (lang_init_options): Default diagnostic message maximum + length to 80, when line-wrapping. + +2000-08-20 Mark Mitchell + + * class.c (build_vtbl_initializer): Clear the entire + vtbl_init_data. Start keeping track of the functions for which we + have created vcall offsets here. + (dfs_build_vcall_offset_vtbl_entries): Remove. + (build_vcall_offset_vtbl_entries): Reimplement. + (add_vcall_offset_vtbl_entries_r): New function. + (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for + computing when vcall offsets are necessary. + +2000-08-18 Nathan Sidwell + + * decl.c (member_function_or_else): Use cp_error ... %T. + (grokdeclarator): Likewise. + (start_method): Likewise. + * friend.c (make_friend_class): Use cp_pedwarn ... %T. + +2000-08-18 Nathan Sidwell + + * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class + TYPE_DECLs. + +2000-08-18 Nathan Sidwell + + * cp-tree.h (PTRMEM_OK_P): New macro. + (itf_ptrmem_ok): New enumeration value. + * class.c (resolve_address_of_overloaded_function): Add PTRMEM + argument. Diagnose implicit pointer to member. + (instantiate_type): Don't diagnose implicit pointer to member + here. Pass itf_ptrmem_ok if ok. Adjust calls to + resolve_address_of_overloaded_function. + * init.c (build_offset_ref): Set PTRMEM_OK_P. + (resolve_offset_ref): Don't diagnose implicit pointer to member here. + * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here. + * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P. + (build_unary_op): Deal with single non-static member in + microsoft-land. + +2000-08-18 Nathan Sidwell + + * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE. + +2000-08-18 Nathan Sidwell + + * cp-tree.h (enum_name_string): Remove prototype. + (report_case_error): Remove prototype. + * cp/typeck2.c (enum_name_string): Remove. + (report_case_error): Remove. + * error.c (dump_expr): Deal with enum values directly. + Correctly negate integer constant. + +2000-08-17 Nathan Sidwell + + * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare. + (__cxa_vec_delete2, __cxa_vec_delete3): Declare. + * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement. + (__cxa_vec_delete2, __cxa_vec_delete3): Implement. + (__cxa_vec_new): Use __cxa_vec_new2. + (__cxa_vec_delete): Use __cxa_vec_delete2. + +2000-08-17 Nathan Sidwell + + * vec.cc (__cxa_vec_new): Set "C" linkage. + (__cxa_vec_ctor): Likewise. + (__cxa_vec_cctor): Likewise. + (__cxa_vec_dtor): Likewise. + (__cxa_vec_delete): Likewise. + * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage. + (__cxa_vec_ctor): Likewise. + (__cxa_vec_cctor): Likewise. + (__cxa_vec_dtor): Likewise. + (__cxa_vec_delete): Likewise. + +2000-08-17 Nathan Sidwell + + * class.c (instantiate_type): Reinstate local variable + deleted in previous change. + + * cvt.c (cp_convert_to_pointer): Pass itf_complain, not + itf_no_attributes. + +2000-08-17 Nathan Sidwell + + * cp-tree.h (instantiate_type_flags): New enumeration. + (instantiate_type): Change parameter. + * class.c (instantiate_type): Adjust prototype. Adjust. + * call.c (standard_conversion): Adjust instantiate_type call. + (reference_binding): Likewise. + (build_op_delete_call): Likewise. + (convert_like_real): Likewise. + * cvt.c (cp_convert_to_pointer): Likewise. + (convert_to_reference): Likewise. + * pt.c (convert_nontype_argument): Likewise. + * typeck.c (build_binary_op): Likewise. + (build_ptrmemfunc): Likewise. + (convert_for_assignment): Likewise. + +2000-08-17 Nathan Sidwell + + * cp-tree.h (CPTR_AGGR_TAG): New global tree node. + (current_aggr): Define. + * decl.c (grokdeclarator): Make sure a friend class is an + elaborated type specifier. + * parse.y (current_aggr): Remove static definition. + (cp_parse_init): Adjust. + (structsp): Clear and restore current_aggr. + (component_decl_list): Clear current_aggr. + + * error.c (dump_type, case TYPENAME_TYPE): Don't emit the + aggregate tag on the typename's context. + + * pt.c (tsubst_friend_class): Return error_mark_node, if + parms becomes NULL. + (instantiate_class_template): Ignore error_mark_node friend types. + +2000-08-14 Nathan Sidwell + + * cvt.c (warn_ref_binding): New static function, broken out of ... + (convert_to_reference): ... here. Use it. + +2000-08-11 Kriang Lerdsuwanakij + + * parse.y (template_arg): Add rule for template qualified with + global scope. + +2000-08-11 Theodore Papadopoulo + + * decl2.c (add_function): Reorganize. + (arg_assoc): Do not consider function template decls. + +2000-08-11 Jason Merrill + + * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're + looking inside. + +2000-08-11 Nathan Sidwell + + * cp-tree.h (resolve_scope_to_name): Remove unused prototype. + (lookup_nested_tag): Likewise. + + * decl2.c (grokfield): Fix comment to reflect many types of _DECLs + can be produced. + +2000-08-11 Nathan Sidwell + + * parse.y (named_complex_class_head_sans_basetype): Remove + always true if. + +2000-08-11 Nathan Sidwell + + * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build + explicit TEMPLATE_ID_EXPR args. + (build_expr_from_tree, case CALL_EXPR): Likewise. + +2000-08-11 Nathan Sidwell + + * decl.c (check_tag_decl): Diagnose typename's which don't + declare anything. + +2000-08-10 Nathan Sidwell + + * init.c (build_aggr_init): Reject bogus array initializers + early. + +2000-08-09 Nathan Sidwell + + * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi + runtime. + * cp/tinfo.cc (__dynamic_cast): Likewise. + * cp/inc/cxxabi.h (__dynamic_cast): Likewise. + +2000-08-09 Nathan Sidwell + + * cvt.c (convert_to_pointer_force): Fix error message when + attempting to cast from ambiguous base. + +2000-08-08 Jason Merrill + + * pt.c (tsubst_aggr_type): Bail if creating the argvec fails. + (tsubst_template_arg_vector): Likewise. + + * decl2.c (build_anon_union_vars): Choose the largest field; don't + assume that one will be as large as the union. + +2000-08-07 Kazu Hirata + + * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo. + * decl.c (pop_labels): Likewise. + +2000-08-04 Jeffrey Oldham + + * inc/cxxabi.h (__pbase_type_info): Changed member names to match + specifications. + (__pointer_to_member_type_info): Likewise. + (__base_class_info): Likewise. + (__class_type_info): Likewise. + (__si_class_type_info): Likewise. + (__vmi_class_type_info): Likewise. + * tinfo.cc (__si_class_type_info::__do_find_public_src): + Changed member names to match specifications. + (__vmi_class_type_info::__do_find_public_src): Likewise. + (__si_class_type_info::__do_dyncast): Likewise. + (__vmi_class_type_info::__do_dyncast): Likewise. + (__si_class_type_info::__do_upcast): Likewise. + (__vmi_class_type_info::__do_upcast): Likewise. + * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. + (__pbase_type_info::__pointer_catch): Likewise. + (__pointer_type_info::__pointer_catch): Likewise. + (__pointer_to_member_type_info::__pointer_catch): Likewise. + +2000-08-04 Zack Weinberg + + * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. + * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. + (cc1plus): Link with $(BACKEND) and $(C_OBJS). + +2000-08-04 Mark Mitchell + + * cp-tree.h (add_method): Change prototype. + * class.c (add_method): Remove FIELDS parameter. Add ERROR_P. + Don't double the size of the method vector in the error case. + (handle_using_decl): Adjust call to add_method. + (add_implicitly_declared_members): Likewise. + (clone_function_decl): Likewise. + * decl2.c (check_classfn): Likewise. + * semantics.c (finish_member_declaration): Likewise. + +2000-08-04 Joseph S. Myers + + * decl.c (flag_isoc94): New variable. + +2000-08-02 Jason Merrill + + * pt.c (do_type_instantiation): Add complain parm; don't complain + if called recursively. + * cp-tree.h, parse.y: Adjust. + +2000-08-02 Zack Weinberg + + * decl2.c: Silently ignore -Wstrict-prototypes; warn about + -Wno-strict-prototypes. + + * g++spec.c: Adjust type of second argument to + lang_specific_driver, and update code as necessary. + + * cp-tree.h: Don't prototype min_precision here. + (my_friendly_assert): Cast expression to void. + * semantics.c (do_poplevel): Initialize scope_stmts. + +2000-08-02 Mark Mitchell + + * cp-tree.h (DECL_NEEDED_P): Tweak. + +2000-07-28 Jason Merrill + + * lang-specs.h: Use %i in rule for .ii files. + +2000-07-31 Zack Weinberg + + * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. + +2000-07-30 Mark Mitchell + + Allow indirect primary bases. + * cp-tree.h (struct lang_type): Remove vfield_parent. Add + primary_base. + (CLASSTYPE_VFIELD_PARENT): Remove. + (CLASSTYPE_PRIMARY_BINFO): Reimplement. + (BINFO_PRIMARY_BINFO): Remove. + (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement. + (BINFO_VBASE_PRIMARY_P): Likewise. + (BINFO_PRIMARY_BASE_OF): New macro. + (BINFO_INDIRECT_PRIMARY_P): Likewise. + (get_primary_binfo): New function. + * decl.c (lang_mark_tree): Make lang_type::primary_base. + * class.c (vcall_offset_data_s): Rename to ... + (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p, + and add ctor_vtbl_p. + (get_derived_offset): Use get_primary_binfo. + (dfs_mark_primary_bases): Adjust handling of virtual primary + bases. + (mark_primary_bases): Likewise. + (set_primary_base): Take a binfo, not an integer, as a + representation of the primary base. + (indirect_primary_base_p): Remove. + (determine_primary_base): Adjust for indirect primary bases. + (dfs_find_final_overrider): Fix typo in coment. + (update_vtable_entry_for_fn): Use get_primary_binfo. + (layout_nonempty_base_or_field): Tweak. + (build_base_fields): Adjust for new primary base semantics. + (dfs_propagate_binfo_offsets): Remove. + (propagate_binfo_offsets): Rewrite. + (dfs_set_offset_for_shared_vbases): Remove. + (layout_virtual_bases): Don't use it. + (layout_class_type): Set CLASSTYPE_SIZE correctly under the new + ABI. + (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not + CLASSTYPE_VFIELD_PARENT. + (dfs_get_primary_binfo): New function. + (get_primary_binfo): Likewise. + (dump_class_hierarchy_r): Tweak printing of primary bases. + (build_vtbl_initializer): Fix typo in comments. Use + vtbl_init_data. + (build_vcall_and_vbase_vtbl_entries): Likewise. + (build_vbaes_offset_vtbl_entries): Likewise. + (dfs_build_vcall_offset_vtbl_entries): Adjust setting of + BV_VCALL_INDEX to handle indirect primary bases. + (build_vcall_offset_vtbl_entries): Use vtbl_init_data. + (build_rtti_vtbl_entries): Likewise. + * search.c (get_shared_vbase_if_not_primary): Tweak. + (find_vbase_instance): Likewise. + (binfo_for_vtable): Simplify. + * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF. + (make_binfo): Make it have 11 entries. + +2000-07-30 Alex Samuel + + * mangle.c (DECL_TEMPLATE_ID_P): Remove. + (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when + ascertaining primaryness. + (G): Remove template_args. + (decl_is_template_id): New function. + (write_encoding): Use decl_is_template_id. + (write_name): Likewise. Handle type_decls. Get main variant of + type decls. + (write_nested_name): Likewise. + (write_prefix): Likewise. + (write_template_prefix): Likewise. + (write_special_name_constructor): Remove defunct production from + comment. + (write_bare_function_type): Remove comment about absent parameter. + (write_template_template_arg): Add missing grammar production to + comment. + +2000-07-27 Jason Merrill + + * decl.c (duplicate_decls): If common_type produces a non-typedef + type for a typedef, just use the old type. + +2000-07-27 Mark Mitchell + + * cp-tree.h (function_depth): Declare. + (verify_stmt_tree): Likewise. + (find_tree): Likewise. + * decl.c (function_depth): Give it external linkage. + * optimize.c (optimize_function): Increment and decrement it. + * tree.c (verify_stmt_tree_r): New function. + (verify_stmt_tree): Likewise. + (find_tree_r): Likewise. + (find_tree): Likewise. + +2000-07-27 Jason Merrill + + * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use + TYPE_PTRMEMFUNC_P. + * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC. + +2000-07-26 Mark Mitchell + + * decl.c (start_cleanup_fn): Mark the function as `inline'. + * decl2.c (get_guard): Call cp_finish_decl, not + rest_of_decl_compilation, for local guards. + * lex.c (do_identifier): Remove unused variable. + +2000-07-26 Marc Espie + + * parse.y: Add missing ';'. + +2000-07-26 Mark Mitchell + + * parse.y (empty_parms): Use `()', not `(...)', when in the scope + of `extern "C++"'. + +2000-07-25 Nathan Sidwell + + Kill strict_prototype. Backwards compatibility only for + non NO_IMPLICIT_EXTERN_C systems. + * cp-tree.h (flag_strict_prototype): Remove. + (strict_prototype): Remove. + (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. + * decl.c (maybe_push_to_top_level): Adjust. + (pop_from_top_level): Adjust. + (decls_match): Only allow sloppy parm matching for ancient + system headers. + (init_decl_processing): Adjust. + (grokdeclarator): Adjust. + * decl2.c (flag_strict_prototype): Remove. + (strict_prototype): Remove. + (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. + (lang_f_options): Remove "strict-prototype". + (unsupported-options): Add "strict-prototype". + * lex.c (do_identifier): Adjust. + (do_scoped_id): Adjust. + * parse.y (empty_parms): Adjust. + * class.c (push_lang_context): Adjust. + (pop_lang_context): Adjust. + * typeck.c (comp_target_parms): Adjust. + +2000-07-25 Nathan Sidwell + + * decl.c (poplevel): Deal with anonymous variables at for scope. + (maybe_inject_for_scope_var): Likewise. + +2000-07-25 Zack Weinberg + + * decl.c: Remove all signal handling code, now done in toplev.c. + +2000-07-23 Mark Mitchell + + * decl.c (make_rtl_for_nonlocal_decl): Rework. + + * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set + correctly. + +2000-07-20 Zack Weinberg + + * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. + Define my_friendly_assert and my_friendly_abort as macros + which may call friendly_abort. Prototype friendly abort, not + my_friendly_abort or my_friendly_assert. + * decl.c (signal_catch): Report the signal caught in the error + message. Call fatal directly. + * typeck2.c (ack, my_friendly_assert): Delete. + (my_friendly_abort): Rename to friendly_abort. Expect file, + line, and function parameters. Report the abort code, then + call fancy_abort. Do not mask an abort if errors have + already occurred. + +2000-07-18 Nathan Sidwell + + * typeck.c (comp_target_parms): Remove obsolete parameter. + (comp_target_types): Adjust. + +2000-07-17 Jason Merrill + + * typeck.c (mark_addressable): Never set TREE_USED. + * call.c (build_call): Don't abort on calls to library functions + that have been declared normally. + + * typeck.c (build_binary_op): Fix grammar in warning. + + * exception.cc (__eh_free): Fix prototype. + + * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR. + + * decl.c (pushdecl): Handle seeing an OVERLOAD in + IDENTIFIER_NAMESPACE_VALUE. + +2000-07-16 Mark Mitchell + + * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation. + * method.c (use_thunk): Correct handling of vcall offsets. + +2000-07-14 Zack Weinberg + + * .cvsignore: parse.h and parse.c have no cp- prefix. + +2000-07-13 Mark Mitchell + + * .cvsignore: New file. + +2000-07-13 Zack Weinberg + + * lang-specs.h: Use the new named specs. Remove unnecessary braces. + +2000-07-12 Mark Mitchell + + * Makefile.in ($(PARSE_H)): Depend directly on parse.y. + * parse.c: Remove. + * parse.h: Likewise. + +2000-07-11 Mark Mitchell + + * class.c (layout_class_type): Add pointers to virtual bases after + base classes under the old ABI. + +2000-07-10 Benjamin Chelf + + * semantics.c (finish_for_stmt): Remove call to emit_line_note. + (finish_continue_stmt): Likewise. + (begin_for_stmt): Remove call to note_level_for_for. + (finish_goto_stmt): Change call from build_min_nt + to build_stmt. + (finish_expr_stmt): Likewise. + (begin_if_stmt): Likewise. + (begin_while_stmt): Likewise. + (finish_while_stmt): Likewise. + (finish_return_stmt): Likewise. + (begin_for_stmt): Likewise. + (finish_for_stmt): Likewise. + (finish_break_stmt): Likewise. + (begin_switch_stmt): Likewise. + (finish_case_label): Likewise. + (genrtl_try_block): Likewise. + (begin_try_block): Likewise. + (begin_handler): Likewise. + (begin_compound_stmt): Likewise. + (finish_asm_stmt): Likewise. + (finish_label_stmt): Likewise. + (add_decl_stmt): Likewise. + (finish_subobject): Likewise. + (finish_decl_cleanup): Likewise. + (finish_named_return_value): Likewise. + (setup_vtbl_ptr): Likewise. + (add_scope_stmt): Likewise. + * decl.c (finish_constructor_body): Likewise. + (finish_destructor_body): Likewise. + * optimize.c (copy_body_r): Likewise. + (initialize_inlined_parameters): Likewise. + (declare_return_variable): Likewise. + (expand_call_inline): Likewise. + +2000-07-10 Jakub Jelinek + + * semantics.c (expand_body): Sync interface information + at the end of function body expansion. + +2000-07-09 Jason Merrill + + * init.c (build_new_1): Bail early if the call to new fails. + + * decl.c (compute_array_index_type): Check specifically for + an INTEGER_CST, not just TREE_CONSTANT. + + * decl.c (duplicate_decls): Don't call duplicate_decls on + the DECL_TEMPLATE_RESULT. + (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different + codes. + + * error.c (dump_template_bindings): Don't crash if we had an + invalid argument list. + + * typeck.c (c_expand_start_case): Do narrowing here. + * semantics.c (finish_switch_cond): Not here. + +2000-07-09 Hidvegi Zoli + + * parse.y (asm_clobbers): Do string concatenation. + +2000-07-09 Mark Mitchell + + * decl.c (pushtag): Don't put local classes in template functions + on the local_classes list. + +2000-07-04 Scott Snyder + + * decl2.c (get_guard): Add missing return for old ABI local + variable case. + +2000-07-09 Mark Mitchell + + * cp-tree.h (char_type_p): New function. + * decl.c (init_decl_processing): Don't initialize + signed_wchar_type_node or unsigned_wchar_type_node. + (complete_array_type): Handle brace-enclosed string-constants. + * rtti.c (emit_support_tinfos): Remove #if 0'd code. + * tree.c (char_type_p): New function. + * typeck2.c (digest_init): Use char_type_p. + +2000-07-06 Nathan Sidwell + + * pt.c (tsubst): Don't layout type, if it's error_mark. + +2000-07-06 Nathan Sidwell + + * pt.c (instantiate_pending_templates): Reset template level. + +2000-07-05 Jason Merrill + + * call.c (joust): Don't complain about `operator char *()' beating + `operator const char *() const'. + +2000-07-04 scott snyder + Jason Merrill + + * repo.c (repo_get_id): Handle the case where a class with virtual + bases has a null TYPE_BINFO_VTABLE. + +2000-07-04 Kevin Buhr + Jason Merrill + + * parse.y (member_init): Just pass in the type. + * init.c (expand_member_init): Handle getting a type. + +2000-07-04 Martin v. Löwis + Jason Merrill + + * decl.c (finish_function): Warn if a function has no return + statement. + Suggested by Andrew Koenig. + * typeck.c (check_return_expr): Do set current_function_returns_value + if we got an error_mark_node. + +2000-07-03 Nathan Sidwell + + * decl2.c (push_decl_namespace): Push the original namespace. + +2000-07-03 Nathan Sidwell + + * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES. + * semantics.c (begin_class_definition): Clear it. + +2000-07-02 Benjamin Chelf + + * cp-tree.h (genrtl_goto_stmt): Remove declaration. + (genrtl_expr_stmt): Likewise. + (genrtl_decl_stmt): Likewise. + (genrtl_if_stmt): Likewise. + (genrtl_while_stmt): Likewise. + (genrtl_do_stmt): Likewise. + (genrtl_return_stmt): Likewise. + (genrtl_for_stmt): Likewise. + (genrtl_break_stmt): Likewise. + (genrtl_continue_stmt): Likewise. + (genrtl_scope_stmt): Likewise. + (genrtl_switch_stmt): Likewise. + (genrtl_case_label): Likewise. + (genrtl_begin_compound_stmt): Likewise. + (genrtl_finish_compound_stmt): Likewise. + (genrtl_compound_stmt): Likewise. + (genrtl_asm_stmt): Likewise. + + * init.c (begin_init_stmts): Remove call to + genrtl_begin_compound_stmt. + (finish_init_stmts): Remove call to genrtl_finish_compound_stmt. + + * semantics.c (lang_expand_stmt): Changed call to + genrtl_compound_stmt to ignore return value. + +2000-07-02 Mark Mitchell + + * mangle.c (canonicalize_for_substitution): Return the canonical + variant of a type. + + * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a + TYPE_DECL. + * typeck.c (commonparms): Remove obstack manipulations. + +2000-07-01 Benjamin Chelf + + * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o. + + * Makefile.in (OBJS): Added ../c-semantics.o. + (OBJDEPS): Likewise. + + * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to + ../c-common.h. + (struct stmt_tree): Added comment. + (current_function_name_declared): Removed. + (stmts_are_full_exprs_p): Likewise. + (genrtl_do_pushlevel): Likewise. + (genrtl_clear_out_block): Likewise. + (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h. + (DECL_ANON_UNION_ELEMS): Likewise. + (emit_local_var): Likewise. + (make_rtl_for_local_static): Likewise. + (do_case): Likewise. + (expand_stmt): Likewise. + (genrtl_decl_cleanup): Likewise. + (c_expand_asm_operands): Likewise. + (c_expand_return): Likewise. + (c_expand_start_case): Likewise. + + * decl.c (make_rtl_for_local_static): Moved to c-semantics.c. + (emit_local_var): Likewise. + (initialize_local_var): Change reference to + stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). + Change reference to stmts_are_full_exprs_p to + current_stmt_tree->stmts_are_full_exprs_p. + (push_cp_function_context): Likewise. + + * expect.c (expand_throw): Change reference to + stmts_are_full_exprs_p. + + * init.c (build_aggr_init): Change reference to + stmts_are_full_exprs_p. + (build_vec_init): Likewise. + + * optimize.c (maybe_clone_body): Change reference to + current_function_name_declared to + cp_function_chain->name_declared. + + * pt.c (instantiate_decl): Change reference to + current_function_name_declared to + cp_function_chain->name_declared. + + * semantics.c (expand_cond): Moved declaration to c-common.h. + (genrtl_do_pushlevel): Moved to c-semantics.c. + (genrtl_clear_out_block): Likewise. + (genrtl_goto_stmt): Likewise. + (genrtl_expr_stmt): Likewise. + (genrtl_decl_stmt): Likewise. + (gerntl_if_stmt): Likewise. + (genrtl_while_stmt): Likewise. + (genrtl_do_stmt): Likewise. + (genrtl_return_stmt): Likewise. + (genrtl_for_stmt): Likewise. + (genrtl_break_stmt): Likewise. + (genrtl_continue_stmt): Likewise. + (genrtl_scope_stmt): Likewise. + (genrtl_switch_stmt): Likewise. + (genrtl_case_label): Likewise. + (genrtl_begin_compound_stmt): Likewise. + (genrtl_finish_compound_stmt): Likewise. + (genrtl_compound_stmt): Likewise. + (genrtl_asm_stmt): Likewise. + (genrtl_decl_cleanup): Likewise. + (expand_cond): Likewise. + (expand_stmt): Renamed to ... + (lang_expand_stmt): ... this. + (lang_expand_expr_stmt): Initialize. + (set_current_function_name_declared): Likewise. + (stmts_are_full_exprs_p): Likewise. + (current_function_name_declared): Likewise. + (anon_aggr_type_p): Likewise. + (do_poplevel): Change reference to + stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). + Change reference to stmts_are_full_exprs_p to + current_stmt_tree->stmts_are_full_exprs_p. + (add_tree): Likewise. + (finish_expr_stmt): Likewise. + (prep_stmt): Likewise. + (lang_expand_stmt): Likewise. + (begin_compound_stmt): Change reference to + current_function_name_declared to + cp_function_chain->name_declared and call to + current_function_name_declared(). + (setup_vtbl_ptr): Likewise. + (genrtl_do_poplevel): Removed. + +2000-06-30 Jason Merrill + + * init.c (init_init_processing): Go back to aligning like + double_type_node for old ABI. + (get_cookie_size): Make cookie larger if we get a type that needs + more alignment. + (build_vec_delete): Call it. + + * typeck.c (qualify_type_recursive): New fn. + (composite_pointer_type): Use it. + (build_binary_op): Use composite_pointer_type. + +2000-06-24 Carlos O'Ryan + Jason Merrill + + * typeck.c (check_return_expr): Don't complain about returning + NULL from operator new if -fcheck-new. + * cp-tree.h: Declare flag_check_new here. + * init.c: Not here. + +2000-06-28 Alex Samuel + + * mangle.c (find_substitution): Use same_type_p. + (write_encoding): Don't check for substitutions. + +2000-06-30 Nathan Sidwell + + * parse.y (expr_no_comma_rangle): New non-terminal. + (template_parm): Use it for default parameter case. + (template_arg): Use it. + (expr_no_commas): Remove commented out undefined extensions. + * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. + * parse.h, parse.c: Rebuilt. + +2000-06-30 Mark Mitchell + + * semantics.c (genrtl_asm_stmt): Don't decay input operands here. + (finish_asm_stmt): Do it here, instead. + + * cp-tree.h (ridpointers): Don't declare. + * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX. + (record_builtin_java_type): Likewise. + (init_decl_processing): Likewise. + * lex.c: Move inclusion of lex.h. + (ridpointers): Don't define. + (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of + RID_MAX. + * lex.h (enum rid): Rename to ... + (enum cp_rid): ... this. + (ridpointers): Don't declare. + * parse.y: Move inclusion of lex.h. + * parse.c: Regenerated. + * spew.c: Move inclusion of lex.h. + + * cp-tree.h (struct language_function): Remove temp_name_counter. + (temp_name_counter): Remove. + (get_temp_name): Change prototype. + (get_guard): New function. + (get_guard_cond): Likewise. + (set_guard): Likewise. + * cvt.c (build_up_reference): Adjust call to get_temp_name. + * decl.c (expand_static_init): Use get_guard and friends to + implement guard variables. + * decl2.c (get_temp_name): Assume that the variables created are + always static. + (get_sentry): Rename to ... + (get_guard): ... this. Implement new ABI guard variables. + (get_guard_bits): New function. + (get_guard_cond): Likewise. + (set_guard): Likewise. + (start_static_initialization_or_destruction): Use them. + (do_static_initialization): Replace sentry with guard throughout. + (do_static_destruction): Likewise. + * init.c (create_temporary_var): Add comment. + +2000-06-28 Alex Samuel + + * mangle.c (find_substitution): Use same_type_p. + (write_encoding): Don't check for substitutions. + +2000-06-30 Nathan Sidwell + + * parse.y (expr_no_comma_rangle): New non-terminal. + (template_parm): Use it for default parameter case. + (template_arg): Use it. + (expr_no_commas): Remove commented out undefined extensions. + * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. + * parse.h, parse.c: Rebuilt. + +2000-06-29 Mark Mitchell + + * cp-tree.h (flag_const_strings): Remove. + (warn_parentheses): Likewise. + (warn_format): Likewise. + (common_type): Likewise. + (default_conversion): Likewise. + (build_binary_op): Likewise. + (cp_build_binary_op): New macro. + * call.c (build_new_op): Use cp_build_binary_op instead of + build_binary_op. + * class.c (build_vtable_entry_ref): Likewise. + * decl.c (expand_static_init): Likewise. + (compute_array_index_type): Likewise. + (build_enumerator): Likewise. + * decl2.c (delete_sanity): Likewise. + (start_static_initialization_or_destruction): Likewise. + * error.c (dump_type_suffix): Likewise. + * init.c (resolve_offset_ref): Likewise. + (build_new): Likewise. + (build_new_1): Likewise. + (build_vec_delete_1): Likewise. + (build_vec_init): Likewise. + (build_delete): Likewise. + * rtti.c (synthesize_tinfo_fn): Likewise. + (synthesize_tinfo_var): Likewise. + * search.c (expand_upcast_fixups): Likewise. + (fixup_all_virtual_upcast_offsets): Likewise. + * typeck.c (build_array_ref): Likewise. + (get_member_function_from_ptrfunc): Likewise. + (build_binary_op): Add parameter. + (pointer_int_sum): Use cp_build_binary_op. + (pointer_diff): Likewise. + (build_modify_expr): Likewise. + (get_delta_difference): Likewise. + (build_ptrmemfunc): Likewise. + +2000-06-29 Nathan Sidwell + + * cp-tree.h (SET_DECL_ARTIFICIAL): Remove. + * decl.c (create_implicit_typedef): Adjust. + * decl2.c (build_artificial_parm): Adjust. + * method.c (implicitly_declare_fn): Adjust. + * pt.c (push_inline_template_parms_recursive): Adjust. + (process_template_parm): Adjust. + (overloaded_template_name): Adjust. + * semantics.c (finish_template_template_parm): Adjust. + +2000-06-28 Mark Mitchell + + * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove. + * class.c (update_vtable_entry_for_fn): Correct logic for deciding + where to emit thunks. + (build_vtt): Adjust call to build_vtt_inits. + (build_vtt_inits): Add parameter to indicate whether or not + sub-VTTs for virtual bases should be included. Adjust handling of + construction vtables. + (get_matching_base): New function. + (dfs_build_vtt_inits): Rename to ... + (dfs_build_secondary_vptr_vtt_inits): Adjust handling of + construction vtables. + (dfs_fixup_binfo_vtbls): Likewise. + (build_ctor_vtbl_groups): Build construction vtables for virtual + bases, too. + (accumulate_vtbl_inits): Tweak logic for deciding whether or not + to build construction vtbls. + (dfs_accumulate_vtbl_inits): Adjust handling of + construction vtables. + + * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified + types correctly. + +2000-06-27 Mark Mitchell + + * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. + +2000-06-26 Nathan Sidwell + + * search.c (hides): Remove. + (is_subobject_of_p): Add most_derived parameter. Use + CANONICAL_BINFO. + (lookup_field_queue_p): Adjust. + (lookup_field_r): Adjust. + +2000-06-26 Nathan Sidwell + + * decl2.c (handle_class_head): Bash typedefs to the type's main + decl. + +2000-06-25 Mark Mitchell + + * cp-tree.h (genrtl_begin_stmt_expr): Rename to ... + (begin_global_stmt_expr): ... this. + (genrtl_finish_stmt_expr): Rename to ... + (finish_global_stmt_expr): ... this. + * init.c (begin_init_stmts): Adjust calls. + (finish_init_stmts): Likewise. + * semantics.c (genrtl_begin_stmt_expr): Rename to ... + (begin_global_stmt_expr): ... this. + (genrtl_finish_stmt_expr): Rename to ... + (finish_global_stmt_expr): ... this. + +2000-06-25 Theodore Papadopoulo + + * search.c (lookup_member): Fix typo in comment. + +2000-06-24 Jason Merrill + + * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace. + (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL. + +2000-06-24 Martin v. Löwis + + * parse.y (complex_direct_notype_declarator): Support global_scope. + * Makefile.in: Adjust conflict count. + +2000-06-23 Kriang Lerdsuwanakij + + * parse.y (template_arg): Convert TEMPLATE_DECL + that is a template template parameter to + TEMPLATE_TEMPLATE_PARM here. + + * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment. + * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro. + (copy_template_template_parm): Adjust prototype. + * decl.c (grokdeclarator): Remove dead code. + * pt.c (process_template_parm): Tidy. + (lookup_template_class): Construct nodes in + copy_template_template_parm. + (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to + lookup_template_class. Use TYPE_TI_TEMPLATE. + * tree.c (copy_template_template_parm): Add NEWARGS + parameter. + (mapcar): Adjust call to copy_template_template_parm. + * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. + * method.c (build_template_template_parm_names): Change error + code to avoid compilation warning. + + * gxxint.texi: Document template template parameter + name mangling. + +2000-06-21 Alex Samuel + + * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. + (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. + (cp-demangle.o): New rule. + (dyn-string.o): Likewise. + * inc/cxxabi.h (__cxa_demangle): New declaration. + +2000-06-22 Mark Mitchell + + * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro. + (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. + (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset + a tree, not an int. + (THUNK_GENERATE_WITH_VTABLE_P): New macro. + (make_thunk): Change prototype. + (emit_thunk): Rename to use_thunk. + (mangle_thunk): Change prototype. + * class.c (get_derived_offset): Simplify. + (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and + BV_GENERATE_THUNK_WITH_VTABLE_P. + (build_primary_vtable): Simplify. + (add_virtual_function): Use BV_FN, rather than TREE_VALUE. + (dfs_find_base): Remove. + (update_vtable_entry_for_fn): Correct bug in finding the base + where a virtual function was first declared. Figure out whether + or not to emit a vcall-thunk with the vtables in which it appears. + Correct logic for deciding whether to use an ordinary thunk, or a + vcall thunk. + (finish_struct_1): Remove unnecssary code. + (build_vtbl_initializer): Use ssize_int for the running counter of + negative indices. + (build_vtbl_initializer): Only use vcall thunks where necessary. + Mark thunks as needing to be emitted with their vtables, or not. + (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in + indices. Use size_binop. + (dfs_build_vcall_offset_vtbl_entries): Don't rely on + BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use + size_binop. + (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. + (build_vtable_entry): Mark thunks as needing to be emitted with + their vtables, or not. + * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. + * decl2.c (mark_vtable_entries): Use use_thunk instead of + emit_thunk. + * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk + information. + * error.c (dump_expr): Use BV_FN. + * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, + not an int. + * method.c (make_thunk): Likewise. + (emit_thunk): Rename to use_thunk. Allow callers to decide + whether or not to actually emit the thunk. Adjust for changes in + representation of vcall offsets. + * search.c (dfs_get_pure_virtuals): Use BV_FN. + * semantics.c (emit_associated_thunks): New function. + (expand_body): Use it. + * ir.texi: Adjust descriptions of thunks. + +2000-06-22 Jason Merrill + + * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. + (tsubst_friend_function): Copy it here. + + * decl.c (grok_op_properties): Fix typo. + + * decl2.c (delete_sanity): Clarify warning, avoid failure on + deleting void*. + + * pt.c (check_explicit_specialization): Clarify error. + + * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from + an old OVERLOAD when we're declaring a non-function. + (pushdecl, destroy_local_var): Check for error_mark_node. + (warn_extern_redeclared_static): Also bail early if + we're a CONST_DECL. + (push_overloaded_decl): Ignore an old error_mark_node. + +2000-06-22 Nathan Sidwell + + * call.c (build_x_va_arg): Check if in a template decl. + * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. + +2000-06-20 Alexandre Petit-Bianco + + * class.c (push_lang_context): TYPE_NAME gets you to the Java + types DECLs. + * decl.c (check_goto): Computed gotos assumed OK. + +2000-06-20 Jason Merrill + + * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs + for which we don't need to look for instantiations. + +2000-06-21 Nathan Sidwell + + * parse.y (program): Always call finish_translation_unit. + * parse.c, parse.h: Rebuilt. + +2000-06-20 Zack Weinberg + + * method.c: Don't include hard-reg-set.h. + +2000-06-20 Nathan Sidwell + + * rtti.c (get_base_offset): Cope when vbase field is in a base. + +2000-06-20 Nathan Sidwell + + * call.c (build_conditional_expr): Use VOID_TYPE_P. + * cvt.c (cp_convert_to_pointer): Likewise. + (convert_to_void): Likewise. + * error.c (dump_expr): Likewise. + * except.c (complete_ptr_ref_or_void_ptr_p): Likewise. + * init.c (build_delete): Likewise. + * method.c (emit_thunk): Likewise. + * optmize.c (declare_return_variable): Likewise. + * rtti.c (get_tinfo_decl_dynamic): Likewise. + (get_typeid): Likewise. + (build_dynamic_cast_1): Likewise. + * typeck.c (composite_pointer_type): Likewise. + (common_type): Likewise. + (build_indirect_ref): Likewise. + (build_binary_op): Likewise. + (build_x_compound_expr): Likewise. + (check_return_expr): Likewise. + * typeck2.c (add_exception_specifier): Likewise. + + * mangle.c (write_method_parms): Use direct comparison for end + of parmlist. + +2000-06-19 Benjamin Chelf + + * cp-tree.h (genrtl_try_block): Declare function. + (genrtl_handler): Likewise. + (genrtl_catch_block): Likewise. + (genrtl_ctor_stmt): Likewise. + (genrtl_subobject): Likewise. + (genrtl_decl_cleanup): Likewise. + (genrtl_do_poplevel): Likewise. + (genrtl_do_pushlevel): Likewise. + (genrtl_clear_out_block): Likewise. + (genrtl_goto_stmt): Likewise. + (genrtl_expr_stmt): Likewise. + (genrtl_decl_stmt): Likewise. + (genrtl_if_stmt): Likewise. + (genrtl_while_stmt): Likewise. + (genrtl_do_stmt): Likewise. + (genrtl_return_stmt): Likewise. + (genrtl_for_stmt): Likewise. + (genrtl_break_stmt): Likewise. + (genrtl_continue_stmt): Likewise. + (genrtl_scope_stmt): Likewise. + (genrtl_switch_stmt): Likewise. + (genrtl_case_label): Likewise. + (genrtl_begin_compound_stmt): Likewise. + (genrtl_finish_compound_stmt): Likewise. + (genrtl_compound_stmt): Likewise. + (genrtl_asm_stmt): Likewise. + (genrtl_named_return_value): Likewise. + (genrtl_begin_stmt_expr): Likewise. + (genrtl_finish_stmt_expr): Likewise. + (finish_for_stmt): Removed first argument. + (finish_switch_stmt): Likewise. + + * semantics.c (genrtl_try_block): Define function. + (genrtl_handler): Likewise. + (genrtl_catch_block): Likewise. + (genrtl_ctor_stmt): Likewise. + (genrtl_subobject): Likewise. + (genrtl_decl_cleanup): Likewise. + (genrtl_do_poplevel): Likewise. + (genrtl_do_pushlevel): Likewise. + (genrtl_clear_out_block): Likewise. + (genrtl_goto_stmt): Likewise. + (genrtl_expr_stmt): Likewise. + (genrtl_decl_stmt): Likewise. + (genrtl_if_stmt): Likewise. + (genrtl_while_stmt): Likewise. + (genrtl_do_stmt): Likewise. + (genrtl_return_stmt): Likewise. + (genrtl_for_stmt): Likewise. + (genrtl_break_stmt): Likewise. + (genrtl_continue_stmt): Likewise. + (genrtl_scope_stmt): Likewise. + (genrtl_switch_stmt): Likewise. + (genrtl_case_label): Likewise. + (genrtl_begin_compound_stmt): Likewise. + (genrtl_finish_compound_stmt): Likewise. + (genrtl_compound_stmt): Likewise. + (genrtl_asm_stmt): Likewise. + (genrtl_named_return_value): Likewise. + (genrtl_begin_stmt_expr): Likewise. + (genrtl_finish_stmt_expr): Likewise. + (finish_for_stmt): Removed first argument and generate rtl + specific code. + (finish_switch_stmt): Likewise. + (do_poplevel): Removed generate rtl specific code. + (do_pushlevel): Likewise. + (add_tree): Likewise. + (finish_goto_stmt): Likewise. + (finish_expr_stmt): Likewise. + (begin_if_stmt): Likewise. + (finish_if_stmt_cond): Likewise. + (finish_then_clause): Likewise. + (begin_else_clause): Likewise. + (finish_else_clause): Likewise. + (finish_if_stmt): Likewise. + (clear_out_block): Likewise. + (begin_while_stmt): Likewise. + (finish_while_stmt_cond): Likewise. + (finish_while_stmt): Likewise. + (begin_do_stmt): Likewise. + (finish_do_body): Likewise. + (finish_do_stmt): Likewise. + (finish_return_stmt): Likewise. + (begin_for_stmt): Likewise. + (finish_for_init_stmt): Likewise. + (finish_for_cond): Likewise. + (finish_for_expr): Likewise. + (finish_break_stmt): Likewise. + (finish_continue_stmt): Likewise. + (begin_switch_stmt): Likewise. + (finish_switch_cond): Likewise. + (finish_case_label): Likewise. + (begin_try_block): Likewise. + (begin_function_try_block): Likewise. + (finish_try_block): Likewise. + (finish_cleanup_try_block): Likewise. + (finish_cleanup): Likewise. + (finish_function_try_block): Likewise. + (finish_handler_sequence): Likewise. + (finish_function_handler_sequence): Likewise. + (begin_handler): Likewise. + (finish_handler_parms): Likewise. + (begin_catch_block): Likewise. + (finish_handler): Likewise. + (begin_compound_stmt): Likewise. + (finish_compound_stmt): Likewise. + (finish_asm_stmt): Likewise. + (finish_label_stmt): Likewise. + (finish_label_decl): Likewise. + (finish_subobject): Likewise. + (finish_decl_cleanup): Likewise. + (finish_named_return_value): Likewise. + (begin_stmt_expr): Likewise. + (finish_stmt_expr): Likewise. + + * decl.c (initialize_local_var): Changed call to finish_expr_stmt + to call genrtl_expr_stmt when appropriate. + + * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and + begin_compound_expr to call genrtl_begin_stmt_expr and + genrtl_begin_compound_expr when appropriate. + (finish_init_stmts): Changed calls to finish_compound_expr and + finish_stmt_expr to call genrtl_finish_compound_expr and + genrtl_finish_stmt_expr when appropriate. + (expand_default_init): Changed call to finish_expr_stmt to call + genrtl_expr_stmt when appropriate. + (build_vec_init): Likewise. + + * parse.y (simple_stmt): Removed first argument from call to + finish_for_stmt. Removed first argument from call to + finish_switch_stmt. + + * parse.c: Regenerated. + + * pt.c (tsubst_expr): Removed first argument from call to + finish_for_stmt. Removed first argument from call to + finish_switch_stmt. + +2000-06-16 Benjamin Chelf + + * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to + CP_DUMMY_TREE_CODE. Remove #include "c-common.def". + + * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def". + (cplus_tree_code_length[]): Likewise. + (cplus_tree_code_name[]): Likewise. + (init_parse): Added call to add_c_tree_codes. Changed + LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE. + +2000-06-16 Mark Mitchell + + * cp-tree.h (finish_mem_initializers): Declare. + (count_trees): Likewise. + * parse.y (base_init): Use finish_mem_initializers. + * semantics.c (finish_mem_initializers): New function. + + * tree.c (count_trees_r): Prototype. Use DATA parameter to store + the number of trees. + (n_trees): Remove. + (count_trees): Don't use it. + +2000-06-15 Jason Merrill + + * tree.c (count_trees): New debugging function. + + * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P. + * init.c (build_member_call): Pull out the name of a DECL. + + * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H. + * semantics.c (expand_body): Push to TV_INTEGRATION here. + * optimize.c (optimize_function): Not here. + * pt.c (instantiate_decl): Push to TV_PARSE. + +2000-06-15 Mark Mitchell + + * cp-tree.h (struct language_function): Remove x_base_init_list + and x_member_init_list. + (current_base_init_list): Remove. + (current_member_init_list): Likewise. + (setup_vtbl_ptr): Change prototype. + (emit_base_init): Likewise. + (expand_member_init): Likewise. + (reinit_parse_for_function): Remove. + * decl.c (save_function_data): Don't clear x_base_init_list and + x_member_init_list. + (mark_language_function): Don't mark them. + * init.c (perform_member_init): Tweak comment. + (sort_member_init): Take the list of initializers as an argument. + (sort_base_init): Likewise. + (emit_base_init): Likewise. + (expand_member_init): Return the initializer. Don't use global + variables. + * lex.c (reinit_parse_for_function): Remove. + * method.c (build_template_parm_names): Correct substitution. + (do_build_copy_constructor): Don't use current_member_init_list + and current_base_init_list. + (synthesize_method): Likewise. + * parse.y (base_init): Split mem-initializers into + base-initializers and field-initializers. + (member_init_list): Build up the list here. + (member_init): Return the initializer. + (fn.depfn): Don't use reinit_parse_for_function. + * parse.c: Regenerated. + * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the + ERROR_MARK. + (tsubst_expr): Don't use current_member_init_list + and current_base_init_list. + (tsubst_expr_values): Rename to ... + (tsubst_initializer_list): ... this. Use convert_from_reference. + * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list + and current_base_init_list. + (begin_function_definition): Don't call reinit_parse_for_function. + + * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors. + + * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE + correctly. + + * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking. + +2000-06-14 Benjamin Chelf + + * cp-tree.h (IF_COND): Move to c-common.h. + (THEN_CLAUSE): Likewise. + (ELSE_CLAUSE): Likewise. + (WHILE_COND): Likewise. + (WHILE_BODY): Likewise. + (DO_COND): Likewise. + (DO_BODY): Likewise. + (RETURN_EXPR): Likewise. + (EXPR_STMT_EXPR): Likewise. + (FOR_INIT_STMT): Likewise. + (FOR_COND): Likewise. + (FOR_EXPR): Likewise. + (FOR_BODY): Likewise. + (SWITCH_COND): Likewise. + (SWITCH_BODY): Likewise. + (CASE_LOW): Likewise. + (CASE_HIGH): Likewise. + (GOTO_DESTINATION): Likewise. + (COMPOUND_BODY): Likewise. + (ASM_CV_QUAL): Likewise. + (ASM_STRING): Likewise. + (ASM_OUTPUTS): Likewise. + (ASM_INPUTS): Likewise. + (ASM_CLOBBERS): Likewise. + (DECL_STMT_DECL): Likewise. + (STMT_EXPR_STMT): Likewise. + (LABEL_STMT_LABEL): Likewise. + (SCOPE_BEGIN_P): Likewise. + (SCOPE_END_P): Likewise. + (SCOPE_STMT_BLOCK): Likewise. + (SCOPE_NULLIFIED_P): Likewise. + (SCOPE_NO_CLEANUPS_P): Likewise. + (SCOPE_PARTIAL_P): Likewise. + (ASM_VOLATILE_P): Likewise. + (STMT_LINENO): Likewise. + (STMT_LINENO_FOR_FN_P): Likewise. + + * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR, + ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, + FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, + CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, + SCOPE_STMT, CASE_LABEL, STMT_EXPR. + + * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def. + + * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def. + (cc1plus$(exeext)): Added $(srcdir)/c-common.def. + + * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'. + (cplus_tree_code_length[]): Added '#include "c-common.def"'. + (cplus_tree_code_name[]): Added '#include "c-common.def"'. + +2000-06-14 Mark Mitchell + + * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. + * class.c (dfs_find_final_overrider): Set it appropriately. + (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to + avoid unneeded secondary vptrs. + +2000-06-13 Jakub Jelinek + + * class.c (build_secondary_vtable): Set DECL_USER_ALIGN. + (check_bitfield_decl, check_field_decl): Likewise. + (build_vtbl_or_vbase_field, build_base_field): Likewise. + (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN. + * decl.c (record_unknown_type): Set TYPE_USER_ALIGN. + (xfer_tag, finish_enum): Likewise. + * decl2.c (finish_builtin_type): Likewise. + * init.c (init_init_processing): Likewise. + * pt.c (instantiate_class_template): Likewise. + * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN. + * cp-tree.h (struct lang_type): Add user_align member. + (CLASSTYPE_USER_ALIGN): Define. + +2000-06-13 Maciej W. Rozycki + + * Make-lang.in (c++.install-common): Install g++-cross in + $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as + $(target_alias)-g++ and $(target_alias)-c++. + +2000-06-12 Mark Mitchell + + * class.c (vcall_offset_data_s): Add last_init and fns. + (overrides): Rename to same_signature_p. + (dfs_find_final_overrider): Adjust accordingly. + (mark_overriders): Likewise. + (warn_hidden): Likewise. + (build_vtbl_initializer): Reorganize machinery for building things + at negative offsets. + (build_vcall_and_vbase_vtbl_entries): Likewise. + (build_vbase_offset_vtbl_entries): Likewise. + (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall + offset entries. Do not create two entries for functions with the + same signature. + (build_vcall_offset_vtbl_entries): Initialize vod->fns. + (build_rtti_vtbl_entries): Reorganize machinery for building things + at negative offsets. + + * optimize.c (expand_call_inline): Don't recurse into the code + used to initialize the parameters more than once. + +2000-06-11 Mark Mitchell + + * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment. + (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here. + (find_substitution): Only use the `Sa' substitution for + std::allocator, not instantiations of it. + (write_template_prefix): Move comment. Only use a TREE_LIST to + represent substitutions for a member template. + (write_array_type): Mangle array dimensions correctly. + * optimize.c (maybe_clone_body): Copy more information from the + cloned function. + * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE + on the regenerated declaration. + +2000-06-11 Chip Salzenberg + Mark Mitchell + + * class.c (build_vtable): Clarify comment. + (build_ctor_vtbl_group): Pass the most derived type to + build_vtable. + +2000-06-11 Kaveh R. Ghazi + + * decl2.c (compare_options): Don't needlessly cast away const-ness. + +2000-06-10 Mark Mitchell + + * decl.c (add_binding): Handle duplicate declarations of external + variables. + +2000-06-09 Chip Salzenberg + Mark Mitchell + + * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an + argument. + (write_signed_number): New macro. + (write_unsigned_number): Likewise. + (write_source_name): Use them. + (write_number): Handle signed and unsigned values. + (write_integer_cst): Use tree_int_cst_sgn, and use + write_unsigned_number or write_signed_number as appropriate. + (write_discriminator): Use write_unsigned_number or + write_signed_number as appropriate. + (write_template_arg_literal): Likewise. + (write_array_type): Use tree_low_cst. + (write_template_parm): Use write_unsigned_number or + write_signed_number as appropriate. + (write_substitution): Adjust call to write_number. + (write_type): Get the TYPE_MAIN_VARIANT before mangling it. + (write_expression): Handle non-type template arguments of + reference type correctly. + (mangle_thunk): Use write_signed_number. + +2000-06-09 Chip Salzenberg + + * mangle.c (find_substition): Don't mangle objects with typename + substitutions (e.g. "cin" as "Si"). + +2000-06-09 Zack Weinberg + + * call.c (add_candidate): Use ggc_alloc_cleared. + * decl.c (lookup_label): Likewise. + * lex.c (retrofit_lang_decl): Likewise. + +2000-06-09 Jason Merrill + + * semantics.c (expand_body): Push to TV_EXPAND. + * optimize.c (optimize_function): Push to TV_INTEGRATION. + * decl.c (start_function): Always call announce_function. + + * tinfo2.cc: Just declare abort. + +2000-06-09 Gabriel Dos Reis + + * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @' + whenever @ is a symbolic name. + +2000-06-08 Jakub Jelinek + + * method.c (make_thunk): Clear DECL_VTT_PARM in thunk. + +2000-06-07 Mark Mitchell + + * decl.c (pushdecl): Look up functions by DECL_NAME, not + DECL_ASSEMBLER_NAME. + +2000-06-06 Mark Mitchell + + * decl2.c (c_language): Define. + +2000-06-06 Gabriel Dos Reis + + * lex.c (lang_init_options): Tweak. + + * decl2.c: Remove #inclusion of diagnostic.h + (lang_decode_option): Move diagnostic formatting options to + toplevel. + + * lang-options.h: Remove documentation for diagnostic options. + + * Makefile.in (lex.o): Depends upon diagnostic.h + +2000-06-06 Mark Mitchell + + * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have + the same DECL_RESULT, it's not a redefinition. + * pt.c (tsubst_decl): Remove code to handle illegal + specializations. + +2000-06-06 Nathan Sidwell + + * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c + +2000-06-05 Jason Merrill + + * search.c (maybe_suppress_debug_info): Don't check + CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set. + + * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION + here if extern_p. + + Remember instantiation context in deferred instantiations. + * cp-tree.h (struct tinst_level): Remove. + (TINST_DECL, TINST_LINE, TINST_FILE): New macros. + * pt.c (current_tinst_level): Now a tree. + (print_template_context, push_tinst_level, pop_tinst_level, + tinst_for_decl): Adjust. + (reopen_tinst_level): New fn. + (init_pt): Register current_tinst_level as a root. + (add_pending_template): Put current_tinst_level in TREE_PURPOSE + of the pending templates list. + (instantiate_pending_templates): Adjust. Call reopen_tinst_level. + * lex.c (extract_interface_info): Adjust. + * decl2.c (warn_if_unknown_interface): Adjust. + +2000-06-05 Mark Mitchell + + * class.c (indirect_primary_base_p): New function. + (determine_primary_base): Use it. + +2000-06-05 Nathan Sidwell + + Update new-abi dynamic cast algorithm. + * tinfo.cc (__class_type_info::__dyncast_result): Add + whole_details. Adjust constructor. + (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags. + Avoid unnecessary searching. + (__dynamic_cast): Adjust for __dyncast_result::whole_details. + +2000-06-05 Richard Kenner + + * decl.c (init_decl_processing): Don't call record_component_aliases. + * tree.c (build_cplus_array_type_1): Likewise. + +2000-06-04 Mark Mitchell + + * ir.texi: Correct typo. + * mangle.c (write_expression): Handle non-type template arguments + with reference type. + * method.c (build_overload_value): Likewise. + * pt.c (convert_nontype_argument): Explicitly represent conversion + to a reference with an ADDR_EXPR. + (unify): Always unify arguments in left-to-right order. + +2000-06-03 Alex Samuel + Mark Mitchell + + * Make-lang.in (CXX_SRCS): Add mangle.c. + * Makefile.in (CXX_OBJS): Add mangle.o. + (mangle.o): New rule. + + * class.c (local_classes): New variable. + * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI. + (get_vtt_name): Use mangle_vtt_name for new ABI. + (init_class_processing): Initialize local_classes. + (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI. + * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER. + (std_identifier): New macro. + (DECL_VOLATILE_MEMFUNC_P): New macro. + (DECL_NAMESPACE_STD_P): Likewise. + (local_classes): Declare. + (get_mostly_instantiated_function_type): Declare. + (init_mangle): Declare. + (mangle_decl): Likewise. + (mangle_type_string): Likewise. + (mangle_type): Likewise. + (mangle_typeinfo_for_type): Likewise. + (mangle_typeinfo_string_for_type): Likewise. + (mangle_vtbl_for_type): Likewise. + (mangle_vtt_for_type): Likewise. + (mangle_ctor_vtbl_for_type): Likewise. + (mangle_thunk): Likewise. + (mangle_conv_op_name_for_type): Likewise. + (mangle_guard_variable): Likewise. + * decl.c (pushtag): Keep track of local classes. + (initialize_predefined_identifiers): Initialize std_identifier. + (init_decl_processing): Use std_identifier. + (start_decl): Don't treat instantiations as specializations. + (grokdeclarator): Likewise. + (grokvardecl): Call mangle_decl for new ABI. Only set mangled + name for fully-instantiated templates. + * decl2.c (grokclassfn): Use set_mangled_name_for_decl for + destructors with the new ABI. + (finish_static_data_member_decl): Use mangle_decl under the new ABI. + (grokfield): Use mangle_type for new ABI. + (grokoptypename): Use mangle_conv_op_for_type for new ABI. + (get_sentry): Use mangle_guard_variable for new ABI. + (start_static_initialization_or_destruction): Likewise. + * expr.c (extract_aggr_init): Remove. + (extract_scalar_init): Likewise. + (extract_init): Remove #if 0'd code. + * mangle.c: New function. + * method.c (build_mangled_name): Assert not flag_new_abi. + (build_static_name): Likewise. + (build_decl_overload_real): Likewise. + (build_typename_overload): Likewise. + (build_overload_with_type): Likewise. + (build_overload_name): Likewise. + (get_ctor_vtbl_name): Likewise. + (start_squangling): Likewise. + (get_id_2): Likewise. + (set_mangled_name_for_decl): Call mangle_decl for new ABI. + (init_method): Call init_mangle for new ABI. + (make_thunk): Call mangle_thunk for new ABI. + * operators.def: Correct new ABI manglings for the `%' operator. + Add `::' operator. + * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and + DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL. + (lookup_template_class): Call mangle_decl for new ABI. + (get_mostly_instantiated_function_type): New function. + (set_mangled_name_for_template_decl): Use it. + (tsubst_decl): Use set_mangled_name_for_decl for destructors with + the new ABI. Use mangle_conv_op_name_for_type for instantiated + conversion op names. + * rtti.c (tinfo_name): Call mangle_type_string for new ABI. + (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI. + (tinfo_base_init): Likewise. Mangle typeinfo string name with + mangle_typeinfo_string_for_type. + +2000-06-03 Mark Mitchell + + * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment. + (INNERMOST_TEMPLATE_ARGS): New macro. + (innermost_args): Remove. + (get_innermost_template_args): New function. + * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS. + * error.c (dump_function_decl): Be caution when using + most_general_template. + * method.c (build_template_parm_names): Use + INNERMOST_TEMPLATE_ARGS. + * pt.c (add_to_template_args): Tidy comment + (get_innermost_template_args): New function. + (check_explicit_specialization): Clear DECL_INITIAL for a new + specialization. + (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS. + Tidy. + (push_template_decl): Always register specializations of the most + general template. + (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS. + (coerce_template_parms): Likewise. + (lookup_template_class): Likewise. + (innermost_args): Remove. + (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS. + (tsubst_decl): Handle tricky specializations. Use + get_innermost_template_args. + (instantiate_template): Simplify handling of partial + instantiations. + (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS. + (most_general_template): Reimplement, in a more straightforward + manner. + (regenerate_decl_from_template): Tweak formatting. Use + TMPL_ARGS_DEPTH for clarity. + (set_mangled_name_for_template_decl): Use INNERMOST_ARGS. + + * dump.c (dequeue_and_dump): Dump information about thunks. + +2000-06-01 Richard Henderson + + * decl.c (init_decl_processing): Set lang_get_alias_set first thing. + +2000-06-01 Richard Henderson + + * decl2.c (unsupported_options): Fix typo, make const. + (lang_decode_option): Fix bsearch argument order. + +2000-06-01 Mark Mitchell + + * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE + on FIELD_DECLs. + +2000-05-31 Richard Kenner + + * cp-tree.h (c_get_alias_set): Deleted. + * Makefile.in (decl.o): Include ../expr.h. + * decl.c (expr.h): Include. + (init_decl_processing): Call record_component_aliases for arrays. + (grokdeclarator): Likewise. + Set TREE_ADDRESSABLE for fields that aren't bitfields. + * tree.c (build_cplus_array_type_1): Call record_component_aliases. + +2000-05-31 Mark Mitchell + + Remove guiding declaration support. + * cp/cp-tree.h (flag_dump_translation_unit): Make it const. + (flag_guiding_decls): Remove. + * call.c (build_user_type_conversion_1): Remove support for + guiding decls. + (build_new_function_call): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + * decl.c (start_function): Likewise. + * friend.c (is_friend): Likewise. + (do_friend): Likewise. + * decl2.c ((flag_dump_translation_unit): Make it const. + (flag_guiding_decls): Remove. + (unsupported_options): New variable + (compare_options): New function. + (lang_decode_option): Use them. + + * decl.c (build_cp_library_fn): Set DECL_CONTEXT. + + * method.c (mangle_expression): Adjust test for legal expression + operators. + + * pt.c (instantiate_decl): Save and restore the local + specializations list. + +2000-05-30 Jason Merrill + + * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING. + +2000-05-30 Mark Mitchell + + * call.c (add_template_candidate_real): Handle member template + constructors for classes with virtual bases. + (build_user_type_conversion_1): Use in_charge_arg_for_name. + (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. + + * ir.texi: Update thunk documentation. + + * call.c (joust): Fix handling of overloaded builtin operators. + +2000-05-30 Zack Weinberg + + * cp-tree.h (DECL_ANTICIPATED): New macro. + Document new use of DECL_LANG_FLAG_7. + * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins + in the user namespace. + * lex.c (do_identifier): If the identifier's declaration has + DECL_ANTICIPATED on, it has not yet been declared. But do not + replace it with an ordinary implicit declaration. + + * tinfo2.cc: Include stdlib.h. + +2000-05-29 Mark Mitchell + + * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. + * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not + CLASSTYPE_ALIGN. + +2000-05-28 Gabriel Dos Reis + + * decl2.c (lang_decode_option): Use skip_leading_substring instead + of plain strncmp. + +2000-05-28 Alexandre Oliva + + * operators.def (?): this. Fixed. + +2000-05-27 Alex Samuel + Mark Mitchell + + * cp-tree.h (ansi_opname): Make it a macro. + (ansi_assopname): Likewise. + (struct lang_decl_flags): Add assignment_operator_p. + (struct lang_decl): Add operator_code. + (DECL_VTT_PARM): Adjust. + (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an + overloaded operator. + (SET_OVERLOADED_OPERATOR_CODE): New macro. + (DECL_ASSIGNMENT_OPERATOR_P): New macro. + (DECL_ARRAY_DELETE_OPERATOR_P): Adjust. + (opname_tab): Remove. + (assignop_tab): Likewise. + (operator_name_info_t): New type. + (operator_name_info): New variable. + (assignment_operator_name_info): Likewise. + (build_cp_library_fn): Remove declaration. + (push_cp_library_fn): Likewise. + (operator_name_string): Likewise. + (build_decl_overload): Likewise. + * call.c (print_z_candidates): Simplify. + (build_object_call): Adjust usage of ansi_opname. Use + DECL_OVERLOADED_OPERATOR_P. + (op_error): Adjust operator name lookup. + (build_conditional_expr): Adjust usage of ansi_opname. + (build_new_op): Likewise. + (build_op_delete_call): Likewise. + (build_over_call): Likewise. + (joust): Use DECL_OVERLOADED_OPERATOR_P. + * decl.c (duplicate_decls): Copy operator_code. + (init_decl_processing): Adjust parameters to push_cp_library_fn. + (builtin_function): Adjust parameters to build_library_fn_1. + (build_library_fn_1): Accept an overloaded operator code. + (build_library_fn): Pass ERROR_MARK. + (build_cp_library_fn): Accept an overloaded operator code. + (push_cp_library_fn): Likewise. + (grokfndecl): Tweak. + (grokdeclarator): Simplify code to compute names of overloaded + operators. Adjust use of ansi_opname. + (ambi_op_p): Work on tree_codes, not identifiers. + (unary_op_p): Likewise. + (grok_op_properties): Likewise. + (start_function): Use DECL_OVERLOADED_OPERATOR_P. + (lang_mark_tree): Don't try to mark the operator_code. + * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P. + * error.c (dump_decl): Remove special handling for operator + names. + (dump_function_name): Likewise. + (dump_expr): Adjust name lookup of operators. + (op_to_string): Simplify. + (assop_to_string): Likewise. + * init.c (build_new_1): Adjust use of ansi_opname. + * lex.c (opname_tab): Remove. + (assignop_tab): Likewise. + (ansi_opname): Likewise. + (ansi_assopname): Likewise. + (operator_name_string): Likewise. + (reinit_lang_specific): Likewise. + (operator_name_info): New variable. + (assignment_operator_name_info): Likewise. + (init_operators): New function. + (init_parse): Use it. + (do_identifier): Adjust use of ansi_opname. + * method.c (mangle_expression): Don't use ansi_opname for + mangling. + (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P. + (build_decl_overload): Remove. + (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly. + (do_build_assign_ref): Adjust use of ansi_opname. + (synthesize_method): Likewise. + (implicitly_declare_fn): Likewise. + * operators.def: New file. + * parse.y (operator): Adjust use of ansi_opname. + * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P. + (set_mangled_name_for_template_decl): Don't play games with + current_namespace. + (special_function_p): Adjust use of ansi_opname. + * typeck.c (check_return_expr): Likewise. + * Make-lang.in (cc1plus): Depend on operators.def. + * Makefile.in (lex.o): Likewise. + (decl.o): Likewise. + +2000-05-27 Zack Weinberg + + * Make-lang.in (cplib2.ready): Eradicate. + +2000-05-27 Richard Kenner + + * method.c (mangle_expression): Use TREE_CODE_LENGTH. + * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. + (built_min, cp_tree_equal): Likewise. + +2000-05-26 Mark Mitchell + + * class.c (layout_nonempty_base_or_field): Replace + `record_layout_info' with `record_layout_info_s'. + +2000-05-26 Jason Merrill + + Fix goto checking. + * cp-tree.h (struct language_function): x_named_labels is now + a struct named_label_list*. + * decl.c (struct named_label_use_list): Renamed from... + (struct named_label_list): ...this. New struct. + (push_binding_level): Don't set eh_region. + (note_level_for_eh): New fn. + (pop_label): Take label and old value directly. + (pop_labels): Adjust for new named_labels format. + (lookup_label): Likewise. + (poplevel): Note characteristics of a binding level containing a + named label. Mess with named label lists earlier. + (mark_named_label_lists): New fn. + (mark_lang_function): Call it. + (use_label): New fn, split out from... + (make_label_decl): ...here. Don't call it. + (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, + check_previous_gotos): New fns, split out from... + (define_label): ...here. + (check_switch_goto): New fn. + (define_case_label): Call it. + (check_goto): New fn. + * semantics.c (finish_goto_stmt): Call it and use_label. + (begin_compound_stmt): If we're a try block, call note_level_for_eh. + (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings. + +2000-05-26 Mark Mitchell + + * class.c (build_vtable_entry_ref): Correct usage of + get_vtbl_decl_for_binfo. + + * decl2.c (grokclassfn): Set DECL_LANGUAGE here. + * method.c (implicitly_declare_fn): Not here. + +2000-05-26 Nathan Sidwell + + * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ... + (CPTI_PTMD_DESC_TYPE): ... here. + (ptmd_desc_type_node): Rename to ... + (ptm_desc_type_node): ... here. + * decl.c: Likewise. + * rtti.c (ptmd_initializer): Rename to ... + (ptm_initializer): ... here. + (sythesize_tinfo_var): Adjust. Deal with pointer to member + function. + (create_tinfo_types): Adjust. + +2000-05-25 Mark Mitchell + + Finish implementation of VTTs. + * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and + CPTI_VTT_PARM_IDENTIFIER. + (vtt_parm_identifier): New macro. + (vtt_parm_type): Likewise. + (BINFO_SUBVTT_INDEX): Likewise. + (BINFO_VPTR_INDEX): Likewise. + (struct lang_decl): Add vtt_parm. + (DECL_VTT_PARM): New macro. + (DECL_USE_VTT_PARM): Likewise. + (DECL_NEEDS_VTT_PARM_P): Likewise. + (get_vtt_name): Declare. + (build_artificial_parm): Likewise. + (fixup_all_virtual_upcast_offsets): Likewise. + (expand_indirect_vtbls_init): Remove. + * call.c (build_new_method_call): Pass the vtt to subobject + constructors and destructors. + * class.c (get_vtt_name): Give it external linkage. + (build_clone): Handle the magic VTT parameters for clones. + (clone_function_decl): Fix typo in comment. + (build_vtt): Keep track of the indices in the VTTs where various + entities are stored. + (build_vtt_inits): Likewise. + (dfs_build_vtt_inits): Likewise. + (build_ctor_vtbl_group): Tweak type of construction vtables. + (dfs_accumulate_vtbl_inits): Build vtables for all bases, even + primary bases, when building construction vtables. + * decl.c (duplicate_decls): Handle DECL_VTT_PARM. + (initialize_predefined_identifiers): Add vtt_parm_identifier. + (init_decl_processing): Initialize vtt_parm_type. + (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P. + (lang_mark_tree): Make vtt_parm. + * decl2.c (build_artificial_parm): New function. + (maybe_retrofit_in_chrg): Use it. Add VTT parameters. + (grokclassfn): Use build_artificial_parm. + * init.c (initialize_vtbl_ptrs): Call + fixup_all_virtual_upcast_offsets directly. + (perform_member_init): Use the complete subobject destructor for + member cleanups. + (build_vtbl_address): New function. + (expand_virtual_init): Handle VTTs. + * optimize (maybe_clone_body): Likewise. + * search.c (fixup_all_virtual_upcast_offsets): Give it external + linkage. + (expand_indirect_vtbls_init): Remove. + * semantics.c (setup_vtbl_ptr): Fix typos in comment. + * tree.c (make_binfo): Make them bigger. + +2000-05-25 Nathan Sidwell + + * inc/cxxabi.h (__pbase_type_info): Define, based on + __pointer_type_info. + (__pointer_type_info): Derive from __pbase_type_info. Adjust. + (__pointer_to_member_type_info): Likewise. + * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement. + (__pointer_to_member_type_info::__is_pointer_p): Remove. + (__pointer_type_info::__do_catch): Rename to ... + (__pbase_type_info::__do_catch): ... here. Adjust. + (__pbase_type_info::__pointer_catch): Implement. + (__pointer_type_info::__pointer_catch): Adjust. + (__pointer_to_member_type_info::__pointer_catch): Adjust. + +2000-05-25 Nathan Sidwell + + * tinfo.h (__user_type_info::contained_virtual_p): New + predicate. + * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond + shaped hierarchy. + (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to + diamond shaped hierarchy. Add early out for mixed diamond and + duplicate shaped hierarchy. + +2000-05-24 Mark Mitchell + + * cp-tree.h (build_delete): Change prototype. + (build_vec_delete): Likewise. + * call.c (build_scoped_method_call): Use special_function_kind + values to indicate the kind of destruction to be done. + (build_method_call): Likewise. + * decl.c (finish_destructor_body): Likewise. + (maybe_build_cleanup_1): Likewise. Rename to ... + (maybe_build_cleanup): ... this. + * decl2.c (delete_sanity): Use special_function_kind + values to indicate the kind of destruction to be done. + (build_cleanup): Likewise. + * init.c (perform_member_init): Likewise. + (build_vec_delete_1): Likewise. + (build_dtor_call): Simplify. + (build_delete): Use special_function_kind + values to indicate the kind of destruction to be done. + (build_vbase_delete): Likewise. + (build_vec_delete): Likewise. + + * init.c (sort_member_init): Fix typo in error message generation + code. + +2000-05-15 Donald Lindsay + + * semantics.c (begin_class_definition): make the packed + attribute be sensitive to the "-fpack-struct" command line flag + +2000-05-24 Nathan Sidwell + + Update new-abi upcast algorithm. + * inc/cxxabi.h (__class_type_info::__do_upcast): Change + prototype and meaning of return value. + (__si_class_type_info::__do_upcast): Likewise. + (__vmi_class_type_info::__do_upcast): Likewise. + * tinfo.cc (__class_type_info::__upcast_result): Replace + whole2dst with part2dst. Adjust ctor. + (__class_type_info::__do_upcast): Adjust call of worker function. + (__class_type_info::__do_upcast): Adjust. + (__si_class_type_info::__do_upcast): Adjust. Use parent's + __do_upcast. + (__vmi_class_type_info::__do_upcast): Likewise. Fix private + virtual base in diamond hierarchy bug. + +2000-05-23 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable + and bitfield to tinfo_fn_p. + (DECL_TINFO_FN_P): Adjust. + (SET_DECL_TINFO_FN_P): Likewise. + (DECL_MUTABLE_P): Likewise. + (DECL_C_BIT_FIELD): Likewise. + (SET_DECL_C_BIT_FIELD): Likewise. + (CLEAR_DECL_C_BIT_FIELD): Likewise. + (DECL_UNINLINABLE): Likewise. + * class.c (alter_access): Call retrofit_lang_decl if ncessary. + (handle_using_decl): Remove assertion. + (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl, + to build FIELD_DECLs. + (build_base_field): Likewise. + (layout_class_type): Likewise. + * decl.c (init_decl_processing): Likewise. + (build_ptrmemfunc_type): Likewise. + (grokdeclarator): Likewise. + * decl2.c (grok_x_components): Likewise. + * except.c (call_eh_info): Likewise. + * init.c (init_init_processing): Likewise. + * rtti.c (expand_class_desc): Likewise. + (create_pseudo_type_info): Likewise. + (get_vmi_pseudo_type_info): Likewise. + (create_tinfo_types): Likewise. + * ptree.c (print_lang_decl): Adjust. + * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC + before checking DECL_MUTABLE_P. + + * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge + parameters for template functions. + * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for + destructors as well as constructors. + +2000-05-22 Mark Mitchell + + * class.c (build_ctor_vtbl_group): Set inits. + * optimize.c (maybe_clone_body): Set DECL_INLINE and + DECL_THIS_INLINE appropriately for clones. + + * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. + (DECL_CONV_FN_P): Simplify. + (DECL_OPERATOR): Remove. + (language_to_string): Declare. + * decl.c (duplicate_decls): Fix typo in comment. + (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. + (grok_op_properties): Use DECL_CONV_FN_P instead of + IDENTIFIER_TYPENAME_P. + * dump.c (dequeue_and_dump): Dump the language linkage of + declarations. + * error.c (language_to_string): Give it external linkage. + * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. + (implicitly_declare_fn): Set DECL_LANGUAGE. + * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not + IDENTIFIER_TYPENAME_P. + (tsubst_decl): Likewise. + (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. + * semantics.c (finish_member_declaration): Don't mark members of + classes declared in an extern "C" region as extern "C". + +2000-05-22 Martin v. Löwis + + * decl2.c (qualified_lookup_using_namespace): Look through + namespace aliases. + + * decl.c (push_using_decl): Return the old decl on namespace level. + +2000-05-21 Mark Mitchell + + * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. + (VTT_NAME_PREFIX): New macro. + (CTOR_VTBL_NAME_PREFIX): Likewise. + (get_ctor_vtbl_name): New function. + * class.c (get_vtable_name): Simplify. + (get_vtt_name): New function. + (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. + (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list + when a virtual base becomes primary. + (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build + VTTs. + (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in + additional parameters. + (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. + (initialize_array): New function. + (build_vtt): Likewise. + (build_vtt_inits): Likewise. + (dfs_build_vtt_inits): Likewise. + (dfs_fixup_binfo_vtbls): Likewise. + (build_ctor_vtbl_group): Likewise. + (initialize_vtable): Use initialize_array. + (accumulate_vtbl_inits): Reimplement to handle construction + vtables. + (dfs_accumulate_vtbl_inits): Likewise. + (bulid_vtbl_initializer): Adjust parameter name. + * method.c (build_typename_overload): Remove #if 0'd code. + (get_ctor_vtbl_name): New function. + * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. + (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. + + * cp-tree.h (struct lang_type): Remove search_slot. + (CLASSTYPE_SEARCH_SLOT): Remove. + (emit_base_init): Change prototype. + (initialize_vtbl_ptrs): Likewise. + (expand_indirect_vtbls_init): Likewise. + (clear_search_slots): Remove. + * decl.c (lang_mark_tree): Don't mark search_slot. + * init.c (initialize_vtbl_ptrs): Simplify. + (emit_base_init): Likewise. + * search.c (struct vbase_info): Document decl_ptr. + (convert_pointer_to_single_level): Remove. + (dfs_find_vbases): Remove. + (dfs_init_base_pointers): Simplify. + (dfs_clear_vbase_slots): Remove. + (dfs_vtable_path_unmark): New function. + (init_vbase_pointers): Simplify. + (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT. + (expand_indirect_vtbls_init): Simplify. Don't call + mark_all_temps_used. + * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and + initialize_vtbl_ptrs. + +2000-05-20 Zack Weinberg + + * except.c: Add static prototypes. + +2000-05-20 H.J. Lu + + * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext). + +2000-05-19 Mark Mitchell + + Don't create a separate copy of virtual bases for the + CLASSTYPE_VBASECLASSES list. + * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. + (BINFO_FOR_VBASE): Remove. + (CANONICAL_BINFO): Adjust. + (binfo_for_vbase): New function. + * class.c (build_vbase_pointer_fields): Use binfo_for_vbase + instead of BINFO_FOR_VBASE. + (build_vbase_pointer): Likewise. + (build_secondary_vtable): Likewise. + (dfs_mark_primary_bases): Likewise. + (mark_primary_bases): Likewise. + (layout_nonempty_base_or_field): Likewise. + (dfs_set_offset_for_shared_vbases): Likewise. + (dfs_set_offset_for_unshared_vbases): Likewise. + (layout_virtual_bases): Likewise. Adjust for changes to the + CLASSTYPE_VBASECLASSES list. + (dump_class_hierarchy_r): Use binfo_for_vbase + instead of BINFO_FOR_VBASE. + (dump_class_hierarchy): Likewise. + (finish_vtbls): Likewise. + (build_vtbl_initializer): Adjust for changes to the + CLASSTYPE_VBASECLASSES list. + (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. + * decl.c (finish_destructor_body): Adjust for changes to the + CLASSTYPE_VBASECLASSES list. + * init.c (sort_base_init): Use binfo_for_vbase. + (construct_virtual_bases): Adjust for changes to the + CLASSTYPE_VBASECLASSES list. + (expand_member_init): Use binfo_for_vbase. + (build_vbase_delete): Adjust for changes to the + CLASSTYPE_VBASECLASSES list. + * method.c (do_build_copy_constructor): Likewise. + * rtti.c (get_base_offset): Use binfo_for_vbase. + (expand_class_desc): Remove #if 0'd code. + * search.c (struct vbase_info): Remove vbase_types. + (get_base_distance): Use binfo_for_vbase. + (lookup_field_queue_p): Use CANONICAL_BINFO. + (get_shared_vbase_if_not_primary): Use binfo_for_vbase. + (get_pure_virtuals): Adjust for changes to the + CLASSTYPE_VBASECLASSES list. + (dfs_find_vbases): Use binfo_for_vbase. + (dfs_init_vbase_pointers): Likewise. + (init_vbase_pointers): Don't initialize vi.vbase_types. + (virtual_context): Use binfo_for_vbase. + (fixup_all_virtual_upcast_offsets): Adjust for changes to the + CLASSTYPE_VBASECLASSES list. + (expand_indirect_vtbls_init): Simplify. + (dfs_get_vbase_types): Don't replicate virtual bases. + (find_vbase_instance): Use binfo_for_vbase. + (binfo_for_vbase): New function. + * typeck.c (get_delta_difference): Use binfo_for_vbase. + +2000-05-17 Mark Mitchell + + * decl2.c (finish_anon_union): Generalize error messages to handle + anonymous structures. + * init.c (perform_member_init): Remove `name' parameter. + (build_field_list): New function. + (sort_member_init): Handle anonymous union initialization order + correctly. Check for multiple initializations of the same union. + (emit_base_init): Don't look up fields by name here. + (expand_member_init): Record the result of name lookup for future + reference. + * typeck.c (build_component_ref): Fix formatting. + +2000-05-17 Andrew Cagney + + * decl.c (pop_label): Replace warn_unused with warn_unused_label. + * typeck.c (build_x_compound_expr): Replace warn_unused with + warn_unused_value. + + * decl2.c (lang_decode_option): Update -Wall unused flags by + calling set_Wunused. + +2000-05-16 Mark Mitchell + + * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation. + * init.c (dfs_vtable_path_unmark): Remove. + * search.c (marked_new_vtable_p): Likewise. + (unmarked_new_vtable_p): Likewise. + (dfs_search_slot_nonempty_p): Likewise. + (dfs_mark): Likewise. + (dfs_vtable_path_unmark): Likewise. + (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED. + (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED. + (dfs_init_vbase_pointers): Remove special-case new ABI code. + (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED. + (init_vbase_pointers): Simplify. + (expand_indirect_vtbls_init): Likewise. + + * class.c (copy_virtuals): New function. + (build_primary_table): Use it. + (build_secondary_vtable): Likewise. + (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to + indicate that no vcall offset is required. + (add_virtual_function): Likewise. + (modify_all_vtables): Likewise. + (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. + (dfs_accumulate_vtbl_inits): Likewise. + (build_vtbl_initializer): Make changes to handle construction + vtables. + (dfs_build_vcall_offset_vtbl_entries): Likewise. + (build_rtti_vtbl_entries): Likewise. + (build_vtable_entries): Handle a NULL vcall_index. + +2000-05-15 Gabriel Dos Reis + + * decl2.c (lang_decode_option): Fix thinko. + +2000-05-14 Jason Merrill + + * except.c (check_handlers): New fn. + * cp-tree.h: Declare it. + * semantics.c (finish_handler_sequence): Call it. + (finish_function_handler_sequence): Likewise. + (finish_handler_parms): Set TREE_TYPE on the handler. + * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro. + * search.c (get_base_distance_recursive): If protect>1, ignore + special access. + (get_base_distance): Don't reduce watch_access. + +2000-05-13 Gabriel Dos Reis + + * lex.c: #include diagnostic.h. + (lang_init_options): Set default prefixing rules. + + * lang-options.h: Add -fdiagnostics-show-location=. + + * decl2.c: #include diagnostic.h. + (lang_decode_option): Handle -fdiagnostics-show-location=. + +2000-05-12 Nathan Sidwell + + * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes. + * vec.cc: Revert my 2000-05-07 change. + +2000-05-11 Jason Merrill + + * class.c (check_field_decls): Complain about non-static data + members with same name as class in class with constructor. + +2000-05-10 Jason Merrill + + * decl.c (grokdeclarator): Allow non-static data members with + same name as class. + +2000-05-09 Zack Weinberg + + * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, + and pending_inline.filename. Update prototypes. + * decl.c (define_label): Constify filename parameter. + * decl2.c (warn_if_unknown_interface): Constify local char *. + * input.c Constify input_source.filename. Don't declare + input_filename or lineno. Constify filename parameter to feed_input. + * lex.c (init_parse): Constify parameter and return value. + (cp_pragma_interface, cp_pragma_implementation): Constify + filename argument. + (reinit_parse_for_method, reinit_parse_for_block, + reinit_parse_for_expr, feed_defarg, handle_cp_pragma): + Constify local char *. + * pt.c: Don't declare lineno or input_filename. + (print_template_context, tsubst_friend_function, tsubst_decl, + tsubst, instantiate_decl): Constify local char *. + * semantics.c (expand_body): Constify local char *. + * tree.c (build_srcloc): Constify filename parameter. + * typeck.c (c_expand_asm_operands): Constify filename + parameter. + +2000-05-08 Nathan Sidwell + + * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix + offsetof expansion. + +2000-05-08 Branko Cibej + + * inc/cxxabi.h: Fix typos in comment. + (__base_class_info::__offset): Use a static_cast. + +2000-05-07 Nathan Sidwell + + * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place + of std::size_t and std::ptrdiff_t respectively. + * tinfo.cc: Likewise. + * vec.cc: Likewise. + +2000-05-06 Richard Henderson + + * typeck.c (build_c_cast): Don't warn integer->pointer size + mismatch for constants. + +2000-05-06 Nathan Sidwell + + * rtti.c (ptmd_initializer): Set non-public, if class is + incomplete. + + * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++". + (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, + __cxa_vec_delete): Likewise. + * tinfo.cc (__dynamic_cast): Likewise. + * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, + __cxa_vec_delete): Likewise. + +2000-05-04 Mark Mitchell + + * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove. + (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise. + (lang_decl_flags): Add vcall_offset. + (THUNK_VCALL_OFFSET): Use it. + * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk. + * method.c (make_thunk): Create the lang_decl here, not in + emit_thunk. + (emit_thunk): Make generic thunks into ordinary functions once + they have been fed to expand_body. + * semantics.c (expand_body): Set current_function_is_thunk here. + +2000-05-04 Kaveh R. Ghazi + + * class.c (update_vtable_entry_for_fn): Prototype. + + * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl' + and `tmpl'. + + * search.c (dfs_build_inheritance_graph_order): Prototype. + +2000-05-04 Mark Mitchell + + * cp-tree.h (special_function_kind): Add various kinds of + destructors. + (special_function_p): New function. + * class.c (overrides): Don't let one kind of destructor override + another. + * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding + whether or not to instantiate a template. + * tree.c (special_function_p): Define. + +2000-05-03 Mark Mitchell + + * cp-tree.def (THUNK_DECL): Remove. + * cp-tree.h (DECL_THUNK_P): New macro. + (DECL_NON_THUNK_FUNCTION_P): Likewise. + (DECL_EXTERN_C_FUNCTION_P): Likewise. + (SET_DECL_THUNK_P): Likewise. + (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P. + (FNADDR_FROM_VTABLE_ENTRY): Likewise. + (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P. + * decl.c (decls_match): Use DECL_EXTERN_C_P. + (duplicate_decls): Likewise. + (pushdecl): Likewise. Adjust thunk handling. + (grokfndecl): Use DECL_EXTERN_C_P. + * decl2.c (mark_vtable_entries): Use DECL_THUNK_P. + * dump.c (dequeue_and_dump): Remove THUNK_DECL handling. + * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P. + * expr.c (cplus_expand_expr): Remove THUNK_DECL handling. + * method.c (make_thunk): Use SET_DECL_THUNK_P. Set + DECL_NO_STATIC_CHAIN. + (emit_thunk): Don't play games with TREE_CODE on thunks. Don't + set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk. + * search.c (covariant_return_p): Remove THUNK_DECL handling. + * ir.texi: Update. + +2000-05-01 Jason Merrill + + * tree.c (walk_tree): Set lineno. + +2000-05-01 Mark Mitchell + + * exception.cc: Update license notice. + * new.cc: Likewise. + * new1.cc: Likewise. + * new2.cc: Likewise. + * tinfo.cc: Likewise. + * tinfo2.cc: Likewise. + * vec.cc: Likewise. + * inc/cxxabi.h: Likewise. + * inc/exception: Likewise. + * inc/new: Likewise. + * inc/new.h: Likewise. + * inc/typeinfo: Likewise. + +2000-05-01 Jason Merrill + + * tree.c (build_target_expr_with_type): If we already have a + TARGET_EXPR, just return it. + + * optimize.c (initialize_inlined_parameters): Don't generate an + EXPR_STMT if we can just use DECL_INITIAL. + * decl.c (emit_local_var): Only make the initialization a + full-expression if stmts_are_full_exprs_p. + +2000-05-01 Mark Mitchell + + * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New + macro. + * call.c (standard_conversion): Use it. + (direct_reference_binding): Likewise. + (build_over_call): Likewise. + (is_properly_derived_from): Likewise. + (compare_ics): Likewise. + * class.c (resolves_to_fixed_type_p): Likewise. + * optimize.c (declare_return_variable): Likewise. + * pt.c (is_specialization_of): Likewise. + (unify): Likewise. + * typeck.c (comp_target_parms): Likeiwse. + (build_static_cast): Likewise. + (build_reinterpret_cast): Likewise. + (build_const_cast): Likewise. + (comp_ptr_ttypes_real): Likewise. + (comp_ptr_ttypes_const): Likewise. + * typeck2.c (process_init_constructor): Likewise. + +2000-04-30 Scott Snyder + + * decl.c (finish_destructor_body): Use the base destructor when + destroying virtual bases. + +2000-04-30 Mark Mitchell + + * expr.c (cplus_expand_expr): Preserve temporaries when expanding + STMT_EXPRs. + * optimize.c (struct inline_data): Add target_exprs field. + (declare_return_variable): When a function returns an aggregate, + use the variable declared in the TARGET_EXPR as the remapped + DECL_RESULT. + (expand_call_inline): Update the pending target_exprs stack. + (optimize_function): Initialize the stack. + + * decl2.c (finish_file): Fix typo in comment. + + * method.c (emit_thunk): Don't try to return a `void' value. + + * optimize.c (initialize_inlined_parameters): If the parameter is + addressable, we need to make a new VAR_DECL, even if the + initializer is constant. + +2000-04-28 Cosmin Truta + + * decl.c (grok_op_properties): Add an extra check of argtypes. + +2000-04-27 Mark Mitchell + + * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying + variables. + (initialize_inlined_parameters): Try to avoid creating new + VAR_DECLs. + +2000-04-27 Alex Samuel + + * lex.c (my_get_run_time): Remove. + (init_filename_times): Use get_run_time instead of my_get_run_time. + (check_newline): Likewise. + (dump_time_statistics): Likewise. + * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead + of computing elapsed time explicitly. + +2000-04-26 Mark Mitchell + + * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. + * init.c (decl_constant_value): Check TREE_READONLY_DECL_P. + * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P + before calling decl_constant_value. + * class.c (check_bitfield_decl): Likewise. + * cvt.c (ocp_convert): Likewise. + (convert): Likewise. + * decl.c (compute_array_index_type): Likewise. + (build_enumerator): Likewise. + * decl2.c (check_cp_case_value): Likewise. + * pt.c (convert_nontype_argument): Likewise. + (tsubst): Likewise. + * typeck.c (decay_conversion): Likewise. + (build_compound_expr): Likewise. + (build_reinterpret_cast): Likewise. + (build_c_cast): Likewise. + (convert_for_assignment): Likewise. + +2000-04-26 Jason Merrill + + * decl.c (finish_function): Don't play games with DECL_INLINE. + +2000-04-25 Gabriel Dos Reis + + * ir.texi: Correct typo. + +2000-04-25 Martin v. Löwis + + * decl.c (grokdeclarator): Reject VLAs as members. + +2000-04-24 Gabriel Dos Reis + + * call.c (standard_conversion): Accept conversion between + COMPLEX_TYPEs. + + * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. + +2000-04-24 Zack Weinberg + + * decl2.c (finish_file): Remove double setup for accounting + compile time. + +2000-04-24 Robert Lipe + + * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. + +2000-04-23 Benjamin Kosnik + + * new.cc (set_new_handler): Needs to be in std::. + +2000-04-23 Mark Mitchell + + * cp-tree.h (lang_decl): Remove pretty_function_p. + (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the + language-specific node. + * decl.c (cp_make_fname_decl): Use build_decl, not + build_lang_decl, to build the variables. + (grokvardecl): Don't call build_lang_decl for local variables in + templates. + (grokdeclarator): Don't call build_lang_decl for local type + declarations in templates. + * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated + zero'd memory, rather than calling memset. + * pt.c: Include hashtab.h. + (local_specializations): New variable. + (retrieve_local_specialization): Use it. + (register_local_specialization): Likewise. + (tsubst_decl): Don't assume local variables have + DECL_LANG_SPECIFIC. + (instantiate_decl): Set up local_specializations. + * Makefile.in (HTAB_H): New variable. + +2000-04-23 Richard Henderson + + * typeck.c (c_expand_asm_operands): Restore the original + contents of the output list. + +2000-04-22 Gabriel Dos Reis + + * ir.texi: Document complex number representation. + +2000-04-20 Nathan Sidwell + + * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi. + (target_incomplete_p): New function. + (tinfo_base_init): Create comdat NTBS name variable. + (ptr_initializer): Add non_public parameter. Calculate it. + (ptmd_initializer): Likewise. + (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo. + (create_real_tinfo_var): Add non_public parameter. Use it. + Push proxy into global namespace. + * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask): + New enumeration. + * inc/typeinfo (type_info::before, type_info::operator==): + Compare __name addresses. + + * tinfo2.cc: Remove new-abi builtins comment. + +2000-04-20 Jason Merrill + + * typeck.c (build_x_function_call): Resolve an OFFSET_REF. + + * call.c (joust): Exit early if we get the same function, too. + + * decl2.c (key_method): Return NULL_TREE for template classes. + (import_export_class): Don't need to check for template classes. + +2000-04-18 Zack Weinberg + + * lex.c: Remove references to cccp.c. + +2000-04-18 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Remove const_memfunc and + volatile_memfunc. Add destructor_attr. Adjust dummy. + (DECL_DESTRUCTOR_P): Use destructor_attr. + (DECL_CONST_MEMFUNC_P): Reimplement. + (DECL_VOLATILE_MEMFUNC_P): Remove. + * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS. + (overrides): Use DECL_DESTRUCTOR_P. + (check_for_override): Likewise. + * decl.c (start_function): Likewise. + * decl2.c (grokfclassfn): Likewise. + (check_classfn): Likewise. + (grok_function_init): Likewise. + +2000-04-17 Mark Mitchell + + * decl2.c (grokfield): Issue error on illegal data member + declaration. + +2000-04-17 Mark P Mitchell + + * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL. + +2000-04-16 Mark Mitchell + + * class.c (build_vtable_entry): Don't build thunks for type-info + functions. + +2000-04-16 Jason Merrill + + * decl.c (decls_match): Allow a redeclaration of a builtin to + specify args while the builtin did not. + +2000-04-15 Mark Mitchell + + * cp-tree.def (THUNK_DECL): Add to documentation. + * cp-tree.h (flag_huge_objects): Declare. + * class.c (modify_vtable_entry): Tidy. + (update_vtable_entry_for_fn): Split out from dfs_modify_vtables. + Calculate delta appropriately for the new ABI. + (dfs_modify_vtables): Use it. + (modify_all_vtables): Fix thinko in code to add overriding copies + of functions to primary vtables. + (build_clone): Fix typo in comment. + (clone_function_decl): Correct order of destructors in vtable. + (build_vbase_offset_vtbl_entries): Adjust comment. + (dfs_vcall_offset_queue_p): Remove. + (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX. + (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases. + (build_vtable_entry): Correct check for pure virtual functions. + Don't declare flag_huge_objects. + * decl.c (flag_huge_objects): Remove declaration. + * method.c (make_thunk): Tweak mangling for vcall offset thunks. + Use int_size_in_bytes. + (emit_thunk): Handle vcall offset thunks. + +2000-04-15 Richard Kenner + + * decl2.c (parse_time, varconst_time): Delete declarations. + (finish_file): Delete LINENO declaration. + START_TIME and THIS_TIME now long. + +2000-04-13 Nathan Sidwell + + * class.c (build_base_field): Reformat comment. + + * inc/cxxabi.h (stddef.h): Comment inclusion. + (__base_class_info::__offset): Comment shift. + +2000-04-12 Mark Mitchell + + * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. + (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. + (cp_push_exception_identifier): New macro. + (DECL_COMPLETE_DESTRUCTOR_P): New macro. + (DECL_BASE_DESTRUCTOR_P): Likewise. + (DECL_DELETING_DESTRUCTOR_P): Likewise. + (get_vtbl_decl_for_binfo): Fix formatting. + (in_charge_arg_for_name): New macro. + (maybe_build_cleanup_and_delete): Remove declaration. + * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. + (in_charge_arg_for_name): New function. + (build_new_method_call): Use it. Handle cloned destructors. + (build_clone): Don't make the base constructor virtual. + Automatically defer generated functions. + (clone_function_decl): Handle destructors, too. + (clone_constructors_and_destructors): Likewise. + (create_vtable_ptr): Don't create a vtable entry for a cloned + function. + * decl.c (predefined_identifier): Add ctor_or_dtor_p. + (initialize_predefined_identifiers): Update appropriately. + (finish_destructor_body): Simplify. + (maybe_build_cleanup_and_delete): Remove. + * except.c (expand_throw): Handle new-ABI destructors. + * init.c (expand_cleanup_for_base): Use base_dtor_identifier. + (build_dtor_call): New function. + (build_delete): Use it. Simplify. + * optimize.c (maybe_clone_body): Handle destructors. + * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. + + * exception.cc (cleanup_fn): New typedef. + (CALL_CLEANUP): New macro. + (cp_eh_info): Use them. + (__cp_push_exception): Likewise. + (__cp_pop_exception): Likewise. + +2000-04-11 Mark Mitchell + + * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER. + (complete_dtor_identifier): New macro. + (CLASSTYPE_FIRST_CONVERSION): Remove. + (CLASSTYPE_CONSTRUCTOR_SLOT): New macro. + (CLASSTYPE_DESTRUCTOR_SLOT): Likewise. + (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise. + (CLASSTYPE_CONSTRUCTORS): Likewise. + (CLASSTYPE_DESTRUCTORS): Likewise. + (lang_decl): Add cloned_function. + (DECL_COMPLETE_CONSTRUCTOR_P): New macro. + (DECL_BASE_CONSTRUCTOR_P): Likewise. + (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. + (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. + (DECL_CLONED_FUNCTION_P): Likewise. + (DECL_CLONED_FUNCTION): Likewise. + (clone_function_decl): Declare. + (maybe_clone_body): Likewise. + * call.c (build_user_type_conversion_1): Call complete object + constructors in the new ABI. + (build_new_method_call): Don't add in-charge parameters under the + new ABI. + * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, + DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and + CLASSTYPE_DESTRUCTOR_SLOT. + (build_clone): New function. + (clone_function_decl): Likewise. + (clone_constructors_and_destructors): Likewise. + (check_bases_and_members): Use it. + * decl.c (iniitialize_predefined_identifiers): Initialize + complete_dtor_identifier. + (finish_function): Don't add extra code to a clone. + (lang_mark_tree): Mark cloned_function. + * decl2.c (mark_used): Don't bother trying to instantiate things + we synthesized. + * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice. + * method.c (set_mangled_name_for_decl): Don't treat clones as + constructors. + (synthesize_method): Sythesize cloned functions, not the clones. + * optimize.c (inline_data): Update comment on ret_label. + (remap_block): Don't assume DECL_INITIAL exists. + (copy_body_r): Allow ret_label to be NULL. + (maybe_clone_body): Define. + * pt.c (tsubst_decl): Handle clones. + (instantiate_clone): New function. + (instantiate_template): Use it. + (set_mangled_name_for_template_decl): Don't treat clones as + constructors. + * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT, + CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT. + * semantics.c (expand_body): Clone function bodies as necessary. + + * optimize.c (remap_decl): Avoid sharing structure for arrays + whose size is only known at run-time. + * tree.c (copy_tree_r): Don't copy PARM_DECLs. + + * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr + to has_in_charge_parm_p. + (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ... + (DECL_HAS_IN_CHARGE_PARM_P): ... this. + (DECL_COPY_CONSTRUCTOR_P): New macro. + * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P. + (build_user_type_conversion_1): Likewise. + (convert_like_real): Likewise. + (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P. + * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P. + (copy_args_p): Likewise. + (grok_ctor_properties): Likewise. + (start_function): Likewise. + * decl2.c (maybe_retrofit_in_charge): Likewise. Set it. + * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P. + * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P. + * method.c (do_build_copy_constructor): Use + DECL_HAS_IN_CHARGE_PARM_P. + (synthesize_method): Likewise. + * pt.c (instantiate_template): Remove goto. + * tree.c (build_cplus_method_type): Remove mention of obstacks in + comment. + + * cp-tre.h (finish_function): Change prototype. + * decl.c (end_cleanup_fn): Adjust caller. + (finish_function): Take only one parameter. + * decl2.c (finish_objects): Adjust caller. + (finish_static_storage_duration_function): Likewise. + * method.c (emit_thunk): Likewise. + * parse.y: Likewise. + * parse.c: Regenerated. + * pt.c (instantiate_decl): Likewise. + * rtti.c (synthesize_tinfo_fn): Likewise. + * semantics.c (expand_body): Likewise. + + * cp-tree.h (copy_decl): New function. + * class.c (finish_struct_1): Use it. + * lex.c (copy_decl): Define it. + * pt.c (tsubst_decl): Likewise. + * tree.c (copy_template_template_parm): Likewise. + + * cp-tree.h (lang_type): Remove has_nonpublic_ctor and + has_nonpublic_assign_ref. + (TYPE_HAS_NONPUBLIC_CTOR): Don't declare. + (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise. + * class.c (finish_struct_methods): Don't set + TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF. + (interface_only): Don't declare. + (interface_unknown): Likewise. + +2000-04-11 Martin v. Löwis + + * tree.h (HAVE_TEMPLATES): Remove definition. + * lang-options.h (-fthis-is-variable): Remove documentation. + +2000-04-10 Jason Merrill + + * class.c (instantiate_type): Handle object-relative template-id. + + * semantics.c (finish_expr_stmt): Call convert_to_void here. + * decl.c (cplus_expand_expr_stmt): Not here. + + * rtti.c (build_dynamic_cast_1): Call non_lvalue. + Initialize exprtype earlier. + + * parse.y (fn.def1): Check for defining types in return types. + + * decl.c (check_tag_decl): Notice extra fundamental types. + Diagnose empty decls in classes, too. + + * decl.c (grokdeclarator): Don't override an anonymous name if no + declarator was given. + + * cvt.c (convert_to_void): Call resolve_offset_ref. + + * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. + + * decl2.c (decl_namespace): Handle getting a type. + + * typeck.c (build_c_cast): Re-enable warning for cast between + pointer and integer of different size. + +2000-04-10 Nathan Sidwell + + * inc/cxxabi.h (__pointer_type_info): Add restrict and + incomplete flags. + (__pointer_type_info::__pointer_catch): New virtual function. + (__pointer_to_member_type_info): Derive from + __pointer_type_info. Adjust. + (__pointer_to_member_type_info::__do_catch): Remove. + (__pointer_to_member_type_info::__is_pointer_p): Declare. + (__pointer_to_member_type_info::__pointer_catch): Declare. + * rtti.c (qualifier_flags): Add restrict flag. + (ptmd_initializer): Reorder members. + (create_tinfo_types): Expand comments. Reorder + ptmd_desc_type_node members. + * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): + Implement. + (__pointer_type_info::__do_catch): Move specific code into + __pointer_catch. Call it. + (__pointer_type_info::__pointer_catch): Non-pointer-to-member + specific catch checking. Fix void conversion check. + (__pointer_to_member_type_info::__do_catch): Remove. + (__pointer_to_member_type_info::__pointer_catch): Implement. + +2000-04-10 Martin v. Löwis + + * lex.c (init_parse): Remove traces of classof and headof. + * decl2.c (flag_operator_names): Default to 1. + (lang_decode_option): Do not set it for -ansi. + +2000-04-09 Mark Mitchell + + * cp-tree.h (struct lang_decl): Remove main_decl_variant. + (DECL_MAIN_VARIANT): Remove. + * decl.c (duplicate_decls): Don't set it. + (start_function): Likewise. + (lang_mark_tree): Don't mark it. + * decl2.c (defer_fn): Don't use it. + * lex.c (retrofit_lang_decl): Don't set it. + * pt.c (tsubst_decl): Likewise. + * ptree.c (print_lang_decl): Don't print it. + * typeck.c (mark_addressable): Don't use it. + +2000-04-09 Nathan Sidwell + + * vec.cc: Include and . + (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup. + (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or + terminate. + (__cxa_vec_delete): Catch dtor exceptions. + +2000-04-09 Nathan Sidwell + + Prepend __ to implementation defined names. + * inc/typeinfo (type_info): Rename _name to __name. + (type_info::type_info): Rename parameter. + (type_info::operator==, type_info::operator!=, + type_info::before): Likewise. + (type_info::is_pointer_p, type_info::is_function_p, + type_info::do_catch, type_info::do_upcast): Prepend __. Rename + parameters. + * inc/cxxabi.h + (__fundamental_type_info::__fundamental_type_info) Rename parameters. + (__pointer_type_info::__pointer_type_info): Likewise. + (__pointer_type_info::is_pointer_p, + __pointer_type_info::do_catch): Prepend __. Rename parameters. + (__array_type_info::__array_type_info): Rename parameters. + (__function_type_info::__function_type_info): Likewise. + (__function_type_info::is_function_p): Prepend __. + (__enum_type_info::__enum_type_info): Rename parameters. + (__pointer_to_member_type_info::__pointer_to_member_type_info): + Likewise. + (__pointer_to_member_type_info::do_catch): Prepend __. Rename + parameters. + (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. + (__class_type_info::__class_type_info): Rename parameters. + (__class_type_info::sub_kind): Prepend __. Adjust member names. + (__class_type_info::upcast_result, + __class_type_info::dyncast_result): Prepend __. Move definition + into tinfo.cc. + (__class_type_info::do_upcast, __class_type_info::do_catch, + __class_type_info::find_public_src, + __class_type_info::do_dyncast, + __class_type_info::do_find_public_src): Prepend __. Rename + parameters. + (__si_class_type_info::__si_class_type_info): Rename parameters. + (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, + __si_class_type_info::do_find_public_src): Prepent __. Rename + parameters. + (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. + (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, + __vmi_class_type_info::do_find_public_src): Prepent __. Rename + parameters. + (__dynamic_cast): Rename parameters. + * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, + type_info::do_catch, type_info::do_upcast): Prepend __. + (contained_p, public_p, virtual_p, contained_public_p, + contained_nonpublic_p, contained_nonvirtual_p): Adjust. + (__class_type_info::do_catch, + __class_type_info::do_upcast): Prepend __. Adjust. + (__class_type_info::__upcast_result, + __class_type_info::__dyncast_result): Move from inc/cxxabi.h. + Adjust. + (__class_type_info::find_public_src): Prepend __. Adjust. + (__class_type_info::do_find_public_src, + __si_class_type_info::do_find_public_src, + __vmi_class_type_info::do_find_public_src): Likewise. + (__class_type_info::do_dyncast, + __si_class_type_info::do_dyncast, + __vmi_class_type_info::do_dyncast): Likewise. + (__class_type_info::do_upcast, + __si_class_type_info::do_upcast, + __vmi_class_type_info::do_upcast): Likewise. + (__dynamic_cast): Adjust. + * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. + (__function_type_info::is_function_p): Likewise. + (__pointer_type_info::do_catch): Likewise. Adjust. + (__pointer_to_member_type_info::do_catch): Likewise. Adjust. + (__throw_type_match_rtti_2): Adjust. + (__is_pointer): Adjust. + +2000-04-08 Mark Mitchell + + * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER. + (complete_ctor_identifier): New macro. + (special_function_kind): Add sfk_copy_constructor and + sfk_assignment_operator. + (LOOKUP_HAS_IN_CHARGE): Remove. + (cons_up_default_function): Rename to ... + (implicitly_declare_fn): ... this. + * call.c (build_new_method_call): Add in-charge parameters for + constructors here. + * class.c (add_implicitly_declared_members): Change parameter name + from cant_have_assignment to cant_have_const_assignment. + Replace calls to cons_up_default_function to implicitly_declare_fn. + * cvt.c (ocp_convert): Use complete_ctor_identifier. + * decl.c (initialize_predefined_identifiers): Initialize it. + (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of + complex expression. + * init.c (expand_default_init): Don't calculate the in-charge + parameter here. + (build_new_1): Likewise. + * lex.c (cons_up_default_function): Move to method.c. + * method.c (synthesize_method): Use DECL_DESTRUCTOR_P. + (implicitly_declare_fn): New function. + * typeck.c (build_static_cast): Use complete_ctor_identifier. + (build_modify_expr): Likewise. + * typeck2.c (build_functional_cast): Likewise. + + Under the new ABI, constructors don't return `this'. + * cp-tree.h (warn_reorder): Declare. + (special_function_kind): New enum. + (global_base_init_list): Remove declaration. + (emit_base_init): Don't return a value. + (check_base_init): Don't declare. + (is_aggr_typedef): Likewise. + * decl.c (check_special_function_return_type): New function. + (return_types): Remove. + (grokdeclarator): Use check_special_function_return_type. + (start_function): Don't initialize ctor_label under the new ABI. + (finish_construtor_body): Don't create a corresponding LABEL_STMT. + * init.c (begin_init_stmts): Move to top of file. + (finish_init_stmts): Likewise. + (warn_reorder): Don't declare. + (emit_base_init): Don't create a STMT_EXPR here. Don't return a + value. + (check_base_init): Remove. + (is_aggr_typedef): Likewise. + (build_new_1): Don't use the return value of a constructor. + * semantics.c (setup_vtbl_ptr): Don't use the return value + of emit_base_init. + * typeck.c (check_return_expr): Don't magically convert return + statements into `return this' in constructors under the new ABI. + + * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER, + CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER. + (base_ctor_identifier): New macro. + (base_dtor_identifier): Likewise. + (deleting_dtor_identifier): Likewise. + * decl.c: Don't include obstack.h. + (obstack_chunk_alloc): Don't define. + (obstack_chunk_free): Likewise. + (struct predefined_identifier): New type. + (initialize_predefined_identifiers): New function. + (init_decl_processing): Use it. + (debug_temp_inits): Remove. + (start_method): Don't call preserve_data. + (hack_incomplete_structures): Update comment. + * init.c (init_init_processing): Don't initialize + nelts_identifier. + (build_offset_rf): Remove dead code. + (build_delete): Use CLASSTYPE_N_BASECLASSES. + * search.c (init_search_processing): Don't initialize + vptr_identifier. + +2000-04-08 Kaveh R. Ghazi + + * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide + some sign_compare warnings. + +2000-04-07 Nathan Sidwell + + Rename abi::__vmi_class_type_info members. + * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, + base_list, detail_masks members to vmi_flags, vmi_base_count, + vmi_bases and vmi_flags_masks respectively. + (__vmi_class_type_info::vmi_flags_masks): Rename + details_unknown_mask to flags_unknown_mask. + * tinfo.cc (__class_type_info::do_upcast): Adjust. + (__vmi_class_type_info::do_find_public_src): Adjust. + (__vmi_class_type_info::do_dyncast): Adjust. + (__vmi_class_type_info::do_upcast): Adjust. + +2000-04-07 Nathan Sidwell + + * tinfo.cc (convert_to_base): New function. + (get_vbase_offset): Remove. Move into convert_to_base. + (__vmi_class_type_info::do_find_public_src): Adjust. + (__vmi_class_type_info::do_dyncast): Adjust. + (__vmi_class_type_info::do_upcast): Adjust. + +2000-04-06 Jason Merrill + + * tinfo.cc (operator=): Use __builtin_strcmp. + * tinfo2.cc (before): Likewise. + +2000-04-06 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred. + (DECL_SAVED_INLINE): Rename to ... + (DECL_DEFERRED_FN): ... this. + (in_function_p): Remove declaration. + (mark_inline_for_output): Rename to ... + (defer_fn): ... this. + * decl.c (finish_function): Adjust call to mark_inline_for_output. + (in_function_p): Remove definition. + * decl2.c (saved_inlines): Rename to ... + (deferred_fns): ... this. + (saved_inlines_used): Rename to ... + (deferred_fns_used): ... this. + (mark_inline_for_output): Rename to ... + (defer_fn): ... this. + (finish_file): Adjust accordingly. + (init_decl2): Likewise. + * lex.c (cons_up_default_function): Likewise. + * pt.c (mark_decl_instantiated): Likewise. + (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any + circumstances. + * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output. + * semantics.c (expand_body): Defer more functions. + +2000-04-06 Nathan Sidwell + + * vec.cc: New file. + * Make-lang.in (CXX_LIB2FUNCS): Add it. + (vec.o): Build it. + * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, + __cxa_vec_delete): Declare. + +2000-04-06 Nathan Sidwell + + * rtti.c (dfs_class_hint_mark): New static function. + (dfs_class_hint_unmark): New static function. + (class_hint_flags): Use them. + +2000-04-05 Benjamin Kosnik + + * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE. + +2000-04-05 Mark Mitchell + + * cp-tree.h (instantiate_decl): Change prototype. + * decl2.c (mark_used): Adjust call. + * optimize.c (inlinable_function_p): Adjust handling of templates. + * pt.c (do_decl_instantiation): Adjust call to instantiate_decl. + (do_type_instantiation): Likewise. + (instantiate_decl): Defer more templates. + (instantiate_pending_templates): Adjust logic to handle inline + friend functions. + + * Makefile.in (GGC_H): New variable. Use it throughout in place + of ggc.h. + + * call.c: Don't include obstack.h. Include ggc.h. + (obstack_chunk_alloc): Don't define. + (obstack_chunk_free): Likewise. + (add_candidate): Allocate the z_candidate with ggc_alloc_obj. + * decl.c (push_switch): Use xmalloc to allocate the cp_switch. + (pop_switch): Free it. + + * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. + + * dump.c (dequeue_and_dump): Don't try to print the bit_position + if we don't have a DECL_FIELD_OFFSET. + +Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka + + * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of + special_function_p. + +2000-04-04 Kaveh R. Ghazi + + * cfns.gperf (hash, libc_name_p): Prototype. + + * rtti.c (build_dynamic_cast_1): Constification. + + * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes. + + * semantics.c (deferred_type_access_control): Prototype. + +2000-04-04 Mark Mitchell + + Correct many new ABI issues regarding vbase and vcall offset + layout. + * cp-tree.h (BINFO_VTABLE): Document. + (struct lang_type): Tweak formatting. + (BINFO_PRIMARY_BINFO): Add to documentation. + (CLASSTYPE_VSIZE): Fix typo in comment. + (CLASSTYPE_VBASECLASSES): Update documentation. + (BINFO_VBASE_MARKED): Remove. + (SET_BINFO_VBASE_MARKED): Likewise. + (CLEAR_BINFO_VBASE_MARKED): Likewise. + (BINFO_FIELDS_MARKED): Remove. + (SET_BINFO_FIELDS_MARKED): Likewise. + (CLEAR_BINFO_FIELDS_MARKED): Likewise. + (enum access_kind): New enumeration. + (num_extra_vtbl_entries): Remove declaration. + (size_extra_vtbl_entries): Likewise. + (get_vtbl_decl_for_binfo): New function. + (dfs_vbase_unmark): Remove declaration. + (mark_primary_bases): Likewise. + * class.c (SAME_FN): Remove. + (struct vcall_offset_data_s): Move definition. + (build_vbase_pointer): Use `build', not `build_binary_op', to + access the vbase pointer under the new ABI. + (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo. + (build_primary_vtable): Likewise. + (dfs_mark_primary_bases): Move here from search.c. + (mark_primary_bases): Likewise. + (determine_primary_bases): Under the new ABI, don't make a base + class a primary base just because we don't yet have any virtual + functions. + (layout_vtable_decl): Use get_vtbl_decl_for_binfo. + (num_vfun_entries): Remove. + (dfs_count_virtuals): Likewise. + (num_extra_vtbl_entries): Likewise. + (size_extra_vtbl_entries): Likewise. + (layout_virtual_bases): Iterate in inheritance graph order under + the new ABI. + (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to + indicate that a vfield is present. + (init_class_processing): Initialize access_public_node, etc., from + ak_public, etc. + (get_vtbl_decl_for_binfo): New function. + (dump_class_hierarchy_r): Likewise. + (dump_class_hierarchy): Use it. + (finish_vtbls): Build the vtbls in inheritance graph order. + (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. + (initialize_vtable): Use get_vtbl_decl_for_binfo. + (accumulate_vtbl_inits): Add comments explaining why a pre-order + walk is required. + (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location + where the vptr points, even for primary vtables. + (build_vtbl_initializer): Adjust handling of vbase and vcall + offsets. + (build_vcall_and_vbase_vtable_entries): New function. + (dfs_build_vbase_offset_vtbl_entries): Remove. + (build_vbase_offset_vtbl_entries): Reimplement. + (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that + were already handled in a primary base class vtable. + (build_vcall_offset_vtbl_entries): Adjust. + (build_rtti_vtbl_entries): Adjust. + * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo. + * init.c (expand_virtual_init): Simplify. + * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo. + * rtti.c (create_pseudo_type_info): Adjust calculation of vptr. + * search.c (BINFO_ACCESS): New macro. + (SET_BINFO_ACCESS): Likewise. + (dfs_access_in_type): Manipulate access_kinds, not access nodes. + (access_in_type): Likewise. + (dfs_accessible_p): Likewise. + (protected_accessible_p): Likewise. + (lookup_fnfields_1): Adjust documentation. + (dfs_mark_primary_bases): Move to class.c + (mark_primary_bases): Likewise. + (dfs_vbase_unmark): Remove. + (virtual_context): Use BINFO_FOR_VBASE. + (dfs_get_vbase_types): Simplify. + (dfs_build_inheritance_graph_order): New function. + (get_vbase_types): Use it. + * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo. + + * tinfo.cc (get_vbase_offset): New function. + (__vmi_class_type_info::do_find_public_src): Use it. + (__vmi_class_type_info::do_dyncast): Likewise. + (__vmi_class_type_info::do_upcast): Likewise. + +2000-04-03 Zack Weinberg + + * lang-specs.h: Pass -fno-show-column to the preprocessor. + +2000-03-30 Nathan Sidwell + + * rtti.c (class_hint_flags): Rename flags. + (class_initializer): Remove flags. + (synthesize_tinfo_var): Combine offset and flags. Add flags + for __vmi_class_type_info. + (create_tinfo_types): Remove flags from __class_type_info and + __si_class_type_info. Merge flags and offset from + base_class_type_info. + * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags. + (__base_class_info::is_virtual_p): Adjust. + (__base_class_info::is_public_p): Adjust. + (__base_class_info::offset): New accessor. + (__class_type_info::details): Remove member. + (__class_type_info::__class_type_info): Lose details. + (__class_type_info::detail_masks): Remove. + (__si_class_type_info::__si_class_type_info): Lose details. + (__vmi_class_type_info::details): New member. + (__vmi_class_type_info::__vmi_class_type_info): Adjust. + (__vmi_class_type_info::detail_masks): New member. + * tinfo.cc (__class_type_info::do_upcast): Initialize result + with unknown_details_mask. + (__vmi_class_type_info::do_find_public_src): Adjust + (__vmi_class_type_info::do_dyncast): Adjust. + (__vmi_class_type_info::do_upcast): Set result details, if + needed. Adjust. + (__dynamic_cast): Temporarily #if out optimization. + +2000-03-29 Nathan Sidwell + + * rtti.c (get_tinfo_decl): Mark used. + (emit_tinfo_decl): Don't optimize polymorphic type_info. Only + mark as dealt with, if we output it. + +2000-03-28 Mark Mitchell + + * class.c: Reorganize to put virtual function table initialization + machinery at the end of the file. + +2000-03-28 Jason Merrill + + * class.c (finish_struct): Use bitsize_zero_node. + * pt.c (instantiate_class_template): Likewise. + +2000-03-28 Mark Mitchell + + Put RTTI entries at negative offsets in new ABI. + * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first + vbase offset at index -3, not -1. + (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not + dfs_vtable_path_unmarked_real_bases_queue_p to walk bases. + (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff. + (build_rtti_vtbl_entries): New function. + (set_rtti_entry): Remove. + (build_primary_vtable): Don't use it. + (build_secondary_vtable): Likewise. + (start_vtable): Remove. + (first_vfun_index): New function. + (set_vindex): Likewise. + (add_virtual_function): Don't call start_vtable. Do call + set_vindex. + (set_primary_base): Rename parameter. + (determine_primary_base): Likewise. + (num_vfun_entries): Don't use skip_rtti_stuff. + (num_extra_vtbl_entries): Include RTTI information. + (build_vtbl_initializer): Use build_rtti_vtbl_entries. + (skip_rtti_stuff): Remove. + (dfs_modify_vtables): Don't use it. + (modify_all_vtables): Don't use start_vtable. Do use set_vindex. + (layout_nonempty_base_or_field): Update size handling. + (create_vtable_ptr): Tweak. + (layout_class_type): Adjust parameter names. + (finish_struct_1): Simplify. + * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation. + (skip_rtti_stuff): Remove. + (first_vfun_index): New function. + (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. + (dfs_vtable_path_marked_real_bases_queue_p): Remove. + (marked_vtable_pathp): Declare. + (unmarked_vtable_pathp): Likewise. + * error.c (dump_expr): Use first_vfun_index to calculate vtable + offsets. + * rtti.c (build_headof): Look for RTTI at negative offsets. + (get_tinfo_decl_dynamic): Likewise. + (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL + here. + (create_pseudo_type_info): Do it here instead. Adjust so that + vptr points at first virtual function. + * search.c (marked_vtable_pathp): Make it global. + (unmarked_vtable_pathp): Likewise. + (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. + (dfs_vtable_path_marked_real_bases_queue_p): Likewise. + (dfs_get_pure_virtuals): Don't use skip_rtti_stuff. + (get_pure_virtuals): Likewise. + (expand_upcast_fixups): Likewise. + * tree.c (debug_binfo): Likewise. + * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate + negative offset. + +2000-03-26 Richard Kenner + + * class.c (check_field_decl): Fix typo. + (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. + (check_methods): Likewise. + (check_field_decls): Likewise. + Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. + * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): + Use DECL_RESULT_FLD, not DECL_RESULT. + * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. + * lex.c (identifier_type): Likewise. + * pt.c (determine_specialization, lookup_template_class): Likewise. + (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. + (resolve_overloaded_unification, more_specialized): Likewise. + * semantics.c (finish_member_declaration): Likewise. + * typeck.c (build_x_function_call): Likewise. + +2000-03-26 Mark Mitchell + + * class.c (layout_empty_base): Handle empty bases with non-byte + alignment. + (build_base_field): Likewise. + (layout_virtual_bases): Likewise. + + * class.c (finish_struct_1): Fix typo in this change: + + Sat Mar 25 09:12:10 2000 Richard Kenner + +2000-03-25 Mark Mitchell + + * decl.c (grokdeclarator): Count partial specializations when + keeping track of how many template classes have been seen. + + * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. + +2000-03-25 Richard Kenner + + * class.c (build_vbase_pointer_fields): layout_field now place_field. + (get_vfield_offset): Use byte_position. + (set_rtti_entry): Set OFFSET to ssizetype zero. + (get_binfo_offset_as_int): Deleted. + (dfs_record_base_offsets): Use tree_low_cst. + (dfs_search_base_offsets): Likewise. + (layout_nonempty_base_or_field): Reflect changes in RLI format + and call byte_position. + (layout_empty_base): Convert offset to ssizetype. + (build_base_field): use rli_size_unit_so_far. + (dfs_propagate_binfo_offsets): Do computation in proper type. + (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. + (layout_class_type): Reflect changes in RLI names and fields. + (finish_struct_1): Set DECL_FIELD_OFFSET. + * dump.c (dequeue_and_dump): Call bit_position. + * expr.c (cplus_expand_constant): Use byte_position. + * rtti.c (expand_class_desc): Use bitsize_one_node. + * typeck.c (build_component_addr): Use byte_position and don't + special case for zero offset. + +2000-03-24 Nathan Sidwell + + * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P. + + * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi + tinfo object. + (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting + vtable. + +2000-03-20 Theodore Papadopoulo + + * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and + DECL_P macros. + * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name, + make_typename_type, check_initializer, cp_finish_decl, + xref_tag): Likewise. + * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree, + decl_namespace, arg_assoc_template_arg, arg_assoc, + validate_nonmember_using_decl, do_class_using_decl): Likewise. + * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of, + args_to_string): Likewise. + * friend.c (is_friend): Likewise. + * lex.c (note_got_semicolon, note_list_got_semicolon, + is_global): Likewise. + * method.c (build_overload_nested_name, build_overload_value, + build_qualified_name, build_qualified_name, hack_identifier): Likewise. + * parse.y (typename_sub, typename_sub1): Likewise. + * pt.c (push_inline_template_parms_recursive, check_template_shadow, + process_partial_specialization, convert_template_argument, + template_args_equal, add_pending_template, lookup_template_class, + for_each_template_parm_r, maybe_fold_nontype_arg, + tsubst, instantiate_template, type_unification_real, unify, + instantiate_pending_templates, set_mangled_name_for_template_decl): + Likewise. + * repo.c (repo_get_id, repo_template_used): Likewise. + * search.c (lookup_field_1): Likewise. + * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise. + * xref.c (classname): Likewise. + +2000-03-22 Mark Mitchell + + * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation. + (CANONICAL_BINFO): New macro. + (BINFO_NEW_VTABLE_MARKED): Use it. + (SET_BINFO_NEW_VTABLE_MARKED): Likewise. + (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise. + * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE, + not TREE_TYPE. + (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED. + (build_secondary_vtable): Likewise. + (dfs_finish_vtbls): Likewise. + (dfs_accumulate_vtbl_inits): Likewise. + (accumulate_vtbl_inits): New function. + (finish_vtbls): Make sure that virtual bases come after + non-virtual bases in the vtable group. + (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL. + (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED. + * search.c (struct vbase_info): Move definition. + (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED. + (unmarked_new_vtable_p): Likewise. + (dfs_mark_vtable_path): Remove. + (dfs_mark_new_vtable): Remove. + (dfs_unmark_new_vtable): Likewise. + (dfs_clear_search_slot): Likewise. + (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED. + (dfs_clear_vbase_slots): Likewise. + (init_vbase_pointers): LIkewise. + +2000-03-22 Jason Merrill + + * typeck.c (type_after_usual_arithmetic_conversions): Prefer a + SIZETYPE to a non-SIZETYPE. + +2000-03-21 Mark Mitchell + + * class.c (layout_virtual_bases): Adjust names in conditionally + compiled code. + + * class.c (record_base_offsets): New function. + (layout_conflict_p): Likewise. + (layout_nonempty_base_or_field): Use it. + (layout_empty_base): New function. + (build_base_field): Use it. + (build_base_fields): Update comment. + (layout_virtual_bases): Fold in a little code form + layout_basetypes. Use layout_empty_base. + (layout_basetypes): Remove. + (end_of_class): New function. + (layout_class_type): Use it. Adjust. + + * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment. + (fntype_p): Remove. + * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in + comment. + (dfs_skip_nonprimary_vbases_markedp): Likewise. + * typeck.c (fntype_p): Remove. + + * cp-tree.h (TI_SPEC_INFO): Remove. + (CLASSTYPE_TI_SPEC_INFO): Likewise. + * pt.c (process_partial_specialization): Likewise. + + * class.c (build_base_field): Fix thinko in computation of binfo + offsets. + + * tree.c (mark_local_for_remap_p): Mark variables declared in + TARGET_EXPRs as well. + +2000-03-21 Nathan Sidwell + + * typeck.c (require_complete_type, complete_type, + complete_type_or_else, c_sizeof, c_sizeof_nowarn, + build_array_ref, convert_arguments, pointer_diff, + build_x_unary_op, build_unary_op, build_c_cast, + build_modify_expr): Use COMPLETE_TYPE_P etc. + * call.c (is_complete, convert_like_real, + build_new_method_call): Likewise. + * class.c (build_vbase_pointer_fields, check_bases, + build_base_field, finish_struct_1, pushclass): Likewise. + * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. + * decl.c (maybe_process_template_type_declaration, pushtag, + pushdecl, redeclaration_error_message, start_decl, start_decl_1, + layout_var_decl, check_initializer, cp_finish_decl, + grokdeclarator, require_complete_types_for_parms, + grok_op_properties, xref_tag, xref_basetypes, + check_function_type): Likewise. + * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. + * friend.c (do_friend): Likewise. + * init.c (build_offset_ref): Likewise. + * parse.y (structsp): Likewise. + * pt.c (maybe_process_partial_specialization, + tsubst_friend_function, instantiate_class_template, tsubst, + do_type_instantiation, instantiate_pending_templates): Likewise. + * repo.c (repo_get_id): Likewise. + * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, + synthesize_tinfo_var, emit_support_tinfos): Likewise. + * search.c (lookup_fnfields_1, lookup_conversions): Likewise. + * semantics.c (begin_class_definition): Likewise. + * tree.c (build_cplus_method_type): Likewise. + * typeck2.c (digest_init, build_functional_cast, + add_exception_specifier): Likewise. + * parse.h, parse.c: Regenerated. + +2000-03-21 Nathan Sidwell + + * inc/cxxabi.h: New header file. Define new-abi entry points. + (__pointer_type_info::target): Rename member to ... + (__pointer_type_info::type): ... here. + (__base_class_info::type): Rename member to ... + (__base_class_info::base): ... here. + * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h + * cp-tree.h (CPTI_ABI): New global tree enumeration. + (abi_node): New global tree node. + * decl.c (abi_node): Document. + (init_decl_processing): Initialize abi_node. + * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi. + (get_vmi_pseudo_type_info): Likewise. + (create_tinfo_types): Likewise. + (emit_support_tinfos): Likewise. + * tinfo.h (cxxabi.h): Include for new-abi. + Move rtti class definitions to new header file. + * tinfo.cc (abi): Use the namespace. + (std): Move new abi rtti classes from here ... + (__cxxabiv1): ... to here. + * tinfo2.cc (cxxabi.h): Include for new-abi. + Move rtti class definitions to new header file. + (std): Move new abi rtti classes from here ... + (__cxxabiv1): ... to here. + * inc/typeinfo (__class_type_info): Move into __cxxabiv1 + namespace. + +2000-03-20 Jed Wing + Jason Merrill + + * method.c (build_overload_int): Use host_integerp. + +2000-03-20 Theodore Papadopoulo + + * init.c (build_offset_ref): Handle the case of a templated member + function. + +2000-03-19 Martin v. Löwis + + * except.c (expand_exception_blocks): Clear catch_clauses_last. + +2000-03-18 Mark Mitchell + + * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro. + * class.c (check_bitfield_decl): Turn illegal bitfields into + non-bitfields. + (dfs_propagate_binfo_offsets): Adjust for new size_binop + semantics. + (dfs_offset_for_unshared_vbases): Likewise. + * cvt.c (cp_convert_to_pointer): Convert NULL to a + pointer-to-member correctly under the new ABI. + * expr.c (cplus_expand_constant): Don't use cp_convert when + turning an offset into a pointer-to-member. + * init.c (resolve_offset_ref): Don't adjust pointers-to-members + when dereferencing them under the new ABI. + * typeck.c (get_member_function_from_ptrfunc): Tweak calculation + of pointers-to-members under the new ABI. + + * class.c (check_bitfield_decl): Remove restriction on really long + bitfields. + (layout_class_type): Implement new ABI handling of bitfields + longer than their types. + +2000-03-18 Martin v. Löwis + + * parse.y (extdefs): Call ggc_collect. + * parse.c: Regenerated. + +2000-03-18 Nathan Sidwell + + * class.c (build_base_field): Use TYPE_ALIGN to examine a type. + (note_name_declared_in_class): Use OVL_CURRENT to get at a + potential overload. + +2000-03-17 Richard Kenner + + * class.c (build_vbase_path): Use integer_zerop. + (build_vtable_entry): Use tree_low_cst. + (get_vfield_offset): Use bit_position. + (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. + Use tree_low_cst. + (check_bitfield_decl): Set DECL_SIZE using convert. + (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. + (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. + Use tree_low_cst. + (finish_struct_1): Use bit_position. + (dump_class_hierarchy): Use tree_low_cst. + * cp-tree.h (min_precision): Add declaration. + * decl.c (xref_tag, xref_basetypes): Use tree_low_cst. + * error.c (dump_type_suffix): Use host_integerp and tree_low_cst. + (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. + * expr.c (cplus_expand_constant): Use bit_position. + * init.c (build_vec_init): Use host_integerp and tree_low_cst. + * rtti.c (get_base_offset): Use bit_position. + * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, + host_integerp, and tree_low_cst. + (pointer_int_sum): Use integer_zerop. + (build_component_addr): Use bit_position. + +2000-03-17 Nathan Sidwell + + * typeck.c (require_complete_type): Don't assume size_zero_node. + (complete_type_or_else): Likewise. + +2000-03-16 Steven Grady + Jason Merrill + + * rtti.c (build_dynamic_cast_1): Improve diagnostics. + +2000-03-16 Nathan Sidwell + + * decl2.c (grokfield): Bail out if type is error_mark_node. + +2000-03-15 Nathan Sidwell + + * tinfo2.cc (__ptr_to_member_data): Rename to ... + (__pointer_to_member_data): ... here. Adjust. + * rtti.c (create_tinfo_types): Adjust. + +2000-03-15 Nathan Sidwell + + * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove. + * decl.c (ref_desc_type_node): Undocument. + * rtti.c (ptr_ref_initializer): Rename to ... + (ptr_initializer): ... here. Adjust comments. + (ptmd_initializer): Fix comment thinko. + (synthesize_tinfo_var): Remove REFERENCE_TYPE case. + (create_tinfo_types): Remove ref_desc_type_node init. + * tinfo2.cc (__reference_type_info): Remove. + +2000-03-15 Nathan Sidwell + + * decl.c (cp_finish_decl): Remove obsolete comment. + + * typeck.c (build_ptrmemfunc1): Kill uninitialized warning. + +2000-03-14 Mark Mitchell + + * cp-tree.h: Tweak documentation. + * class.c (build_vbase_pointer_fields): Layout the fields, too. + (avoid_overlap): Remove. + (get_binfo_offset_as_int): New function. + (dfs_serach_base_offsets): Likewise. + (layout_nonempty_base_or_field): Likewise. + (build_base_field): Layout fields here. Avoid placing two objects + of the same type at the same address, under the new ABI. + (build_base_fields): Adjust accordingly. + (create_vtable_ptr): Return the new field, but don't attach it to + TYPE_FIELDS. + (remove_base_field): Remove. + (remove_base_fields): Remove. + (layout_basetypes): Adjust accordingly. + (layout_class_type): Call layout_field for each field, rather than + just making a wholesale call to layout_type. + +2000-03-14 Jeff Sturm + + * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw. + +2000-03-13 Jason Merrill + + * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P. + + * except.c (dtor_nothrow): New fn. + (do_pop_exception): Use it. Take type parm. + (push_eh_cleanup): Take type parm. + (expand_start_catch_block): Pass it. + (build_eh_type_type_ref): Accept null type. + +2000-03-12 Mark Mitchell + + * cp-tree.h (revert_static_member_fn): Change prototype. + * decl.c (grokfndecl): Adjust call to revert_static_member_fn. + (grok_op_properties): Likewise. + (start_function): Likewise. + (revert_static_member_fn): Simplify. + * pt.c (check_explicit_specialization): Adjust call to + revert_static_member_fn. + +2000-03-11 Mark Mitchell + + * cp-tree.h (scope_kind): New type. + (tmpl_spec_kind): Likewise. + (declare_pseudo_global_level): Remove. + (pseudo_global_level_p): Rename to template_parm_scope_p. + (pushlevel): Remove declaration. + (begin_scope): New function. + (finish_scope): Likewise. + (current_tmpl_spec_kind): Likewise. + * decl.c (struct binding_level): Shorten parm_flag to 2 bits. + Shorten keep to 2 bits. Rename pseudo_global to template_parms_p. + Add template_spec_p. + (toplevel_bindings_p): Adjust. + (declare_pseudo_global_level): Remove. + (pseudo_global_level_p): Rename to template_parm_scope_p. + (current_tmpl_spec_kind): New function. + (begin_scope): Likewise. + (finish_scope): Likewise. + (maybe_push_to_top_level): Adjust. + (maybe_process_template_type_declaration): Likewise. + (pushtag): Likewise. + (pushdecl_nonclass_level): Likewise. + (lookup_tag): Likewise. + (grokfndecl): Handle member template specializations. Share + constructor and non-constructor code. + * decl2.c (check_classfn): Handle member template specializations. + * pt.c (begin_template_parm_list): Use begin_scope. + (begin_specialization): Likewise. + (end_specialization): Likewise. + (check_explicit_specialization): Use current_tmpl_spec_kind. + Handle member template specializations. + (end_template_decl): Use finish_scope. Remove call to + get_pending_sizes. + (push_template_decl_real): Remove bogus error message. + (tsubst_decl): Fix typo in code contained in comment. + (instantiate_template): Handle member template specializations. + (most_general_template): Likewise. + +2000-03-11 Gabriel Dos Reis + + * lex.c (whitespace_cr): Compress consecutive calls to warning(). + (do_identifier): Ditto for error(). + + * pt.c (convert_nontype_argument): Ditto for cp_error(). + (convert_template_argument): Ditto for cp_pedwarn(). + +2000-03-11 Jason Merrill + + * exception.cc (__check_null_eh_spec): New fn. + * except.c (expand_end_eh_spec): Call it if the spec is throw(). + +2000-03-10 Jason Merrill + + * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE. + * except.c (expand_end_eh_spec): Add the return type. + * rtti.c (throw_bad_cast): Add the parmtypes. + (throw_bad_typeid): Likewise. + + * semantics.c (expand_stmt): Only leave out rtl for unused + artificials, and set DECL_IGNORED_P on them as well. + * decl.c (wrapup_globals_for_namespace): Likewise. + +2000-03-09 Nathan Sidwell + + * decl.c (maybe_commonize_var): Skip all artificial decls. + * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN. + +2000-03-10 Jason Merrill + + * lang-options.h, decl2.c: Add -fno-enforce-eh-specs. + * cp-tree.h: Declare flag_enforce_eh_specs. + * decl.c (store_parm_decls, finish_function): Check it. + + C library functions don't throw. + * Makefile.in (cfns.h): New target. + (except.o): Depend on it. + * Make-lang.in (cc1plus): Depend on cfns.gperf. + * cfns.gperf: New file. + * cfns.h: Generated. + * except.c: Include it. + (nothrow_libfn_p): New fn. + * decl.c (grokfndecl): Use it. + * cp-tree.h: Declare it. + + * decl.c (push_overloaded_decl_1, auto_function, + define_function): Lose. + (build_library_fn_1): New static fn. + (builtin_function): Use it. + (get_atexit_node): Use build_library_fn_ptr. + (build_library_fn, build_cp_library_fn, build_library_fn_ptr, + build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn, + push_void_library_fn, push_throw_library_fn): New fns. + * cp-tree.h: Declare them. + (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID. + (throw_bad_cast_node, throw_bad_typeid_node): Lose. + * except.c (init_exception_processing, call_eh_info, do_pop_exception, + (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns. + * rtti.c (build_runtime_decl): Lose. + (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, + build_dynamic_cast_1, expand_si_desc, expand_class_desc, + expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns. + + * call.c (build_call): Remove result_type parm. + Call mark_used on unused artificial fns. + * init.c, method.c, typeck.c, except.c, rtti.c: Adjust. + +2000-03-09 Jason Merrill + + * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as + appropriate. + * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL. + * except.c (call_eh_info, alloc_eh_object, expand_throw): Set + TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate. + * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1, + expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, + expand_generic_desc): Likewise. + +2000-03-08 Nathan Sidwell + + * exception.cc (__cp_pop_exception): Cleanup the original object. + +2000-03-08 Nathan Sidwell + + * decl.c (grok_op_properties): Merge conversion to void warning + with other silly op warnings. + +2000-03-08 Jason Merrill + + * typeck2.c (process_init_constructor): Set TREE_PURPOSE of + array CONSTRUCTOR elements. Don't use expr_tree_cons. + +2000-03-08 Nathan Sidwell + + * decl.c (cp_make_fname_decl): New function. + (wrapup_globals_for_namespace): Don't emit unused static vars. + (init_decl_processing): Remove comment about use of + array_domain_type. Set make_fname_decl. + (cp_finish_decl): Remove __FUNCTION__ nadgering. + * semantics.c (begin_compound_stmt): Remove + current_function_name_declared flagging. + (expand_stmt): Don't emit unused local statics. + * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls + specially. + +2000-03-08 Nathan Sidwell + + * typeck.c (convert_for_assignment): Don't look at array + initializer. + * call.c (convert_like_real): Likewise. + +2000-03-07 Jason Merrill + + Add initial support for '\uNNNN' specifier. + * lex.c (read_ucs): New fn. + (readescape, skip_white_space): Call it. + (is_extended_char, is_extended_char_1): New fns. + (utf8_extend_token): New fn, #if 0'd out. + (real_yylex): Treat extended chars like letters. + + * search.c (note_debug_info_needed): Walk the bases even if we + weren't deferring the type itself. + +2000-03-07 Kaveh R. Ghazi + + * decl2.c (finish_objects): Constify a char*. + + * method.c (emit_thunk): Likewise. + +2000-03-06 Nathan Sidwell + + * typeck.c (dubious_conversion_warnings): Look through + REFERENCE_TYPE. + +2000-03-06 Richard Kenner + + * class.c (dfs_modify_vtables): I is now unsigned. + (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. + (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. + * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. + * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. + * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. + * typeck.c (build_binary_op, case TRUNC_DIV_EXPR): + Call integer_all_onesp. + * typeck2.c (process_init_constructor): Use compare_tree_int. + + * lang-specs.h (as): Don't call if -syntax-only. + +2000-03-06 Mark Mitchell + + * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set + RTL_EXPR_HAS_NO_SCOPE after all. + +2000-03-05 Mark Mitchell + + * expr.c (cplus_expand_expr, case STMT_EXPR): Use + expand_start_stmt_expr and expand_end_stmt_expr directly. Set + RTL_EXPR_HAS_NO_SCOPE. + + * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little + later. + + * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P. + +2000-03-05 Nathan Sidwell + + * call.c (convert_like): Macrofy. + (convert_like_with_context): New macro. + (convert_like_real): Renamed from convert_like. Add calling + context parameters, for diagnostics. Add recursive flag. Call + dubious_conversion_warnings for outer conversion. + (build_user_type_conversion): Use convert_like_with_context. + (build_over_call): Likewise. Don't warn about dubious + conversions here. Adjust convert_default_arg calls. + (convert_default_arg): Add context parameters for diagnostics. + Pass through to convert_like_with_context. + * cp-tree.h (convert_default_arg): Add context parameters. + (dubious_conversion_warnings): Prototype new function. + * typeck.c (convert_arguments): Adjust convert_default_arg call. + (dubious_conversion_warnings): New function, broken + out of convert_for_assignment. + (convert_for_assignment): Adjust. + +2000-03-03 Jason Merrill + + * decl2.c (key_method): Break out from... + (import_export_vtable, import_export_class): ...here. + + * decl.c (finish_function): Don't mess with flag_keep_inline_functions. + * decl2.c (finish_vtable_vardecl): Don't check decl_function_context. + + * search.c (note_debug_info_needed, dfs_debug_mark, + dfs_debug_unmarkedp): Uncomment. Adjust for new scheme. + * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed. + +2000-03-03 Nathan Sidwell + + * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix + typos. + +2000-03-02 Mark Mitchell + + * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ... + (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this. + (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro. + (lang_type): Split gets_new into has_new and has_array_new. + (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. + (TYPE_GETS_NEW): Split into ... + (TYPE_HAS_NEW_OPERATOR): ... this, and ... + (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this. + (DECL_ARRAY_DELETE_OPERATOR_P): New macro + (build_op_new_call): Don't declare. + (build_new_1): Likewise. + * call.c (build_op_new_call): Remove. + * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR + instead of TYPE_NEEDS_DESTRUCTOR. + (finish_struct_bits): Likewise. + (add_implicitly_declared_members): Likewise. + (check_field_decl): Likewise. + (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it + correctly under the new ABI. + * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR + instead of TYPE_NEEDS_DESTRUCTOR. + (initialize_local_var): Likewise. + (destroy_local_var): Likewise. + (cp_finish_decl): Likewise. + (register_dtor_fn): Likewise. + (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and + TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set + TYPE_VEC_DELETE_TAKES_SIZE here. + (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and + TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. + (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. + (finish_destructor_body): Likewise. + (maybe_build_cleanup_1): Likewise. + * decl2.c (do_static_destruction): Likewise. + * init.c (build_new_1): Make it static. + (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. + (expand_cleanup_for_base): Likewise. + (get_cookie_size): New function. + (build_new_1): Handle array-new cookies correctly under the new + ABI. + (build_vec_delete_1): Likewise. + (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. + (build_delete): Likewise. + (build_vec_delete): Handle array-new cookies correctly under the new + ABI. + * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. + * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and + TYPE_HAS_ARRAY_NEW_OPERATOR. + * ptree.c (print_lang_type): Check them. + * search.c (context_for_name_lookup): Fix typo in comment. + (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. + * tree.c (break_out_cleanups): Likewise. + (build_cplus_array_test_1): Likewise. + (cp_build_qualified_type_real): Likewise. + * typeck.c (complete_type): Likewise. + + * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of + the command-line, not the end. + +2000-03-01 Jason Merrill + + * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG. + +2000-03-02 Tom Tromey + + * cp-tree.h (build_java_class_ref): Declare. + * init.c (build_java_class_ref): No longer static. + * except.c (expand_throw): Generate a Java-style `throw' if the + thrown object is a "Java" object. + (initialize_handler_parm): Generate a Java-style lookup of + exception info if the caught object is a "Java" object. + (catch_language, catch_language_init): New globals. + (decl_is_java_type): New function. + (expand_start_catch_block): Don't call push_eh_info() or + push_eh_cleanup() when handling a Java-style "catch". Pass Java + class reference to build_catch_block. + +2000-03-02 Richard Kenner + + * typeck.c (comptypes): Treat sizetype like its language equivalent. + +2000-03-01 Bernd Schmidt + + * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize + to merge reference/pointer code and fix incorrect warnings. + +2000-02-29 Jason Merrill + + * search.c (protected_accessible_p): Use context_for_name_lookup. + + * init.c (construct_virtual_bases): Fix thinko. + * typeck.c (expand_ptrmemfunc_cst): Fix thinko. + +2000-03-01 Martin von Loewis + + * decl.c (current_function_decl): Move to toplev.c. + +2000-02-29 Nathan Sidwell + + * pt.c (fn_type_unification): Unify return type, whenever + provided. + (get_bindings_real): Only pass return type when necessary. + Remove explicit return type check. + * class.c (resolve_address_of_overloaded_function): Pass desired + return type to fn_type_unification. + +2000-02-28 Richard Kenner + + * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear + DECL_FIELD_SIZE. + (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not + DECL_FIELD_SIZE. + * rtti.c (expand_class_desc): Likewise. + * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. + (THUNK_VCALL_OFFSET): Likewise. + (THUNK_DELTA): Reflect changes in ../tree.h. + +2000-02-28 Jason Merrill + + * search.c (protected_accessible_p): Also allow the access if + the member is public in DERIVED. Lose TYPE parm. + (friend_accessible_p): Lose TYPE parm. + (accessible_p): Adjust. + +2000-02-27 Richard Kenner + + * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop + on things that are not sizes; ssize_binop deleted. + Call size_diffop when appropriate. + (dfs_build_vcall_offset_vtbl_entries): Likewise. + (build_primary_vtable, build_secondary_vtable): Likewise. + (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. + Variable I is HOST_WIDE_INT. + (get_vfield_offset): Pass proper types to size_binop. + (size_extra_vtbl_entries, layout_virtual_bases): Likewise. + (finish_struct_1): Likewise. + (skip_rtti_stuff): Arg N is now pointer to signed. + (layout_class_type): Use size_zero_node. + * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. + * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. + * decl.c (complete_arry_type): Pass proper types to size_binop. + (xref_basetypes): BINFO_OFFSET is sizetype. + * error.c (dump_expr): Don't use size_binop non-sizes. + * expr.c (cplus_expand_constant): Pass proper types to size_binop. + * init.c (construct_virtual_bases): Fix type error. + (build_vec_delete_1): Pass proper type to size_binop and don't + fold result. + * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. + * rtti.c (get_base_offset): Pass proper type to size_binop. + * search.c (dfs_find_vbases): Fix type error. + (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. + (dfs_get_vbase_types): BINFO_OFFSET is sizetype. + * tree.c (debug_binfo): Variable N is signed. + Use HOST_WIDE_INT_PRINT_DEC. + * typeck.c (comptypes): sizetype is same as equivalent integer type. + (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, + size_one_node and size_zero_node. + (c_alignof): Use size_one_node. + (build_component_addr): Pass proper types to size_binop. + (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. + +2000-02-26 Jason Merrill + + Implement class scope using-declarations for functions. + * class.c (handle_using_decl): Call add_method for used functions. + Use IDENTIFIER_CLASS_VALUE to check for conflicts. + (add_method): Used functions are hidden by local functions. + (check_bases_and_members): Handle using-decls before finalizing + CLASSTYPE_METHOD_VEC. + * call.c (add_function_candidate): Add ctype parm; if nonzero, + override the type of 'this' accordingly. + (add_template_candidate, add_template_candidate_real): Add ctype parm. + (convert_class_to_reference, build_user_type_conversion_1, + build_new_function_call, build_object_call, build_new_op, + build_new_method_call): Pass ctype parm. + + * search.c (lookup_member): Put rval_binfo, not basetype_path, in + the baselink. + * call.c (convert_class_to_reference, build_user_type_conversion_1, + build_new_function_call, build_object_call, build_new_op, + build_new_method_call, build_op_delete_call): Don't get basetype_path + from a baselink. + * typeck.c (build_component_ref): Likewise. + * init.c (build_offset_ref): Likewise. + (resolve_offset_ref): Don't call enforce_access. + Call build_scoped_ref. + * typeck2.c (build_scoped_ref): Simplify. Do nothing if it + would cause an error or if -pedantic. + * class.c (alter_access): Lose binfo parm. + +2000-02-26 Mark Mitchell + + * semantics.c (simplify_aggr_init_exprs_p): Don't walk into + types. + +2000-02-25 Alfred Minarik + + * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info + pseudo_type_info creation into the std namespace + +2000-02-26 Mark Mitchell + + * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF. + (import_export_class): Remove declaration. + * decl2.c (import_export_class): Make it static. + * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR, + PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, + EXPR_WITH_FILE_LOCATION. + * lex.c (check_newline): Tweak filename/lineno setting. + * semantics.c (begin_while_stmt): Fix typo in comment. + +2000-02-26 Richard Kenner + + * lang-options.h (-fmessage-length=): Add missing option. + + * Make-lang.in (CXX_SRCS): Add .h files and sort list. + +2000-02-26 Zack Weinberg + + * Make-lang.in: Delete refs to LIBGCC2_DEPS. + +2000-02-25 Jim Wilson + + * optimize.c (expand_call_inline): Emit the return label before + evaluating the return value. + +2000-02-24 Mark Mitchell + + * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather + than duplicating functionality here. + * optimize.c: Include input.h. + (expand_call_inline): Use push_srcloc and pop_srcloc. + * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note. + * parse.c: Regenerated. + * Makefile.in (lex.o): Depend on input.h. + (optimize.o): Likewise. + +2000-02-24 Nathan Sidwell + + * decl.c (grokdeclarator): Diagnose qualifiers on non-member + function type, rather than ICE. + +2000-02-23 Jason Merrill + + * decl.c (grokdeclarator): Call decl_type_access_control. + * parse.y (parse_end_decl): Don't call decl_type_access_control if + decl is null. + +2000-02-23 Nathan Sidwell + + * decl.c (decls_match): Remove obsolete static member nadgering. + +2000-02-21 Martin v. Löwis + + * decl.c (grokdeclarator): Change ANSI to ISO. + * lex.c (consume_string, readescape, do_identifier): Likewise. + (parse_float, real_yylex): Likewise. + * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise. + (unary_expr, new_initializer, cast_expr, primary, primary_no_id, + new_type_id, maybe_label_decls, simple_stmt, + for.init.statement): Likewise. + * pt.c (do_decl_instantiation, do_type_instantiation): Likewise. + * semantics.c (finish_named_return_value): Likewise. + * parse.c: Regenerate. + +2000-02-21 Mark Mitchell + + * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro. + (CPTI_CLASS_STAR_TYPE): Remove. + (vtable_index_type): Likewise. + (class_star_type_node): Remove. + (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI. + (build_binary_op_nodefault): Remove. + * call.c (build_new_op): Use build_binary_op instead of + build_binary_op_nodefault. + * decl.c (init_decl_processing): Remove class_star_type_node + initialization. Make delta_type_node ptrdiff_type_node under the + new ABI. Initialize vtable_index_type. + (build_ptrmemfunc_type): Build different structures for the new + ABI. + (build_enumerator): Use build_binary_op instead of + build_binary_op_nodefault. + * method.c (build_overload_value): Mangle pointers-to-members + appropriately under the new ABI. + * typeck.c (build_array_ref): Use build_binary_op instead of + build_binary_op_nodefault. + (get_member_function_from_ptrfunc): Adjust for the new ABI. + (build_binary_op_nodefault): Rename to ... + (build_binary_op): ... this. Remove old version. Adjust for + pointer-to-member comparisons under the new ABI. + (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI. + (build_ptrmemfunc): Adjust for the new ABI. + (expand_ptrmemfunc_cst): Likewise. + (delta2_from_ptrmemfunc): Assert that we're not using the new ABI. + (pfn_from_ptrmemfunc): Adjust for the new ABI. + +2000-02-21 Gabriel Dos Reis + + * call.c (build_object_call): Compress consecutive calls to + cp_error. + (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'. + (build_op_delete_call): Adjust message formatting. + + * class.c (check_bases): Compress consecutive calls to + cp_pedwarn. + (finish_struct_anon): Say 'ISO C++'. + + * decl.c (start_decl): Same here. + (grok_reference_init): Likewise. + (grokfndecl): Correct message formatting. + (grokfndecl): Improve diagnostic. + (check_static_variable_definition): Likewise. Say 'ISO C++' + (compute_array_index_type): Say 'ISO C++' + (create_array_type_for_decl): Compress consecutive calls to + cp_error. + (grokdeclarator): Say 'ISO C++' + (grok_op_properties): Likewise. + + * decl2.c (delete_sanity): Clairify diagnostic. + (check_member_template): Same here. + (grok_function_init): Use consistent terminology. + + * expr.c (do_case): Say 'ISO C++' + + * friend.c (do_friend): Compress consecutive calls to warning. + +2000-02-20 Mark Mitchell + + * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro. + * class.c (build_secondary_vtable): Reorganize. Don't create a + new vtable under the new ABI. + (layout_vtable_decl): Don't add num_extra_vtbl_entries when + computing the size. + (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return + the initializing elements. + (initialize_vtable): New function. + (dfs_finish_vtbls): Use it. + (dfs_accumulate_vtbl_inits): New function. + (finish_vtbls): Merge primary and secondary vtables under the new + ABI. + (finish_struct_1): Remove redundant call to layout_vtable_decl. + * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that + aren't VAR_DECLs. + + * class.c (build_vtable): New function, split out from ... + (get_vtable_decl): ... here, and ... + (build_secondary_vtable): ... here. + + * pt.c (tsubst_decl): Fix formatting. + +2000-02-19 Richard Kenner + + * class.c (build_primary_vtable, layout_vtable_decl): Likewise. + (avoid_overlap, build_base_field): Likewise. + (build_base_field, build_base_fields, is_empty_class): + Test DECL_SIZE with integer_zero. + (layout_class_type): Set CLASSTYPE_SIZE_UNIT. + * cp-tree.h (struct lang_type): New field size_unit. + (CLASSTYPE_SIZE_UNIT): New macro. + * decl.c (init_decl_processing): Set DECL_SIZE_UNIT. + (cp_finish_decl): Delete -Wlarger-than processing. + * optimize.c (remap_decl): Walk DECL_SIZE_UNIT. + * pt.c (tsubst_decl): Set DECL_SIZE_UNIT. + * tree.c (make_binfo): binfo vector is one entry longer. + (walk_tree): Walk DECL_SIZE_UNIT. + +2000-02-19 Mark Mitchell + + * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in + comment. + (build_vtable_entry): Don't assume all vtable entries are + functions. + (build_vtbl_initializer): Adjust accordingly. + (get_vtable_decl): Fix formatting. + +2000-02-18 Jason Merrill + + * semantics.c (deferred_type_access_control): Walk the entire + type_lookups list. + (save_type_access_control): Rename from + initial_deferred_type_access_control. Just remember the value. + (decl_type_access_control): New fn. + (begin_function_definition): Use deferred_type_access_control, after + we've started the function. Set type_lookups to error_mark_node. + * parse.y (frob_specs, fn.def1): Adjust. + (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns. + (parse_end_decl, parse_bitfield0, parse_method): New fns. + (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them. + (after_type_component_declarator0): Likewise. + (after_type_component_declarator): Likewise. + (notype_component_declarator): Likewise. + * cp-tree.h: Adjust. + + * decl.c (redeclaration_error_message): Allow redeclaration of + namespace-scope decls. + +2000-02-18 Martin von Loewis + + * typeck2.c (my_friendly_abort): Use GCCBUGURL. + +2000-02-17 Mark Mitchell + + * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. + * decl2.c (grokclassfn): Likewise. + + * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. + + * decl2.c (lang_decode_option): Don't set default message length + here. + * lex.c (lang_init_options): Set it here. + +2000-02-16 Mark Mitchell + + Make DECL_CONTEXT mean the class in which a member function was + declared, even for a virtual function. + * cp-tree.h (DECL_CLASS_CONTEXT): Adjust. + (DECL_FRIEND_CONTEXT): New macro. + (DECL_REAL_CONTEXT): Remove. + (SET_DECL_FRIEND_CONTEXT): Likewise. + (DECL_VIRTUAL_CONTEXT): Adjust. + (DECL_CLASS_SCOPE_P): Use TYPE_P. + (add_friends): Remove. + (hack_decl_function_context): Likewise. + * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with + CP_DECL_CONTEXT. + (build_over_call): Fix indentation. Use DECL_CONTEXT + instead of DECL_CLASS_CONTEXT. + * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise. + (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. + (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. + (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT. + (build_base_field): Likewise. + (finish_struct_1): Likewise. + (build_self_reference): Likewise. + * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not + DECL_REAL_CONTEXT. + (pushtag): Use decl_function_context, not + hack_decl_function_context. + (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. + (duplicate_decls): Use DECL_VIRTUAL_CONTEXT. + (pushdecl): Remove bogus code. + (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT. + (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. + (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. + Use decl_function_context, nothack_decl_function_context. + (grokvardecl): Don't set DECL_CLASS_CONTEXT. + (grokdeclarator): Likewise. Use decl_function_context, not + hack_decl_function_context. + (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT. + (start_function): Use DECL_FRIEND_CONTEXT, not + DECL_CLASS_CONTEXT. Use decl_function_context, not + hack_decl_function_context. + (finish_function): Use decl_function_context, not + hack_decl_function_context. + (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not + DECL_CLASS_CONTEXT. + (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT. + (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT. + (grokfield): Likewise. + (finish_builtin_type): Likewise. + (finish_vtable_vardec): Use decl_function_context, not + hack_decl_function_context. + (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. + (start_static_initialization_or_destruction): Likewise. + (finish_static_initialization_or_destruction): Likewise. + (mark_used): Adjust logic for deciding when to synthesize methods. + * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not + DECL_REAL_CONTEXT. + * error.c (dump_function_decl): Use DECL_CONTEXT, not + DECL_CLASS_CONTEXT. + * friend.c (is_friend): Likewise. + (add_friends): Remove. + (do_friend): Use SET_DECL_FRIEND_CONTEXT. + * lex.c (begin_definition_of_inclass_inline): Use + decl_function_context, not hack_decl_function_context. + (process_next_inline): Likewise. + (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. + * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not + DECL_CLASSS_CONTEXT. + (hack_identifier): Likewise. + (synthesize_method): Use decl_function_context, not + hack_decl_function_context. + * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not + DECL_REAL_CONTEXT. + (is_member_template): Use decl_function_context, not + hack_decl_function_context. Use DECL_CONTEXT, not + DECL_CLASS_CONTEXT. + (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not + DECL_CLASS_CONTEXT. + (check_default_tmpl_args): Use CP_DECL_CONTEXT, not + DECL_REAL_CONTEXT. + (push_template_decl_real): Likewise. + (instantiate_class_template): Don't call add_friends. + (tsubst_default_argument): Use DECL_CONTEXT, not + DECL_REAL_CONTEXT. + (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. + Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. + (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not + DECL_CLASS_CONTEXT. + * repo.c (repo_inline_used): Likewise. + * search.c (current_scope): Adjust for new _CONTEXT macros. + (context_for_name_lookup): Use CP_DECL_CONTEXT, not + DECL_REAL_CONTEXT. + (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. + (lookup_fnfields_here):Likewise. + (check_final_overrider): Likewise. + (init_vbase_pointers): Likewise. + (virtual_context): Likewise. + * semantics.c (finish_member_declaration): Just set DECL_CONTEXT. + (expand_body): Use decl_function_context, not + hack_decl_function_context. + * tree.c (hack_decl_function_context): Remove. + * typeck.c (build_x_function_call): Use DECL_CONTEXT, not + DECL_CLASS_CONTEXT. + * typeck2.c (error_not_base_type): Likewise. + +2000-02-15 Jason Merrill + + * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE. + +2000-02-16 Kaveh R. Ghazi + + * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h. + +2000-02-15 Jonathan Larmour + + * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. + +2000-01-16 Gabriel Dos Reis + + * decl2.c (lang_decode_option): Enable automatic line wrapping. + +2000-02-13 Jason Merrill + + * parse.y (frob_specs): Split out... + (parse_decl): From here. + (fn.def2): Call initial_deferred_type_access_control. + (after_type_component_declarator0): Call frob_specs. + (notype_component_declarator0): Likewise. + * search.c (friend_accessible_p): Nested classes are friends of their + enclosing classes. + +2000-02-10 Mark Mitchell + + * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be + used to create an implicit temporary. + + * class.c (dfs_modify_vtables): Tweak calculation of functions to + override. + +2000-02-08 Nathan Sidwell + + * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to + strip array element qualifiers too. + +2000-02-07 Mark Mitchell + + * decl.c (store_parm_decls): Don't build cleanups for parameters + while processing_template_decl. + +2000-02-07 Jason Merrill + + * cp-tree.h (struct saved_scope): Add incomplete field. + (namespace_scope_incomplete): New macro. + * decl.c (pushdecl): Use it. + (hack_incomplete_structures): Use it. See through artificial + binding levels. + (mark_saved_scope): Mark it. + + Implement access control for nested types. + * search.c (type_access_control): New fn. + (accessible_p): Now we do perform access control for types. + * semantics.c (deferred_type_access_control): New fn. + (initial_deferred_type_access_control): New fn. + (begin_function_definition): Call it. Add lookups parm. + * decl.c (struct binding_level): Add this_class field. + (pushlevel_class): Set it. + (mark_binding_level): Mark it. + (lookup_name_real): Use it. Call type_access_control. + (mark_saved_scope): Mark lookups field. + * cp-tree.h (flagged_type_tree): Add lookups field. + (struct saved_scope): Add lookups field. + (type_lookups): New macro. + * parse.y (declmods): Now . + (parse_decl): Add lookups parm. Call + initial_deferred_type_access_control. + (lang_extdef): Clear type_lookups. + (typed_declspecs, declmods, typespec): Set lookups field. + (initdcl): Call deferred_type_access_control. + (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0, + component_decl_1, named_parm): Adjust. + * friend.c (is_friend): Nested classes are friends of their + enclosing classes. + + * class.c (currently_open_derived_class): New fn. + * method.c (hack_identifier): Use it. + + * lex.c (do_identifier): Remove obsolete code. + + * parse.y (typed_typespecs): Propagate new_type_flag properly. + +2000-02-05 Zack Weinberg + + * tinfo.h: Remove apostrophes from C++ comment (xgettext + thinks this file is plain C). + +2000-02-05 Kaveh R. Ghazi + + * Makefile.in (call.o): Depend on $(EXPR_H). + + * call.c: Include "expr.h". + + * class.c (dump_class_hierarchy): Add prototype. + + * search.c (dfs_get_pure_virtuals): Likewise. + +2000-02-1 Ulrich Drepper + + * parse.y (simple_stmt): Allow :: token in asm parameter list. + * parse.c: Rebuilt. + +2000-01-31 Jim Wilson + + * class.c (build_vtbl_or_vbase_field): New parameter fcontext. + Store it in DECL_FCONTEXT. + (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. + +2000-01-31 Jason Merrill + + * tinfo.h (old abi): #include "tconfig.h". + * tinfo.cc (convert_to_base): Move into old abi section. + +2000-01-31 Mark Mitchell + + * cp-tree.h (BINFO_VIRTUALS): Tweak documentation. + (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO. + (BINFO_PRIMARY_BINFO): New macro. + (BF_DELTA): Rename to ... + (BV_DELTA): ... this. + (BF_VCALL_INDEX): Rename to ... + (BV_VCALL_INDEX): ... this. + (BF_FN): Rename to ... + (BV_FN): ... this. + * class.c (build_vbase_path): Adjust for changes to reverse_path. + (set_rtti_entry): Rename BF_ macros to BV_ variants. + (modify_vtable_entry): Simplify. + (add_virtual_function): Rename BF_ macros to BV_ variants. + (build_vtable_initializer): Likewise. + (get_class_offset_1): Remove. + (dfs_get_class_offset): Likewise. + (get_class_offset): Likewise. + (dfs_find_final_overrider): New function. + (find_final_overrider): Likewise. + (modify_one_vtable): Remove. + (dfs_find_base): New function. + (dfs_modify_vtables): Fold modify_one_vtable in here. Use + find_final_overrider. + (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new + virtuals. + (dfs_fixup_vtable_deltas): Remove. + (override_one_vtable): Remove. + (merge_overrides): Likewise. + (layout_virtual_bases): Make sure BINFO_OFFSET is set right for + unreal chilren of virtual bases. + (finish_struct_1): Don't use merge_overrides. Don't use + dfs_fixup_vtable_deltas. + * tree.c (reverse_path): Return a TREE_LIST, not a chain of + BINFOs. + +2000-01-31 Herman A.J. ten Brugge + Jason Merrill + + * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT. + +2000-01-31 Alfred Minarik + + * exception.cc (__throw_bad_typeid): Add missing std::. + +2000-01-31 Kaveh R. Ghazi + + * cp-tree.h (make_thunk): PROTO -> PARAMS. + +2000-01-31 Nathan Sidwell + + * cp-tree.h (new_abi_rtti_p): Use flag_new_abi. + + Runtime support for new-abi rtti. + * inc/typeinfo (type_info::operator!=): Define in class. + (type_info::before, type_info::name, type_info::operator==, + type_info::operator!=): Define new ABI implementations. + (type_info::is_pointer_p, type_info::is_function_p): Declare + new virtual functions. + (type_info::do_catch, type_info::do_upcast): Likewise. + + * tinfo.h (__base_class_info): Define new class. + (__class_type_info): Likewise. + (__si_class_type_info): Likewise. + (__vmi_class_type_info): Likewise. + (__dynamic_cast): Prototype. + + * tinfo.cc: Conditionalize old and new rtti mechanisms. + (type_info::is_pointer_p): Define new function. + (type_info::is_function_p): Likewise. + (type_info::do_catch): Likewise. + (type_info::do_upcast): Likewise. + (vtable_prefix): New structure for vtable access. + (adjust_pointer): Define new template function. + (contained_p, public_p, virtual_p, contained_public_p, + contained_nonpublic_p, contained_nonvirtual_p): Define new + functions. + (nonvirtual_base_type): New local variable. + (__class_type_info::~__class_type_info): Define. + (__si_class_type_info::~__si_class_type_info): Likewise. + (__vmi_class_type_info::~__vmi_class_type_info): Likewise. + (__class_type_info::do_catch): Define new function. + (__class_type_info::do_upcast): Likewise. + (__class_type_info::find_public_src): Likewise. + (__class_type_info::do_find_public_src): Likewise. + (__si_class_type_info::do_find_public_src): Likewise. + (__vmi_class_type_info::do_find_public_src): Likewise. + (__class_type_info::do_dyncast): Likewise. + (__si_class_type_info::do_dyncast): Likewise. + (__vmi_class_type_info::do_dyncast): Likewise. + (__class_type_info::do_upcast): Likewise. + (__si_class_type_info::do_upcast): Likewise. + (__vmi_class_type_info::do_upcast): Likewise. + (__dynamic_cast): Likewise. + + * tinfo2.cc (__fundamental_type_info): Define new class. + (__pointer_type_info): Likewise. + (__reference_type_info): Likewise. + (__array_type_info): Likewise. + (__function_type_info): Likewise. + (__enum_type_info): Likewise. + (__ptr_to_member_type_info): Likewise. + (__fundamental_type_info::~__fundamental_type_info): Define. + (__pointer_type_info::~__pointer_type_info): Likewise. + (__reference_type_info::~__reference_type_info): Likewise. + (__array_type_info::~__array_type_info): Likewise. + (__function_type_info::~__function_type_info): Likewise. + (__enum_type_info::~__enum_type_info): Likewise. + (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise. + (__pointer_type_info::do_catch): Define new function. + (__ptr_to_member_type_info::do_catch): Define new function. + + (__throw_type_match_rtti_2): Use new ABI interface, if enabled. + (__is_pointer): Likewise. + + * exception.cc (__cplus_type_matcher): Deal with new-abi rtti. + +2000-01-30 Mark Mitchell + + * cp/class.c (build_vtable): Rename to build_primary_vtable. + (prepare_fresh_vtable): Rename to build_secondary_vtable. + (make_new_vtable): New function. + (modify_vtable_entry): Handle generation of new vtables correctly. + (modify_one_vtable): Remove unused parameter. + (dfs_fixup_vtable_deltas): Likewise. + (override_one_vtable): Use build_secondary_vtable. + (finish_struct_1): Use build_primary_vtable and + build_secondary_vtable. + +2000-01-28 Ulrich Drepper + + * cp/decl.c: Adjust variable names, comments, help strings. + +2000-01-29 Nathan Sidwell + + * new2.cc (operator delete[]): Use operator delete, don't assume + implementation. + +2000-01-29 Nathan Sidwell + + * class.c (build_vtbl_initializer): Add argument to + build_vtable_entry call. + +2000-01-27 Mark Mitchell + + * cp-tree.def (THUNK_DECL): Discuss vcall indices. + * cp-tree.h (BINFO_VIRTUALS): Update documentation. + (BF_DELTA): New macro. + (BF_VCALL_INDEX): Likewise. + (BF_FN): Likewise. + (THUNK_VCALL_OFFSET): Likewise. + (make_thunk): Change prototype. + * class.c (build_vtable_entry): Integrate + build_vtable_entry_for_fn. Handle vcall indices. + (build_vtable_entry_for_fn): Remove. + (set_rtti_entry): Handle vcall indices. Use BF_DELTA, + BF_VCALL_INDEX, BF_FN. + (modify_vtable_entry): Integrate common code from + modify_one_vtable and dfs_fixup_vtable_deltas. + (add_virtual_function): Set BF_VCALL_INDEX. + (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX, + and BF_FN. + (modify_one_vtable): Simplify. + (dfs_fixup_vtable_deltas): Likewise. + (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. + * method.c (make_thunk): Handle vcall indices. + +2000-01-28 Nathan Sidwell + + Compiler side new abi rtti (not enabled). + * cp-tree.h (new_abi_rtti_p): New macro. + (emit_support_tinfos): Prototype new function. + (tinfo_decl_p): Likewise. + (emit_tinfo_decl): Likwise. + * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor + macros. + (doing_runtime): New local static. + (init_rtti_processing): Add new-abi initializer. + (get_tinfo_decl): Add new-abi logic. + (tinfo_from_decl): Likewise. + (build_dynamic_cast_1): Likewise. + (qualifier_flags): New static function. + (tinfo_base_init): Likewise. + (generic_initializer): Likewise. + (ptr_ref_initializer): Likewise. + (ptmd_initializer): Likewise. + (class_hint_flags): Likewise. + (class_initializer): Likewise. + (synthesize_tinfo_var): Likewise. + (create_real_tinfo_var): Likewise. + (create_pseudo_type_info): Likewise. + (get_vmi_pseudo_type_info): Likewise. + (create_tinfo_types): Likewise. + (emit_support_tinfos): New global function. + (tinfo_decl_p): New global predicate. + (emit_tinfo_decl): New global function. + * class.c (set_rtti_entry): Generalize for old and new rtti. + (build_vtbl_initializer): Likewise. + * decl2.c (finish_file): Likewise. + +2000-01-27 Jim Wilson + + * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t) + and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))). + +2000-01-27 Mike Stump + + * decl.c (pushdecl): Fix up shadow warnings with respect to implicit + for scopes. + +2000-01-26 Jason Merrill + + * pt.c (unify): Use fold, not maybe_fold_nontype_arg. + +2000-01-26 J"orn Rennecke + + * optimize.c (calls_setjmp_r): Supply new argument + to special_function_p. + +2000-01-26 Kaveh R. Ghazi + + * call.c: PROTO -> PARAMS. + * class.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + * decl.c: Likewise. + * decl.h: Likewise. + * decl2.c: Likewise. + * dump.c: Likewise. + * errfn.c: Likewise. + * error.c: Likewise. + * except.c: Likewise. + * expr.c: Likewise. + * init.c: Likewise. + * input.c: Likewise. + * lex.c: Likewise. + * lex.h: Likewise. + * method.c: Likewise. + * optimize.c: Likewise. + * parse.y: Likewise. + * pt.c: Likewise. + * repo.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * spew.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + * xref.c: Likewise. + +2000-01-25 Richard Henderson + + * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. + +2000-01-25 Mark Mitchell + + * cp-tree.h (vcall_offset_in_vtable_p): New macro. + * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment. + (struct vcall_offset_data_s): New type. + (dfs_vcall_offset_queue_p): New function. + (dfs_build_vcall_offset_vtbl_entries): Likewise. + (build_vcall_offset_vtbl_entries): Likewise. + (layout_vtable_decl): Likewise. + (num_vfun_entries): Likewise. + (num_extra_vtbl_entries): Add the entries for vcall offsets. + (build_vtbl_initializer): Likewise. + (dfs_finish_vtabls): Use layout_vtable_decl. + (modify_one_vtables): Always duplicate vtables under the new ABI. + (finish_struct_1): Use layout_vtable_decl. + +2000-01-25 Kaveh R. Ghazi + + * decl.c (member_function_or_else): Change third arg from a format + specifier to an `enum overload_flags'. Callers changed. + +2000-01-25 Gabriel Dos Reis + + * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof, + build_binary_op_nodefault, build_unary_op, build_reinterpret_cast, + build_const_cast, get_delta_difference, check_return_expr): Avoid + ANSI string concatenation usage. + +2000-01-24 Mark Mitchell + + * class.c (layout_class_type): Put the fields required to make a + class non-empty at the end, not the beginning, of the TYPE_FIELDs + list. + +2000-01-24 Jason Merrill + + * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a + template. + + * decl2.c (mark_used): Do instantiate inlines that have been + explicitly instantiated. + +2000-01-24 Richard Henderson + + * call.c (build_over_call): Use expand_tree_builtin. + * typeck.c (build_function_call_real): Likewise. + (build_binary_op_nodefault): Handle unordered compares. + +2000-01-24 Nathan Sidwell + + * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New + cp_tree_index values. + (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node): + New global node #defines for them. + * rtti.c (call_void_fn): Replace with ... + (build_runtime_decl): ... new static function. + (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl. + (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl. + (build_dynamic_cast_1): Always produce correctly typed result. + Explicitly produce type_info addresses. Use dynamic_cast_node. + * exception.cc (__throw_bad_cast): Return `void *'. + (__throw_bad_typeid): Return `const type_info &'. + +2000-01-24 Nathan Sidwell + + * cp-tree.h (get_vtable_decl): Prototype new function. + * class.c (get_vtable_decl): New function. Broken out from ... + (build_vtable): ... here. Use it. + * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created + by get_vtable_decl. + +2000-01-24 Nathan Sidwell + + * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE, + CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE, + CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations. + (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE, + CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, + CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations. + (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ... + (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here. + (CPTI_TINFO_VAR_ID): New enumeration. + (__tp_desc_type_node, __access_mode_type_node, + __bltn_desc_type_node, __user_desc_type_node, + __class_desc_type_node, __ptr_desc_type_node, + __attr_desc_type_node, __func_desc_type_node, + __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines. + (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, + ref_desc_type_node, ary_desc_type_node, func_desc_type_node, + enum_desc_type_node, class_desc_type_node, + si_class_desc_type_node, vmi_class_desc_type_node, + ptmd_desc_type_node, base_desc_type_node): New #defines. + (tinfo_fn_id, tinfo_fn_type): Rename to ... + (tinfo_decl_id, tinfo_decl_type): ... here. Adjust. + (tinfo_var_id): New enumeration. + (DECL_TINFO_FN_P): Augment comment. + * decl.c (cp_global_trees): Adjust documentation. + * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id, + tinfo_decl_type and tinfo_var_id. + (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type. + (build_typeid): Remove unused variable. + (get_tinfo_var): Use tinfo_var_id. + (tinfo_name): New static function. + (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type. + (tinfo_from_decl): Likewise. + (get_base_offset): New static function, broken out of + expand_class_desc. + (expand_si_desc): Use tinfo_name. + (expand_class_desc): Likewise. Lose local static variable. + Use base_desc_type_node. Use get_base_offset. + (expand_ptr_desc): Use tinfo_name. + (expand_attr_desc): Likewise. + (expand_generic_desc): Likewise. + + * tinfo.cc (__GXX_ABI_VERSION): Test value and existence. + * tinfo.h (__GXX_ABI_VERSION): Test value and existence. + +2000-01-23 Mark Mitchell + + * cp-tree.h (__eprintf): Remove declaration. + * tree.c (__eprintf): Remove definition. + +2000-01-23 Zack Weinberg + Mark Mitchell + + * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, + CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings. + +2000-01-23 Brad Lucier + + * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. + +2000-01-23 Mark Mitchell + + * cp-tree.h (register_dtor_fn): New function. + * decl.c (destroy_local_static): Rename to ... + (register_dtor_fn): ... this. Give it external linkage. + (expand_static_init): Use it. + * decl2.c (do_static_initialization): Likewise, if using + __cxa_atexit. + (do_static_destruction): Check that __cxa_atexit is not in use. + (finish_file): Don't call do_static_destruction if using + __cxa_atexit. + + * typeck.c (convert_arguments): Restore two-message error + reporting. + +2000-01-20 Nathan Sidwell + + Remap dynamic cast hint values to be consistent across ABIs. + * search.c (dynamic_cast_base_recurse): Remap generated value. + (get_dynamic_cast_base_type): Adjust documentation. + * tinfo.h (__user_type_info::dyncast): Likewise. + (__user_type_info::find_public_subobj): Remap BOFF meaning. + * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning. + (__class_type_info::do_dyncast): Likewise. + (__class_type_info::do_find_public_subobj): Likewise. + * tinfo2.cc (__dynamic_cast): Remap BOFF parameter. + +2000-01-19 Gabriel Dos Reis + + * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. + + * typeck2.c (incomplete_type_error): Restore previous + cp_error and cp_error_at call sequence. + +2000-01-20 Brad Lucier + + * class.c (dump_class_hierarchy): Make format agree with argument; + cast pointer to unsigned long and print with %lx. + +2000-01-19 Gabriel Dos Reis + + * decl2.c (lang_decode_option): Set default line-wrap length to 72. + + * typeck.c (composite_pointer_type, common_type, + comp_target_parms, c_sizeof, expr_sizeof, build_array_ref, + build_function_call_real, convert_arguments, + build_binary_op_nodefault, pointer_int_sum, pointer_diff, + build_unary_op, mark_addressable, build_compound_expr, + build_static_cast, build_reinterpret_cast, build_const_cast, + build_c_cast, build_modify_expr, get_delta_difference, + build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with + 'ISO C++'. Fusion consecutive calls to diagnostic message routines + into a single one. + * typeck2.c (readonly_error, abstract_virtuals_error, + process_init_constructor, check_for_new_type): Likewise. + +2000-01-19 Mark Mitchell + + * tree.c (bot_manip): Set DECL_CONTEXT for newly created + VAR_DECLs. + +2000-01-18 Nathan Sidwell + + * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype. + (build_x_typeid): Likewise. + (get_tinfo_fn): Likewise. + (get_tinfo_fn_unused): Rename to ... + (get_tinfo_decl): ... here. + * rtti.c (build_headof): Replace logic error with assertion. + (get_tinfo_fn_dynamic): Rename to ... + (get_tinfo_decl_dynamic): ... here. Make static. Use + complete_type_or_else. + (build_x_typeid): Move into ... + (build_typeid): ... here. Adjust call to + get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify + throw_bad_typeid expression. + (get_tinfo_fn_unused): Rename to ... + (get_tinfo_decl): ... here. Adjust comment. + (get_tinfo_fn): Delete. + (tinfo_from_decl): New static function. + (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl. + (get_typeid): Use complete_type_or_else. + (build_dynamic_cast_1): Adjust calls to + get_tinfo_decl_dynamic. Simplify throw_bad_cast expression. + * parse.y (primary): Adjust call to build_typeid. + * except.c (build_eh_type_type_ref): Adjust call to + get_tinfo_decl. Mark as used. + * class.c (set_rtti_entry): Adjust call to get_tinfo_decl. + * decl2.c (build_expr_from_tree): Adjust call to build_typeid. + * parse.c: Regenerated. + +2000-01-17 Mark Mitchell + + * class.c (fixed_type_or_null): Don't clear NONNULL. Document + calling convention. + (resolves_to_fixed_type_p): Document calling convention. + * rtti.c (build_x_typeid): Initialize NONNULL. + + * cp-tree.h (build_shared_int_cst): New function. + * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity. + * class.c (modify_vtable_entry): Likewise. + (add_virtual_function): Split out code to generated shared + INTEGER_CSTs to build_share_int_cst. + (modify_all_vtables): Handle all the overridden functions here. + Add overridden functions from non-primary virtual bases to the + primary vtable. + (finish_struct_1): Adjust call to modify_all_vtables. Add + overridden functions from non-primary bases to the vtable. + * tree.c (build_shared_int_cst): New function. + + * cp-tree.h (scratchalloc): Remove. + (build_scratch_list): Likewise. + * call.c (convert_class_to_reference): Replace build_scratch_list + and build_expr_list with build_tree_list. + (add_candidate): Replace scratchalloc with expralloc. Note memory + leak. + (build_user_type_conversion_1): Replace build_scratch_list + and build_expr_list with build_tree_list. + (build_new_op): Likewise. + (build_op_delete_call): Likewise. + (convert_like): Likewise. + * cvt.c (ocp_convert): Likewise. + * decl.c (start_decl): Likewise. + (start_function): Likewise. + (finish_destructor_body): Likewise. + (maybe_build_cleanup_1): Likewise. + * decl2.c (reparse_decl_as_expr): Likewise. + * init.c (perform_member_init): Likewise. + (expand_cleanup_for_base): Likewise. + (build_builtin_delete_call): Likewise. + (build_new_1): Likewise. + (build_delete): Likewise. + * method.c (do_build_assign_ref): Likewise. + * parse.y (already_scoped_stmt): Likewise. + (nontrivial_exprlist): Likewise. + (net_initializer): Likewise. + (initlist): Likewise. + * parse.c: Regenerated. + * rtti.c (build_x_typeid): Likewise. + (build_dynamic_cast_1): Likewise. + * typeck.c (build_x_compound_expr): Likewise. + (build_static_cast): Likewise. + (build_modify_expr): Likewise. + + * cp-tree.h (DECL_VINDEX): Add documentation. + * class.c (build_vtable_entry): Likewise. + (start_vtable): Add comment. + (add_virtual_function): Replace pending_hard_virtuals with + overridden_virtuals and pending_virtuals with new_virtuals. + Replace redundant assignments with assertions. + (check_for_override): Add comment. + (check_bases_and_members): Replace pending_hard_virtuals with + overridden_virtuals and pending_virtuals with new_virtuals. + (create_vtbl_ptr): Likewise. + (layout_class_type): Likewise. + (finish_struct_1): Likewise. Add comments. + +2000-01-16 Mark Mitchell + + * class.c (finish_struct_1): Replace redundant code with + assertions. + + * cp-tree.h (flag_new_abi): Move. + (flag_use_cxa_atexit): Likewise. + (flag_honor_std): Likewise. + (flag_rtti): Likewise. + (vbase_offsets_in_vtable_p): Define. + (vptrs_present_everywhere_p): Likewise. + (TYPE_CONTAINS_VPTR_P): Likewise. + (dfs_walk_real): Declare. + * class.c (build_vbase_pointer_fields): Check + vbase_offsets_in_vtable_p. + (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in + BINFO_VPTR_FIELD. + (build_vbase_offset_vtbl_entries): Simplify. + (build_vbase_offset_vtbl_entries): Adjust. + (build_vbase_pointer): Add ability to look up vbase offsets in + vtable. + (start_vtable): New function. + (add_virtual_function): Use it. + (determine_primary_base): Use TYPE_CONTAINS_VPTR_P. + (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p. + (build_vtbl_initializer): Take the type of the complete object as + input. Use it to correctly calculate vbase offsets. + (dfs_finish_vtbls): Pass the complete type to + build_vtbl_initializer. + (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. + (create_vtable_ptr): Create a vtable even if there are no + new virtual functions, under the new ABI. + (finish_struct_1): Likewise. + (get_vfield_name): Use TYPE_CONTAINS_VPTR_P. + * decl.c (exapnd_static_init): Remove call to + preserve_initializer. + * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in + vtables. + * init.c (initialize_vtbl_ptrs): Initialize them in pre-order. + (expand_virtual_init): Use vbase_offsets_in_vtable_p. + (construct_virtual_bases): Don't initialize virtual base pointers + under the new ABI. + (build_aggr_init): Clean up comment. + (expand_aggr_init_1): Likewise. + * rtti.c (expand_class_desc): Store the virtual function table + index where the vbase offset lives in the offset field. + * search.c (dfs_walk_real): Make it global. + (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P. + * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD. + + * tinfo.h (USItype): Make it signed under the new ABI. + * tinfo.cc (convert_to_base): New function. Encapsulate base + conversion logic here. + (__class_type_info::do_upcast): Use it. + (__class_type_info::do_dyncast): Likewise. + (__class_type_info::do_find_public_subobj): Likewise. + + * init.c (construct_virtual_bases): Don't look up the addresses of + virtual bases at run-time. + + * class.c (build_vbase_pointer): Relocate. + (build_vbase_pointer_fields): Likewise. + (dfs_build_vbase_offset_vtbl_entries): Likewise. + (build_vbase_offset_vtbl_entries): Likewise. + + * decl.c (init_decl_processing): Complain if -fnew-abi + -fno-vtable-thunks is used. + + * decl2.c (lang_decode_option): Don't couple flag_honor_std to + flag_new_abi. + +2000-01-15 Mark Mitchell + + * cp-tree.h (num_extra_vtbl_entries): New function. + (size_extra_vtbl_entries): Likewise. + (dfs_vtable_path_unmark): Likewise. + (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise. + (dfs_vtable_path_marked_real_bases_queue_p): Likewise. + * class.c (num_extra_vtbl_entries): New function. + (size_extra_vtbl_entries): Likewise. + (dfs_build_vbase_offset_vtbl_entries): New function. + (build_vbase_offset_vtbl_entries): Likewise. + (build_vtbl_initializer): Use it. + (finish_struct_1): Adjust vtable sizes (using + num_extra_vtbl_entries). + * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a + THUNK_DECL is non-NULL before expanding it. + * init.c (expand_virtual_init): Adjust the vtable pointer by + size_extra_vtbl_entries before storing it. + * search.c (get_shared_vase_if_not_primary): Adjust prototype. + Handle TREE_LIST parameters here, not in the dfs_* functions. + (dfs_unmarked_real_bases_queue_p): Adjust. + (dfs_marked_real_bases_queue_p): Likewise. + (dfs_vtable_path_unmarked_real_bases_queue_p): New function. + (dfs_vtable_path_marked_real_bases_queue_p): New function. + (dfs_vtable_path_unmark): Likewise. + +2000-01-14 Mark Mitchell + + * optimize.c (copy_body_r): Clear the operand three of a + TARGET_EXPR when copying it. + +2000-01-14 Martin v. Löwis + + * method.c (build_decl_overload_real): Check whether we are in :: + before returning __builtin_new/delete. + +2000-01-13 Mark Mitchell + + * pt.c (tsubst_friend_function): Improve comment. + (instantiate_decl): Avoid crashing when a "nested" function is + instantiated from the top level. + + * dump.c (dqeueue_and_dump): Dump + DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION. + +2000-01-13 Kaveh R. Ghazi + + * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. + +2000-01-13 Nathan Sidwell + + * g++spec.c (lang_specific_driver): Add -fnew-abi if + ENABLE_NEW_GXX_ABI defined. + * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o, + opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o, + opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch. + +2000-01-12 Mark Mitchell + + * decl.c (start_cleanup_fn): Call pushdecl. + + * call.c (convert_class_to_reference): Fix typos. + (build_conditional_expr): Handle errors gracefully. + * class.c (push_nested_class): Likewise. + * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro. + (DECL_THIS_EXTERN): Use it. + (DECL_THIS_STATIC): Likewise. + * cvt.c (convert_to_void): Handle errors gracefully. + (build_expr_type_conversion): Likewise. + * decl.c (maybe_push_decl): Likewise. + (start_decl_1): Likewise. + (require_complete_types_for_parms): Likewise. + * parse.y (structsp): Likewise. + (base_class): Likewise. + * parse.c: Regenerated. + * pt.c (finish_member_template_decl): Likewise. + * typeck.c (decay_conversion): Likewise. + + * cp-tree.h (dfs_skip_vbases): New function. + (find_vbase_instance): Likewise. + * class.c (determine_primary_base): Allow a nearly empty base to + serve as a primary base class under the new ABI. + (get_class_offset_1): Rename to ... + (dfs_get_class_offset): ... this. Simplify. Don't issue error + messages here. + (get_class_offset): Use it. Issue error messages here. + (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to + find the right copies of virtual bases. + (fixup_vtable_deltas1): Rename to ... + (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual + bases as primary bases. + (fixup_vtable_deltas): Remove. + (override_one_vtable): Handle virtual bases as primary bases. + (merge_overrides): Likewise. + (finish_struct_1): Likewise. + (dump_class_hierarchy): Dump primary-ness of bases as well. + * search.c (mark_primary_bases): Use a pre-order traversal to + handle primary virtual bases. + (dfs_skip_vbases): New fiunction. + (expand_upcast_fixups): Adjust to handle primary virtual bases. + (fixup_virtual_upcast_offsets): Likewise. + (fixup_all_virtual_upcast_offsets): Likewise. + (dfs_find_vbase_instances): New function. + (find_vbase_instance): Likewise. + +2000-01-11 Mumit Khan + + * lex.c (DIR_SEPARATOR): Delete macro. + +2000-01-12 Gabriel Dos Reis + + * decl2.c (lang_decode_option): Handle automatic line wrapping + option. + +2000-01-11 Mark Mitchell + + * friend.c (do_friend): Don't resolve scopes when processing + template declarations, even if the qualifying scope doesn't + involve template parameters. + +2000-01-10 Mark Mitchell + + * class.c (dfs_modify_vtables_queue_p): Remove. + (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p + and dfs_marked_real_bases_queue_p instead of + dfs_modify_vtables_queue_p. + + * class.c (build_vbase_path): Simplify. + (dfs_propagate_binfo_offsets): New function. + (propagate_binfo_offsets): Use it. + (remove_base_field): Simplify. + (dfs_set_offset_for_vbases): Remove. + (dfs_set_offset_for_shared_vbases): New function. + (dfs_set_offset_for_unshared_vbases): Likewise. + (layout_virtual_bases): Use them. + (layout_basetypes): Don't call propagate_binfo_offsets. + * search.c (dfs_get_vbase_types): Clone completely fresh binfos + for the vbases. + + * class.c (build_base_field): New function, split out from ... + (build_base_fields): ... here. Use it. Allocate primary bases + first, under the new ABI. + (get_vtable_entry): Remove. + (remove_base_field): New function, split out from ... + (remove_base_fields): ... here. Adjust since primary bases come + first under the new ABI. + + * cp-tree.h (expand_direct_vtbls_init): Remove declaration. + (initialize_vtbl_ptrs): New function. + (expand_indirect_vtbls_init): Change prototype. + (convert_pointer_to_vbase): Declare. + * init.c (expand_direct_vtbls_init): Remove. + (dfs_initialize_vtbl_ptrs): New function. + (initialize_vtbl_ptrs): Likewise. + (emit_base_init): Use initialize_vtbl_ptrs. + * search.c (convert_pointer_to_vbase): Make it global. + (expand_indirect_vtbls_init): Remove vtable initialization code. + * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs. + + * class.c (dfs_finish_vtbls): New function. + (finish_vtbls): Use it. + (dump_class_hierarchy): New function. + + * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition. + (BINFO_VBASE_PRIMARY_P): New macro. + (BINFO_VIRTUALS): Add to documentation. + (SET_BINFO_PRIMARY_MARKED_P): Remove. + (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. + (dfs_mark_primary_bases_queue_p): Likewise. + (dfs_unmarked_real_bases_queue_p): New function. + (dfs_marked_real_bases_queue_p): Likewise. + * search.c (dfs_mark_primary_bases): Adjust. + (mark_primary_bases): Likewise. + (get_shared_vbase_if_not_primary): New function. + (dfs_unmarked_real_bases_queue_p): Likewise. + (dfs_marked_real_bases_queue_p): Likewise. + (dfs_get_pure_virtuals): Simplify. + (get_pure_virtuals): Likewise. + +2000-01-10 Kaveh R. Ghazi + + * lex.c: Include tm_p.h. + +2000-01-07 Nathan Sidwell + + * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro. + +2000-01-06 Jason Merrill + + * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT. + * pt.c (instantiate_decl): Defer comdat templates that might not be + needed. + + * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT. + * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT. + (finish_file): Likewise. + + * decl2.c (import_export_class): Undo 12/14 change. + + * error.c (dump_decl): operator new, not operatornew. + + * class.c (field_decl_cmp): A nontype is "greater" than a type. + * search.c (lookup_field_1): Look for the last field with the + desired name. + +2000-01-05 Nathan Sidwell + + * decl2.c (lookup_arg_dependent): Deal with FNS not being a + FUNCTION_DECL. + +2000-01-05 Nathan Sidwell + + * typeck.c (build_static_cast): Don't strip target qualifiers + when casting from a class. + +2000-01-04 Kaveh R. Ghazi + + * class.c (warn_hidden): Initialize variable `fndecl'. + +2000-01-03 Ulrich Drepper + + * decl.c (flag_isoc9x): New variable to be able to use code in + c-common.c. For now always zero. + +2000-01-03 Mark Mitchell + + * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. + * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN + or unshare_base_binfos for virtual bases here. + * search.c (dfs_get_vbase_types): Do it here. + (get_vbase_types): Adjust. + +2000-01-02 Mark Mitchell + + * cp-tree.h (CLASSTYPE_VFIELDS): Move definition. + (BINFO_PRIMARY_MARKED_P): Use flag 5. + (SET_BINFO_PRIMARY_MARKED_P): Likewise. + (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. + (unmark_primary_bases): Remove declaration. + (unmarkedp): Declare. + (dfs_vbase_unmark): Likewise. + * class.c (determine_primary_base): Return immediately if there + are no base classes. Call mark_primary_bases here. + (modify_all_direct_vtables): Remove. + (modify_all_indirect_vtables): Remove. + (dfs_modify_vtables_queue_p): New function. + (dfs_modify_vtables): New function. + (modify_all_vtables): Use them. + (build_base_fields): Build FIELD_DECLs for primary virtual base + classes. + (create_vtable_ptr): Don't call determine_primary_base here. + (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ... + (dfs_set_offset_for_vbases): ... this. + (layout_virtual_bases): Use it. + (layout_class_type): Call determine_primary_base here. + * search.c (unmarkedp): Make it global. + (shared_marked_p): Simplify. + (shared_unmarked_p): Likewise. + (dfs_primary_bases_queue_p): Remove. + (dfs_unmark_primary_bases): Likewise. + (unmark_primary_bases): Likewise. + (mark_primary_bases): Simplify. + (get_pure_virtuals): Don't call mark_primary_bases here. + (dfs_vbase_unmark): New function. + (get_vbase_types): Simplify. + + * class.c (struct base_info): Remove. + (determine_primary_base): Take has_virtual_p rather than a + base_info as input. Don't calculate max_has_virtual. + (finish_struct_bits): Remove max_has_virtual argument. + (create_vtable_ptr): Remove max_has_virtual_p argument. + (layout_virtual_bases): Remove max argument. + (layout_basetypes): Likewise. + (layout_class_type): Remove max_has_virtual_p argument. + (finish_struct_1): Remove max_has_virtual. + + * cp-tree.h (dfs_mark_primary_bases_queue_p): New function. + (layout_basetypes): Remove. + * class.c (propagate_binfo_offsets): Moved here from tree.c. + Update to handle primary virtual bases. + (remove_base_fields): New function, split out from + layout_basetypes. + (dfs_mark_primary_bases_and_set_vbase_offsets): New function. + (layout_virtual_bases): New function, split out from + layout_basetypes. Update to handle primary virtual bases. + (layout_basetypes): Moved here from tree.c. Use + remove_base_fields and layout_virtual_bases. + * search.c (dfs_mark_primary_bases_queue_p): New function. + (mark_primary_bases): Use it. + * tree.c (CEIL): Remove. + (propagate_binfo_offsets): Remove. + (layout_basetypes): Remove. + +2000-01-01 Mark Mitchell + + * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES. + (BINFO_PRIMARY_MARKED_P): New macro. + (SET_BINFO_PRIMARY_MARKED_P): Likewise. + (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. + (mark_primary_bases): New function. + (unmark_primary_bases): Likewise. + * search.c (get_abstract_virtuals_1): Remove. + (dfs_mark_primary_bases): New function. + (mark_primary_bases): Likewise. + (dfs_unmark_primary_bases): Likewise. + (unmark_primary_bases): Likewise. + (dfs_get_pure_virtuals): Likewise. + +2000-01-01 Mark Mitchell + + * cp-tree.h (skip_rtti_stuff): Adjust prototype. + * class.c (skip_rtti_stuff): Reorganize parameters and return value. + (modify_one_vtable): Adjust. + (fixup_vtable_deltas1): Likewise. + (override_one_vtable): Likewise. + * search.c (get_abstract_virtuals_1): Likewise. + (get_pure_virtuals): Likewise. + (expand_upcast_fixups): Likewise. + * tree.c (debug_binfo): Likewise. + + * class.c (build_vtable): Don't return a value. Don't rebuild + vtables for bases that have already been handled. + (prepare_fresh_vtable): Don't rebuild vtables for bases that have + already been handled. + (modify_one_vtable): Adjust accordingly. + (fixup_vtable_deltas1): Likewise. + (finish_struct_1): Likewise. + +2000-01-01 Martin v. Löwis + + * call.c (build_new_method_call): Also check destructors. + diff --git a/gcc/cp/ChangeLog-2001 b/gcc/cp/ChangeLog-2001 new file mode 100644 index 0000000..9643357 --- /dev/null +++ b/gcc/cp/ChangeLog-2001 @@ -0,0 +1,3895 @@ +2001-12-29 Nathan Sidwell + + * call.c (build_user_type_conversion_1): Use my_friendly_assert + rather than if ... abort. + * cvt.c (convert_to_reference): Likewise. + * semantics.c (setup_vtbl_ptr): Likewise. + * pt.c (lookup_template_class): Comment typo. + +2001-12-29 Nathan Sidwell + + PR c++/5125 + * pt.c (push_template_decl_real): Make sure DECL has + DECL_LANG_SPECIFIC. + +2001-12-29 Nathan Sidwell + + PR c++/335 + * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer + for non-reference fields. + * typeck.c (require_complete_type): Use resolve_offset_ref). + +2001-12-26 Nathan Sidwell + + PR c++/196 + * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF. + +2001-12-24 Nathan Sidwell + + PR c++/160 + * typeck.c (build_modify_expr): Remove old unreachable code & tidy + up. Don't stabilize_references when initializing a reference. + +2001-12-23 Kaveh R. Ghazi + + * decl2.c (lang_f_options): Const-ify. + +2001-12-20 Joseph S. Myers + + * config-lang.in (diff_excludes): Remove. + +2001-12-19 Nathan Sidwell + + PR c++/90 + * typeck.c (build_function_call_real): Use original function + expression for errors. + +2001-12-18 Jason Merrill + + PR c++/3242 + * class.c (add_method): Do compare 'this' quals when trying to match a + used function. Don't defer to another used function. + +2001-12-18 Nathan Sidwell + + * pt.c (instantiate_clone): Remove, fold into ... + (instantiate_template): ... here. Simplify by removing mutual + recursion. + * typeck2.c (build_m_component_ref): Don't cv qualify the function + pointed to by a pointer to function. + * class.c (delete_duplicate_fields_1): Typo. + +2001-12-18 Jason Merrill + + C++ ABI change: destroy value arguments in caller. + * semantics.c (genrtl_start_function, genrtl_finish_function): Don't + create an extra binding level for the parameters. + * decl.c (store_parm_decls): Don't do parameter cleanups. + +2001-12-18 Nathan Sidwell + + * call.c (build_new_method_call): Use '%#V'. + * error.c (cv_to_string): Use V parameter to determine padding. + +2001-12-18 Joseph S. Myers + + * call.c, decl2.c, init.c: Use "built-in" and "bit-field" + spellings in messages. + +2001-12-17 Zack Weinberg + + * cp-tree.h: Delete #defines for cp_error, cp_warning, + cp_pedwarn, and cp_compiler_error. + * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c, + except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c, + rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, + typeck2.c: Change calls to the above macros to use their + language-independent equivalents: error, warning, pedwarn, and + internal_error respectively. + +2001-12-16 Neil Booth + + * decl2.c (finish_file): Remove back_end_hook. + +2001-12-16 Joseph S. Myers + + * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c, + cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c, + pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors. + +2001-12-15 Joseph S. Myers + + * lang-options.h: Use American spelling in messages. + +2001-12-13 Jason Merrill + + * Make-lang.in (parse.h): Separate rule, just depend on parse.c. + + Use cleanups to run base and member destructors. + * init.c (push_base_cleanups): New function, split out from... + (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code. + * decl.c (finish_destructor_body): Move vbase destruction code to + push_base_cleanups. + (begin_function_body, finish_function_body): New fns. + (finish_function): Move [cd]tor handling and call_poplevel to + finish_function_body. + (pushdecl): Skip the new level. + * semantics.c (genrtl_try_block): Don't call end_protect_partials. + (setup_vtbl_ptr): Call push_base_cleanups. + * method.c (synthesize_method): Call {begin,end}_function_body. + * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK. + * cp-tree.h: Declare new fns. + * parse.y (function_body, .begin_function_body): New nonterminals. + (fndef, pending_inline, function_try_block): Use function_body. + (ctor_initializer_opt, function_try_block): No longer has a value. + (base_init): Remove .set_base_init token. + (.set_base_init, compstmt_or_error): Remove. + * Make-lang.in (parse.c): Expect two fewer s/r conflicts. + + * optimize.c (maybe_clone_body): Fix parameter updating. + +2001-12-12 Jason Merrill + + * decl.c (store_parm_decls): Remove parms_have_cleanups cruft. + * semantics.c (genrtl_start_function): Don't pass + parms_have_cleanups or push an extra binding level. + (genrtl_finish_function): Lose cleanup_label cruft. + + * cp-tree.h (struct cp_language_function): Remove x_ctor_label. + (ctor_label): Remove. + * semantics.c (finish_return_stmt): Lose ctor_label support. + * decl.c (finish_constructor_body, mark_lang_function): Likewise. + * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not + dtor_label. + + * call.c (build_new_method_call): Let resolves_to_fixed_type_p + check for [cd]tors. + * class.c (fixed_type_or_null, case INDIRECT_REF): Fix. + + * decl.c (finish_function): Check VMS_TARGET, not VMS. + + * decl.c (start_cleanup_fn): Remove redundant pushlevel. + (end_cleanup_fn): And poplevel. + + * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER + if we're in a template. + +2001-12-12 Jakub Jelinek + + * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P, + ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT, + THIS_NAME_P): Delete. + * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P, + THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash + with internal naming scheme. + * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use. + +2001-12-12 Nathan Sidwell + + * decl.c (grokdeclarator): Deprecated implicit typename use. + +2001-12-11 Nathan Sidwell + + PR g++/51 + * parse.y (frob_specs): Indicate it is a language linkage which + contained the extern. + * decl.c (grokdeclarator): Allow extern language linkage with + other specifiers. + +2001-12-10 Nathan Sidwell + + PR g++/72 + * decl.c (add_binding): Don't reject duplicate typedefs involving + template parameters. + +2001-12-10 Neil Booth + + * parse.y, semantics.c: Similarly. + +2001-12-09 Nathan Sidwell + + PR g++/87 + * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p. + (copy_args_p): Rename to ... + (copy_fn_p): ... here. + (grok_special_member_properties): New function. + (grok_op_properties): Lose VIRTUALP parameter. + (copy_assignment_arg_p): Remove. + * call.c (build_over_call): Use copy_fn_p. + * decl.c (grokfndecl): Reformat. Adjust call to + grok_op_properties. + (copy_args_p): Rename to ... + (copy_fn_p): ... here. Reject template functions. Check for pass + by value. + (grok_special_member_properties): Remember special functions. + (grok_ctor_properties): Don't remember them here, just check. + (grok_op_properties): Likewise. + (start_method): Call grok_special_member_properties. + * decl2.c (grokfield): Likewise. + (copy_assignment_arg_p): Remove. + (grok_function_init): Don't remember abstract assignment here. + * pt.c (instantiate_class_template): Call + grok_special_member_properties. + (tsubst_decl): Adjust grok_op_properties call. + +2001-12-08 Aldy Hernandez + + * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and + RID_TYPES_COMPATIBLE_P. + +2001-12-08 John David Anglin + + * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in + call to build_aggr_init. + * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND. + +2001-12-08 Neil Booth + + * parse.y: Replace uses of the string non-terminal with STRING. + Don't perform string concatentaion here. + (string): Remove non-terminal. + * semantics.c (finish_asm_stmt): Don't concatenate strings here. + +2001-12-05 Jason Merrill + + * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. + (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. + * tree.c (cp_start_inlining, cp_end_inlining): New fns. + * pt.c (push_tinst_level): No longer static. + * cp-tree.h: Declare them. + + * init.c (resolve_offset_ref): Don't check access for the base + conversion to access a FIELD_DECL. + + * cp-tree.h (TYPE_REFFN_P): New macro. + * decl.c (bad_specifiers): Check it, too. + + * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY + on the __*_type_info type if we haven't seen a definition. + +2001-12-05 Neil Booth + + * decl.c: Include c-common.h. + (shadow_warning): Move to c-common.c. + +2001-12-05 Richard Kenner + + * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE. + +2001-12-04 Nathan Sidwell + + * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm. + +2001-12-04 Nathan Sidwell + + PR g++/164 + * init.c (sort_base_init): Allow binfos to be directly specified. + * method.c (do_build_copy_constructor): Explicitly convert to the + base instance. + (do_build_assign_ref): Likewise. + +2001-12-03 Hans-Peter Nilsson + + * decl.c (xref_basetypes): Don't use C99 construct in tag_code + declaration and initialization. + +2001-12-03 Neil Booth + + * typeck2.c: Remove leading capital from diagnostic messages, as + per GNU coding standards. + +2001-12-03 Mumit Khan + + PR c++/3394 + * decl.c (xref_basetypes): Handle attributes between + 'class' and name. + +2001-12-03 Nathan Sidwell + + PR g++/3381 + * parse.y (named_complex_class_head_sans_basetype): Add new + reduction. + * Make-lang.in (parse.c): Adjust expected conflict count. + +2001-12-03 Jason Merrill + + * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the + immediate binfos for our virtual bases. + +2001-12-02 Neil Booth + + * call.c (build_java_interface_fn_ref): Similarly. + * except.c (is_admissible_throw_operand): Similarly. + * init.c (build_java_class_ref): Similarly. + * xref.c (open_xref_file): Similarly. + +2001-12-01 Neil Booth + + * class.c (finish_struct): Remove trailing periods from messages. + * decl.c (check_tag_decl): Similarly. + * lex.c (cxx_set_yydebug): Similarly. + * typeck2.c (friendly_abort): Similarly. + +2001-11-29 Mark Mitchell + + PR c++/3048 + * cp-tree.h (ovl_member): Remove. + * decl2.c (merge_functions): Handle extern "C" functions + specially. + * tree.c (ovl_member): Remove. + +2001-11-29 Mark Mitchell + + PR c++/4842 + * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a + FUNCTION_DECL, as input. + (mark_overriders): Remove. + (warn_hidden): Rework for the new ABI. + +2001-11-29 Mark Mitchell + + PR c++/3471 + * call.c (convert_like_real): Do not build additional temporaries + for rvalues of class type. + +2001-11-28 Nathan Sidwell + + * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base. + (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise. + (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise. + (DERIVED_FROM_P): Likewise. + (enum base_access): Renumber, add ba_quiet bit mask. + (get_binfo): Remove. + (get_base_distance): Remove. + (binfo_value): Remove. + (ACCESSIBLY_DERIVED_FROM_P): Remove. + * call.c (standard_conversion): Use lookup_base. + * class.c (strictly_overrides): Likewise. + (layout_virtual_bases): Likewise. + (warn_about_ambiguous_direct_bases): Likewise. + (is_base_of_enclosing_class): Likewise. + (add_vcall_offset_vtbl_entries_1): Likewise. + * cvt.c (build_up_reference): Adjust comment. + * init.c (build_member_call): Reformat. + * search.c (get_binfo): Remove. + (get_base_distance_recursive): Remove. + (get_base_distance): Remove. + (lookup_base_r): Tweak. + (lookup_base): Add ba_quiet control. Complete the types here. + (covariant_return_p): Use lookup_base. + * tree.c (binfo_value): Remove. + (maybe_dummy_object): Use lookup_base. + * typeck.c (build_static_cast): Use lookup_base. + (get_delta_difference): Likewise. + * typeck2.c (binfo_or_else): Use lookup_base. + (build_scoped_ref): Add back error_mark_check. + (build_m_component_ref): Use lookup_base. + +2001-11-29 Joseph S. Myers + + * Make-lang.in (c++.generated-manpages): New dummy target. + +2001-11-27 Richard Kenner + + * Make-lang.in (cp-lang.o): Depends on c-common.h. + * cp-lang.c (c-common.h): Include. + (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. + * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. + * expr.c (init_cplus_expand): Don't set lang_expand_constant. + +2001-11-26 Neil Booth + + * decl2.c (c_language): Move to c-common.c. + * lex.c (cxx_post_options, cxx_init_options): Use c-common.c + functions. + (cxx_init): Update. + +2001-11-26 Jason Merrill + + * call.c (joust): Remove COND_EXPR hack. + +2001-11-25 Aldy Hernandez + + * search.c (lookup_base_r): Declare bk in variable declaration + space. + +2001-11-25 Nathan Sidwell + + PR g++/3145 + * class.c (build_vbase_pointer): Remove. + (build_vbase_path): Remove. + (build_base_path): New function. + * cp-tree.h (base_access, base_kind): New enumerations. + (build_base_path): Declare. + (convert_pointer_to_real): Remove. + (convert_pointer_to): Remove. + (lookup_base): Declare. + (convert_pointer_to_vbase): Remove. + * call.c (build_scoped_method_call): Use lookup_base & + build_base_path instead of convert_pointer_to_real, + get_base_distance & get_binfo. + (build_over_call): Likewise. + * cvt.c (cp_convert_to_pointer): Likewise. + (convert_to_pointer_force): Likewise. + (build_up_reference): Likewise. + (convert_pointer_to_real): Remove. + (convert_pointer_to): Remove. + * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path + instead of convert_pointer_to_vbase & build_vbase_path. + (emit_base_init): Use build_base_path instead of + convert_pointer_to_real. + (expand_virtual_init): Lose unrequired conversions. + (resolve_offset_ref): Use lookup_base and build_base_path + instead of convert_pointer_to. + * rtti.c (build_dynamic_cast_1): Use lookup_base & + build_base_path instead of get_base_distance & build_vbase_path. + * search.c (get_vbase_1): Remove. + (get_vbase): Remove. + (convert_pointer_to_vbase): Remove. + (lookup_base_r): New function. + (lookup_base): New function. + * typeck.c (require_complete_type): Use lookup_base & + build_base_path instead of convert_pointer_to. + (build_component_ref): Likewise. + (build_x_function_call): Likewise. + (get_member_function_from_ptrfunc): Likewise. + (build_component_addr): Likewise. + * typeck2.c (build_scoped_ref): Likewise. + +2001-11-22 Bryce McKinlay + + * cp-tree.h (CP_TYPE_QUALS): Removed. + * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree. + * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and + LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN. + * dump.c (cp_dump_tree): Use void* dump_info argument to match + lang-hooks prototype. + * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c, + rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to + CP_TYPE_QUALS changed to cp_type_quals. + * Make-lang.in: References to c-dump.h changed to tree-dump.h. + (CXX_C_OBJS): Remove c-dump.o. + +2001-11-21 Mark Mitchell + + PR c++/3637 + * pt.c (lookup_template_class): Ensure that all specializations + are registered on the list corresponding to the most general + template. + +2001-11-20 Mark Mitchell + + * call.c (non_reference): Add documentation. + (convert_class_to_reference): Do not strip reference types + from conversion operators. + (maybe_handle_ref_bind): Simplify. + (compare_ics): Correct handling of references. + +2001-11-19 John Wilkinson + + * dump.c (dump_op): New function. + (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use + dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs. + DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P, + +2001-11-19 Mark Mitchell + + PR4629 + * semantics.c (finish_sizeof): Make sure that expression created + while processing a template do not have a type. + (finish_alignof): Likewise. + * typeck.c (c_sizeof): Likewise. + (expr_sizeof): Likewise. + +2001-11-18 Neil Booth + + * lex.c (cxx_finish): Call c_common_finish. + (finish_parse): Remove. + +2001-11-17 Kriang Lerdsuwanakij + + * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE + when displaying error message about missing array bounds. + +2001-11-17 Kriang Lerdsuwanakij + + * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR, + CONST_CAST_EXPR. + * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR. + +2001-11-16 Neil Booth + + * cp-tree.h (print_class_statistics): Restore. + +2001-11-15 Jason Merrill + + * method.c (use_thunk): Don't emit debugging information for thunks. + + * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions. + * decl.c (make_typename_type): Handle getting a class template. + * search.c (lookup_field_r): A class template is good enough for + want_type. + + * call.c (convert_like_real): Only use cp_convert for the bad part. + (standard_conversion): Also allow bad int->enum. + * typeck.c (ptr_reasonably_similar): Also allow functions to + interconvert. Pointers to same-size integers are reasonably + similar. + + * cvt.c (convert_to_void): If we build a new COND_EXPR, always + give it void type. + +2001-11-15 Nathan Sidwell + + PR g++/3154 + * init.c (sort_base_init): Remove unreachable code. + (expand_member_init): Adjust comment to reflect reality. Simplify + and remove unreachable code. + +2001-11-15 Neil Booth + + * cp-tree.h (init_reswords, cxx_init_decl_processing): New. + (cxx_init): Update prototype. + * decl.c (init_decl_processing): Rename. Move null node init + to its creation time. + * lex.c (cxx_init_options): Update. + (cxx_init): Combine with old init_parse; also call + cxx_init_decl_processing. + +2001-11-14 Richard Sandiford + + * decl.c (check_initializer): Try to complete the type of an + array element before checking whether it's complete. Don't + complain about arrays with complete element types but an + unknown size. + (cp_finish_decl): Build the hierarchical constructor before + calling maybe_deduce_size_from_array_init. + +2001-11-14 Joseph S. Myers + + * Make-lang.in: Change all uses of $(manext) to $(man1ext). + +2001-11-13 Nathan Sidwell + + PR g++/4206 + * parse.y (already_scoped_stmt): Remove. + (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt. + +2001-11-12 H.J. Lu + + * cvt.c (ocp_convert): Don't warn the address of a weak + function is always `true'. + +2001-11-09 Neil Booth + + * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, + LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, + LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. + * cp-tree.h (print_class_statistics): Remove. + (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, + cxx_print_identifier, cxx_set_yydebug): New. + * lex.c (set_yydebug): Rename c_set_yydebug. + * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, + lang_print_xnode): Rename. + * tree.c (print_lang_statistics): Rename. + +2001-11-09 Kaveh R. Ghazi + + * class.c (dump_array): Fix format specifier warning. + +2001-11-09 Neil Booth + + * cp-lang.c (LANG_HOOKS_NAME): Override. + (struct lang_hooks): Constify. + * lex.c (cxx_init_options): Update. + (lang_identify): Remove. + * parse.y (language_string): Remove. + +2001-11-08 Andreas Franck + + * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME, + DEMANGLER_CROSS_NAME): Handle program_transform_name the way + suggested by autoconf. + (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define. + (c++.install-common): Use the transformed target alias names. + +2001-11-06 Neil Booth + + * Make-lang.in: Update. + * cp-lang.c: Include langhooks-def.h. + +2001-11-04 Kriang Lerdsuwanakij + + * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR. + +2001-11-03 Kaveh R. Ghazi + + * lex.c (copy_lang_type): Add static prototype. + +2001-11-02 Kriang Lerdsuwanakij + + * pt.c (unify): Handle SCOPE_REF. + +2001-11-01 Jakub Jelinek + + * tree.c (cp_copy_res_decl_for_inlining): Adjust + DECL_ABSTRACT_ORIGIN for the return variable. + +2001-10-31 Zack Weinberg + + * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. + +2001-10-28 Joseph S. Myers + + * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c, + semantics.c, spew.c: Fix spelling errors. + +2001-10-27 Kriang Lerdsuwanakij + + * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL. + +2001-10-25 Zack Weinberg + + * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to + pop_everything. + +2001-10-23 Richard Kenner + + * cp-lang.c (cxx_get_alias_set): New function. + Point LANG_HOOKS_GET_ALIAS_SET to it. + +2001-10-23 Kriang Lerdsuwanakij + + * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node. + * cp-tree.h (make_unbound_class_template): Prototype new function. + * decl.c (make_unbound_class_template): New function. + * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE. + * error.c (dump_type): Likewise. + * mangle.c (write_type): Likewise. + * parse.y (template_parm): Likewise. + (template_argument): Use make_unbound_class_template. + * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE. + (tsubst): Likewise. + (tsubst_copy): Likewise. + (unify): Likewise. + * tree.c (walk_tree): Likewise. + * typeck.c (comptypes): Likewise. + +2001-10-21 Kaveh R. Ghazi + + * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold + extra calls into fewer ones. + +2001-10-18 Alexandre Oliva + + * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE. + Warn when merging inline with attribute noinline. + (start_decl, start_function): Warn if inline and attribute + noinline appear in the same declaration. + +2001-10-16 H.J. Lu + + * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined + for tree checking disabled. + +2001-10-16 Hans-Peter Nilsson + + * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL && + NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME. + +2001-10-15 Richard Sandiford + + * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define. + (unify): Only handle MINUS_EXPR specially if the above flag is set + and the subtracted constant is 1. Clear the flag on recursive calls. + Set it when unifying the maximum value in an INTEGER_TYPE's range. + +2001-10-15 Richard Sandiford + + * decl.c (bad_specifiers): Don't allow exception specifications + on any typedefs. + +2001-10-14 Neil Booth + + * cp/lex.c (init_cp_pragma): Similarly. + +2001-10-13 Kriang Lerdsuwanakij + + * pt.c (lookup_template_class): Build complete template arguments + for BOUND_TEMPLATE_TEMPLATE_PARM. + +2001-10-12 Kriang Lerdsuwanakij + + * cp-tree.h (TYPE_BINFO): Update comment. + (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro. + (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info. + (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS. + (copy_type): Prototype new function. + * lex.c (copy_lang_decl): Gather tree node statistics. + (copy_lang_type): New function. + (copy_type): Likewise. + (cp_make_lang_type): Create lang_type for + BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE + and BOUND_TEMPLATE_TEMPLATE_PARM. + * pt.c (tsubst): Use copy_type instead of copy_node. + * search.c (lookup_field_1): Ignore TYPENAME_TYPE. + +2001-10-12 Kriang Lerdsuwanakij + + * pt.c (determine_specialization): Ignore functions without + DECL_TEMPLATE_INFO. + +2001-10-12 Nathan Sidwell + + PR g++/4476 + * typeck2.c (abstract_virtuals_error): Ignore incomplete classes. + +2001-10-11 Jason Merrill + + * typeck2.c (store_init_value): Don't re-digest a bracketed + initializer. + + * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of + ANON_AGGR_TYPE_P. + +2001-10-11 Richard Henderson + + * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead + of an asm statement. + (build_vtbl_ref_1): Split out from build_vtbl_ref. + (build_vfn_ref): Use it to handle vtable descriptors before + calling build_vtable_entry_ref. + * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit. + +2001-10-10 Richard Henderson + + * parse.y (asm_operand): Allow named operands. + * semantics.c (finish_asm_stmt): Tweek for changed location + of the operand constraint. + +2001-10-09 Jason Merrill + + * call.c (standard_conversion): Add bad conversion between + integers and pointers. + (convert_like_real): Don't use convert_for_initialization for bad + conversions; complain here and use cp_convert. + (build_over_call): Don't handle bad conversions specially. + (perform_implicit_conversion): Allow bad conversions. + (can_convert_arg_bad): New fn. + * cp-tree.h: Declare it. + * typeck.c (convert_for_assignment): Use it. + (ptr_reasonably_similar): Any target type is similar to void. + +2001-10-08 Alexandre Oliva + + * Make-lang.in (CXX_OBJS): Added cp-lang.o. + (cp/cp-lang.o): New rule. + * cp-tree.h: Declare hooks. + * tree.c: Make hooks non-static. + (init_tree): Don't initialize hooks here. + * lex.c: Likewise. Move definition of lang_hooks to... + * cp-lang.c: ... new file. + +2001-10-08 Richard Henderson + + * cp-tree.h (struct lang_decl_flags): Remove declared_inline. + (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl. + +2001-10-07 Kaveh R. Ghazi + + * class.c (build_vtable_entry_ref): Const-ify. + * decl.c (predefined_identifier, + initialize_predefined_identifiers): Likewise. + * init.c (build_new_1): Likewise. + * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): + Likewise. + +2001-10-05 Alexandre Oliva + + * optimize.c (struct inline_data): Moved to ../tree-inline.c. + (INSNS_PER_STMT): Likewise. + (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise. + (copy_body, initialize_inlined_parameters): Likewise. + (declare_return_variable, inlinable_function_p): Likewise. + (expand_call_inline, expand_calls_inline): Likewise. + (optimize_inline_calls, clone_body): Likewise. + * tree.c (walk_tree): Moved to ../tree-inline.c. + (walk_tree_without_duplicates): Likewise. + (copy_tree_r, remap_save_expr): Likewise. + +2001-10-04 Alexandre Oliva + + * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h. + (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise. + * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl. + (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h. + (flag_inline_trees): Moved declaration to ../tree-inline.h. + (walk_tree): Moved declaration to ../tree-inline.h. + (walk_tree_without_duplicates, copy_tree_r): Likewise. + (remap_save_expr): Likewise. + * decl.c: Include tree-inline.h. + (lang_mark_tree): Don't mark inlined_fns. + * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c. + * optimize.c: Include tree-inline.h. + (optimize_inline_calls): Move declaration to ../tree.h, as + non-static. + (remap_decl): Use language-independent constructs and hooks. + (remap_block, copy_body_r, declare_return_variable): Likewise. + (inlinable_function_p): Likewise. Don't test for + DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is + no longer language-specific. + (optimize_inline_calls): Likewise. Make it non-static. Moved + call of dump_function to... + (optimize_function): Here... + (clone_body): New function, extracted from... + (maybe_clone_body): ... here. Build decl_map locally and pass + it on to clone_body. + * pt.c, semantics.c: Include tree-inline.h. + * tree.c: Likewise. + (cp_walk_subtrees): New language-specific hook for tree inlining. + (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls, + cp_is_overload_p, cp_auto_var_in_fn_p, + cp_copy_res_decl_for_inlining): Likewise. + (walk_tree): Move language-specific constructs into... + (cp_walk_subtrees): this new function. + (copy_tree_r): Use language-independent constructs and hooks. + (init_tree): Initialize tree inlining hooks. + (remap_save_expr): Adjust prototype so that the declaration + does not require the definition of splay_tree. + +2001-10-03 John David Anglin + + * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used + to build the declaration instead of the declaration itself. + +2001-10-02 Jason Merrill + + * decl2.c (cxx_decode_option): Add 'else'. + + * spew.c (end_input): No longer static. + * cp-tree.h: Declare it. + * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion. + +2001-10-02 Joseph S. Myers + + * call.c (build_over_call), typeck.c (build_function_call_real): + Pass type attributes to check_function_format rather than name or + assembler name. Don't require there to be a name or assembler + name to check formats. + +2001-10-02 Joseph S. Myers + + * decl.c (init_decl_processing): Don't call + init_function_format_info. Initialize lang_attribute_table + earlier. + (builtin_function): Call decl_attributes. + (insert_default_attributes): New. + +2001-10-01 Jason Merrill + + * decl.c (grokdeclarator): Copy array typedef handling from C + frontend. + + * decl.c (grokdeclarator): Copy too-large array handling from C + frontend. + +2001-09-29 Alexandre Oliva + + * config-lang.in (target_libs): Added target-gperf, so that we + don't try to build it if C++ is disabled. + +2001-09-23 Zack Weinberg + + * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. + (cp/errfn.o): Delete rule. + (cp/error.o): Depend on flags.h. + * errfn.c: Delete file. + * cp-tree.h: Declare warn_deprecated. Remove definitions of + TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, + and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, + cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and + internal_error respectively. Make cp_deprecated into a macro. + Don't define cp_printer typedef or declare cp_printers. + * error.c: Include flags.h. + Delete: struct tree_formatting_info, print_function_argument_list, + print_declaration, print_expression, print_function_declaration, + print_function_parameter, print_type_id, print_cv_qualifier_seq, + print_type_specifier_seq, print_simple_type_specifier, + print_elaborated_type_specifier, print_rest_of_abstract_declarator, + print_parameter_declaration_clause, print_exception_specification, + print_nested_name_specifier, and definition of cp_printers. + (locate_error): New function. + (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and + rewritten in terms of locate_error and diagnostic.c. + (cp_tree_printer): Rename cp_printer; wire up to *_to_string + instead of deleted print_* routines. Handle %C, %L, %O, %Q also. + (init_error): Adjust to match. + +2001-09-22 Richard Kenner + + * Make-lang.in (CXX_C_OBJS): Add attribs.o. + +2001-09-21 Richard Henderson + + * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. + (build_vtbl_initializer): Likewise. + (build_vfn_ref): New. + * cp-tree.h: Declare it. + * call.c (build_over_call): Use it. + * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. + * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. + +2001-09-21 J"orn Rennecke + + * decl.c (grokdeclarator): Use C syntax for attr_flags declaration. + +2001-09-21 Joseph S. Myers + + Table-driven attributes. + * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. + * decl2.c (cplus_decl_attributes): Only take one attributes + parameter. + * cp-tree.c (cplus_decl_attributes): Update prototype. + * class.c (finish_struct), decl.c (start_decl, start_function), + decl2.c (grokfield), friend.c (do_friend), parse.y + (parse_bitfield): Update calls to cplus_decl_attributes. + * decl.c (grokdeclarator): Take a pointer to a single ordinary + attribute list. + * decl.h (grokdeclarator): Update prototype. + * decl2.c (grokfield): Take a single ordinary attribute list. + * friend.c (do_friend): Likewise. + * decl.c (shadow_tag, groktypename, start_decl, + start_handler_parms, grokdeclarator, grokparms, start_function, + start_method), decl2.c (grokfield, grokbitfield, grokoptypename), + parse.y (parse_field, parse_bitfield, component_decl_1), pt.c + (process_template_parm, do_decl_instantiation): Pass single + ordinary attribute lists around. + * decl.c (grokdeclarator): Correct handling of nested attributes. + Revert the patch + 1998-10-18 Jason Merrill + * decl.c (grokdeclarator): Embedded attrs bind to the right, + not the left. + . + * cp-tree.h (cp_valid_lang_attribute): Remove declaration + (cp_attribute_table): Declare. + * decl.c (valid_lang_attribute): Don't define. + (lang_attribute_table): Define. + (init_decl_processing): Initialize lang_attribute_table instead of + valid_lang_attribute. + * tree.c (cp_valid_lang_attribute): Remove. + (handle_java_interface_attribute, handle_com_interface_attribute, + handle_init_priority_attribute): New functions. + (cp_attribute_table): New array. + * decl2.c (import_export_class): Don't use + targetm.valid_type_attribute. + +2001-09-15 Gabriel Dos Reis + + * Make-lang.in (cp/error.o): Depend on real.h + * error.c: #include "real.h" + +2001-09-15 Kaveh R. Ghazi + + * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of + xmalloc/strcpy/strcat. + +2001-09-13 Kaveh R. Ghazi + + * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): + Const-ification. + * pt.c (tsubst_decl): Likewise. + +2001-09-12 Kaveh R. Ghazi + + * decl2.c (lang_f_options): Const-ification. + * lex.c (cplus_tree_code_name): Likewise. + * spew.c (yyerror): Likewise. + +2001-09-06 Nathan Sidwell + + PR c++/3986 + * class.c (force_canonical_binfo_r): Check & move an indirect + primary base first. + (force_canonical_binfo): Check that it's not already + canonical. + (mark_primary_virtual_base): Remove BINFO parameter. + (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here. + +2001-09-06 Nathan Sidwell + + Remove TYPE_NONCOPIED_PARTS. + * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto + CLASSTYPE_PURE_VIRTUALS. + (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. + * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. + (layout_class_type): Don't call fixup_inline_methods here ... + (finish_struct_1): ... call it here. + +2001-09-04 Mark Mitchell + + * decl.c (duplicate_decls): Remove code deadling with + DECL_SAVED_INSNS. + * decl2.c (finish_file): Likewise. + * pt.c (instantiate_decl): Likewise. + * semantics.c (expand_body): Don't defer local functions if + they wouldn't be deferred for some other reason. Don't + generate RTL for functions that will not be emitted. + (genrtl_start_function): Remove code deadling with + DECL_SAVED_INSNS. + (genrtl_finish_function): Likewise. + +2001-09-04 Nathan Sidwell + + PR c++/4203 + * call.c (build_over_call): Do not optimize any empty base + construction. + +2001-08-31 Kriang Lerdsuwanakij + + * error.c (dump_template_decl): Output template parameters + together with their specifiers. + Output `class' prefix for template template parameter. + (dump_decl): Fix formatting. + +2001-08-30 Kurt Garloff + + * optimize.c (inlinable_function_p): Allow only smaller single + functions. Halve inline limit after reaching recursive limit. + +2001-08-30 Joern Rennecke + Jason Merrill + + * class.c (build_vtable_entry_ref): Subtract in char*, not + ptrdiff_t. + +2001-08-23 Jason Merrill + + * tree.c (cp_build_qualified_type_real): Use get_qualified_type. + (build_cplus_array_type): Use cp_build_qualified_type, not + TYPE_MAIN_VARIANT, to get an unqualified version. + + * decl2.c (grok_alignof): Lose. + (build_expr_from_tree): Use expr_sizeof and c_alignof_expr. + * typeck.c (c_alignof): Lose. + * semantics.c (finish_sizeof, finish_alignof): New. + * parse.y: Use them. + * cp-tree.h: Declare them. + +2001-08-22 Jason Merrill + + * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement. + Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK. + * tree.c (cp_statement_code_p): A TAG_DEFN is a statement. + +2001-08-19 Jakub Jelinek + + * typeck2.c (add_exception_specifier): Only require complete type if + not in processing template declaration. + +2001-08-18 Kaveh R. Ghazi + + * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to + GNU_xref_start_scope and GNU_xref_end_scope. + + * tree.c (TYPE_HASH): Moved to ../tree.h. + +2001-08-16 Mark Mitchell + + * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS + on COMPOUND_EXPRs. + +2001-08-14 Richard Henderson + + * class.c, cp-tree.h (build_vfn_ref): Remove. + * call.c, rtti.c: Replace all refernces with build_vtbl_ref. + +2001-08-13 Mark Mitchell + + * call.c (build_over_call): Mark COMPOUND_EXPRs generated for + empty class assignment as having side-effects to avoid + spurious warnings. + +2001-08-13 Zack Weinberg + + * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. + * except.c: Include libfuncs.h. + +2001-08-11 Gabriel Dos Reis + + * decl.c (grokdeclarator): Clarify diagnostic message. + +2001-08-13 Kriang Lerdsuwanakij + + * decl2.c (do_nonmember_using_decl): Replace using directive + with using declaration in the error message. + +2001-08-11 Kriang Lerdsuwanakij + + * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the + criterion to avoid rebuilding expression tree instead of + processing_template_decl. + +2001-08-07 Jason Merrill + + Support named return value optimization for inlines, too. + * decl.c (finish_function): Nullify returns here. + * semantics.c (genrtl_start_function): Not here. + (cp_expand_stmt): Don't mess with CLEANUP_STMTs. + (nullify_returns_r): No longer static. Just clear RETURN_EXPR. + Also nullify the CLEANUP_STMT for the nrv. + * cp-tree.h: Declare it. + * optimize.c (declare_return_variable): Replace the nrv with the + return variable. + * typeck.c (check_return_expr): Be more flexible on alignment check. + Ignore cv-quals when checking for a matching type. + +2001-08-09 Richard Henderson + + * decl2.c (finish_objects): Use target hooks instead of + assemble_constructor and assemble_destructor. + +2001-08-08 John David Anglin + + * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'. + +2001-08-07 Nathan Sidwell + + PR c++/3820 + Stop using TYPE_NONCOPIED_PARTS. + * call.c (build_over_call): Be careful when copy constructing + or assigning to an empty class. + * class.c (check_bases_and_members): It has a + COMPLEX_ASSIGN_REF if it has a vptr. + (layout_class_type): Don't add empty class padding to + TYPE_NONCOPIED_PARTS. + (finish_struct_1): Don't add the VFIELD either. + * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_ + initialization. + +2001-08-07 Jason Merrill + + * tree.c (walk_tree): Walk siblings even if !walk_subtrees. + +2001-08-06 Richard Henderson + + * decl2.c (finish_objects): Pass a symbol_ref and priority to + assemble_{constructor,destructor}. Remove priority handling. + +2001-08-05 Gabriel Dos Reis + + Don't allow template-id in using-declaration. + * decl2.c (validate_nonmember_using_decl): Handle template-ids. + (do_class_using_decl): Likewise. + +2001-08-04 Neil Booth + + * cp/spew.c (read_token): No need to pop buffers. + +2001-08-02 Stan Shebs + + * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used. + (fnaddr_from_vtable_entry): Remove decl. + * method.c (use_thunk): Update comment. + +2001-08-01 Andrew Cagney + + * repo.c (get_base_filename): Change return value to const char + pointer. + +2001-08-02 Nathan Sidwell + + Kill -fhonor-std. + * NEWS: Document. + * cp-tree.h (flag_honor_std): Remove. + (CPTI_FAKE_STD): Remove. + (std_node): Remove comment about it being NULL. + (fake_std_node): Remove. + * decl.c (in_fake_std): Remove. + (walk_namespaces_r): Remove fake_std_node check. + (push_namespace): Remove in_fake_std code. + (pop_namespace): Likewise. + (lookup_name_real): Remove fake_std_node check. + (init_decl_processing): Always create std_node. Always add + std:: things there. + (builtin_function): Always put non '_' fns in std. + * decl2.c (flag_honor_std): Remove. + (lang_f_options): Remove honor-std. + (unsupported_options): Add honor-std. + (set_decl_namespace): Remove fake_std_node check. + (validate_nonmember_using_decl): Likewise. + (do_using_directive): Likewise. + (handle_class_head): Likewise. + * dump.c (cp_dump_tree): Likewise. + * except.c (init_exception_processing): Adjust. + * init.c (build_member_call): Remove fake_std_node check. + (build_offset_ref): Likewise. + * lang-options.h: Remove -fhonor-std, -fno-honor-std. + * rtti.c (init_rtti_processing): Adjust. + +2001-07-31 Alexandre Petit-Bianco + + * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second + operand while calling cp_tree_equal. + +2001-07-31 Nathan Sidwell + + The 3.0 ABI no longer has vbase pointer fields. + * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P, + FORMAT_VBASE_NAME): Remove. + * method.c (do_build_copy_constructor): Adjust. + (do_build_assign_ref): Adjust. + * search.c (lookup_field_r): Adjust. + * typeck.c (build_component_ref): Adjust. + + The 3.0 ABI always has a vtable pointer at the start of every + polymorphic class. + * rtti.c (build_headof_sub): Remove. + (build_headof): Adjust. + (get_tinfo_decl_dynamic): No need to check flag_rtti + here. Adjust. + (create_real_tinfo_var): Explain why we need a hidden name. + +2001-07-31 Nathan Sidwell + + PR c++/3631 + * class.c (update_vtable_entry_for_fn): The fixed adjustment + of a virtual thunk should be from declaring base. + +2001-07-31 Nathan Sidwell + + * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into + the shared virtual base, so preserving inheritance graph order. + +2001-07-30 Andreas Jaeger + + * decl2.c: Remove unused var global_temp_name_counter. + +2001-07-28 Richard Henderson + + * method.c (pending_inlines): Remove. + +2001-07-27 Nathan Sidwell + + * class.c (mark_primary_virtual_base): Don't adjust base + offsets here. + (dfs_unshared_virtual_bases): Adjust them here. + (mark_primary_bases): Explain why we adjust at the end. + +2001-07-27 Nathan Sidwell + + * class.c (finish_struct_1): When copying the primary base's + VFIELD, make sure we find it is at offset zero. + +2001-07-26 Kriang Lerdsuwanakij + + * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and + tsubst_expr for default template arguments. + +2001-07-26 Nathan Sidwell + + PR c++/3621 + * spew.c (yylex): Only copy the token's lineno, if it is + nonzero. + +2001-07-26 Nathan Sidwell + + PR c++/3624 + * call.c (resolve_args): Simplify, call + convert_from_reference. + (build_new_op): Resolve and convert from reference ARG1 + earlier. Adjust ARG2 & ARG3 resolve and conversion. + +2001-07-26 Nathan Sidwell + + * decl.c (last_function_parm_tags): Remove. + (current_function_parm_tags): Remove. + (init_decl_processing): Adjust. + (start_function): Adjust. + (store_parm_decls): Adjust. + + PR c++/3152 + * decl.c (grokdeclarator): Detect when a function typedef is + declaring a function, and create last_function_parms correctly. + +2001-07-25 Jason Merrill + + * call.c (joust): Only prefer a non-builtin candidate to a builtin + one if they have the same signature. + + * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on + it rather than toplevel_bindings_p. Give it a mangled name if static. + (convert_to_reference): Adjust. + * decl2.c (get_temp_name): Lose. + * mangle.c (mangle_ref_init_variable): New fn. + (mangle_guard_variable): Strip the ref-init header. + * cp-tree.h: Adjust. + * decl.c (cp_finish_decl): Add the DECL_STMT after processing the + initializer. + (grok_reference_init): Always use DECL_INITIAL. + +2001-07-25 Nathan Sidwell + + PR c++/3416 + * call.c (build_conditional_expr): Recheck args after + conversions. + * cp-tree.h (build_conditional_expr): Move to correct file. + * typeck.c (decay_conversion): Diagnose any unknown types + reaching here. + (build_binary_op): Don't do initial decay or default + conversions on overloaded functions. + (build_static_cast): Don't do a decay conversion here. + +2001-07-25 Nathan Sidwell + + PR c++/3543 + * typeck.c (condition_conversion): Resolve an OFFSET_REF. + * expr.c (cplus_expand_expr): An OFFSET_REF should never get here. + +2001-07-25 Nathan Sidwell + + * class.c (build_vtbl_or_vbase_field): Remove, move into ... + (create_vtbl_ptr): ... here. + +2001-07-25 Nathan Sidwell + + * class.c (build_vbase_offset_vbtl_entries): Look for + non-primary base of which we are a sub vtable. + +2001-07-24 Phil Edwards + + * semantics.c (finish_this_expr): Remove unused code. + +2001-07-24 Nathan Sidwell + + Simplify rtti, now we've only one ABI. + * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID, + CPTI_TINFO_VAR_ID. + (tinfo_decl_id, tinfo_var_id): Remove. + (get_typeid_1): Remove. + * rtti.c + (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id. + (typeid_ok_p): New function. + (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl. + (get_tinfo_decl): Remove old abi documentation. + (tinfo_from_decl): Remove. + (get_type_id): Call typeid_ok_p. Absorb get_typeid_1. + (get_typeid_1): Remove. + (get_base_offset): Remove. + (synthesize_tinfo_var): Absorb get_base_offset. + (create_real_tinfo_var): Don't use tinfo_decl_id. + +2001-07-23 Graham Stott + + * cp/class.c (type_requires_array_cookie): Fix use of uninitialized + variable has_two_argument_delete_p. + +2001-07-21 Nathan Sidwell + + Remove flag_vtable_thunk. It is always on for the 3.0 ABI. + * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove. + (CPTI_INDEX_IDENTIFIER): Remove. + (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove. + (delta2_identifier): Remove. + (index_identifier): Remove. + (pfn_or_delta2_identifier): Remove. + (flag_vtable_thunks): Remove. + (VTABLE_DELTA2_NAME): Remove. + (VTABLE_INDEX_NAME): Remove. + (FNADDR_FROM_VTABLE_ENTRY): Adjust. + (vfunc_ptr_type_node): Adjust. + (VTABLE_NAME_PREFIX): Adjust. + (build_vfn_ref): Lose first parameter. + (fixup_all_virtual_upcast_offsets): Remove. + * decl.c (initialize_predefined_identifiers): Remove + delta2_identifier, index_identifier, pfn_or_delta2_identifier. + (init_decl_processing): Remove no-vtable-thunk code. + * decl2.c (flag_vtable_thunks): Remove. + (mark_vtable_entries): Remove no-vtable-thunk code. + * error.c (dump_decl): Remove no-vtable-thunk code. + (dump_expr): Adjust ptr to member function code. + * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk + code. + * rtti.c (build_headof): Remove no-vtable-thunk code. + (get_tinfo_decl_dynamic): Adjust build_vfn_ref call. + * search.c (get_base_distance): Remove expand_upcast_fixups case. + (virtual_context) Remove. + (expand_upcast_fixups): Remove. + (fixup_virtual_upcast_offsets): Remove. + (fixup_all_virtual_upcast_offsets): Remove. + * typeck.c (get_member_function_from_ptrfunc): Remove + no-vtable-thunk code. + * call.c (build_over_call): Adjust call to build_vfn_ref. + * class.c (build_vfn_ref): Lose first parameter. Remove + no-vtable-thunk code. + (build_rtti_vtbl_entries): Remove no-vtable-thunk code. + (build_vtable_entry): Remove no-vtable-thunk code. + +2001-07-20 Nathan Sidwell + + Remove old-abi remnants. Remove comments about old abi + behavior. Remove references to 'new-abi' in comments. + * cp-tree.h: Adjust comments. + (vbase_offsets_in_vtable_p): Delete. + (vcall_offsets_in_vtable_p): Delete. + (vptrs_present_everywhere_p): Delete. + (all_overridden_vfuns_in_vtables_p): Delete. + (merge_primary_and_secondary_vtables_p): Delete. + (TYPE_CONTAINS_VPTR_P): Adjust. + (VTT_NAME_PREFIX): Remove. + (CTOR_VTBL_NAME_PREFIX): Remove. + (init_vbase_pointers): Remove. + * class.c: Adjust coments. + (build_vbase_pointer_fields): Delete. + (build_vbase_pointer): Remove old-abi code. + (build_secondary_vtable): Likewise. + (modify_all_vtables): Likewise. + (create_vtable_ptr): Likewise. + (layout_class_type): Likewise. + (finish_struct_1): Likewise. + (finish_vtbls): Likewise. + (dfs_finish_vtbls): Delete. + (build_vbase_offset_vtbl_entries): Remove old-abi code. + * cvt.c: Adjust comments. + * decl.c: Adjust comments. + * decl2.c: Adjust comments. + * init.c: Adjust comments. + (construct_virtual_bases): Remove old-abi code. + * lang-specs.h: Remove -fno-new-abi. + * mangle.c: Adjust comments. + * rtti.c: Adjust comments. + (get_base_offset): Remove old-abi-code. + * search.c: Adjust comments. + (dfs_init_vbase_pointers): Remove. + (dfs_vtable_path_unmark): Remove. + (init_vbase_pointers): Remove. + * semantics.c: Adjust comments. + (emit_associated_thunks): Remove old-abi code. + * typeck.c: Adjust comments. + +2001-07-20 Daniel Berlin + + * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not + params.h. + +2001-07-19 Mark Mitchell + + * class.c (finish_struct_anon): Forbid nested classes. + +2001-07-19 Neil Booth + + * decl2.c: Don't include dwarfout.h and dwarf2out.h. + * optimize.c: Include debug.h. + (maybe_clone_body): Use debug hook. + * semantics.c: Include debug.h. + (expand_body): Use debug hook. + +2001-07-19 Neil Booth + + * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases. + +2001-07-18 Mark Mitchell + + * class.c (type_requires_array_cookie): New function. + (check_methods): Don't try to figure out whether the type needs a + cookie here. + (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here. + * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove. + (TYPE_VEC_NEW_USES_COOKIE): Reimplement. + * pt.c (instantiate_class_template): Don't set + TYPE_VEC_DELETE_TAKES_SIZE. + * NEWS: Document ABI changes from GCC 3.0. + +2001-07-18 Xavier Delacour , + Gerald Pfeifer + + * NEWS (Changes in GCC 3.0): Fix typo. + +2001-07-13 Joseph S. Myers + + * decl2.c (cplus_decl_attributes): Take a pointer to the node to + which attributes are to be attached, and a flags argument. Update + call to decl_attributes. + (grokfield): Update call to decl_attributes. + * class.c (finish_struct): Update call to cplus_decl_attributes. + * cp-tree.h (cplus_decl_attributes): Update prototype. + * decl.c (start_decl, grokdeclarator, start_function): Update + calls to decl_attributes and cplus_decl_attributes. + * friend.c (do_friend): Update call to cplus_decl_attributes. + * parse.y (parse_bitfield): Update call to cplus_decl_attributes. + +2001-07-12 Mark Mitchell + + * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER + for `register' variables with an asm-specification. + +2001-07-11 Mark Mitchell + + * semantics.c (finish_asm_stmt): Mark the output operands + to an asm addressable, if necessary. + +2001-07-11 Ben Elliston + + * Revert this change -- there is a subtle bug. + + PR c++/80 + * decl.c (finish_enum): New "attributes" argument; pass it to + cplus_decl_attributes. Use a narrower type if the enum is packed. + * cp-tree.h (finish_enum): Adjust prototype. + * parse.y (enum_head): New non-terminal. + (structsp): Use it. Enums now may be preceded or followed by + optional attributes -- pass their chained tree to finish_enum(). + * pt.c (tsubst_enum): Pass NULL_TREE for the new argument. + +2001-07-10 Mark Mitchell + + * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope + variables. + +2001-07-10 Jason Merrill + + * semantics.c (cp_expand_stmt): Fix for null + current_function_return_value. + +2001-07-10 Jan van Male + + * call.c (build_op_delete_call): Initialize fn. + (convert_like_real): Delete conditional. + (joust): Initialize *w and *l. + * class.c: Add prototype for binfo_ctor_vtable. + (get_primary_binfo): Initialize result. + * init.c (build_java_class_ref): Initialize name. + +2001-07-09 Erik Rozendaal + + * typeck.c (unary_complex_lvalue): Do not duplicate the + argument to modify, pre-, or post-increment when used as an + lvalue and when the argument has side-effects. + +2001-07-08 Joseph S. Myers + + * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES. + (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call + cplus_decl_attributes even if attrs is NULL. + * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES. + +2001-07-08 Joseph S. Myers + + * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update + calls to decl_attributes. + +2001-07-06 Ira Ruben + + * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should + be DECL_TEMPLATE_RESULT. + +2001-07-05 Kriang Lerdsuwanakij + + * cp-tree.h (copy_template_template_parm): Rename to ... + (bind_template_template_parm): ... here. + * tree.c (copy_template_template_parm): Rename to ... + (bind_template_template_parm): ... here. Remove the case when + NEWARGS is NULL_TREE. + (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and + BOUND_TEMPLATE_TEMPLATE_PARM. + * pt.c (lookup_template_class): Adjust. + +2001-07-05 Jason Merrill + + * cvt.c (convert_lvalue): New fn. + * cp-tree.h: Declare it. + * method.c (do_build_assign_ref): Use it. + (do_build_copy_constructor): Convert parm to base types + before calling base constructors. + + * typeck.c (check_return_expr): Check DECL_ALIGN instead of + DECL_USER_ALIGN. Check flag_elide_constructors instead of + optimize. + * semantics.c (cp_expand_stmt): Don't destroy the named return value. + +2001-07-02 Nathan Sidwell + + * optimize.c (optimize_inline_calls): New function, broken out + of ... + (optimize_function): ... here. Call it. Don't inline if it is + a thunk. + (dump_function): Print name of dump flag causing this dump. + * semantics.c (expand_body): Move thunk inline check to + optimize_function. + +2001-06-29 Joseph S. Myers + + * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. + (comptypes): Use target.comp_type_attributes. + +2001-06-29 Nathan Sidwell + + * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration. + +2001-06-28 Gabriel Dos Reis + + * error.c (lang_print_error_function): Add a `diagnostic_context *' + parameter. Tweak. + +2001-06-27 Neil Booth + + * decl2.c (import_export_class): Update. + +2001-06-26 Gabriel Dos Reis + + * error.c (init_error): Adjust settings. + +2001-06-26 Gabriel Dos Reis + + * error.c (init_error): Adjust settings. + +2001-06-19 Richard Sandiford + + * except.c (initialize_handler_parm): Expect __cxa_begin_catch to + return pointers to data members by reference rather than by value. + +2001-06-18 Jason Merrill + + Implement the Named Return Value optimization. + * cp-tree.h (struct cp_language_function): Add x_return_value. + (current_function_return_value): Now a macro. + * decl.c: Don't define it. + (define_label, finish_case_label): Don't clear it. + (init_decl_processing): Don't register it with GC. + * semantics.c (genrtl_finish_function): Don't check it for + no_return_label. Copy the RTL from the return value to + current_function_return_value and walk, calling... + (nullify_returns_r): ...this new fn. + * typeck.c (check_return_expr): Set current_function_return_value. + +2001-06-15 Jason Merrill + + * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're + sharing a ctor vtable with. Merge code for cases 1 and 2. + (binfo_ctor_vtable): New fn. + (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it. + +2001-06-14 Jason Merrill + + * class.c (dfs_find_final_overrider): Fix logic. + + * class.c (update_vtable_entry_for_fn): Uncomment optimization to use + virtual thunk instead of non-virtual. + (get_matching_virtual): Uncomment. + + * pt.c (unify): Don't recurse between the POINTER_TYPE and the + OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on + PARM, not ARG. + +2001-06-14 Nathan Sidwell + + * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure + we've not emerged from the hierarchy of RTTI_BINFO on reaching + a non-virtual base. + +2001-06-13 Mark Mitchell + + * NEWS: Update release number. + +2001-06-12 Nathan Sidwell + + PR c++/3130, c++/3131, c++/3132 + * cp-tree.h (BINFO_UNSHARED_MARKED): New #define. + * class.c (force_canonical_binfo_r): Move + BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move + virtual bases unless they're primary and what they're primary + too has been moved. + (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope + with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and + BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most + derived binfo. + (mark_primary_bases): Use BINFO_UNSHARED_MARKED. + (layout_nonempty_base_or_field): Add most derived type + parameter. Adjust. + (layout_empty_base): Likewise. + (build_base_field): Likewise. + (build_base_fields): Likewise. + (propagate_binfo_offsets): Add most derived type + parameter. Skip non canonical virtual bases too. + (dfs_set_offset_for_unshared_vbases): Don't skip primary + bases. Do skip canonical bases. + (layout_virtual_bases): Adjust. + (layout_class_type): Adjust. + (dfs_get_primary_binfo): Build list of virtual primary base + candidates. + (get_primary_binfo): Check that the shared virtual primary + base candidate was found first. + (accumulate_vtbl_inits): Don't do anything for non-vptr + containing binfos. For case 1 primary virtual bases, keep + checking that we've not emerged from the hierarchy of RTTI_BINFO. + +2001-06-12 Nathan Sidwell + + PR c++/3089 + * class.c (dfs_accumulate_vtbl_inits): Always walk down the + hierarchy looking for primary bases for a ctor + vtable. Recursively call oneself, if we meet our primary via + this route and haven't met it yet via inheritance graph order. + +2001-06-11 Mark Mitchell + + * lang-options.h: Emit documentation for -fno-honor-std, not + -fhonor-std. + +2001-06-10 Alexandre Oliva + + * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]: + Don't clobber delta. + (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn. + +2001-06-10 Mark Mitchell + Gabriel Dos Reis + + * Make-lang.in (cp/call.o): Depend on diagnostic.h + (cp/typeck.o): Depend on diagnostic.h + (cp/typeck2.o): Depend on diagnostic.h + (cp/repo.o): Depend on dignostic.h + * typeck.c: #include diagnostic.h + (convert_for_initialization): Remove extern declaration for + warningcount and errorcount. + + * call.c: #include diagnostic.h + (convert_like_real): Remove extern declaration for warnincount and + errorcount. + + * repo.c: #include diagnostic.h + * typeck2.c: #include diagnostic.h + +2001-06-08 Nathan Sidwell + + * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko + in previous change. + +2001-06-08 Nathan Sidwell + + PR c++/2929 + * friend.c (do_friend): Use push_decl_namespace for classes at + namespace scope. + +2001-06-08 Nathan Sidwell + Jason Merrill + + PR c++/3061 + * class.c (build_secondary_vtable): Use assert, rather than an error + message. + (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL. + (dfs_accumulate_vtbl_inits): A lost primary virtual base may + be between ORIG_BINFO and RTTI_BINFO, but neither of them. + Don't set BINFO_VTABLE for a primary virtual base. + +2001-06-07 Mark Mitchell + + * decl.c (duplicate_decls): Update source position information + when a template function is defined. + +2001-06-07 Phil Edwards + + * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. + +2001-06-07 Nathan Sidwell + + PR c++/2914 + * decl.c (pushtag): Don't push into a complete type's scope. + +2001-06-06 Jason Merrill + + * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose. + (struct lang_decl_flags): Lose generate_with_vtable_p. + (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose. + * class.c (copy_virtuals): Adjust. + * decl2.c (mark_vtable_entries): Adjust. + * method.c (make_thunk, build_vtable_entry): Adjust. + * class.c (update_vtable_entry_for_fn): Only look as far as the + first defining class. + (build_vtbl_initializer): Put nothing in the slot for a function only + defined in a lost primary virtual base. + (add_vcall_offset_vtbl_entries_1): Use the same code for + the lost primary case and the normal case. + (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base. + (get_vfield_offset, get_derived_offset): Lose. + (dfs_find_final_overrider): Use look_for_overrides_here. + (get_matching_virtual): New fn. + * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P, + not BV_VCALL_INDEX. + * search.c (look_for_overrides_here): Split out from... + (look_for_overrides_r): Here. + + * class.c (find_final_overrider): Return error_mark_node on error. + + * decl2.c (key_method): #if 0 accidental change. + +2001-06-06 John David Anglin + + * call.c (convert_default_arg): Use INTEGRAL_TYPE_P. + (build_over_call): Likewise. + * decl.c (grokparms): Likewise. + * pt.c (tsubst_decl): Likewise. + * typeck.c (convert_arguments): Likewise. + +2001-06-05 Mark Mitchell + + * semantics.c (begin_class_definition): Robustify. + + * pt.c (instantiate_decl): Tell the repository code about the + clones, not the cloned functions. + * repo.c (repo_template_used): Explicitly instantiate the cloned + function, not the clones. + +2001-06-05 Nathan Sidwell + + * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and + ICS_BAD_FLAG on created conversion. + (compare_ics): Break out rank. + +2001-06-05 Nathan Sidwell + + * decl.c (xref_tag): Remove extraneous %s on dependent name + lookup warning. + +2001-06-05 Nathan Sidwell + + * class.c (layout_vtable_decl): Fix off by one error on + build_index_type. + (build_vtt): Likewise. + (build_ctor_vtbl_group): Likewise. + +2001-06-05 Nathan Sidwell + + * class.c (maybe_indent_hierarchy): New function. + (dump_class_hierarchy_r): Add flags. Dump extra binfo + information, if enabled. Use maybe_indent_hierarchy. Adjust + output format. + (dump_class_hierarchy): Adjust prototype. Adjust output format. + (dump_array, dump_vtable, dump_vtt): New functions. + (finish_struct_1): Adjust hierarchy dumping. + (initialize_vtable): Call dump_vtable. + (build_vtt): Call dump_vtt. + (build_ctor_vtbl_group): Call dump_vtable. + * decl2.c (flag_dump_class_layout): Remove. + (cxx_decode_option): Remove dump translation unit + and dump class hierarchy check. Call dump_switch_p. + (finish_file): Adjust dumping. + (dump.c): Only dump base classes if not TDF_SLIM. + Only dump namespace members if not TDF_SLIM. + * optimize.c (dump_function): New function. + (optimize_function): Call dump_function. + * semantics.c (expand_body): Use dump_enabled_p. + +2001-06-01 Nathan Sidwell + + PR g++/2936 + Part missed from first commit + * decl2.c (finish_anon_union): Copy context. + +2001-05-30 Nathan Sidwell + + PR g++/2936 + * optimize.c (remap_decl): Remap anonymous aggregate members too. + +2001-05-26 Nathan Sidwell + + PR g++/2823 + * semantics.c (expand_body): Don't optimize thunks. + +2001-05-25 Sam TH + + * cp-tree.h lex.h: Fix header include guards. + +2001-05-25 Mark Mitchell + + * decl.c (init_decl_processing): Tweak. + +2001-05-24 Mark Mitchell + + * decl.c (duplicate_decls): Tidy. + (init_decl_processing): Always set flag_no_builtin. + +2001-05-24 Nathan Sidwell + + PR c++/2184 + * decl2.c (do_local_using_decl): Push the decls, even in a + template. + +2001-05-22 Mark Mitchell + + * optimize.c (initialize_inlined_parameters): Don't set + TREE_READONLY for a VAR_DECL taking the place of an inlined + PARM_DECL. + +2001-05-22 Jason Merrill + + * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support. + * tree.c (cp_valid_lang_attribute): Warn about use of com_interface + attribute. + +2001-05-22 Joseph S. Myers + + * parse.y: Refer to compound literals as such, not as + constructor-expressions. + +2001-05-21 Mark Mitchell + + * call.c (build_op_delete_call): Ignore exception-specifications + when looking for matching delete operators. + * init.c (build_new_1): Compute whether or not the allocation + function used is a placement allocation function or not, and + communicate this information to build_op_delete_call. + +2001-05-21 Jason Merrill + + * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi. + (build_vtbl_ref): Adjust. + (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address. + * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks. + Re-add vtable-gc. + (unsupported_options): Correspondingly. + + * decl2.c (maybe_make_one_only): Check flag_weak, not + supports_one_only(). + + * cp-tree.def (START_CATCH_STMT): Lose. + * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS. + * tree.c (cp_statement_code_p): Don't case it. + * semantics.c (cp_expand_stmt): Likewise. + * cp-tree.h (START_CATCH_TYPE): Lose. + (HANDLER_TYPE): New. + * except.c (expand_start_catch_block): Don't start any blocks. + Return the type. + (expand_end_catch_block): Don't end any blocks. + * parse.y (handler): Don't pass anything from finish_handler_parms + to finish_handler. + * pt.c (tsubst_expr): Likewise. + * semantics.c (begin_handler): Call note_level_for_catch here. + (finish_handler_parms): Don't return anything. + (genrtl_catch_block, begin_catch_block): Lose. + (genrtl_handler): Call expand_start_catch here. + +2001-05-18 Jason Merrill + + * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here. + (get_vtable_decl, build_vtt): Not here. + +2001-05-20 Nathan Sidwell + + PR c++/2781 + * optimize.c (update_cloned_parm): Copy addressability and other + flags. + +2001-05-20 Kriang Lerdsuwanakij + + * pt.c (determine_specialization): Ignore artificial functions. + +2001-05-20 Neil Booth + + * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. + (C_RID_CODE): Remove. + * lex.c (cxx_init_options): Call set_identifier_size. Update. + (init_parse): Don't do it here. + +2001-05-18 Diego Novillo + + * decl2.c (finish_objects): Use the original SYMBOL_REF from the + function declaration to avoid stripping the symbol's attributes. + +2001-05-18 Nathan Sidwell + + * decl.c (pushdecl): Adjust error string. + (xref_tag): Adjust friend class injection warning. Remove the + inherited name from the class shadowed scope. + +2001-05-17 Mark Mitchell + + * except.c (cp_protect_cleanup_actions): New function. + (init_exception_processing): Don't set protect_cleanup_actions + here. Do set lang_protect_cleanup_actions. + +2001-05-16 Nathan Sidwell + + * spew.c (read_token): Call yyerror on all unexpected tokens. + +2001-05-16 Nathan Sidwell + + * init.c (member_init_ok_or_else): Take a tree rather than + string for name. + (expand_member_init): Adjust. + +2001-05-14 Nick Clifton + + * decl.c (duplicate_decls): Suppress warning about duplicate + decls if the first decl is a friend. + +2001-05-12 Zack Weinberg + + * except.c (choose_personality_routine): Export. Add + explanatory comment. Take an enum languages, not a boolean. + (initialize_handler_parm): Adjust to match. + * cp-tree.h: Prototype choose_personality_routine. + * lex.c (handle_pragma_java_exceptions): New function. + (init_cp_pragma): Register #pragma GCC java_exceptions. + +2001-05-12 Neil Booth + + * method.c (build_mangled_C99_name): Remove unused prototype. + +2001-05-12 Alexandre Oliva + + * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type. + * typeck.c (get_member_function_from_ptrfunc, + build_ptrmemfunc, expand_ptrmemfunc_cst): Take + TARGET_PTRMEMFUNC_VBIT_LOCATION into account. + + Reverted Geoff Keating's 2001-05-03's patch. + +2001-05-11 Ira Ruben + + * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h. + +2001-05-11 Neil Booth + + * cp-tree.h (finish_label_expr, lookup_label): Delete. + * parse.y: Update for '&&'; don't issue warning here. + * semantics.c (finish_label_expr): Delete. + +2001-05-07 Mark Mitchell + + * splay-tree.h (splay_tree_max): New function. + (splay_tree_min): Likewise. + +2001-05-03 Geoffrey Keating + + * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER. + (pfn_vflag_identifier): Define. + Update comment about layout of pointer functions. + (build_ptrmemfunc1): Update prototype. + (expand_ptrmemfunc_cst): Update prototype. + * decl.c (initialize_predefined_identifiers): Initialize + pfn_vflag_identifier. + (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add + an extra field to the type. + * expr.c (cplus_expand_constant): Pass 'flag' between + expand_ptrmemfunc_cst and build_ptrmemfunc1. + * typeck.c (get_member_function_from_ptrfunc): When + FUNCTION_BOUNDARY < 16, look at additional field to determine + if a pointer-to-member is a real pointer or a vtable offset. + (build_ptrmemfunc1): Add new parameter to contain extra field. + (build_ptrmemfunc): Pass the extra field around. + (expand_ptrmemfunc_cst): Add new parameter to return extra field. + (pfn_from_ptrmemfunc): Ignore the extra field. + +2001-05-03 Mark Mitchell + + * cp-tree.h (flag_inline_trees): Update documentation. + * decl.c (init_decl_processing): Adjust handling of + flag_inline_functions and flag_inline_trees to support -O3. + (grokfndecl): Set DECL_INLINE on all functions if that's what + the user requested. + (save_function_data): Clear DECL_INLINE in + current_function_cannot_inline is non-NULL. + * decl2.c (flag_inline_trees): Update documentation. + +2001-05-03 Nathan Sidwell + + * dump.c (cp_dump_tree, USING_STMT case): New case. + * tree.c (cp_statement_code_p): Add USING_STMT. + * decl2.c (do_using_directive): Add the using directive statement. + + * tree.c (walk_tree): Reformat an if block. + +2001-05-02 Mark Mitchell + + * decl.c (compute_array_index_type): Don't try to do anything with + the indices when processing a template. + +2001-05-02 Kaveh R. Ghazi + + * call.c: NULL_PTR -> NULL. + * class.c: Likewise. + * cvt.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * except.c: Likewise. + * init.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + +2001-05-02 Mark Mitchell + + * decl2.c (do_using_directive): Revert previous patch. + +2001-05-01 Nathan Sidwell + + * cp-tree.def (USING_STMT): New statement node. + * cp-tree.h (USING_STMT_NAMESPACE): New macro. + * decl2.c (do_using_directive): Add USING_STMT to statement + tree. Don't emit errors when processing template decl. + * pt.c (tsubst_expr, USING_STMT case): New case. + * semantics.c (cp_expand_stmt, USING_STMT case): New case. + +2001-05-01 Nathan Sidwell + + * call.c (build_new_op): Convert args from reference here. + (build_conditional_expr): Don't convert here. + +2001-05-01 Nathan Sidwell + + * spew.c (last_token_id): New static variable. + (read_token): Set it here. + (yyerror): Use it here. + +2001-04-30 Richard Henderson + + * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations. + * decl.c: Likewise. + +2001-04-30 Mark Mitchell + + * gxxint.texi: Remove. + * Make-lang.in: Remove all traces of gxxint.texi. + +2001-04-30 Mark P Mitchell + + * decl2.c (start_static_initialization_or_destruction): Correct + logic to handle the -fno-use-cxa-atexit case. + +2001-04-30 Mark Mitchell + + * optimize.c (update_cloned_parm): New function. + (maybe_clone_body): Use it. Update the `this' parameter too. + +2001-04-29 Joseph S. Myers + + * decl2.c (unsupported_options): Add new-abi. + * lang-options.h: Remove no longer supported options. + +2001-04-27 Nathan Sidwell + + * except.c (can_convert_eh): Don't check template parms, + typename types etc. + +2001-04-27 Nathan Sidwell + + * optimize.c (maybe_clone_body): Copy parameter names and locations. + +2001-04-27 Nathan Sidwell + + * cp-tree.h (adjust_clone_args): Prototype new function. + * class.c (adjust_clone_args): New function. + * decl.c (start_function): Call it for in charge ctors. + +2001-04-26 Mark Mitchell + + * method.c (use_thunk): Make sure that thunks really are emitted + when requested. + +2001-04-26 Nathan Sidwell + + * mangle.c (write_chars): New macro. + (hwint_to_ascii): New function + (write_number): Use it. + (write_integer_cst): Deal with really big numbers. + +2001-04-25 Mark Mitchell + + * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting + the clone. + +2001-04-25 Nathan Sidwell + + * decl.c (grokdeclarator): Set context of namespace scope + TYPE_DECLS. + +2001-04-24 Zack Weinberg + + * cp/optimize.c: Include hashtab.h. + (struct inline_data): Add tree_pruner. + (expand_call_inline, expand_calls_inline): Use it when calling + walk_tree. + (optimize_function): Initialize and free tree_pruner. + +2001-04-24 Nathan Sidwell + + Lazy __FUNCTION__ generation. + * cp-tree.def (FUNCTION_NAME): Remove. + * cp-tree.h (function_name_declared_p): Remove. + (cp_fname_init): Prototype. + * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids, + don't call declare_function_name. Call start_fname_decls. + (cp_make_fname_decl): Adjust parameters. Generate the name. Don't + clobber the line number. + (cp_fname_init): New function. + (start_function): Call start_fname_decls. + (finish_function): Call finish_fname_decls. + * lex.c (reswords): Add slots for __FUNCTION__ et al. + (rid_to_yy): Add mappings for __FUNCTION__ et al. + * optimize.c (maybe_clone_body): Remove function_name_declared_p. + * parse.y (VAR_FUNC_NAME): New token. + (primary): Add VAR_FUNC_NAME. + * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's + generation. + (tsubst, FUNCTION_NAME case): Remove. + (tsubst_copy, FUNCTION_NAME case): Remove. + (tsubst_expr, DECL_STMT case): Be careful with a + DECL_PRETTY_FUNCTION_P. + (instantiate_decl): Remove function_name_declared_p. + * semantics.c (begin_compound_statement): Don't call + declare_function_name here. + (setup_vtbl_ptr). Don't save & restore function_name_declared_p. + (finish_translation_unit): Call finish_fname_decls. + (expand_body): Remove function_name_declared_p. + * typeck2.c (digest_init): Allow any ERROR_MARK. + +2001-04-24 Nathan Sidwell + + * pt.c (tsubst_decl): Use VOID_TYPE_P. + * semantics.c: Fix some typos. + +2001-04-23 Phil Edwards + + * cp/decl2.c (flag_honor_std): Always initialize to 1. + +2001-04-22 Kaveh R. Ghazi + + * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf. + +2001-04-23 Jason Merrill + + * except.c (build_throw): Wrap the initialization of the exception + object in a MUST_NOT_THROW_EXPR. + (do_free_exception): #if 0. + +2001-04-20 Mark Mitchell + + * cp-tree.h (finish_enum): Change prototype. + * decl.c (finish_enum): Reorganize. + * parse.y (structsp): Adjust calls to finish_enum. + +2001-04-20 Nathan Sidwell + + * tree.c (cp_tree_equal): Adjust final switch formatting. Add + 't' case. + +2001-04-20 Nathan Sidwell + + * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED. + (layout_empty_base): Return at end flag. + (build_base_field): Likewise. + (build_base_fields): Likewise. + (layout_virtual_bases): Don't add 1 to eoc value. + (end_of_class): Use full size for empty bases. + (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended + empty bases. Don't add 1 to eoc value. Only add trailing padding + if we're an empty class with no empty bases. + (dump_class_hierarchy): Dump size and alignment. + +2001-04-20 Jakub Jelinek + + * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and + ICS_BAD_FLAG. + +2001-04-20 Jakub Jelinek + + * search.c (lookup_field_r): If looking for type and non-TYPE_DECL + is found, look first if name does not match the structure name. + +2001-04-19 Mark Mitchell + + * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is + set. + (SET_DECL_LANGUAGE): New macro. + * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE. + (pushdecl): Likewise. + (build_library_fn_1): Likewise. + (build_cp_library_fn): Likewise. + (grokfndecl): Likewise. + (grokvardecl): Mark `extern "C"' variables as having C linkage. + * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE. + * lex.c (retrofit_lang_decl): Likewise. + * mangle.c (mangle_decl_string): Don't mangle the names of + variables declared with C language linkage. + * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE. + +2001-04-18 John David Anglin + + * semantics.c (simplify_aggr_init_exprs_r): Don't restore + flag_access_control from uninitialized storage. + +2001-04-15 Mark Mitchell + + * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation. + * mangle.c (write_pointer_to_member_type): Fix mangling of + pointers to cv-qualified member function types. + + * init.c (build_delete): Create a SAVE_EXPR for the address if + we're going to use it more than once. + +2001-04-13 Mark Mitchell + + * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove. + (expand_ptremfunc_cst): Change prototype. + (delta2_from_ptrmemfunc): Remove. + * expr.c (cplus_expand_constant): Adjust call to + expand_ptrmemfunc_cst. + * typeck.c (build_ptrmemfunc1): Simplify. + (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still + results in a constant. + (expand_ptrmemfunc_cst): Remove idx and delta2 parameters. + (delta2_from_ptrmemfunc): Remove. + (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst. + +2001-04-12 Jason Merrill + + * cp-tree.h (decl_namespace_list): New macro. + (struct saved_scope): Add decl_ns_list. + * decl.c (mark_saved_scope): Mark it. + * decl2.c: Lose static decl_namespace_list. + (init_decl2): Don't save it. + +2001-04-12 Kaveh R. Ghazi + + * cp-tree.h (warn_return_type, yylex): Delete redundant + declarations. + + * decl.c (current_class_depth, global_namespace): Likewise. + + * decl2.c (current_class_depth, flag_gnu_xref): Likewise + + * repo.c (flag_use_repository): Likewise. + +2001-04-12 Kaveh R. Ghazi + + * cp-tree.h (pedantic, convert, global_bindings_p, insert_block, + set_block, pushdecl, getdecls, gettags, init_decl_processing, + maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p, + lvalue_or_else, print_lang_statistics, comp_target_types, + unsigned_type, signed_type, signed_or_unsigned_type, + build_function_call, mark_addressable, incomplete_type_error): + Delete redundant declarations. + +2001-04-11 Jason Merrill + + * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro. + (TYPE_ANONYMOUS_P): New macro. + (TAGGED_TYPE_P): New macro. + * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P. + (grokfndecl, grokvardecl, grokdeclarator): Likewise. + * tree.c (no_linkage_helper): Likewise. + * semantics.c (begin_class_definition): Likewise. + * pt.c (convert_template_argument): Likewise. + * lex.c (check_for_missing_semicolon): Likewise. + +2001-04-12 Nathan Sidwell + + * class.c (dfs_unshared_virtual_bases): New function. + (mark_primary_bases): Call it. + (check_bases): Ignore virtual bases when determining + nearly-emptiness. + +2001-04-12 Nathan Sidwell + + * method.c (make_thunk): Clear DECL_CLONED_FUNCTION. + +2001-04-11 Mark Mitchell + + * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the + cloned function to the clone. + +2001-04-11 Kaveh R. Ghazi + + * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). + + * semantics.c: Include expr.h. + +2001-04-11 Nathan Sidwell + + * method.c (implicitly_declare_fn): Commonize code for copy ctor + and assignment op. Set TREE_USED for parameter. + +2001-04-10 Mark Mitchell + + * class.c (find_final_overrider_data): Add `candidates'. + (dfs_find_final_overrider): Don't issue error messages + prematurely. + (find_final_overrider): Issue error messages here. + (build_base_field): Don't warn about amgibuous direct bases here. + (warn_about_ambiguous_direct_bases): New function. + (layout_class_type): Use it. + +2001-04-10 Richard Henderson + + * typeck.c (build_array_ref): Push the array reference inside + COMPOUND_EXPR and COND_EXPR. + +2001-04-05 Mark Mitchell + + * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P. + * decl.c (duplicate_decls): Adjust accordingly. + (maybe_commonize_var): Likewise. + (grokfndecl): Likewise. + (start_function): Likewise. + (start_method): Likewise. + * decl2.c (key_method): Likewise. + (import_export_decl): Likewise. + * method.c (implicitly_declare_fn): Likewise. + * optimize.c (maybe_clone_body): Likewise. + +2001-04-05 Benjamin Kosnik + + * lang-specs.h: Add __DEPRECATED. + +2001-04-05 J"orn Rennecke + + * search.c (get_dynamic_cast_base_type): When building a new + constant, set its type to ssizetype. + +2001-04-04 Jakub Jelinek + + * optimize.c (expand_call_inline): Only add newly inlined statements + into inlined_stmts. + +2001-04-03 Mark Mitchell + + * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove. + (OPERATOR_FORMAT): Likewise. + (OPERATOR_TYPENAME_FORMAT): Likewise. + * operators.def: Remove old name-mangling information. + * decl.c (grok_op_properties): Adjust accordingly. + * lex.c (init_operators): Likewise. + * rtti.c (get_tinfo_decl): Issue error messages about types that + have variable size. + +2001-04-03 Mark Mitchell + + * decl2.c (import_export_decl): Don't call import_export_class + when processing an inline member function. + * semantics.c (expand_body): Call import_export_decl before + emitting inline functions. + +2001-03-28 Richard Henderson + + IA-64 ABI Exception Handling: + * cp-tree.def (EH_SPEC_BLOCK): New. + (MUST_NOT_THROW_EXPR): New. + * cp-tree.h: Update changed function declarations. + (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove. + (CPTI_CALL_UNEXPECTED): New. + (struct cp_language_function): Rename x_eh_spec_try_block + to x_eh_spec_block. + (EH_SPEC_STMTS, EH_SPEC_RAISES): New. + * decl.c (current_binding_level): If no current function + bindings, revert to scope_chain. + (initialize_predefined_identifiers): Remove __cp_push_exception. + (store_parm_decls): Use begin_eh_spec_block. + (finish_function): Use finish_eh_spec_block. + (mark_lang_function): Update for name changes. + * decl2.c (finish_file): No mark_all_runtime_matches. + * dump.c (cp_dump_tree): Handle new tree codes. + * error.c (dump_expr) [BIND_EXPR]: Fix typo. + * except.c (catch_language_init, catch_language): Remove. + (init_exception_processing): Don't set language code. + Initialize call_unexpected_node, protect_cleanup_actions, + eh_personality_libfunc, lang_eh_runtime_type. + (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove. + (get_eh_type, get_eh_caught, get_eh_handlers): Remove. + (prepare_eh_type): Split out type canonicalizations ... + (build_eh_type_type): ... from here. + (build_eh_type_type_ref): Remove. + (mark_all_runtime_matches): Remove. + (build_exc_ptr): New. + (do_begin_catch, do_end_catch): New. + (do_pop_exception): Remove. + (build_terminate_handler): Remove. + (choose_personality_routine): Split out language choice from ... + (initialize_handler_parm): ... here. + Use MUST_NOT_THROW_EXPR. + (expand_start_catch_block): Use do_begin_catch. Simplify Java + exception object handling. + (expand_start_eh_spec, expand_end_eh_spec): Remove. + (expand_exception_blocks, alloc_eh_object): Remove. + (begin_eh_spec_block, finish_eh_spec_block): New. + (do_allocate_exception, do_free_exception): New. + (expand_throw): Merge into ... + (build_throw): ... here. Update for abi. + * expr.c (cplus_expand_expr): No expand_internal_throw. + Handle MUST_NOT_THROW_EXPR. + * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK. + * semantics.c (*) Update for except.h name changes. + (genrtl_try_block): No protect_with_terminate. + (genrtl_eh_spec_block): New. + (genrtl_handler): Don't emit the goto here. + (cp_expand_stmt): Handle EH_SPEC_BLOCK. + (genrtl_finish_function): Don't expand_exception_blocks. + * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK. + +2001-03-28 Richard Henderson + + * decl.c (struct named_label_list): Rename eh_region to + in_try_scope, add in_catch_scope. + (struct binding_level): Rename eh_region to is_try_scope, + add is_catch_scope. + (note_level_for_try): Rename from note_level_for_eh. + (note_level_for_catch): New. + (poplevel): Copy both is_try_scope and is_catch_scope to + the named_label_list struct. + (check_previous_goto_1): Don't check for catch block via + DECL_ARTIFICIAL; use in_try_scope instead. + (check_goto): Likewise. + * cp-tree.h (note_level_for_try, note_level_for_catch): Declare. + * except.c (expand_start_catch_block): Call note_level_for_catch. + * semantics.c (begin_compound_stmt): Update for note_level_for_try. + +2001-03-27 Richard Henderson + + * except.c: Use USING_SJLJ_EXCEPTIONS instead of + exceptions_via_longjmp. + +2001-03-27 Phil Edwards + + * pt.c (check_default_tmpl_args): Make error messages clearer. + +2001-03-26 Phil Edwards + + * error.c: Also undefine 'A' macro used for cp_printers definition. + +2001-03-27 Kaveh R. Ghazi + + * Make-lang.in: Depend on $(SYSTEM_H), not system.h. + +2001-03-26 Mike Yang + Mark Mitchell + + * dump.c (dump_access): New function. + (cp_dump_tree): Use it. Dump basetype information for class + types. + +2001-03-26 Mark Mitchell + + * Makefile.in (optimize.o): Depend on params.h. + (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. + (init_decl_processing): Set flag_no_inline when doing + inlining-on-trees. + * optimize.c: Include params.h. + (struct inline_data): Improve documentation of FNS. Add + FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. + (INSNS_PER_STMT): New macro. + (remap_block): Use CLONING_P. + (inlinable_function_p): Don't inline big functions. + (expand_call_inline): Keep track of how much inlining we've done. + (optimize_function): Set FIRST_INLINED_FN. + (maybe_clone_body): Set CLONING_P. + * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in + tree nodes. + (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling + rest_of_compilation. Clear DECL_RTL for local variables + afterwards. + (clear_decl_rtl): New function. + +2001-03-26 Nathan Sidwell + + Implement DR 209 + * cp-tree.h (skip_type_access_control, + reset_type_access_control): Prototype. + * decl.c (grokdeclarator): Access of friends is not checked. + * parse.y (component_decl_list): Reset type access control. + * semantics.c (decl_type_access_control): Clear + current_type_lookups. + (save_type_access_control): Don't save if not deferring. + (skip_type_access_control, reset_type_access_control): New + functions. + (begin_class_definition): Do type access control for basetypes. + Start deferred access control. + (finish_class_definition): Resume immediate access control if + this is a local class. + +2001-03-25 Kaveh R. Ghazi + + * class.c (add_method): Use memcpy/memmove, not bcopy. + + * decl.c (duplicate_decls): Likewise. + +2001-03-23 Jakub Jelinek + + * mangle.c (write_discriminator): Use `_0' for discriminator 1, + not `_'. + +2001-03-23 Jakub Jelinek + + * decl.c (local_names): Define. + (push_local_name): New. + (grok_reference_init): Return init if initializing static reference + variable with non-constant instead of emitting it. + Move expand_static_init call to cp_finish_decl. + (layout_var_decl): Call push_local_name. + (maybe_commonize_var): Allow inlining functions even if they have + static local variables, use comdat_linkage for them if flag_weak. + (check_initializer): Call obscure_complex_init if + grok_reference_init returned nonzero. + (save_function_data): Clear x_local_names. + (pop_cp_function_context): Free x_local_names. + (mark_inlined_fns): Remove. + (mark_lang_function): Mark x_local_names. + (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P. + Mark inlined_fns as tree, remove call to mark_inlined_fns. + * class.c (alter_access): Ensure DECL_ACCESS is never set if + DECL_DISCRIMINATOR_P. + * cp-tree.h (cp_language_function): Add x_local_names. + (lang_decl_flags): Add discriminator into u2. + (lang_decl_inlined_fns): Remove. + (lang_decl): inlined_fns is now a TREE_VEC. + (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define. + * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a + TREE_VEC, not a custom structure. + (optimize_function): Likewise. + * mangle.c (discriminator_for_local_entity): Discriminate among + VAR_DECL local entities. + * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS + is not valid. + +2001-03-22 Bryce McKinlay + + Add support for Java interface method calls. + * cp-tree.h (struct lang_type): Add java_interface flag. + (TYPE_JAVA_INTERFACE): New macro. + * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute + by setting TYPE_JAVA_INTERFACE. + * call.c (java_iface_lookup_fn): New static. + (build_over_call): If calling a method declared in a + TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the + expression which resolves the function address. + (build_java_interface_fn_ref): New function. + +2001-03-22 Richard Henderson + + * Make-lang.in (cp/except.o): Don't depend on insn-flags.h. + * except.c: Don't include it. + +2001-03-22 Gerald Pfeifer + based on an idea from Joe Buck + + * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore): + New nonterminals. + (data_def, component_decl): Add reductions to bad_decl. + +2001-03-22 Jakub Jelinek + + * method.c (do_build_assign_ref): Don't use build_modify_expr for + anonymous aggregates, since they don't have assignment operator + method. + * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy + assignment operators for anonymous structure fields. + +2001-03-21 Jason Merrill + + * pt.c (instantiate_decl): Abort if we see a member constant + instantiation that doesn't already have its initializer. + Downgrade explicit instantiation without definition to pedwarn. + + * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove. + * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P. + (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P. + + * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove. + (pending_vtables): Remove. + * decl2.c (pending_vtables): Remove. + (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not + CLASSTYPE_VTABLE_NEEDS_WRITING. + (import_export_class): Likewise. + (init_decl2): Don't mark pending_vtables. + * lex.c (handle_pragma_vtable): Just sorry. + * pt.c (instantiate_class_template): Don't mess with + CLASSTYPE_VTABLE_NEEDS_WRITING. + (mark_class_instantiated): Likewise. + * ptree.c (print_lang_type): Don't print it. + * semantics.c (begin_class_definition): Don't set it. + + * pt.c (template_tail): Replace with last_pending_template. + (maybe_templates, maybe_template_tail): Remove. + (add_pending_template): Adjust. + (instantiate_pending_templates): Adjust. + + * cp-tree.h (struct saved_scope): Remove lang_stack field. + (current_lang_stack): Remove. + * decl.c (maybe_push_to_top_level): Don't initialize it. + (duplicate_decls): Use current_lang_depth. + (xref_basetypes): Likewise. + * class.c (current_lang_depth): New fn. + (push_lang_context): Use more varray functionality. + (pop_lang_context): Likewise. + + * error.c (GLOBAL_THING): Always use '__'. + +2001-03-21 Mark Mitchell + + * class.c (build_clone): Clear DECL_ASSEMBLER_NAME. + + * mangle.c (mangle_decl_string): Mangle the names of overloaded + operators, even when they have `extern "C"' linkage. + +2001-03-19 Mark Mitchell + + * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME, + COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME + where it's not necessary. + (add_method): Remove optimization involving comparison of + DECL_ASSEMBLER_NAME. + (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME, + COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME + where it's not necessary. + (check_methods): Likewise. + (build_clone): Likewise. + (built_vtt): Likewise. + * cp-tree.h (DECL_NEEDED_P): Likewise. + * decl.c (pushtag): Likewise. + (duplicate_decls): Likewise. + (pushdecl): Likewise. + (builtin_function): Likewise. + (build_library_fn_1): Set DECL_LANGUAGE for library functions. + (build_cp_library_fn): Likewise. + (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME, + COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME + where it's not necessary. + (make_rtl_for_nonlocal_decl): Likewise. + (cp_finish_decl): Likewise. + (grokfndecl): Likewise. + (grokvardecl): Likewise. + (grokdeclarator): Likewise. + (start_function): Likewise. + (cp_missing_return_ok_p): Likewise. + * decl2.c (grokclassfn): Likewise. + (check_classfn): Likewise. + (finish_static_data_member_decl): Likewise. + (grokfield): Likewise. + * error.c (GLOBAL_IORD_P): Remove. + (dump_global_iord): Improve output. + (dump_decl): Avoid using DECL_ASSEMBLER_NAME. + * except.c (nothrow_libfn_p): Summarily reject any function not in + namespace-scope. + * init.c (build_java_class_ref): Don't explicitly set + DECL_ASSEMBLER_NAME after calling mangle_decl. + * mangle.c (mangle_decl_string): Handle extern "C" functions. + (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl. + * method.c (set_mangled_name_for_decl): Don't explicitly set + DECL_ASSEMBLER_NAME after calling mangle_decl. + (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and + IDENTIFIER_GLOBAL_VALUE for the thunk. + * pt.c (set_mangled_name_for_template_decl): Remove. + (check_explicit_specialization): Don't use it. + (looup_template_class): Don't set DECL_ASSEMBLER_NAME. + (tsubst_friend_function): Likewise. + (tsubst_decl): Likewise. + (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME. + * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME, + COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME + where it's not necessary. + (tinfo_base_init): Likewise. + (create_real_tinfo_var): Likewise. + * search.c (looup_field_1): Likewise. + * semantics.c (finish_named_return_value): Likewise. + * tree.c (init_tree): Set lang_set_decl_assembler_name. + +2001-03-15 Gabriel Dos Reis + + Correct semantics restrictions checking in throw-expression. + * except.c (is_admissible_throw_operand): New function. + (build_throw): Use it. + +2001-03-14 Mark Mitchell + + * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ + and its ilk. + +2001-03-14 Mark Mitchell + + * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. + * cp-tree.h (DECL_IN_MEMORY_P): Likewise. + * decl.c (duplicate_decls): Likewise. + (builtin_function): Likewise. + (build_library_fn): Likewise. + (build_cp_library_fn): Likewise. + (check_initializer): Likewise. + (cp_finish_decl): Likewise. + * decl2.c (grokfield): Likewise. + (grok_function_init): Remove #if 0'd code. + (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. + * friend.c (do_friend): Likewise. + * init.c (get_temp_regvar): Likewise. + * method.c (make_thunk): Likewise. + * pt.c (tsubst_friend_function): Likewise. + (tsubst_decl): Likewise. + (regenerate_decl_from_template): Likewise. + * semantics.c (genrtl_named_return_value): Likewise. + (expand_body): Likewise. + (genrtl_finish_function): Likewise. + * tree.c (cp_tree_equal): Likewise. + +2001-03-12 Nathan Sidwell + + * call.c (convert_like_real): Add extra semantics to INNER + parameter. Don't convert to temporary if a user conversion + gives us an lvalue that we're about to bind to a reference. + Set INNER to indicate pending reference binding on recursive + calls. + +2001-03-10 Neil Booth + + * cp/lex.c: Delete duplicate pending_lang_change. + +2001-03-10 Neil Booth + + * cp/lex.c (handle_pragma_interface, handle_pragma_implementation): + Similarly. + * cp/repo.c (get_base_filename, open_repo_file): Similarly. + * cp/cp-tree.h: Remove file_name_nondirectory prototype. + +2001-03-09 Zack Weinberg + + * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. + +2001-03-08 Stan Shebs + + * cp-tree.h (set_identifier_local_value): Remove unused decl. + +2001-03-06 Zack Weinberg + + * spew.c: Remove references to CPP_OSTRING. + +2001-03-06 Andrew Haley + + * typeck.c (convert_arguments): Check that we have an fndecl. + +2001-03-05 Andrew Haley + + * typeck.c (convert_arguments): Don't do ellipsis conversion for + __built_in_constant_p. + +2001-03-02 Nathan Sidwell + + * typeck.c (build_static_cast): Allow enum to enum conversions + as per DR 128. + +2001-03-02 Nathan Sidwell + + * class.c (check_field_decls): Pointers to member do not a + non-pod struct make, as per DR 148. + +2001-03-02 Nathan Sidwell + + * call.c (joust): cp_pedwarn when using gnu extension concerning + worst conversion sequences. + +2001-03-01 Zack Weinberg + + * decl.c: Replace all uses of 'boolean' with 'bool'. + +2001-03-01 Zack Weinberg + + * lang-specs.h: Add zero initializer for cpp_spec field to + all array elements that need one. Don't put an #ifdef inside + the initializer list; set a default for CPLUSPLUS_CPP_SPEC and + use it. + +2001-03-01 Nathan Sidwell + + Implement using decls inside template functions. + * decl2.c (validate_nonmember_using_decl): Don't special case + fake_std_node in the global namespace. Don't reject early when + processing a template. + (do_local_using_decl): Add to statement tree. Don't do further + processing when building a template. + * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs. + +2001-03-01 Nathan Sidwell + + * decl2.c (do_nonmember_using_decl): Don't complain if we find + same function. Do complain about ambiguating extern "C" + declarations. + +2001-02-28 Nathan Sidwell + + Remove floating point and complex type template constant parms. + * pt.c (convert_nontype_argument): Remove REAL_TYPE and + COMPLEX_TYPE extensions. + (invalid_nontype_parm_type_p): Likewise. + +2001-02-27 Jeffrey Oldham + + * except.c (call_eh_info): Revert "match_function"'s type. + +2001-02-27 Nathan Sidwell + + Fix ctor vtable vcall offsets. + * class.c (struct vtbl_init_data_s): Add rtti_binfo member. + (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter. + (get_matching_base): Remove. + (get_original_base): New function. + (build_vtbl_initializer): Initialize vid.rtti_binfo. + Use a virtual thunk for a ctor vtable with an index + (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a + primary base within a constructor vtable. Only set + BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset + when primary base has been lost. + * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment. + +2001-02-26 Jeffrey Oldham + + * call.c (joust): Ensure more_specialized()'s argument length + parameter has correct value for constructors. + +2001-02-26 Nathan Sidwell + + * except.c (call_eh_info): Cleanup generation of cp_eh_info struct. + + * decl.c (mark_inlined_fns): Prototype. + +2001-02-22 Mark Mitchell + + * spew.c (yylex): Correct handling of friends. + +2001-02-22 Mark Mitchell + + * mangle.c (write_encoding): Pass write_function_type the + FUNCTION_DECL for the function being encoded. + (write_function_type): Pass it along to write_bare_function_type. + (write_bare_function_type): Pass it along to write_method_parms. + (write_method_parms): Don't mangle the compiler-generated + parameters to a constructor or destructor. + +2001-02-22 Andreas Jaeger + + * optimize.c: Include toplev.h for + note_deferral_of_defined_inline_function prototype. + +2001-02-22 Jakub Jelinek + + * cp-tree.h (struct lang_decl_inlined_fns): New. + (struct lang_decls): Add inlined_fns. + (DECL_INLINED_FNS): New macro. + * optimize.c (struct inline_data): Add inlined_fns. + (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro. + (inlinable_function_p): Likewise, fix typo in comment, + function is not inlinable if it already inlined function currently + being optimized. + (expand_call_inline): Add fn to inlined_fns if necessary. + (optimize_function): Initialize inlined_fns. + Save inlined_fns into DECL_INLINED_FNS after expanding inlines. + * decl.c (mark_inlined_fns): New function. + (lang_mark_tree): Call it. + +2001-02-21 Jason Merrill + + * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag. + (DECL_UNINLINABLE): Move to middle-end. + + * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn. + * decl.c (duplicate_decls): Preserve DECL_ABSTRACT. + * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone. + * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the + parms and outer BLOCK. note_deferral_of_defined_inline_function. + + * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on + second parm of op=. + +2001-02-19 Mark Mitchell + + * decl2.c (set_decl_namespace): Allow explicit instantiations in + any namespace. + +2001-02-18 Kriang Lerdsuwanakij + + * optimize.c (expand_call_inline): Don't walk subtrees of type + nodes. + +2001-02-18 Mark Mitchell + + * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry + for a destructor. + +2001-02-18 Jason Merrill + + Do put the VTT parameter in DECL_ARGUMENTS. + * cp-tree.h (struct cp_language_function): Add x_vtt_parm. + (current_vtt_parm): New macro. + (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm. + (DECL_HAS_VTT_PARM_P): New macro. + (DECL_VTT_PARM): Remove. + (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros. + * decl.c (duplicate_decls): Only copy the operator code if + appropriate. + (start_function): Set current_vtt_parm. + (lang_mark_tree): Don't mark vtt_parm. + * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to + DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P. + * class.c (build_clone): Maybe remove the VTT parm. + * optimize.c (maybe_clone_body): Set up the VTT parm. + * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm. + * call.c (build_over_call): Just allow the VTT arg. + * method.c (make_thunk): Don't set DECL_VTT_PARM. + (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM. + (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE. + * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise. + * error.c (dump_function_decl): Likewise. + * call.c (build_user_type_conversion_1, convert_like_real): Abort + if we try to call a constructor with in-charge or VTT parms. + * method.c (skip_artificial_parms_for): New fn. + * call.c (add_function_candidate, build_over_call): Call it. + * call.c (build_new_method_call): Use current_vtt_parm. + * init.c (expand_virtual_init): Likewise. + * class.c (same_signature_p): No longer static. + * cp-tree.h: Declare it. + * search.c (look_for_overrides_r): Use it. + +2001-02-17 Mark Mitchell + + * cp-tree.h (new_abi_rtti_p): Remove. + (name_mangling_version): Likewise. + (flag_do_squangling): Likewise. + * class.c (build_rtti_vtbl_entries): Remove old ABI support. + * decl.c (grokfndecl): Likewise. + * decl2.c (name_mangling_version): Remove. + (flag_do_squangling): Likewise. + (lang_f_options): Remove `squangle'. + (unsupported_options): Add `squangle'. + (cxx_decode_option): Issue a warning about uses of + -fname-mangling-version. + (finish_file): Remove old ABI support. + * pt.c (check_explicit_specialization): Likewise. + (tsubst_decl): Likewise. + * rtti.c (init_rtti_processing): Likewise. + (build_headof): Likewise. + (get_tinfo_decl_dynamic): Likewise. + (tinfo_from_decl): Likewise. + (build_dynamic_cast_1): Likewise. + (synthesize_tinfo_var): Likewise. + * init.c (build_new): Allow enumeration types for the array-bounds + in a direct-new-declarator. + + * semantics.c (finish_typeof): Resolve OFFSET_REFs. + + * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and + TREE_PROTECTED from the template being specialized. + +2001-02-17 Jason Merrill + + * decl2.c (build_artificial_parm): Set TREE_READONLY. + + * decl.c (bad_specifiers): Allow throw specs on things with + pointer-to-function or -member-function type. + * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize + a pmf. + +2001-02-17 Mark Mitchell + + * call.c (check_dtor_name): Handle template names correctly. + +2001-02-16 Jason Merrill + + * cp-tree.h (DECL_USE_VTT_PARM): Remove. + * decl2.c (maybe_retrofit_in_chrg): Don't create it. + * optimize.c (maybe_clone_body): Don't substitute it. + * call.c (build_new_method_call): Check in_chrg instead. + * init.c (expand_virtual_init): Likewise. + +2001-02-16 Gabriel Dos Reis + + * decl.c (check_tag_decl): Make sure a typedef for an anonymous + class-type introduces at least a type-name. + +2001-02-16 Jakub Jelinek + + * call.c (convert_like_real): Create a temporary for non-lvalue. + +2001-02-16 Jeffrey Oldham + + * cp-tree.h: Fix typos in comments. + +2001-02-16 Jason Merrill + + * optimize.c (remap_block): If we're compiling a clone, pass the + new block to insert_block. + +2001-02-16 Mark Mitchell + + * semantics.c (finish_asm_stmt): Robustify. + +2001-02-15 Mark Mitchell + + * pt.c (push_template_decl_real): Don't remangle the name of a + class template. + +2001-02-15 Jim Meyering + + * Make-lang.in (c++.install-common): Depend on installdirs. + (c++.install-info): Likewise. + (c++.install-man): Likewise. + +2001-02-15 Mark Mitchell + + * typeck2.c (build_m_component_ref): Robustify. + +2001-02-15 Alexandre Oliva + + * friend.c (do_friend): Don't take the nested [template] class + into account when deciding whether to warn about the friend + function not referring to a template function. + +2001-02-14 Jakub Jelinek + + * typeck.c (build_unary_op): Clarify error message. + +2001-02-08 Aldy Hernandez + + * parse.y (component_constructor_declarator): allow optional + parentheses around constructor class name. + +2001-02-14 Nathan Sidwell + + * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c + section. + * init.c (emit_base_init): Remove incorrect comment about + virtual bases. + * method.c (make_thunk): Fix comment alignment. + +2001-02-14 Nathan Sidwell + + Kill remnants of this is variable. + * cp-tree.h (flag_this_is_variable): Remove. + * decl2.c (flag_this_is_variable): Remove. + * class.c (fixed_type_or_null): Add cdtor parm. Adjust. + (build_vbase_path): The path is non-static, even in a cdtor. + (resolves_to_fixed_type_p): Add additional return value. + * search.c (init_vbase_pointers): Adjust. + * tree.c (lvalue_p_1): Adjust. + * typeck.c (mark_addressable): Adjust. + +2001-02-14 Nathan Sidwell + + * pt.c (unify): Don't check cv quals of array types. + +2001-02-14 Nathan Sidwell + + * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to + check whether we already have the type. + +2001-02-13 Mark Mitchell + + * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment. + * call.c (build_op_delete_call): Simplify to remove duplicate + code. + * class.c (clone_function_decl): Don't build the deleting variant + of a non-virtual destructor. + * decl.c (finish_destructor_body): Don't call delete if this is a + non-virtual destructor. + * init.c (build_delete): Explicitly call `operator delete' when + deleting an object with a non-virtual destructor. + +2001-02-13 Jason Merrill + + * lang-specs.h: Add more __EXCEPTIONS. + +2001-02-12 Nathan Sidwell + + * typeck2.c (process_init_constructor): Check + TREE_HAS_CONSTRUCTOR before issuing missing init warning. + +2001-02-12 Nathan Sidwell + + * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case): + Remove spurious information in comment. Allow further + adjustments of REFERENCE_TYPE args. + +2001-02-12 Nathan Sidwell + + * errfn.c (cp_deprecated): Tweak diagnostic text. + * parse.y (new_initializer): Deprecate initializer lists + extension. + +2001-02-12 Mark Mitchell + + Remove old ABI support. + +2001-02-11 Mark Mitchell + + * decl2.c (flag_vtable_thunks): Always set it to 1. + (flag_new_abi): Likewise. + * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI. + + * Makefile.in (g++spec.o): Fix typo. + +2001-02-09 Jason Merrill + + * lang-specs.h: Restore definition of __EXCEPTIONS. + +2001-02-08 Jason Merrill + + * search.c (shared_member_p): New function. + (lookup_field_r): Use it. + * cp-tree.h (SHARED_MEMBER_P): Remove. + + * method.c (process_overload_item): Handle template-dependent array + bounds. + * pt.c (type_unification_real): If we end up with undeduced nontype + parms, try again. + + * decl.c (lookup_name_real): Tweak warning to refer to decls, not + types. + + * typeck2.c (friendly_abort): Don't say anything if we have + earlier errors or sorries. + + * decl.c (check_tag_decl): Notice attempts to redefine bool and + wchar_t. Ignore if in_system_header. + + * decl.c (maybe_push_cleanup_level): New fn... + (start_decl_1): ...split out from here. + * cvt.c (build_up_reference): Use it. + * cp-tree.h: Declare it. + +2001-02-07 Mark Mitchell + + * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor + spec. + +2001-02-06 Nathan Sidwell + + * pt.c (lookup_template_class): Make sure it's a primary + template or template_template_parm when called from the parser. + (instantiate_template_class): Add assertion. + +2001-02-05 Alexandre Oliva + + * method.c (build_mangled_name) [old abi]: Protect flush_repeats() + from error_mark_node. + +2001-02-05 Nathan Sidwell + + Fix specification and implementation bugs in V3 ABI + construction vtables. + * cp-tree.h (flag_dump_class_layout): New flag. + (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove. + (BINFO_LOST_PRIMARY_P): New flag. + (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts. + (BINFO_PRIMARY_MARKED_P): Rename to ... + (BINFO_PRIMARY_P): ... here. + (binfo_via_virtual): New prototype. + * decl2.c (flag_dump_class_layout): New flag. + (cxx_decode_option): Set it. Adjust -fdump-translation-unit to + use `=' as a file name separator. + * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary + bases. + (build_vtbl_address): If this is a virtual primary base, then + get the vtbl of what it is ultimately primary for. + * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust + for BINFO_PRIMARY_P. + (dfs_skip_nonprimary_vbases_markedp): Likewise. + (get_shared_vbase_if_not_primary): Likewise. + (dfs_get_pure_virtuals): Likewise. + (expand_upcast_fixups): Likewise. + (fixup_virtual_upcast_offsets): Likewise. + (dfs_find_vbase_instance): Likewise. + (find_vbase_instance): Likewise. + (binfo_from_vbase): Adjust comment to reflect reality. + (binfo_via_virtual): New function. + * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros + for binfo walking during VTT construction. + (dfs_mark_primary_bases): Remove. + (force_canonical_binfo_r): New function. + (force_canonical_binfo): New function. + (mark_primary_virtual_base): New function. + (mark_primary_bases): Walk in inheritance graph order, use + mark_primary_virtual_base. + (determine_primary_base): Use some more intermediate variables. + (dfs_find_final_overrider): Don't check for overriding along a + virtual path. + (dfs_modify_vtables): Walk into primary virtual bases too. + (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P. + (build_base_fields): Likewise. + (dfs_set_offset_for_unshared_vbases): Likewise. + (layout_virtual_bases): Likewise. + (end_of_class): Likewise. + (finish_struct_1): Call dump_class_hierarchy, if requested. + (dfs_get_primary_binfo): Use BINFO_TYPE for binfos. + (dump_class_hierarchy_r): Add stream parameter. Emit more information. + (dump_class_hierarchy): Add file parameter. Append to file, if + required. + (finish_vtbls): Adjust accumulate_vtbl_inits call. + Use canonical base for virtual bases. + (build_vtt): Add more comments. Adjust build_vtt_inits call. + (build_vtt_inits): Remove VIRTUAL_VTTS_P parm. + Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P, + VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for + virtual VTTs. + (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P + from DATA. We want virtual primary bases and all bases via virtual. + Only set BINFO_VPTR_INDEX for top level. Look up from a primary + virtual base when not a construction vtable. + (dfs_ctor_vtable_bases_queue_p): New DFS predicate. + (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call. + Use canonical bases when processing virtual bases. + (accumulate_vtbl_inits): We're interested in any base via a + virtual path. + (dfs_accumulate_vtbl_inits): If this is a primary virtual base + within a construction vtable, determine what is being overridden. + (build_vtbl_initializer): Add more comments + (add_vcall_offset_vtbl_entries_1): Adjust comment. + (build_rtti_vtbl_entries): Check if the base has lost its + primary. + +2001-02-05 Mark Mitchell + + * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES. + +2001-02-04 Richard Kenner + + * decl.c (pushdecl): Call abort instead of fatal. + * except.c (decl_is_java_type): Call fatal_error instead of fatal. + * init.c (build_new_1): Likewise. + (build_java_class_ref): Call internal_error and fatal_error, not fatal. + * decl.c (build_typename_type): hash_table_init now returns void. + decl.c (init_decl_processing): Make an error non-fatal. + +2001-02-04 Mark Mitchell + + * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting. + Document. + (CLASSTYPE_INTERFACE_KNOWN): Likewise. + (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. + (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. + (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. + * decl.c (maybe_commonize_var): Use the new name-mangling where + appropriate. + * decl2.c (comdat_linkage): Enhance comments. Make all + compiler-generated things static, if COMDAT is not available. + (get_tinfo_decl): Do not make typeinfo objects that belong in the + library COMDAT. + (tinfo_base_init): Use the correct mangled name for typeinfo + strings, and push them into the global scope. + (typeinfo_in_lib_p): New function. + (synthesize_tinfo_var): Use it. + (create_real_tinfo_var): Likewise. + +2001-02-03 Jakub Jelinek + + * decl.c (push_class_binding): Use context_for_name_lookup instead + of CP_DECL_CONTEXT. + * search.c (context_for_name_lookup): Remove static. Check for NULL + context in the loop. + * cp-tree.h (context_for_name_lookup): Add prototype. + +2001-02-02 Jakub Jelinek + + * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. + * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): + Remove. + * call.c (convert_class_to_reference, build_user_type_conversion_1, + add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. + +2001-02-02 Mark Mitchell + + * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list + of macros used when compiling g++spec.c. + * g++spec.c (lang_specific_driver): Link with the shared + libgcc by default. + +2001-01-29 Joseph S. Myers + + * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator, + make_reference_declarator, make_call_declarator), method.c + (implicitly_declare_fn), parse.y (namespace_using_decl, + notype_unqualified_id, expr_or_declarator, new_type_id, + after_type_declarator, direct_after_type_declarator, + notype_declarator, complex_notype_declarator, + complex_direct_notype_declarator, qualified_id, + notype_qualified_id, overqualified_id, direct_new_declarator, + absdcl, direct_abstract_declarator, conversion_declarator), pt.c + (tsubst), semantics.c (begin_constructor_declarator): Use build_nt + instead of build_parse_node. + +2001-01-28 Kaveh R. Ghazi + + * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE. + (minus_one_node): Moved to top level gcc directory. Renamed + to integer_minus_one_node. + + * init.c (init_init_processing): Don't set minus_one_node. + (build_vec_init): Use integer_minus_one_node. + + * rtti.c (get_tinfo_decl_dynamic): Likewise. + +2001-01-28 Jakub Jelinek + + * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments + identical and they would be replaced with constant, remove + MODIFY_EXPR from the tree. + +2001-01-27 Kaveh R. Ghazi + + * Make-lang.in: Remove all dependencies on defaults.h. + * call.c: Don't include defaults.h. + * decl.c: Likewise. + * decl2.c: Likewise. + * except.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + +2001-01-25 Jakub Jelinek + + * mangle.c (write_mangled_name, write_encoding): Mangle overloaded + operators even in "C" linkage. + * method.c (set_mangled_name_for_decl): Likewise. + * decl.c (grokfndecl): Call set_mangled_name_for_decl even for + overloaded operators in "C" linkage. + +2001-01-24 Nathan Sidwell + + * pt.c (tsubst_decl): Remove IN_DECL parameter. + (tsubst_arg_types): Check parameter is not void. + (tsubst): Adjust tsubst_decl call. + +2001-01-24 Nathan Sidwell + + * call.c (add_builtin_candidate): Quote std properly, from + previous change. + +2001-01-23 Kriang Lerdsuwanakij + + * pt.c (check_explicit_specialization): Clone constructors and + destructors. + +2001-01-23 Nathan Sidwell + + * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC + indicates anything special about template depth. Make sure we + only count the user visible template classes. + +2001-01-23 Nathan Sidwell + + * call.c (build_conv): Typo in comment. + (add_builtin_candidate): Add more explanation. + Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR. + Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates + when we have enumeral types. + (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE + candidates for relops and eqops. + (joust): Simplify control flow. Allow a non-template user + function to hide a builtin. + +2001-01-22 Nathan Sidwell + + * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER. + (more_specialized): Add deduction parameter. + * call.c (joust): Adjust more_specialized call. + * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL, + UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags. + (get_bindings_order): Remove. + (get_bindings_real): Add DEDUCE parameter. + (maybe_adjust_types_for_deduction): Return extra unify flags. Do + REFERENCE_TYPE jig for DEDUCE_ORDER. + (type_unification_real): Deal with DEDUCE_ORDER. Use result of + maybe_adjust_types_for_deduction. + (more_specialized): Add DEDUCE parameter. Call get_bindings_real + directly. + (try_one_overload): Use result of maybe_adjust_types_for_deduction. + (check_cv_quals_for_unify): Use new unify qualifier flags. + (unify): Clear new unify qualifier flags. + (get_bindings_real): Add DEDUCE parameter. + (get_bindings): Adjust call to get_bindings_real. + (get_bindings_overload): Likewise. + (most_specialized_instantiation): Adjust call to + more_specialized. + +2001-01-19 Jason Merrill + + * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI. + + * decl.c (init_decl_processing): Just force -fvtable-thunks on if + -fnew-abi. + +2001-01-19 Ute Pelkmann + + * decl2.c (arg_assoc_class): Fix double iteration logic. + +2001-01-19 Jason Merrill + + * init.c (build_delete): Always call convert_force to strip cv-quals. + + * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI. + * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI. + * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI. + +2001-01-19 Nathan Sidwell + + * search.c (get_vbase_1): Count only virtual bases. + +2001-01-19 Nathan Sidwell + + * class.c (duplicate_tag_error): Robustify flag clearing. + +2001-01-19 Nathan Sidwell + + * cp-tree.h (lookup_template_class): Add complain parm. + * decl.c (lookup_namespace_name): Adjust call to + lookup_template_class. + (make_typename_type): Likewise. + * semantics.c (finish_template_type): Likewise. + * pt.c (lookup_template_class): Add complain parm. Adjust. + (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class. + (tsubst): Likewise. + +2001-01-19 Nathan Sidwell + + * pt.c (copy_default_args_to_explicit_spec): Preserve + object's CV quals. Reorganize. + +2001-01-18 Nathan Sidwell + + * typeck.c (build_modify_expr): Say `initialization' for + INIT_EXPRs. + * init.c (build_default_init): Convert to enumeral type, if + needed. + +2001-01-18 Jakub Jelinek + + * parse.y (nomods_initdcl0): Properly set things up for + initdcl0_innards. + +2001-01-18 Nathan Sidwell + + * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag. + (type_unification_real): Set it. + (unify): Use it. + +2001-01-18 Nathan Sidwell + + * decl.c (finish_destructor_body): Convert to vbase pointer here. + +2001-01-18 Nathan Sidwell + + * semantics.c (begin_class_definition): Check we're not inside a + template parm list. + +2001-01-18 Nathan Sidwell + + * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of + BASELINK_P. + +2001-01-16 Kriang Lerdsuwanakij + + * typeck.c (build_function_call_real): Call fold on the CALL_EXPR. + * call.c (build_over_call): Add comment. + +2001-01-16 Daniel Berlin + + * cvt.c (ocp_convert): Handle vector type conversion + * typeck2.c (digest_init): Handle vector type initializations + +2001-01-16 Phil Edwards + + * g++spec.c: Don't add libraries needlessly if -fsyntax-only + was given. + +2001-01-15 Nathan Sidwell + + * pt.c (check_nontype_parm): Rename to ... + (invalid_nontype_parm_type_p): ... here. + (process_template_parm): Adjust. + (convert_template_argument): Adjust. + +2001-01-15 Nathan Sidwell + + * pt.c (check_nontype_parm): New function. + (process_template_parm): Use it. + (convert_template_argument): Use it. + (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to + member. + +2001-01-14 Jeffrey Oldham + + * tree.c: Add defaults.h + (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY. + * Make-lang.in (cp/tree.o): Add defaults.h. + +2001-01-13 Joseph S. Myers + + * Make-lang.in (CXX_C_OBJS): Add c-format.o. + +2001-01-13 Joseph S. Myers + + * g++.1: Change to be ".so man1/gcc.1". + +2001-01-13 Joseph S. Myers + + * Make-lang.in (c++.info, c++.install-info): Build and install g++ + internals info. + (c++.uninstall, c++.maintainer-clean): Remove g++ internals info. + ($(srcdir)/cp/g++int.info): New target. + * gxxint.texi: Add info directory entry. Use @@ in email address. + * .cvsignore: Update. + +2001-01-12 Nathan Sidwell + + * typeck.c (build_c_cast): Do template processing earlier. + Always pedwarn on array casts. + +2001-01-12 Nathan Sidwell + + * friend.c (make_friend_class): Make sure a templated class is + actually a template. + +2001-01-11 Nathan Sidwell + + * decl2.c (get_guard): Set linkage from guarded decl. + +2001-01-11 Nathan Sidwell + + * call.c (convert_default_arg): Check for unprocessed + DEFAULT_ARG. + * cp-tree.h (replace_defarg): Move to spew.c. + (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to + spew.c, which is where they really are. + (done_pending_defargs): Declare. + (unprocessed_defarg_fn): Declare. + * decl.c (replace_defarg): Move to spew.c + * parse.y (structsp): Call done_pending_defargs. + * spew.c (defarg_fns): Rearrange list structure. + (defarg_fnsdone): New static variable. + (defarg_depfns): New static variable. + (init_spew): Adjust. + (add_defarg_fn): Store the type in TREE_TYPE. + (do_pending_defargs): Detect and deal with ordering constraints + and circularity. + (done_pending_defargs): New function. + (unprocessed_defarg_fn): New function. + (replace_defarg): Moved from decl.c. Robustify. Don't save + if circularity detected. + +2001-01-11 Nathan Sidwell + + * pt.c (unify): Check array has a domain, before checking + whether it is variable sized. + +2001-01-11 Nathan Sidwell + + * decl.c (grokparms): Unobfuscate and get correct diagnostic for + parameters with pointers to arrays of unknown bound. + +2001-01-11 Nathan Sidwell + + * parse.y (template_parm_header, template_spec_header): New + reductions. Split out from ... + (template_header): ... here. Use them. + (template_template_parm): Use template_parm_header. + * semantics.c (finish_template_template_parm): Add assert. + +2001-01-10 Mark Mitchell + + * mangle.c (write_builtin_type): Fix thinko. + + * pt.c (copy_default_args_to_explicit_spec_1): New function. + (copy_default_args_to_explicit_spec): Likewise. + (check_explicit_specialization): Use it. + + * class.c (finish_struct_1): Remove last argument in call to + make_decl_rtl; use make_function_rtl instead of make_decl_rtl. + * decl.c (builtin_function): Likewise. + (build_cp_library_fn): Likewise. + (check_initializer): Likewise. + (make_rtl_for_nonlocal_decl): Likewise. + (cp_finish_decl): Likewise. + (start_function): Likewise. + * decl2.c (finish_anon_union): Likewise. + * friend.c (do_friend): Likewise. + * init.c (build_java_class_ref): Likewise. + * method.c (make_thunk): Likewise. + * pt.c (tsubst_friend_function): Likewise. + * semantics.c (expand_body): Likewise. + +2001-01-10 Mark Mitchell + + * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not + looking at DECL_CLONED_FUNCTION for non-functions. + +2001-01-10 Nathan Sidwell + + * error.c (dump_template_parameter): Use parm to determine how + to print default value. + +2001-01-10 Nathan Sidwell + + * class.c (duplicate_tag_error): Clear more flags. + +2001-01-10 Nathan Sidwell + + * call.c (build_new_method_call): Use binfo_for_vbase. + +2001-01-10 Joseph S. Myers + + * cp-tree.h (flag_cond_mismatch): Don't declare. + * decl2.c (flag_cond_mismatch): Don't define. + (lang_f_options): Remove cond-mismatch. + (unsupported_options): Add cond-mismatch. + +2001-01-09 Nathan Sidwell + + * class.c (handle_using_decl): Reject using of constructor name + of sourcing class. Allow injecting of a method with same name as + nested class. Fixup error messages. + +2001-01-09 Joseph S. Myers + + * decl2.c (lang_decode_option): Handle -Wformat=2. + +2001-01-08 Nathan Sidwell + + * cp-tree.h (lang_decl_flags): Rename defined_in_class to + initialized_in_class. + (DECL_DEFINED_IN_CLASS_P): Rename to ... + (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning. + * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P. + (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P. + * pt.c (check_default_tmpl_args): Adjust for + DECL_INITIALIZED_IN_CLASS_P. + (instantiate_class_template): Likewise. + (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P. + + * class.c (finish_struct): Constify saved_filename. + +2001-01-08 Nathan Sidwell + + * class.c (duplicate_tag_error): Adjust diagnostic. + (finish_struct): Locally set location to start of struct. + * decl.c (fixup_anonymous_aggr): Use cp_error_at. + +2001-01-08 Nathan Sidwell + + * decl.c (struct binding_level): Adjust class_shadowed comments + to reflect reality. + (push_class_level_binding): Adjust comments to reflect reality. + Set IDENTIFIER_CLASS_VALUE when replacing an existing binding. + Don't set TREE_VALUE on the class_shadowed list. + +2001-01-07 Alexandre Petit-Bianco + + * decl2.c (acceptable_java_type): Allow references too. + * init.c (build_java_class_ref): When using the new ABI, search + `class$' and have it mangled with `mangle_decl.' + * mangle.c (write_java_integer_type_codes): New function. + (write_builtin_type): Detect and mangle Java integer and real + types. + +2001-01-07 Mark Mitchell + + * decl2.c (grokfield): Don't accept `asm' specifiers for + non-static data members. + +2001-01-07 Kaveh R. Ghazi + + * expr.c (cplus_expand_expr): Don't reset `target'. + +2001-01-07 Neil Booth + + * cp/decl2.c (cxx_post_options): Call cpp_post_options. + +2001-01-05 Nathan Sidwell + + * parse.y (template_datadef): Check for error_mark_node. + +2001-01-05 Nathan Sidwell + + * cp-tree.def (DEFAULT_ARG): Make `x' class. + +2001-01-04 Joseph S. Myers + + * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define. + (record_builtin_type): Make non-static. + (flag_short_double): Don't declare. + (init_decl_processing): Remove the creation of many tree nodes now + in c_common_nodes_and_builtins. + (build_void_list_node): New function. + * decl2.c (flag_short_double, flag_short_wchar): Don't define. + * cp-tree.h (flag_short_wchar): Don't declare. + +2001-01-04 Mark Mitchell + + * call.c (build_conv): Don't use build1 for USER_CONV. + * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes. + +2001-01-03 Joseph S. Myers + + * lex.c (lang_init): Call c_common_lang_init. + +2001-01-03 Nathan Sidwell + + * search.c (lookup_fnfields_here): Remove. + (look_for_overrides_r): Use lookup_fnfields_1. + Ignore functions from using declarations. + +2001-01-03 Nathan Sidwell + + Implement exceptions specifiers for implicit member functions. + * cp-tree.h (merge_exceptions_specifiers): Declare new function. + * method.c (synthesize_exception_spec): New function. + (locate_dtor, locate_ctor, locate_copy): New functions. + (implicitly_declare_fn): Generate the exception spec too. + * search.c (check_final_overrider): Check artificial functions + too. + * typeck2.c (merge_exception_specifiers): New function. + +2001-01-03 Jason Merrill + + * init.c (build_default_init): New fn. + (perform_member_init): Split out from here. + (build_new_1): Use it. Simplify initialization logic. + (build_vec_init): Take an array, rather than a pointer and maxindex. + Speed up simple initializations. Don't clean up if we're assigning. + * cp-tree.h: Adjust. + * decl2.c (do_static_initialization): Remove TREE_VEC case. + * parse.y (new_initializer): Return void_zero_node for (). + * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR. + * typeck2.c (digest_init): Only complain about user-written + CONSTRUCTORs. + +2000-12-22 Mike Stump + + * decl2.c: (max_tinst_depth): Increase to 50. + +2001-01-02 Mark Mitchell + + * class.c (invalidate_class_lookup_cache): Zero the + previous_class_values. + * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not + TREE_INT_CST_HIGH. + (CLASSTYPE_TEMPLATE_LEVEL): Likewise. + * decl.c (free_bindings): New variable. + (push_binding): Don't create a new binding if we have one on the + free list. + (pop_binding): Put old bindings on the free list. + (init_decl_processing): Use size_int, not build_int_2. + Register free_bindings as a GC root. + (cp_make_fname_decl): Use size_int, not build_int_2. + (push_inline_template_parms_recursive): Likewise. + (end_template_parm_list): Likewise. + (for_each_template_parm): Do not use walk_tree_without_duplicates. + (tsubst_template_parms): Use size_int, not build_int_2. + (tsubst): Likewise. + * rtti.c (get_vmi_pseudo_type_info): Likewise. + +2001-01-02 Richard Henderson + + * parse.y (asm): Set ASM_INPUT_P. + +2001-01-02 Jason Merrill + + * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE + for v3 ABI. + + * typeck.c (cp_truthvalue_conversion): New fn. + * cvt.c (ocp_convert): Use it. + + * cp-tree.h: Lose c-common.c decls. + + * typeck.c (build_unary_op): Restore old &a.f diagnostic code. + * cvt.c (convert_to_void): Use type_unknown_p. + + * typeck.c (strip_all_pointer_quals): Also strip quals from + pointer-to-member types. + + * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat + parse.y as C. + + * call.c (build_new_method_call): Do evaluate the object parameter + when accessing a static member. + * typeck.c (build_component_ref): Likewise. + +2001-01-02 Andreas Jaeger + + * decl.c (cp_missing_noreturn_ok_p): New. + (init_decl_processing): Set lang_missing_noreturn_ok_p. + diff --git a/gcc/cp/ChangeLog-2002 b/gcc/cp/ChangeLog-2002 new file mode 100644 index 0000000..5737153 --- /dev/null +++ b/gcc/cp/ChangeLog-2002 @@ -0,0 +1,4574 @@ +2002-12-31 Neil Booth + + * .cvsignore: Remove. + +2002-12-31 Steven Bosscher + + * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c, + except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h, + lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c, + pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c, + typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the + copyright header. + * lex.h: parse.y is dead, so don't mention it. Also replace the + copyright header with the default GNU copyright header. + +2002-12-31 Mark Mitchell + + * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove. + (lookup_name_namespace_only): Likewise. + (begin_only_namespace_names): Likewise. + (end_only_namespace_names): Likewise. + * decl.c (only_namespace_names): Remove. + (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED. + (lookup_name_real): Do not check only_namespace_names. + (lookup_name_namespace_only): Remove. + (begin_only_namespace_names): Likewise. + (end_only_namespace_names): Likewise. + * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous + nested-name-specifiers more gracefully. + (cp_parser_class_or_namespace_name): Avoid looking up namespace + names when they cannot possibly appear. + (cp_parser_template_name): Adjust call to cp_parser_lookup_name. + (cp_parser_elaborated_type_specifier): Likewise. + (cp_parser_namespace_name): Only look for namespace names. + (cp_parser_lookup_name): Add is_namespace parameter. + (cp_parser_lookup_name_simple): Adjust call to + cp_parser_lookup_name. + + * parser.c (cp_parser_dependent_type_p): Fix thinko. + +2002-12-31 Neil Booth + + * .cvsignore: Update. + +2002-12-31 Nathan Sidwell + + * class.c (modify_vtable_entry): Remove unused variable. + (get_vcall_index): Always expect a non-thunk. + (update_vtable_entry_for_fn): Combine covariant adjustments, when + overriding a thunk. Pass get_vcall_index a non-thunk. + + * decl2.c (finish_file): Mark undefined inlines as extern. + +2002-12-31 Mark Mitchell + + * cp-tree.def (RETURN_INIT): Remove. + * cp-tree.h (DECL_IN_MEMORY_P): Remove. + (scope_kind): Add sk_block, sk_try, sk_catch, sk_for. + (note_level_for_for): Remove. + (note_level_for_try): Likewise. + (note_level_for_catch): Likewise. + (finish_named_return_value): Likewise. + (do_pushlevel): Change prototype. + (pending_lang_change): Remove. + * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch, + sk_for. + (note_level_for_for): Remove. + (note_level_for_try): Likewise. + (note_level_for_catch): Likewise. + (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P. + * parser.c (cp_parser_context_free_list): Make it "deletable". + (cp_parser_template_argument): Remove misleading comment. + * pt.c (tsubst_expr): Remove RETURN_INIT code. + * semantics.c (genrtl_named_return_value): Remove. + (do_pushlevel): Take a scope kind as an argument. + (begin_if_stmt): Adjust. + (begin_while_stmt): Likewise. + (begin_for_stmt): Likewise. + (finish_for_init_stmt): Likewise. + (begin_switch_stmt): Likewise. + (begin_handler): Likewise. + (begin_compound_stmt): Likewise. + (finish_named_return_value): Remove. + (cp_expand_stmt): Remove RETURN_INIT case. + * tree.c (cp_statement_code_p): Remove RETURN_INIT case. + +2002-12-31 Mark Mitchell + + PR c++/9112 + * parser.c (cp_parser_direct_declarator): Handle erroneous + parenthesized declarators correctly. + +2002-12-31 Gabriel Dos Reis + + * cp-tree.h (pending_lang_change): Declare. + +2002-12-30 Mark Mitchell + + * parser.c (cp_parser_context_free_list): New variable. + (cp_parser_context_new): Use it. + (cp_parser_error): Check return code from + cp_parser_simulate_error. + (cp_parser_simulate_error): Return a value. + (cp_parser_id_expression): Optimize common case. + (cp_parser_class_name): Likewise. + (cp_parser_class_specifier): Adjust call to + cp_parser_late_parsing_default_args. + (cp_parser_lookup_name): Optimize common case. + (cp_parser_late_parsing_for_member): Adjust call to + cp_parser_late_parsing_default_args. + (cp_parser_late_parsing_default_args): Add scope parameter. + (cp_parser_require): Avoid creating the error message unless it's + needed. + (cp_parser_parse_definitely): Place free'd contexts on the free + list. + + * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change. + +2002-12-30 David Edelsohn + + * parser.c (cp_parser_parameter_declaration_clause): Treat system + header as extern "C" if NO_IMPLICIT_EXTERN_C undefined. + +2002-12-30 Nathanael Nerode + + * config-lang.in, Make-lang.in, operators.def, cp-tree.def: + GCC, not GNU CC. + +2002-12-30 Mark Mitchell + + * parse.y: Remove. + * spew.c: Likewise. + * Make-lang.in (gt-cp-spew.h): Remove. + * cp-tree.h (do_pending_lang_change): Remove. + (do_identifier): Change prototype. + (finish_id_expr): Remove. + * decl.c (lookup_name_real): Remove yylex variable. + * decl2.c (build_expr_from_tree): Adjust call to do_identifier. + * lex.c (init_cpp_parse): Remove. + (reduce_cmp): Likewise. + (token_cmp): Likewise. + (yychar): Likewise. + (lastiddecl): Likewise. + (token_count): Likewise. + (reduce_count): Likewise. + (yyhook): Likewise. + (print_parse_statistics): Likewise. + (do_pending_lang_change): Likewise. + (do_identifier): Remove parsing parameter. + * lex.h (lastiddecl): Remove. + (looking_for_typename): Remove. + (looking_for_template): Likewise. + (pending_lang_change): Likewise. + (yylex): Likewise. + * semantics.c (finish_id_expr): Remove. + + * decl.c (grokdeclarator): Diagnost "extern thread" and "static + thread" correctly. + +2002-12-30 Nathanael Nerode + + * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front + end, not the C front end. + +2002-12-30 Nathan Sidwell + + * cp-tree.h (THUNK_TARGET): New macro. + (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo. + (finish_thunk): Remove offset parms. + * class.c (find_final_overrider): Look through thunks. + (get_vcall_index): Use THUNK_TARGET. + (update_vtable_entry_for_fn): Look through thunks. Set covariant + fixed offset here. Adjust finish_thunk call. + (build_vtbl_initializer): Adjust finish_thunk calls. + * mangle.c (mangle_call_offset): Remove superfluous if. + (mangle_thunk): Adjust. + * method.c (make_thunk): Adjust. + (finish_thunk): Adjust. + (thunk_adjust): Remove assert. + (use_thunk): Use THUNK_TARGET + * dump1.c (cp_dump_tree): Adjust thunk dumping. + + PR c++/9054 + * class.c (layout_class_type): Set TYPE_CONTEXT of type for base. + * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types. + +2002-12-28 Gabriel Dos Reis + + Remove traditional C constructs 4/n. + * decl2.c (grok_method_quals, warn_if_unknown_interface, + grok_x_components, cp_build_parm_decl, build_artificial_parm, + maybe_retrofit_in_chrg, grokclassfn, grok_array_decl, + delete_sanity, check_member_template, check_java_method, + check_classfn, finish_static_data_member_decl, grokfield, + grokbitfield, grokoptypename, grok_function_init, + cplus_decl_attributes, constructor_name, defer_fn, + build_anon_union_vars, finish_anon_union, coerce_new_type, + coerce_delete_type, comdat_linkage, maybe_make_one_only, + key_method, import_export_vtable, import_export_class, + output_vtable_inherit, import_export_decl, import_export_tinfo, + build_cleanup, get_guard, get_guard_bits, get_guard_cond, + set_guard, start_objects, finish_objects, + start_static_storage_duration_function, + finish_static_storage_duration_function, get_priority_info, + start_static_initialization_or_destruction, + finish_static_initialization_or_destruction, + do_static_initialization, do_static_destruction, + prune_vars_needing_no_initialization, write_out_vars, + reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor, + add_using_namespace, merge_functions, ambiguous_decl, + lookup_using_namespace, lookup_using_namespace, + qualified_lookup_using_namespace, set_decl_namespace, + decl_namespace, current_decl_namespace, push_decl_namespace, + pop_decl_namespace, push_scope, pop_scope, add_function, + arg_assoc_namespace, arg_assoc_template_arg, arg_assoc, + lookup_arg_dependent, do_namespace_alias, + validate_nonmember_using_decl, do_nonmember_using_decl, + do_toplevel_using_decl, do_local_using_decl, + do_class_using_decl, do_using_directive, check_default_args, + mark_used, handle_class_head): Use C90 prototypings. Use booleans. + * parser.c (cp_parser_class_head): Use booleanss. + * decl.c (walk_globals, walk_vtables): Likewise. + * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables, + walk_globals): Change return type from 'int' to 'bool'. + * rtti.c (init_rtti_processing, build_headof, throw_bad_cast + throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p, + build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr, + get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast, + qualifier_flags, tinfo_base_init, generic_initializer, + ptr_initializer, dfs_class_hint_mark, ptm_initializer, + dfs_class_hint_unmark, class_hint_flags, class_initializer, + typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info, + get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos, + unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise. + * repo.c (repo_compile_flags, repo_template_declared, + repo_template_defined, repo_class_defined, repo_get_id, + repo_template_used, repo_vtable_used, repo_inline_used, + repo_tinfo_used, repo_template_instantiated, extract_string, + open_repo_file, afgets, init_repo, reopen_repo_file_for_write, + finish_repo): Likewise. + * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier, + cxx_print_xnode): Likewise.. + * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set, + cxx_warn_unused_global_decl, cp_expr_size): Likewise. + * cxxfilt.c (demangle_it, print_demangler_list, usage, + standard_symbol_characters, hp_symbol_characters, main, fatal): + Likewise. + (strip_underscore): Change type from 'int' to 'bool'. + (main): Use boolean constants. + +2002-12-28 Gabriel Dos Reis + + Remove traditional C constructs 3/n. + * cvt.c (cp_convert_to_pointer, convert_to_pointer_force, + build_up_reference, warn_ref_binding, convert_to_reference, + convert_from_reference, convert_lvalue, cp_convert, ocp_convert, + convert_to_void, convert, convert_force, build_type_conversion, + build_expr_type_conversion, type_promotes_to, + perform_qualification_conversions): Use C90 prototyping style. + * decl2.c (grok_array_decl): Use boolean constant. + (delete_sanity): Likewise. + * typeck.c (build_unary_op): Likewise. + * semantics.c (finish_switch_cond): Likewise. + * parser.c (cp_parser_direct_new_declarator): Likewise. + * init.c (build_new): Likewise. + +2002-12-27 Mark Mitchell + + * Make-lang.in (po-generated): Remove parse.c. + (CXX_OBJS): Remove parse.o and spew.o. Add parser.o. + ($(srcdir)/cp/parse.h): Remove target. + ($(srcdir)/cp/parse.c): Likewise. + (gt-cp-parse.h): Likewise. + (gt-cp-parser.h): New target. + (c++.distclean): Do not remove parse.output. + (c++.maintainer-clean): Do not remove parse.c or parse.h. + (cp/spew.o): Remove target. + (cp/lex.o): Adjust dependencies. + (cp/pt.o): Likewise. + (cp/parse.o): Likewise. + (cp/TAGS): Do not mention parse.c. + (cp/parser.o): New target. + * NEWS: Mention the new parser. + * call.c (build_scoped_method_call): Simplify. + (build_method_call): Likewise. + (build_new_function_call): Adjust calls to add_function_candidate + and add_template_candidate. + (build_new_op): Improve handling of erroroneous operands. + (convert_default_arg): Remove circular argument processing. + (name_as_c_string): New function. + (build_new_method_call): Use it. + (perform_implicit_conversion): Use error_operand_p. + * class.c (finish_struct_anon): Use constructor_name_p. + (check_field_decls): Likewise. + (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN. + (resolve_address_of_overloaded_function): Likewise. + (instantiate_type): Tweak pointer-to-member handling. + (get_primary_binfo): Remove incorrect assertion. + * config-lang.in (gtfiles): Add parser.c, remove parse.c. + * cp-tree.h (DEFARG_TOKENS): New macro. + (default_arg): New structure. + (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG. + (lang_tree_node): Add default_arg. + (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE. + (type_info_ref_type): New macro. + (saved_scope): Make processing_explicit_instantiation a boolean. + (check_access): New field. + (unparsed_text): Remove. + (language_function): Remove unparsed_inlines. + (error_operand_p): New macro. + (lang_decl): Adjust pending_inline_info. + (DEFARG_POINTER): Remove. + (tag_types): Add typenames. + (lookup_ualified_name): Declare. + (lookup_name_real): Likewise. + (shadow_tag): Adjust prototype. + (get_scope_of_declarator): Declare it. + (process_next_inline): Remove it. + (check_for_missing_semicolon): Likewise. + (maybe_get_template_decl_from_type_decl): Declare it. + (finish_label_stmt): Adjust prototype. + (finish_non_static_data_meber): Declare it. + (finish_pseudo_destructor_call_expr): Rename to ... + (finish_pseudo_destructor_expr): ... this. + (finish_compound_literal): Declare it. + (begin_inline_definitions): Remove it. + (init_spew): Remove. + (peekyylex): Likewise. + (arbitrate_lookup): Likewise. + (frob_opname): Likewise. + (maybe_snarf_defarg): Likewise. + (add_defarg_fn): Likewise. + (do_pending_defargs): Likewise. + (done_pending_defargs): Likewise. + (unprocessed_defarg_fn): Likewise. + (replace_defarg): Likewise. + (end_input): Likewise. + (get_overloaded_fn): Likewise. + * cvt.c (convert_to_reference): Improve error handling. + * decl.c (lookup_name_real): Do not declare it static. + (maybe_push_to_top_level): Set check_access. + (identifier_type_value): Adjust call to lookup_name_real. + (lookup_qualified_name): New method. + (lookup_name_real): Remove special-case parsing code. + (lookup_name-nonclass): Adjust call to lookup_name_real. + (lookup_name_namespace_only): Likewise. + (lookup_name): Likewise. + (check_tag_decl): Return the type declared. + (shadow_tag): Likewise. + (register_dtor_fn): Tweak check_access. + (grokfndecl): Use constructor_name_p. + (get_scope_of_declarator): New function. + (grokdeclarator): Obscure tweaks for slightly different declarator + representations. + (start_method): Return error_mark_node to indicate failure. + (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs. + * decl2.c (constructor_name_full): Simplify. + (constructor_name): Use it. + (build_expr_from_tree): Adjust for changes to do new parser. + (push_scope): Improve robustness. + (validate_nonmember_using_decl): Process declarations, not names. + (do_class_using_decl): Likewise. + (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS + here. + * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs. + * expr.c (cxx_expand_expr): Handle BASELINKs. + * init.c (member_init_ok_or_else): Issue more errors. + (build_offset_ref): Tweak handling of FUNCTION_DECLs. + * lex.c: Do not include parse.h. + (yypring): Do not declare. + (yylval): Likewise. + (make_reference_declarator): Remove error-generating code. + (rid_to_yy): Remove. + (cxx_init): Do not call init_spew. + (yypring): Remove. + (check_for_missing_semicolon): Remove. + * lex.h (got_scope): Remove. + (got_object): Remove. + * method.c (hack_identifier): Use finish_non_static_data_member. + (implicitly_declare_fn): Adjust use of constructor_name. + * parser.c: New file. + * pt.c (parse.h): Do not include it. + (maybe_get_template_decl_from_template): Do not declare it. + (finish_member_template_decl): Tweak. + (begin_explicit_instantiation): Adjust for + processing_explicit_instantiation being boolean. + (end_explicit_instantiation): Likewise. + (maybe_process_partial_specialization): Tighten specialization + test. + (retrieve_local_specialization): Adjust ue of hash table. + (eq_local_specializations): New function. + (register_local_specialization): Likewise. + (push_template_decl_real): Remove unnecessary test. + (maybe_get_template_decl_from_type_decl): Don't make it static. + (for_each_template_parm_r): Handle TYPEOF_TYPE. + (tsubst_copy): Use retrieive_local_specialization to handle + PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs. + Handle COMPONENT_REFs with pseudo-destructor-expressions. + Simplify handling of CALL_EXPR and METHOD_CALL_EXPR. + (tsubst_expr): Pass decls, not names, to do_local_using_decl. + (unify): Tweak handling of CONST_DECLs. + (regenerate_decl_from_template): Use push_nested_class. + (template_for_substitution): New funciton. + (instantiate_decl): Use it. Register parameters as local + specializations. + * rtti.c (init_rtti_processing): Set type_info_ref_type. + (build_typeid): Use it. + (get_typeid): Likeise. + * search.c (accessible_p): Use check_access, not + flag_access_control. + (adjust_result_of_qualified_name_lookup): Pay attention to the + context_class. + * semantics.c (finish_asm_stmt): Adjust error handling. + (finish_label_stmt): Return the statement. + (finish_non_static_data_member): New function. + (finish_class_expr): Handle BASELINKs. + (finish_call_expr): Handle PSEUDO_DTOR_EXPR. + (finish_object_call_expr): Simplify handling during templates. + (finish_pseudo_destructor_call_expr): Rename to ... + (finish_pseudo_dtor_expr): ... this. + (finish_compound_literal): New function. + (begin_inline_definitions): Remove. + (finish_sizeof): Remove special template handling. + * spew.c: Do not include parse.h. + * tree.c (get_overloaded_fn): Remove. + * typeck.c (build_class_member_access_expr): Handle + PSEUDO_DTOR_EXPR. Adjust handling of static member functions. + (lookup_destructor): New function. + (finish_class_member_access_expr): Use it. + (convert_arguments): Simplify. + (build_unary_op): Handle BASELINKs. + +2002-12-26 Nathan Sidwell + + PR c++/4803 + * decl2.c (mark_used): Defer inline functions. + (finish_file): Merge deferred_fns loops. Check all used + inline functions have a definition. + * method.c (make_thunk): Thunks are not inline. + + PR c++/5116, c++/764 + * call.c (build_new_op): Make sure template class operands are + instantiated. + +2002-12-24 Nathan Sidwell + + PR C++/7964 + * cp-tree.h (resolve_scoped_fn_name): Prototype. + * call.c (resolve_scoped_fn_name): New function. Deal with + more template expansion. Broken out of ... + * parse.y (parse_finish_call_expr): ... here. Call it. + * decl2.c (build_expr_from_tree, CALL_EXPR): Use + resolve_scoped_fn_name and build_call_from_tree. + + PR c++/9053 + * decl.c (duplicate_decls): Templates may be disambiguated by + return type. + + PR c++/8702 + * decl2.c (check_classfn): Use lookup_fnfield_1. List all + conversion operators on failure. + +2002-12-23 Gabriel Dos Reis + + Remove traditional C constructs 2/n. + * call.c (tourney, build_field_call, equal_functions, joust, + compare_ics, build_over_call, build_java_interface_fn_ref, + convert_like_real, op_error, build_object_call, resolve_args, + build_vfield_ref, check_dtor_name, build_scoped_method_call, + build_addr_func, build_call, build_method_call, null_ptr_cst_p, + sufficient_parms_p, build_conv, non_reference, strip_top_quals, + standard_conversion, reference_related_p, + reference_compatible_p, convert_class_to_reference, + direct_reference_binding, reference_binding, + ,implicit_conversion, is_complete, promoted_arithmetic_type_p, + add_template_conv_candidate, any_viable, any_strictly_viable, + build_this, splice_viable, print_z_candidates, + build_user_type_conversion, build_new_function_call, + conditional_conversion, build_conditional_expr, build_new_op, + build_op_delete_call, enforce_access, call_builtin_trap, + convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to, + convert_default_arg, type_passed_as, convert_for_arg_passing, + in_charge_arg_for_name, is_properly_derived_from, + maybe_handle_implicit_object, maybe_handle_ref_bind, + source_type, add_warning, can_convert, can_convert_arg, + perform_implicit_conversion, can_convert_arg_bad, + initialize_reference, add_conv_candidate, + add_template_candidate_real, add_template_candidate): Ansify. + +2002-12-22 Nathan Sidwell + + PR c++/8572 + * cp-tree.h (grokoptypename): Add SCOPE parameter. + * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type + if in a template scope. + * parse.y (unoperator): Return the scope. + (operator_name): Adjust grokoptypename call. + +2002-12-22 Kriang Lerdsuwanakij + + * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t. + * decl.c (make_unbound_class_template): Adjust. Check for tf_error. + * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error. + +2002-12-20 Kazu Hirata + + * ChangeLog: Fix a typo. + * class.c: Fix comment typos. + * cp-tree.h: Likewise. + +2002-12-18 Jason Merrill + + Handle anonymous unions at the tree level. + C++ ABI change: Mangle anonymous unions using the name of their + first named field (by depth-first search). Should not cause + binary compatibility problems, though, as the compiler previously + didn't emit anything for affected unions. + * cp-tree.def (ALIAS_DECL): New tree code. + * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the + first field, not the largest. + (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME, + push the decl, and write it out at namespace scope. + * decl.c (lookup_name_real): See through an ALIAS_DECL. + (pushdecl): Add namespace bindings for ALIAS_DECLs. + * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name + of a decl which doesn't have one. + * typeck.c (build_class_member_access_expr): Don't recurse if + we already have the type we want. + +2002-12-18 Kriang Lerdsuwanakij + + PR c++/8099 + * friend.c (make_friend_class): Allow partial specialization + when declaration is not a template friend. + +2002-12-18 Kriang Lerdsuwanakij + + PR c++/3663 + * pt.c (lookup_template_class): Copy TREE_PRIVATE and + TREE_PROTECTED to created decl nodes. + +2002-12-18 Mark Mitchell + + * class.c (build_base_field): Do not set DECL_PACKED on the + FIELD_DECL. + +2002-12-18 Gabriel Dos Reis + + * cp-tree.h (struct tree_srcloc): Use location_t. + (SOURCE_LOCUS): New. + (SRCLOC_FILE, SRCLOC_LINE): Adjust. + +2002-12-17 Jason Merrill + + * decl.c (finish_function): Also complain about no return in + templates. + * semantics.c (finish_return_stmt): Also call check_return_expr in + templates. + * typeck.c (check_return_expr): In a template, just remember that we + saw a return. + +2002-12-16 Jason Merrill + + * semantics.c (simplify_aggr_init_exprs_r): Don't change the type + of the CALL_EXPR. + + * semantics.c (do_pushlevel): Call pushlevel after adding the + SCOPE_STMT. + (do_poplevel): Call poplevel before adding the SCOPE_STMT. + * parse.y (function_body): Go back to using compstmt. + * decl.c (pushdecl): Skip another level to get to the parms level. + + * call.c (build_new_method_call): Use is_dummy_object to determine + whether or not to evaluate the object parameter to a static member + function. + +2002-12-14 Jason Merrill + + * semantics.c (simplify_aggr_init_exprs_r): Also prepend the + return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR. + * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE, + don't bother with an AGGR_INIT_EXPR. + (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE, + just generate a new decl normally. Take return slot parm. + * cp-tree.h: Adjust prototype. + +2002-12-13 Gabriel Dos Reis + + PR C++/8031 + * cvt.c (convert_to_pointer_force): Don't try comparing against + erronous type. + +2002-12-13 Geoffrey Keating + + * cp-tree.h: Have the multiple-include guards around + the entire file. + +2002-12-10 David Edelsohn + + * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos + for SPEW_DEBUG. + (snarf_method): Same. + (snarf_defarg): Same. + +2002-12-10 Mark Mitchell + + PR c++/8372 + * pt.c (tsubst_copy): Handle destructor names more correctly. + +2002-12-10 Matt Austern + + * cp-tree.h: get rid of needs_virtual_reinit bit. + +2002-12-09 Mark Mitchell + + * NEWS: Document removal of in-class initialization extension for + static data members of non-arithmetic, non-enumeration type. + * decl.c (check_static_variable_definition): Do not allow that + extension. + * decl2.c (grokfield): Do not call digest_init when processing + templates. + +2002-12-05 Kaveh R. Ghazi + + * error.c (dump_expr): Fix format specifier warning. + +2002-12-04 Geoffrey Keating + + * class.c (finish_struct_1): Correct comment. + * cp-tree.c (DECL_SORTED_FIELDS): Likewise. + +2002-12-04 Gabriel Dos Reis + + PR C++/8799 + * error.c (dump_expr): Don't ever try to dump a non-existent + expression. + +2002-12-03 Nathan Sidwell + + Implement covariant returns. + * cp-tree.h (IS_AGGR_TYPE_2): Remove. + (struct lang_decl_flags): Add this_thunk_p flag. + Rename vcall_offset to virtual_offset. + (struct lang_decl): Rename delta to fixed_offset. + (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines. + (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg. + (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ... + (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here. + (make_thunk): Add this_adjusting arg. + (finish_thunk): Declare. + (mangle_thunk): Add this_adjusting arg. + * class.c (get_vcall_index): Use base function for lookup. + (update_vtable_entry_for_fn): Generate covariant thunk. + (finish_struct_1): Set DECL_VINDEX to NULL for thunks. + (build_vtbl_initializer): Use base function for lookup. + Finish covariant thunk here. Adjust thunk generation. + * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling. + Adjust thunk dumping. + * mangle.c (mangle_call_offset): New function. + (mangle_thunk): Adjust for covariant thunks. + * method.c (make_thunk): Adjust. Do not set name here. + (finish_thunk): New function. Set name here. + (use_thunk): Generate covariant thunks too. + (thunk_adjust): New function. + * search.c (covariant_return_p): Remove. Fold into ... + (check_final_overrider): ... here. Simplify. + * semantics.c (emit_associated_thunks): Walk covariant thunk lists. + +2002-12-03 Jason Merrill + + PR c++/8674 + * call.c (build_over_call): Check specifically for TARGET_EXPR + when eliding. + + PR c++/8461, c++/8625 + * call.c (convert_for_arg_passing): Don't mess with error_mark_node. + (cp_convert_parm_for_inlining): Remove. + * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): + Remove. + * cp-tree.h (ADDR_IS_INVISIREF): Remove. + * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code. + + * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on + an ambiguous conversion. + +2002-12-03 Mark Mitchell + + PR c++/8688 + * decl.c (reshape_init): Handle erroneous initializers. + +2002-12-02 Mark Mitchell + + PR c++/8720 + * spew.c (remove_last_token): Make sure that last_chunk is set + correctly. + + PR c++/8615 + * error.c (dump_expr): Handle character constants with + TREE_OVERFLOW set. + +2002-12-02 Kriang Lerdsuwanakij + + DR 180 + * decl.c (grokdeclarator): Require class-key for all friend class. + Output the correct type and context in the error message. + +2002-12-01 Mark Mitchell + + PR c++/5919 + * pt.c (unify): Use variably_modified_type_p to test validity of + template argument types. + + PR c++/8727 + * cp-tree.h (lang_type_class): Add typeinfo_var. + (CLASSTYPE_TYPEINFO_VAR): New macro. + * rtti.c (get_tinfo_decl): Use it. + + PR c++/8663 + * init.c (expand_member_init): Always get the main variant of a + base class. + +2002-12-01 Mark Mitchell + + PR c++/8332 + PR c++/8493 + * decl.c (cxx_init_decl_processing): Use size_type_node, not + c_size_type_node. + * decl2.c (coerce_new_type): Likewise. + * except.c (do_allocate_exception): Likewise. + +2002-11-30 Zack Weinberg + + * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c, + dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c, + lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c, + repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, + typeck2.c: Include coretypes.h and tm.h. + * Make-lang.in: Update dependencies. + +2002-11-30 Mark Mitchell + + PR c++/8227 + * decl.c (layout_var_decl): Deal gracefully with erroneous types. + (check_initializer): Validate the type of the initialized + variable, even if the initializer is absent. + * typeck.c (cp_type_quals): Deal gracefully with erroneous types. + + PR c++/8214 + * typeck.c (convert_for_assignment): Do not use + decl_constant_value on the operand. + + PR c++/8511 + * pt.c (instantiate_decl): Handle template friends defined outside + of the class correctly. + +2002-11-29 Joe Buck + + * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for + anonymous structs. + +2002-11-29 Mark Mitchell + + * class.c (walk_subobject_offsets): Recur on binfos as well as on + types. + (layout_nonempty_base_or_field): Pass it a binfo when processing a + base class. + (layout_empty_base): Likewise. + (build_base_field): Likewise. + +2002-11-27 Mark Mitchell + + * class.c (build_base_field): Make sure we get the canonical base + when descending through primary bases. + +2002-11-26 Geoffrey Keating + + * decl.c (check_initializer): Don't error on initialisation of + a scalar with a brace-enclosed expression. + +2002-11-26 Nathan Sidwell + + * cp-tree.h (DECL_LANG_FLAG_4): Document more uses. + (template_parms_equal): Remove prototype. + * typeck.c (buuld_indirect_ref): Reformat. + +2002-11-25 Jason Merrill + + * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT + and a DO_STMT. + +2002-11-25 Mark Mitchell + + * tree.c (cp_build_qualified_type_real): Correct handling of + array types. + * class.c (walk_subobject_offsets): Fix thinko. + (build_base_field): Record offsets of empty bases in primary + virtual bases. + (layout_class_type): Record offsets of empty bases in fields. + + * search.c (is_subobject_of_p_1): Fix thinko. + (lookup_field_queue_p): Likewise. + +2002-11-24 Mark Mitchell + + * class.c (layout_class_type): Reuse tail padding when laying out + virtual bases. + +2002-11-22 Mark Mitchell + + * rtti.c (qualifier_flags): Fix thinko. + +2002-11-21 Gabriel Dos Reis + + Remove traditional C constructs 1/n. + * cp-tree.h (init_method, set_mangled_name_for_decl, + build_opfncall, hack_identifier, make_thunk, use_thunk, + synthesize_method, implicitly_declare_fn, + skip_artificial_parms_for, optimize_function, calls_setjmp_p, + maybe_clone_body): Remove use of PARAMS. + + * method.c (do_build_assign_ref, do_build_copy_constructor, + synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy): + Likewise. + (synthesize_method): Use 'bool' type and constants instead of + 'int'. + (locate_copy): Likewise. + (implicitly_declare_fn): Likewise. + + * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function): + Remove old-style declaration. + (maybe_clone_body): Use 'bool' type and constants. + +2002-11-21 Glen Nakamura + + PR c++/8342 + * typeck.c (get_member_function_from_ptrfunc): Make sure that a + SAVE_EXPR for instance_ptr doesn't get evaluated first inside one + of the branches of a COND_EXPR. + +2002-11-19 Mark Mitchell + + * pt.c (for_each_template_parm): Free allocated memory. + * search.c (is_subobject_of_p_1): New function. + (is_subobject_of_p): Avoid walking virtual bases multiple times. + +2002-11-19 Jason Thorpe + + * g++spec.c (lang_specific_spec_functions): New. + +2002-11-15 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * class.c: Likewise. + * decl2.c: Likewise. + +2002-11-14 Zack Weinberg + + * search.c (dfs_push_decls): Do not try to reorder elements + 3..n of method_vec if method_vec has only two elements. + Reverse order of two tests to avoid accessing unallocated + memory. + +2002-11-14 Mark Mitchell + + * class.c (dfs_find_final_overrider): Adjust so that the most + derived object is a binfo, rather than a class type. + (find_final_overrider): Likewise. + (add_vcall_offset_vtbl_entries_1): Simplify accordingly. + (add_vcall_offset): Likewise. + +2002-11-09 Kriang Lerdsuwanakij + + PR c++/8389 + * pt.c (instantiate_template): Push class scope for member + functions. + (get_mostly_instantiated_function_type): Likewise. Don't call + tsubst on context. Remove CONTEXTP and TPARMSP parameters. + * cp-tree.h (get_mostly_instantiated_function_type): Adjust. + * mangle.c (write_encoding, write_unqualified_name): Adjust. + +2002-11-07 Mark Mitchell + + * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of + vcall offfsets. Split out ... + (add_vcall_offset): ... new function. + + PR c++/8338 + * pt.c (for_each_template_parm): Add htab parameter. + (process_partial_specialization): Adjust call. + (push_template_decl_real): Likewise. + (pair_fn_data): Add visited. + (for_each_template_parm_r): Avoid walking duplicates more than + once. + (uses_template_parms): Adjust call to for_each_template_parm. + +2002-11-07 Mark Mitchell + + * class.c (add_implicitly_declared_members): Put implicitly + declared functions at the end of TYPE_METHODs when -fabi-version + is at least 2. + +2002-11-05 Geoffrey Keating + + * decl2.c (finish_file): Correct spelling. + +2002-11-03 Mark Mitchell + + * call.c (build_special_member_call): Do not try to lookup VTTs by + name. + * class.c (vtbl_init_data): Add generate_vcall_entries. + (get_vtable_decl): Do not look up virtual tables by name. + (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P. + (set_primary_base): Do not set CLASSTYPE_RTTI. + (determine_primary_base): Likewise. + (get_matching_virtual): Remove. + (get_vcall_index): New function. + (update_vtable_entry_for_fn): Do not try to use virtual thunks + when they are not required. Assign vcall indices at this point. + (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT. + Do update dynamic_classes. + (build_vtt): Do not add VTTs to the symbol table. + (build_ctor_vtbl_group): Likewise. + (build_vtbl_initializer): Simplify handling of vcall indices. + (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets + for the most derived class. + (add_vcall_offset_vtbl_entries_1): But do not actually add them to + the vtable. + * cp-tree.h (dynamic_classes): New macro. + (lang_type_class): Remove rtti. Add vtables. Add vcall_indices. + (CLASSTYPE_RTTI): Remove. + (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove. + (CLASSTYPE_VCALL_INDICES): New macro. + (CLASSTYPE_VTABLES): Likewise. + (BV_USE_VCALL_INDEX_P): Remove. + (build_vtable_path): Remove. + * decl2.c (finish_vtable_vardecl): Remove. + (key_method): Remove #if 0'd code. + (finish_vtable_vardecl): Rename to ... + (maybe_emit_vtables): ... this. + (finish_file): Use it. + * search.c (look_for_overrides_here): Update comment. + +2002-11-01 Zack Weinberg + + PR c/7353 redux + * decl2.c (grokfield): Reject TYPE_DECLs with initializers. + +2002-10-30 Jason Merrill + + PR c++/8186 + * cp-tree.h (ADDR_IS_INVISIREF): New macro. + * call.c (convert_for_arg_passing): Set it. + * except.c (stabilize_throw_expr): Recurse for such an arg. + +2002-10-31 Mark Mitchell + + * cp-tree.h (lang_decl_flags): Remove init_priority. + (lang_decl): Add delta. + (GLOBAL_INIT_PRIORITY): Remove. + (THUNK_DELTA): Revise definition. + * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY. + * dump.c (cp_dump_tree): Don't dump it. + +2002-10-30 Mark Mitchell + + PR c++/8160 + * typeck2.c (process_init_constructor): Call complete_array_type. + + PR c++/8149 + * decl.c (make_typename_type): Issue errors about invalid results. + +2002-10-30 Kriang Lerdsuwanakij + + Core issue 287, PR c++/7639 + * cp-tree.h (lang_type_class): Add decl_list field. + (CLASSTYPE_DECL_LIST): New macro. + (maybe_add_class_template_decl_list): Add declaration. + * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST. + (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST. + (maybe_add_class_template_decl_list): New function. + (add_implicitly_declared_members): Use it. + * decl.c (maybe_process_template_type_declaration): Likewise. + (pushtag): Likewise. + * friend.c (add_friend): Likewise. + (make_friend_class): Likewise. + * semantics.c (finish_member_declaration): Likewise. + (begin_class_definition): Initialize CLASSTYPE_DECL_LIST. + * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST + to process members and friends in the order of declaration. + +2002-10-29 Mark Mitchell + + PR c++/8287 + * decl.c (finish_destructor_body): Create the label to jump to + when returning from a destructor here. + (finish_function_body): Rather than here. + +2002-10-25 Zack Weinberg + + PR c++/7266 + * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a + SCOPE_REF is not null before dereferencing it. + +2002-10-25 Mark Mitchell + + * call.c (build_over_call): Use DECL_CONTEXT, not + DECL_VIRTUAL_CONTEXT. + * class.c (modify_vtable_entry): Don't mess with + DECL_VIRTUAL_CONTEXT. + (set_vindex): Remove. + (set_primary_base): Remove vfuns_p parameter. + (determine_primary_base): Likewise. + (modify_all_vtables): Likewise. + (layout_class_type): Likewise. Adjust calls to other functions + accordingly. + (finish_struct_1): Adjust calls to modified functions. Set + DECL_VINDEX here. + * cp-tree.h (lang_type_class): Remove vsize. + (CLASSTYPE_VSIZE): Remove. + (lang_decl): Remove thunks. + (DECL_THUNKS): Adjust. + (DECL_VIRTUAL_CONTEXT): Remove. + (duplicate_decls): Don't copy it. + * pt.c (build_template_decl): Don't set it. + (tsubst_decl): Likewise. + * typeck.c (expand_ptrmemfunc_cst): Don't use it. + + * class.c (build_vtbl_initializer): Don't use build_vtable_entry. + (build_vtable_entry): Remove. + * cp-tree.h (BINFO_VIRTUALS): Expand documentation. + (lang_decl): Add thunks. + (DECL_THUNKS): New macro. + * decl.c (duplicate_decls): Copy it. + * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS. + * semantics.c (emit_associated_thunks): Simplify. + +2002-10-24 David Edelsohn + + PR c++/7228 + * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that + lang_type structure exists before accessing field. + (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro. + (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar. + (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro. + * class.c (check_field_decls): Use new macros. + * typeck2.c (process_init_constructor): Remove redundant check for + existence of lang_type structure. + +2002-10-24 Mark Mitchell + + * class.c (end_of_base): New method. + (end_of_class): Use it. Check indirect virtual bases. + + * class.c (check_field_decls): Fix typo. + +2002-10-23 Mark Mitchell + + PR c++/8067 + * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and + related variables. + + PR c++/7679 + * spew.c (next_token): Do not return an endless stream of + END_OF_SAVED_INPUT tokens. + (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of + the cached token stream. + (snarf_defarg): Likewise. + +2002-10-23 Zack Weinberg + + * cp-lang.c (cp_var_mod_type_p): New: C++ hook for + variably_modified_type_p. + * cp-tree.h: Remove prototype of variably_modified_type_p. + * tree.c (variably_modified_type_p): Remove; now implemented + in language-independent code. + +2002-10-22 Mark Mitchell + + PR c++/6579 + * spew.c (snarf_parenthesized_expression): New function. + (snarf_block): Use it. + +2002-10-22 Richard Henderson + + * method.c (use_thunk): Always compute vcall_value; assert that + it is not zero. Use can_output_mi_thunk; use output_mi_thunk + for vcall thunks as well. + +2002-10-21 Mark Mitchell + + * class.c (empty_base_at_nonzero_offset_p): New function. + (layout_nonempty_base_or_field): Do not check for conflicts when + laying out a virtual base using the GCC 3.2 ABI. + (build_base_field): Correct checking for presence of empty classes + at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. + + * class.c (include_empty_classes): Use normalize_rli. + (layout_class_type): Likewise. + + * decl.c (reshape_init): Tweak handling of character arrays. + + PR c++/8218 + * cp-tree.h (lang_type_class): Add contains_empty_class_p. + (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. + * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. + (check_field_decls): Likewise. + (layout_class_type): Likewise. + (finish_struct_1): Initialize it. + (walk_subobject_offsets): Use it to prune searches. + +2002-10-20 Mark Mitchell + + * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT. + * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with + TARGET_ASM_OUTPUT_MI_THUNK in comments. + +2002-10-18 Zack Weinberg + + * decl.c (start_decl): Point users of the old initialized- + typedef extension at __typeof__. + +2002-10-18 Mark Mitchell + + * Make-lang.in (method.o): Depend on TARGET_H. + * method.c (target.h): Include it. + (use_thunk): Use target hooks. Use vcall thunks, if available. + +2002-10-18 Mark Mitchell + + * class.c (base_derived_from): Make sure return value is a bool. + +2002-10-18 Mark Mitchell + + * class.c (find_final_overrider_data_s): Remove overriding_fn and + overriding_base. + (dfs_base_derived_from): New function. + (base_derived_from): Likewise. + (dfs_find_final_overrider): Use base_derived_from. + (find_final_overrider): Adjust. + +2002-10-18 Jason Merrill + + PR c++/8080 + * semantics.c (finish_for_cond, finish_while_cond): Don't mess + with condition decls in a template. + +2002-10-17 Nathan Sidwell + + * class.c (add_method): Compare template parms too. + +2002-10-17 Mark Mitchell + + PR c++/7584 + * class.c (handle_using_decl): Allow the declaration used to be + from an ambiguous base. + + * pt.c (convert_template_argument): Revert this change: + 2002-10-16 Mark Mitchell + * pt.c (convert_template_argument): Do not fold non-type + template rguments when inside a template. + + * init.c (expand_default_init): Handle brace-enclosed initializers + correctly. + +2002-10-16 Mark Mitchell + + * mangle.c (write_expression): Correct handling of enumeration + constants. + (write_template_arg): Likewise. + * pt.c (convert_template_argument): Do not fold non-type template + arguments when inside a template. + + PR c++/7478 + * cvt.c (convert_to_reference): Allow references as the incoming + type. + +2002-10-16 Mark Mitchell + + PR c++/7524 + * method.c (do_build_assign_ref): Use cp_build_qualified_type, not + build_qualified_type. + +2002-10-15 Richard Henderson + + * error.c (dump_expr): Use real_to_decimal directly, and with + the new arguments. + +2002-10-15 Mark Mitchell + + * decl.c (reshape_init): Fix typo. + + * cp-tree.h (operator_name_info_t): Add arity. + * lex.c (init_operators): Initialize it. + * mangle.c (write_conversion_operator_name): New function. + (write_unqualified_name): Use it. + (write_template_args): Accept template arguments as a TREE_LIST. + (write_expression): Adjust handling of qualified names to match + specification. + +2002-10-15 Jason Merrill + + * call.c (call_builtin_trap): New fn. + (convert_arg_to_ellipsis): Use it. Downgrade error to warning. + (build_call): Don't set current_function_returns_abnormally outside + a function. + +2002-10-14 Mark Mitchell + + * class.c (check_field_decls): Remove empty_p parameter. Instead, + clear CLASSTYPE_EMPTY_P. + (build_base_field): Likewise. + (build_base_fields): Likewise. + (check_bases_and_members): Likewise. + (create_vtbl_ptr): Likewise. + (layout_class_type): Likewise. Ensure that empty classes have + size zero when used as base classes in the 3.2 ABI. + (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and + CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p + parameter. + (is_empty_class): Correct definition when using post-3.2 ABI. + * cp-tree.h (lang_type_class): Add empty_p. + (CLASSTYPE_EMPTY_P): New macro. + +2002-10-12 Nathan Sidwell + + * init.c (build_delete): Do not apply save_expr for arrays. + (build_vec_delete): Likewise. + +2002-10-14 Mark Mitchell + + * decl.c (layout_var_decl): Call layout_decl even for variables + whose type is an array with unspecified bounds. + + PR c++/7176 + * lex.c (do_identifier): Add another option for the parsing + parameter. + * parse.y (do_id): Use it. + +2002-10-11 Gabriel Dos Reis + + PRs C++/6803, C++/7721 and C++/7803 + * decl.c (grokdeclarator): Gracefully handle template-name as + decl-specifier. + +2002-10-11 Jason Molenda + + * init.c (build_field_list): Provide uses_unions_p with a default + value. + +2002-10-11 Mark Mitchell + + PR c++/5661 + * cp-tree.h (variably_modified_type_p): New function. + (grokdeclarator) Tighten check for variably modified types as + fields. + * pt.c (convert_template_argument): Do not allow variably modified + types as template arguments. + * tree.c (variably_modified_type_p): New function. + + * NEWS: Document removal of "new X = ..." extension. + * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on + brace-enclosed initializers. + * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro. + (initialize_local_var): Remove declaration. + (expand_static_init): Likewise. + * decl.c (next_initializable_field): New function. + (reshape_init): Likewise. + (check_initializer): Use them. Build dynamic initializer for + aggregates here too. + (initialize_local_var): Simplify, and incorporate cleanup + insertion code as well. + (destroy_local_var): Remove. + (cp_finish_decl): Tidy. + (expand_static_init): Fold checks for whether or not a variable + needs initialization into this function. Simplify. + * decl2.c (do_static_initialization): Simplify. + * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will + be done for us automatically. + (expand_default_init): Handle brace-enclosed initializers + correctly. + (expand_aggr_init_1): Remove RTL-generation code. + (build_vec_init): Remove "new X = ..." support. + * parse.y (new_initializer): Likewise. + * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on + brace-enclosed initializer. + (create_pseudo_type_info): Likewise. + * typeck2.c (store_init_value): Don't try to handle digest_init + being called more than once. + (digest_init): Tidy handling of brace-enclosed initializers. + +2002-10-10 Kaveh R. Ghazi + + * decl.c (typename_hash): Use htab_hash_pointer. + +2002-10-10 Jim Wilson + + * decl.c (duplicate_decls): Don't call decl_attributes. + +2002-10-09 Zack Weinberg + + PR c/7353 + * decl.c (start_decl): Unconditionally issue error for + 'typedef foo = bar'. + (cp_finish_decl): Remove special case for TYPE_DECL with initializer. + (grokdeclarator): Remove redundant error for 'typedef foo = bar'. + +2002-10-09 Kaveh R. Ghazi + + * decl2.c (prune_vtable_vardecl): Delete unused function. + +2002-10-03 Mark Mitchell + + PR c++/7754 + * decl2.c (finish_anon_union): Do not expand anonymous unions when + procesing template functions. + * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable + type. Call layout_decl. + (tsubst_expr, case DECL_STMT): Handle anonymous unions. + +2002-10-07 Richard Henderson + + * decl2.c, pt.c: Revert c++/7754 fix. + +2002-10-05 Kriang Lerdsuwanakij + + PR c++/7804 + * error.c (dump_expr) [REAL_CST]: Output in decimal format. + +2002-10-03 Mark Mitchell + + PR c++/7931 + * pt.c (for_each_template_parm_r): Handle BASELINKs. + + PR c++/7754 + * decl2.c (finish_anon_union): Do not expand anonymous unions when + procesing template functions. + * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable + type. Call layout_decl. + (tsubst_expr, case DECL_STMT): Handle anonymous unions. + +2002-10-03 Mark Mitchell + + PR c++/8006 + * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template + template parameters. + (globals): Add entity and need_abi_warning. + (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not + CLASSTYPE_TEMPLATE_INFO. + (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not + TYPE_TI_TEMPLATE. + (write_prefix): Handle typename types correctly. + (write_template_prefix): Handle template template parameters + correctly. + (start_mangling): Add entity parameter. + (finish_mangling): Warn about names whose mangling will change. + (mangle_decl_string): Adjust. + (mangle_type_string): Likewise. + (mangle_special_for_type): Likewise. + (mangle_ctor_vtbl_for_type): Likewise. + (mangle_thunk): Likewise. + (mangle_guard_variable): Likewise. + (mangle_ref_init_variable): Likewise. + +2002-10-02 Mark Mitchell + + PR c++/7188. + * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two. + * cp-tree.h (emit_base_init): Rename to .... + (emit_mem_initializers): ... this. + (expand_member_init): Change prototype. + * init.c (perform_member_init): Compute explicit, rather than + requiring it as a parameter. + (sort_member_init): Rename to ... + (sort_mem_initializers): ... this. Process bases and data members + together. + (sort_base_init): Remove. + (emit_base_init): Rename to ... + (emit_mem_initializers): ... this. + (expand_aggr_vbase_init_1): Remove. + (construct_virtual_bases): Rename to ... + (construct_virtual_base): ... this. + (expand_member_init): Rework handling of base initializers. + * method.c (do_build_copy_constructor): Use + finish_mem_initializers. + * parse.y (member_init): Adjust calls to expand_member_init. + * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case. + (tsubst_initializer_list): Use expand_member_init. + * semantics.c (finish_mem_intiailizers): Simplify. + +2002-10-02 Matt Austern + * decl.c (walk_vtables_r): Fixed typo that caused result to + never get a nonzero value. + +2002-10-02 Roger Sayle + + PR optimization/6627 + * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition + from here, and move it to tree.h. + * decl.c (cxx_init_decl_processing): If storing the vbit + in function pointers, ensure that force_align_functions_log + is atleast one. + +2002-10-02 Matt Austern + + * class.c (check_field_decls): Changed warning about const member + variables so that it doesn't get issued for a class aggregate. + +2002-10-01 Mark Mitchell + + * decl.c (cp_finish_decl): Make sure array types are laid out, + even if the array bounds are unknown. + +2002-10-01 Steve Ellcey + + * class.c (build_vtbl_initializer): Change build_c_cast + to build1. + +2002-10-01 Mark Mitchell + + * decl.c (cp_finish_decl): Make sure array types are laid out, + even if the array bounds are unknown. + + * decl.c (cp_finish_decl): Correct check for dynamic + initialization of thread-local storage. + +2002-09-30 Nathan Sidwell + + * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also + overloaded. + +2002-09-30 Steve Ellcey + + * class.c (build_vtbl_initializer): Add cast. + (add_vcall_offset_vtbl_entries_1): + Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset. + +2002-09-30 Mark Mitchell + + * class.c (walk_subobject_offsets): Correct the calculation of + offsets for virtual bases. Correct the counting of array + elements. + (layout_nonempty_base_or_field): Simplify. Correct the + calculation of offsets to be propagated through the binfo + hierarchy. + (build_base_field): Avoid creating a FIELD_DECL for empty bases. + Add the FIELD_DECL to TYPE_FIELDS. + (build_base_fields): Adjust accordingly. + (layout_virtual_bases): Use build_base_field. + (end_of_class): Return a tree, not an integer. + (warn_about_ambiguous_direct_bases): Rename to ... + (warn_about_ambiguous_bases): ... this. + (include_empty_classes): New function. + (layout_class_type): Create an alternative version of the type to + be used when as a base class type. Do not call + finish_record_layout until we are done laying out the class. + * cp-tree.h (lang_type_class): Remove size, size_unit. Add + as_base. + (CLASSTYPE_SIZE): Reimplement. + (CLASSTYPE_SIZE_UNIT): Likewise. + (CLASSTYPE_ALIGN): Likweise. + (CLASSTYPE_USER_ALIGN): Likewise. + (CLASSTYPE_AS_BASE): New macro. + (DECL_INITIALIZED_P): Likewise. + (extract_init): Remove prototype. + (build_forced_zero_init): Rename to ... + (build_zero_init): ... this. + (force_store_init_value): Remove. + * decl.c (obscure_complex_init): Remove. + (duplicate_decls): Copy DECL_INITIALIZED_P. + (check_initializer): Do not leave junk in DECL_INITIAL. + (cp_finish_decl): Handle zero-initialization of entities with + static storage duration. + * expr.c (extract_init): Remove. + * init.c (build_forced_zero_init): Remove. + (build_zero_init): New function. + (build_default_init): Use it. + (build_field_list): Skip FIELD_DECLs for base subobjects. + (push_base_cleanups): Likewise. + * method.c (do_build_assign_ref): Likewise. + (synthesize_exception_spec): Likewise. + * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P. + (regenerate_decl_from_template): To not set DECL_INITIAL for a + static data member whose initialization took place in its class. + (instantiate_decl): Do not pass an initializer to cp_finish_decl + in that situation. + * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects. + (dfs_unuse_fields): Likewise. + * tree.c (pod_type_p): Handle error_mark_node. + (zero_init_p): Likewise. + * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base + subobjects. + * typeck2.c (store_init_value): Remove #if 0'd code. + (force_store_init_value): Remove. + (process_init_constructor): Use build_zero_init. + +2002-09-29 Nathan Sidwell + + PR c++/7788 + * rtti.c (unemitted_tinfo_decl_p): Check it has a field. + +2002-09-29 Kazu Hirata + + * cp-tree.h: Fix comment typos. + * decl.c: Likewise. + * pt.c: Likewise. + +2002-09-25 Mark Mitchell + + * cp/class.c (contains_empty_class_p): New method. + (walk_subobject_offsets): Correct computation of field offset. + (layout_empty_base): Correct placement of emtpy base classes. + (layout_class_type): Warn about ABI changes. + +2002-09-23 Mark Mitchell + + * cp/class.c (layout_virtual_bases): Do not round the size of the + type to a multiple of the alignment before laying out virtual bases. + (layout_class_type): Correct handling of bit-fields that are wider + than their type inside unions. Round the size of the type to a + even number of bytes when computing the size without virtual + bases. + * cp/cp-tree.h (abi_version_at_least): New macro. + +2002-09-21 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * ChangeLog.2: Likewise. + * call.c: Likewise. + * class.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * except.c: Likewise. + * friend.c: Likewise. + * g++spec.c: Likewise. + * init.c: Likewise. + * lex.c: Likewise. + * mangle.c: Likewise. + * method.c: Likewise. + * operators.def: Likewise. + * optimize.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * spew.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + +2002-09-18 Devang Patel + + * cp/cp-tree.h: New prototype for walk_vtabls(). + * cp/decl.c (walk_vtables_r): New function. + (struct cp_binding_level): Add new members, namespaces, + names_size and vtables. + (add_decl_to_level): Add decl in namespaces or vtables + chain, if conditions match. + (walk_vtables): New function. + (walk_namespaces_r): Travers separate namespace chain + for namespace decls. + (wrapup_globals_for_namespace): Use names_size instead + of list_length(). + * cp/decl2.c (finish_file): Use walk_vtables() instead of + walk_globals() to walk vtable decls. + +2002-09-18 Nathan Sidwell + + * decl.c (grokdeclarator): Use assert, not internal_error. Don't + ICE with invalid pointers & references. + +2002-09-17 Zack Weinberg + + * Make-lang.in: Remove all references to the demangler. + * cxxfilt.c: Moved to binutils. + +2002-09-16 Nathan Sidwell + + PR c++/7718 + * pt.c (tsubst_decl): Remove assert. + + Remove DR 295 implementation. + * pt.c (check_cv_quals_for_unify): Disable function & method cases. + * tree.c (cp_build_qualified_type_real): Likewise. Don't warn + about ignoring volatile qualifiers. + + * search.c (lookup_member): Correct documentation. + +2002-09-16 Geoffrey Keating + + * cp-tree.h (union lang_tree_node): Add chain_next option. + +2002-09-16 Nathan Sidwell + + * parse.y (parse_finish_call_expr): Check lookup_member result. + + PR c++/7015 + * semantic.c (finish_asm_stmt): Fix operand/output_operands + thinko. + * typeck.c (c_expand_asm_operands): Protect from error_mark_node. + +2002-09-15 Nathan Sidwell + + PR c++/7919 + * call.c (build_over_call): Convert this pointer for fns found by + using decls. + +2002-09-15 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * ChangeLog.1: Likewise. + +2002-09-14 Nathan Sidwell + + PR c++/7768 + * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. + +2002-09-14 Kazu Hirata + + * error.c: Fix comment formatting. + * except.c: Likewise. + * expr.c: Likewise. + * friend.c: Likewise. + * g++spec.c: Likewise. + * init.c: Likewise. + * lex.c: Likewise. + * mangle.c: Likewise. + * method.c: Likewise. + * optimize.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * spew.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + +2002-09-13 Matt Austern + + PR C++/7828 + * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. + * cp/call.c: Change call-by-const-reference mechanism to use + non_cast_lvalue_p when deciding whether the create a temporary. + We need a temporary when passing, e.g. (long) x by const ref. + +2002-09-13 Nathan Sidwell + + * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. + +2002-09-13 Kazu Hirata + + * decl.c: Fix comment formatting. + * decl2.c: Likewise. + +2002-09-12 Kazu Hirata + + * call.c: Fix comment formatting. + * class.c: Likewise. + * cp-lang.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + +2002-09-11 Zack Weinberg + + * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c, + and c++filt from cxxfilt.o + version.o + $(LIBDEPS). + * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with + minor adjustments (use version_string, eliminate yet another + duplicate of xmalloc) + +2002-09-08 Kaveh R. Ghazi + + * cp-tree.h (require_complete_eh_spec_types): Add prototype. + +2002-09-05 Jason Merrill + + * typeck2.c (add_exception_specifier): Only pedwarn for an + incomplete type. + (require_complete_eh_spec_types): New fn. + (cxx_incomplete_type_diagnostic): Also support pedwarning. + * typeck.c (complete_type_or_diagnostic): Likewise. + * call.c (build_call): Call require_complete_eh_spec_types. + * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting + on an incomplete type. + +2002-09-04 Jakub Jelinek + + * decl.c (start_cleanup_fn): Clear interface_only before + start_function, restore it afterwards. + +2002-09-02 Nathan Sidwell + + * cp-tree.h (finish_builtin_type): Remove. + * decl2.c (finish_builtin_type): Move to common code. + * decl.c (build_ptrmemfunc_type): Adjust. + * rtti.c (create_pseudo_type_info): Adjust. + (create_tinfo_types): Adjust. + +2002-08-31 Jason Merrill + + * cp-lang.c (cp_expr_size): Allow initialization from a + CONSTRUCTOR. + +2002-08-30 Richard Henderson + + PR opt/7515 + * tree.c: Include target.h. + (cp_cannot_inline_tree_fn): Don't auto-inline functions that + don't bind locally. + * Makefile.in (tree.o): Update. + +2002-08-27 Mark Mitchell + + * class.c (layout_virtual_bases): Warn about bugs in G++ that + result in incorrect object layouts. + (layout_class_type): Likewise. + +2002-08-24 Matt Austern + + * tree.c (lvalue_p_1): Add argument for whether casts of lvalues + are allowable. + (real_lvalue_p): Update caller. + (lvalue_p): Ditto. + (non_cast_lvalue_or_else): New. + * tree.h: Declare it. + * typeck.c (build_unary_op): Use non_cast_lvalue_or_else. + +2002-08-22 Mark Mitchell + + * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR + and COND_EXPR specially; fix error message output. + +2002-08-22 Jason Merrill + + * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR. + * semantics.c (nullify_returns_r): Likewise. + +2002-08-17 Gabriel Dos Reis + + Fix PR/7621 + * typeck.c (finish_class_member_access_expr): Diagnose cases where + name lookup finds nothing. + +2002-08-15 Jason Merrill + + * semantics.c (finish_then_clause): Remove redundant assignment. + (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the + extra binding level outside the if/switch statement. + (finish_while_cond, finish_for_cond): Rewrite complex condition + into the loop body. + +2002-08-15 Alexandre Oliva + + * parse.y (sizeof, alignof, typeof): New non-terminals to + increment skip_evaluation. Replace terminals with them and + decrement skip_evaluation at the end of rules using them. + * decl2.c (mark_used): Don't assemble_external if + skipping evaluation. + +2002-08-15 Gabriel Dos Reis + + Fix PR/7504 + * parse.y (parse_finish_call_expr): Handle incomplete + type used to name a scope. + +2002-08-15 Nathan Sidwell + + PR c++/7598 + * typeck.c (build_unary_op): Fold offsetof idiom. Fixes + regression caused by my 2002-08-08 patch. + +2002-08-13 Mark Mitchell + + * decl.c (pushdecl_class_level): Honor requests to bind names to + OVERLOADs. + +2002-08-11 Kaveh R. Ghazi + + * decl2.c (build_call_from_tree): Fix uninitialized variable. + * parse.y (parse_finish_call_expr): Likewise. + * repo.c (old_args, old_dir, old_main): Const-ify. + +2002-08-11 Gabriel Dos Reis + + * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE + DECL_SOURCE_LINE with DECL_SOURCE_LOCATION. + * optimize.c (maybe_clone_body): Likewise. + * pt.c (tsubst_enum): Likewise. + (lookup_template_class): Likewise. + * tree.c (cp_copy_res_decl_for_inlining): Likewise. + +2002-08-10 Neil Booth + + * lang-specs.h: Remove -ansi. + +2002-08-10 Nathan Sidwell + + * tree.c (maybe_dummy_object): Replace // with /* */ + +2002-08-09 Mark Mitchell + + * call.c (standard_conversion): Use build_ptrmem_type. + * cp-tree.h (build_ptrmem_type): New function. + (adjust_result_of_qualified_name_lookup): Likewise. + * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate + static data members. + (build_ptrmem_type): New function. + (grokdeclarator): Do not use build_offset_type when encountering a + qualified name. + * parse.y (parse_finish_call_expr): Use + adjust_result_of_qualified_name_lookup. + * search.c (adjust_result_of_qualified_name_lookup): New function. + * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than + accessing OFFSET_TYPEs directly. + +2002-08-08 Mike Stump + + * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid. + (type_decays_to): Likewise. + * class.c (find_final_overrider): Likewise. + (maybe_note_name_used_in_class): Likewise. + * decl.c (current_tmpl_spec_kind): Likewise. + (add_binding): Likewise. + (push_class_binding): Likewise. + (duplicate_decls): Likewise. + (layout_var_decl): Likewise. + (grokfndecl): Likewise. + (grokdeclarator): Likewise. + (check_default_argument): Likewise. + * decl2.c (handle_class_head): Likewise. + * error.c (dump_template_decl): Likewise. + * init.c (build_offset_ref): Likewise. + * pt.c (check_specialization_scope): Likewise. + (determine_specialization): Likewise. + (check_explicit_specialization): Likewise. + (maybe_check_template_type): Likewise. + (process_partial_specialization): Likewise. + (check_default_tmpl_args): Likewise. + (push_template_decl_real): Likewise. + (convert_template_argument): Likewise. + (try_class_unification): Likewise. + (get_bindings_real): Likewise. + (do_decl_instantiation): Likewise. + * semantics.c (begin_function_definition): Likewise. + (finish_member_declaration): Likewise. + (check_multiple_declarators): Likewise. + * typeck.c (comp_array_types): Likewise. + (comptypes): Likewise. + (expr_sizeof): Likewise. + (build_binary_op): Likewise. + (dubious_conversion_warnings): Likewise. + (check_return_expr): Likewise. + +2002-08-08 Mark Mitchell + + * typeck.c (build_class_member_access_expr): Do not return + error_mark_node when no error has occurred. + +2002-08-08 Nathan Sidwell + + * typeck.c (build_component_addr): Remove. + (build_unary_op): Just check it's not a bitfield, and then build + an ADDR_EXPR. + +2002-08-08 Nathan Sidwell + + * class.c (convert_to_base): Correct check for error_mark_node. + (create_vtable_ptr): Remove unused VFUNS_P parm. + +2002-08-08 Nathan Sidwell + + * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. + +2002-08-07 Mark Mitchell + + Rework build_component_ref. + * call.c (build_vfield_ref): Do not go through build_component_ref. + (build_field_call): Use build_class_member_access_expr. + (build_user_type_conversion_1): Use BASELINK_FUNCTIONS. + (build_object_call): Likewise. + * class.c (convert_to_base): New function. + (type_requires_array_cookie): Use BASELINK_FUNCTIONS. + (instantiate_type): Handle BASELINKs. + * cp-tree.def (BASELINK): New tree code. + * cp-tree.h (BASELINK_P): Reimplement. + (SET_BASELINK_P): Remove. + (BASELINK_BINFO): Reimplement. + (BASELINK_FUNCTIONS): Likewise. + (BASELINK_ACCESS_BINFO): Likewise. + (BASELINK_OPTYPE): Likewise. + (convert_to_base): New function. + (name_p): Likewise. + (build_object_ref): Remove. + (build_component_ref_1): Likewise. + (build_component_ref): Likewise. + (build_x_component_ref): Likewise. + (build_class_member_access_expr): New function. + (finish_class_member_access_expr): Likewise. + (build_ptrmemfunc_access_expr): Likewise. + * decl.c (grokdeclarator): Handle BASELINKs. + * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using + finish_class_member_access_expr. + (arg_assoc): Handle BASELINKs. + (do_class_using_decl): Likewise. + * error.c (dump_decl): Likewise. + (dump_expr): Use build_ptrmemfunc_access_expr. + * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find + destructors. + (build_throw): Use BASELINK_FUNCTIONS. + * init.c (perform_member_init): Use + build_class_member_access_expr. + (build_offset_ref): Handle BASELINKs. Use + build_class_member_access_expr. + * method.c (hack_identifier): Likewise. + * parse.y (do_id): Use BASELINK, not TREE_LIST. + (primary): Remove uses of build_object_ref. + * pt.c (lookup_template_function): Handle BASELINKs. + (resolve_overloaded_unification): Likewise. + * search.c (build_baselink): Build a BASELINK, not a TREE_LIST. + (lookup_field): Use BASELINK, not TREE_LIST. + (lookup_fnfiels): Likewise. + (setup_class_bindings): Likewise. + * semantics.c (finish_object_call_expr): Do not use + build_method_call when we already know what function is being + called. + * spew.c (identifier_type): Use BASELINK, not TREE_LIST. + * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not + TREE_CHAIN. + (name_p): New function. + * typeck.c (build_object_ref): Remove. + (build_component_ref_1): Likewise. + (build_x_component_ref): Likewise. + (build_class_member_access_expr): New function. + (finish_class_member_access_expr): Likewise. + (build_ptrmemfunc_access_expr): Likewise. + (get_member_function_from_ptrfunc): Use + build_ptrmemfunc_access_expr. + (build_binary_op): Likewise. + (build_unary_op): Likewise. + (build_ptrmemfunc): Likewise. + (pfn_from_ptrmemfunc): Likewise. + * typeck2.c (build_m_component_ref): Adjust comment. + +2002-08-07 Neil Booth + + * Make-lang.in (CXX_C_OBJS): Update. + * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. + * cp-tree.h (cxx_decode_option): Remove. + * decl2.c (compare_options, lang_f_options, unsupported_options, + cxx_decode_option): Remove. + +2002-08-06 Gabriel Dos Reis + + * typeck.c (build_x_unary_op): Handle pointer-to-member. + +2002-08-05 Geoffrey Keating + + * class.c: Don't include obstack.h. + (popclass): + * decl2.c: Delete bogus comment. + * error.c: Don't include obstack.h. + * except.c: Likewise. + (dump_type): Correct comment. + * method.c: Don't include obstack.h. + * tree.c: Likewise. + +2002-08-04 Gabriel Dos Reis + + Fix PR/2213 + * cvt.c (cp_convert_to_pointer): Reject conversions from integral + expressions to pointer-to-data-member of pointer-to-member-functions. + +2002-08-04 Geoffrey Keating + + * cvt.c (ocp_convert): Delete obsolete code. + * parse.y (permanent_obstack): Delete declaration. + * pt.c (permanent_obstack): Delete declaration. + * repo.c (permanent_obstack): Delete declaration. + (open_repo_file): Use xmalloc instead of permanent_obstack. + (init_repo): Use xstrdup instead of permanent_obstack. + +2002-08-04 Nathan Sidwell + + * cp-tree.h (VF_DERIVED_VALUE): Remove. + * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE. + +2002-08-03 Nathan Sidwell + + PR 7470. + C++ ABI change - vfunc ordering. + * class.c (add_virtual_function): Remove. + (dfs_modify_all_vtables): Take list of all declared + virtuals. Assign all that are not in primary base. + (check_for_override): Adjust comments. + (create_vtable_ptr): Take single list of virtuals. Build chain + of declared virtuals here. + (layout_class_type): Take single list of virtuals. Adjust. + (finish_struct_1): Keep virtuals on single list. Adjust. + +2002-08-02 Mark Mitchell + + * init.c (build_member_call): Use build_new_method_call, not + build_method_call. + +2002-08-02 Krister Walfridsson + + * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies. + +2002-08-02 Mark Mitchell + + * call.c (build_method_call): Issue a more helpful error message + about ambiguous method names. + +2002-08-02 Nathan Sidwell + + * tree.c (build_shared_int_cst): Make cache file scope, and + GTY it. + +2002-08-02 Jason Merrill + + * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. + (cp_expr_size): New fn. + * call.c (build_over_call): Lose empty class hackery. + (convert_arg_to_ellipsis): Promote non-POD warning to error. + * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. + + * semantics.c (expand_body): Do tree optimization in the function + context, too. + +2002-08-01 Neil Booth + + * cp-tree.h: Move all warning and flag declarations to c-common.h. + * decl.c: Move all warning and flag variables to c-common.c. + * decl2.c: Move all warning and flag variables to c-common.c. + * lex.c (flag_digraphs): Remove. + (warn_traditional): Now in c-common.c. + +2002-07-31 Mark Mitchell + + * call.c (build_field_call): Do not look up the field by name. + (build_method_call): Simplify. + (struct z_candidate): Add access_path and conversion_path. Remove + basetype_path. + (convert_class_to_reference): Adjust use of + add_function_candidate. + (add_candidate): Add conversion_path argument. + (add_function_candidate): Use it. + (add_conv_dndidate): Likewise. + (build_builtin_candidate): Likewise. + (add_template_candidate_real): Add conversion_path argument. + (add_template_conv_candidate): Likewise. + (add_template_candidate): Likewise. + (build_user_type_conversion_1): Use it. + (build_new_function_call): Remove name lookup code. Adjust use of + add_template_candidate and add_function_candidate. + (build_new_op): Likewise. + (convert_like_real): Use build_special_member_call. + (build_over_call): Use cand->conversion_path. + (build_special_member_call): New method. + (build_new_method_call): Remove name lookup code. + * cp-tree.def (OFFSET_REF): Update documentation. + (TEMPLATE_ID_EXPR): Likewise. + * cp-tree.h (BASELINK_ACCESS_BINFO): New macro. + (BASELINK_OPTYPE): Likewise. + (build_new_method_call): Adjust prototype. + (build_special_member_call): New method. + (build_baselink): New method. + (build_offset_ref_call_from_tree): Likewise. + (build_call_from_tree): Likewise. + (finish_qualified_call_expr): Remove. + (finish_call_expr): Adjust prototype. + (build_x_function_call): Remove. + * cvt.c (ocp_convert): Use build_special_member_call. + * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr. + (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and + CALL_EXPR. + (build_offset_ref_call_from_tree): New function. + (build_call_from_tree): Likewise. + * init.c (expand_cleanup): Use build_special_member_call. + (expand_default_init): Likewise. + (build_member_call): Use finish_call_expr. + (build_new_1): Use build_special_member_call. + (push_base_cleanups): Likewise. + * method.c (do_build_assign_ref): Likewise. + * parse.y (template_id): Do not pass a COMPONENT_REF to + lookup_template_function. + (primary): Use parse_finish_call_epxr, not finish_call_expr. + (parse_finish_call_expr): New function. + * pt.c (lookup_template_function): Add assertions. + * search.c (lookup_base): Allow T to be a binfo. + (build_baselink): New function. + (lookup_member): Use it. + * semantics.c (finish_call_expr): Do not do name lookup. + (finish_object_call_expr): Remove #if 0'd code. + (finish_qualified_call_expr): Remove. + * typeck.c (build_x_function_call): Remove. + (build_static_case): Use build_special_member_call. + * typeck2.c (build_functional_cast): Likewise. + +2002-07-30 Franz Sirl + + * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. + +2002-07-30 Gabriel Dos Reis + + * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion. + +2002-07-30 Nathan Sidwell + + * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more + documentation. + +2002-07-29 Alan Modra + + * cp-tree.h: Comment typo fix. + +2002-07-29 Richard Earnshaw + + * spew.c (space_for_token): Allocate zeroed memory for a new token + chunk. + +2002-07-27 Roger Sayle + + * decl.c (builtin_function_1): No need to explicitly mark + BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. + +2002-07-27 Roger Sayle + + * decl2.c (cxx_decode_option): Support -fno-builtin-foo. + +2002-07-26 Jason Merrill + + * call.c (build_over_call): Likewise. + (cp_convert_parm_for_inlining): New fn. + (convert_for_arg_passing): New fn. + (convert_default_arg, build_over_call): Use it. + (type_passed_as): New fn. + * pt.c (tsubst_decl): Use it. + * decl2.c (cp_build_parm_decl): New fn. + (build_artificial_parm): Use it. + (start_static_storage_duration_function): Likewise. + * decl.c (start_cleanup_fn, grokdeclarater): Likewise. + (grokparms): Don't mess with DECL_ARG_TYPE. + * typeck.c (convert_arguments): Use convert_for_arg_passing. + * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): + Define. + * cp-tree.h: Declare new fns. + +2002-07-26 Neil Booth + + * cp-tree.h (flag_operator_names): Remove. + * decl2.c (flag_operator_names): Remove. + (lang_f_options): Remove operator-names. + * lex.c (D_OPNAME): Remove. + (reswords): Remove operator names. + (rid_to_yy): Remove operator names. + (init_reswords): No need to handle D_OPNAME. + * spew.c (read_process_identifier): There are no operator + names. + +2002-07-26 Jason Merrill + + * dump.c (cp_dump_tree): Call c_dump_tree. + * Make-lang.in (CXX_C_OBJS): Add c-dump.o. + +2002-07-25 Neil Booth + + * error.c (print_whitespace): Remove. + * g++spec.c (LIBUNWIND): Move. + * mangle.c (mangled_position, write_signed_number): Remove. + +2002-07-25 Neil Booth + + * decl2.c (cxx_decode_option): Similarly. + +2002-07-25 Gabriel Dos Reis + + * cp-tree.h (cxx_sizeof_nowarn): Now a macro. + (cxx_sizeof_or_alignof_type): Take a third argument. + (cxx_sizeof): Adjust definition. + (cxx_alignof): Likewise. + * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality. + * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for + complaining. + (c_sizeof_nowarn): Remove definition. + (build_unary_op): Use cxx_sizeof_nowarn. + +2002-07-24 Geoffrey Keating + + * tree.c (cp_build_qualified_type_real): When copying + pointer-to-method types, unshare the record that holds + the cached pointer-to-member-function type. + +2002-07-23 Neil Booth + + * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove. + +2002-07-23 Gabriel Dos Reis + + Fix PR/7363: + * typeck.c (cxx_sizeof_or_alignof_type): New function. + (c_sizeof): Remove definition. + (expr_sizeof): Use cxx_sizeof. + * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type. + * decl.c (finish_destructor_body): Use cxx_sizeof. + * semantics.c (finish_alignof): Likewise. + (finish_alignof): Use cxx_alignof. + * cp-tree.h (cxx_sizeof, cxx_alignof): New macros. + (cxx_sizeof_or_alignof_type): Declare. + (my_friendly_assert): Move to ../c-common.h. + +2002-07-23 Neil Booth + + * class.c, method.c, pt.c, search.c: Don't define obstack macros. + +2002-07-22 Kriang Lerdsuwanakij + + PR c++/7347, c++/7348 + * cp-tree.h (tsubst_flags_t): Add tf_parsing. + * decl.c (make_typename_type): Use it. + (make_unbound_class_template): Likewise. + (lookup_name_real): Don't call type_access_control if scope is + template parameter dependent. + * parse.y (template_arg): Call make_unbound_class_template with + tf_parsing set. + (nest_name_specifier): Call make_typename_type with tf_parsing set. + (typename_sub0): Likewise. + (typename_sub1): Likewise. + (instantiate_decl): Push class scope. + * pt.c (regenerate_decl_from_template): Call pushclass and popclass + for both static variable and member function template. + (instantiate_decl) Call pushclass and popclass when tsubst'ing type + and arguments. + * search.c (type_access_control): Do type access for TEMPLATE_DECL + too. + +2002-07-20 Roger Sayle + + * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions + test by using positive_option. Make whitespace consistent. + +2002-07-20 Gabriel Dos Reis + + * spew.c (struct unparsed_test): Replace 'filename' and 'lineno' + members with 'locus'. Adjust use throughout. + (struct feed): Likewise. + (alloc_unparsed_test): Change prototype, take a 'const location_t *'. + Adjust use. + (snarf_defarg): Use error(), not error_with_file_and_line(). + +2002-07-19 Chris Demetriou + + * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever + cpp_options is included. + +2002-07-17 Kriang Lerdsuwanakij + + PR c++/2862, c++/2863 + * pt.c (determine_specialization): Compare the length of + TYPE_ARG_TYPES. Tidy. + +2002-07-17 Kriang Lerdsuwanakij + + PR c++/3797 + * decl.c (duplicate_decls): Don't propagate inlining parameters from + olddecl to newdecl when newdecl is a specialization of the + instantiation olddecl. + +2002-07-17 Kriang Lerdsuwanakij + + PR c++/4802, c++/5387 + * decl.c (make_typename_type): Use enforce_access. + +2002-07-17 Scott Snyder + + PR c++/7320 + * rtti.c (get_tinfo_decl): Set DECL_COMDAT. + +2002-07-12 Mark Mitchell + + * class.c (add_method): Correct handling of conversion operators. + +2002-07-11 Mark Mitchell + + PR c++/7224 + * class.c (add_method): Simplify. + +2002-07-11 Jason Merrill + + PR c++/7279 + * tree.c (cp_copy_res_decl_for_inlining): Also copy + TREE_ADDRESSABLE. + +2002-07-10 Graham Stott + + * pt.c (template_parm_this_level_p, push_template_decl_real): + Pass depth as int pointer. + +2002-07-11 Tim Josling + + Remove front end hard coding from gengtype.c. + + * config-lang.in (gtfiles): Add files needed for this front end. + +2002-07-10 Mark Mitchell + + * cp-tree.h (unqualified_name_lookup_error): Declare it. + (begin_function_definition): Adjust prototype. + * lex.c (unqualified_name_lookup_error): New function, split out + from ... + (do_identifier): ... here. + * parse.y (parse_begin_function_definition): New function. + (fn.def1): Use it. + * semantics.c (begin_function_definition): Accept decl-specifiers + and attributes as separate parameters. + +2002-07-10 Jason Merrill + + PR c++/6255 + * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than + modifying the old one. + +2002-07-09 Mark Mitchell + + * cp-tree.h (constructor_name_p): Declare it. + (check_template_template_default_arg): Likewise. + * class.c (handle_using_decl): Use constructor_name_p. + * decl.c (grokdeclarator): Likewise. + * decl2.c (constructor_name_p): Define it. + * init.c (build_member_call): Use constructor_name_p. + * parse.y (template_parm): Use check_template_template_default_arg. + * pt.c (check_explicit_specialization): Use constructor_name_p. + * semantics.c (check_template_template_default_arg): New function. + +2002-07-08 Kriang Lerdsuwanakij + + * pt.c (can_complete_type_without_circularity): Add static to + function definition. + +2002-07-08 Mark Mitchell + + * cp-tree.h (have_extern_spec): Declare it + * decl.c (have_extern_spec): Define it. + (start_decl): Eliminate use of used_extern_spec. + (start_function): Likewise. + * parse.y (have_extern_spec): Remove declaration. + (used_extern_spec): Likewise. + (frob_specs): Eliminate use of used_extern_spec. + (.hush_warning): Likewise. + +2002-07-07 Mark Mitchell + + * Make-lang.in (cp/parse.o): Depend on decl.h. + * cp-tree.h (do_decl_instantiation): Change prototype. + * parse.y: Include decl.h. + (parse_decl_instantiation): New function. + (explicit_instantiation): Use it. + * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR + and DECLSPECS. + +2002-07-07 Roger Sayle + + * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for + constructor and destructor tests when passed a TEMPLATE_DECL. + +2002-07-05 Jason Merrill + + * cvt.c (cp_convert_to_pointer): Call force_fit_type for null + pointers. + + PR optimization/7145 + * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. + +2002-07-05 Nathan Sidwell + + Repair damage on weak-impared targets caused by my previous patch. + * cp-tree.h (import_export_tinfo): Add parameter. + * decl2.c (import_export_tinfo): Add parameter, post adjust + DECL_COMDAT. + * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by + import_export_tinfo. + +2002-07-03 Kriang Lerdsuwanakij + + PR c++/6944 + * init.c (build_aggr_init): Remove qualifiers of init before calling + build_vec_init. + (build_vec_init): Flatten multi-dimensional array during cleanup. + (build_vec_delete_1): Abort if the type of each element is array. + +2002-07-03 Graham Stott + + * pt.c (instantiate_class_template): Fix typo. + +2002-07-02 Kriang Lerdsuwanakij + + * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused + by CVS conflict in my last patch. + +2002-07-02 Kriang Lerdsuwanakij + + PR c++/6716 + * pt.c (can_complete_type_without_circularity): New function. + (instantiate_class_template): Use it. + * typeck2.c (cxx_incomplete_type_diagnostic): Improve error + message due to incomplete fields. + +2002-07-01 Mark Mitchell + + PR c++/7112 + * mangle.c (write_expression): Add mangling for sizeof when + applied to a type. + * operators.def: Remove stale comment. + +2002-06-30 Nathan Sidwell + + * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... + (CPTI_TYPE_INFO_PTR_TYPE): ... this. + (tinfo_decl_type): Replace with ... + (type_info_ptr_type): ... this. + (import_export_tinfo): Declare. + (tinfo_decl_p): Rename to ... + (unemitted_tinfo_decl_p): ... this. + * decl2.c (import_export_decl): Break out tinfo handling into ... + (import_export_tinfo): ... here. New function. + (finish_file): Adjust. + * rtti.c (TINFO_REAL_NAME): New macro. + (init_rtti_processing): Create the tinfo types. + (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. + (get_tinfo_decl): Adjust. + (get_tinfo_ptr): New function. + (get_type_id): Use it. + (tinfo_base_init): Create vtable decl here, if it doesn't exist. + (ptr_initializer): Use get_tinfo_ptr. + (ptm_initializer): Likewise. + (synthesize_tinfo_var): Break into ... + (get_pseudo_ti_init): ... this. Just create the initializer. + (get_pseudo_ti_desc): .. and this. + (create_real_tinfo_var): Remove. + (create_pseudo_type_info): Don't create the vtable decl here. + (get_vmi_pseudo_type_info): Remove. + (create_tinfo_types): Adjust. + (tinfo_decl_p): Rename to ... + (unemitted_tinfo_decl_p): ... here. Adjust. + (emit_tinfo_decl): Adjust. Create the initializer. + +2002-06-27 Mark Mitchell + + PR c++/6695 + * pt.c (tsubst_friend_class): Substitute into the context of the + friend before using it. + +2002-06-26 Mark Mitchell + + * cp-tree.h (xref_tag): Change prototype. + (handle_class_head): Likewise. + (build_x_component_ref): Likewise. + * decl.c (cxx_init_decl_processing): Adjust call to xref_tag. + (xref_tag): Take attributes as a separate parameter. + (xref_tag_from_type): Adjust call to xref_tag. + * decl2.c (build_expr_from_tree): Adjust call to + build_x_component_ref. + (handle_class_head): Take attributes as a separate parameter. + * parse.y (parse_xref_tag): New function. + (parse_handle_class_head): Likewise. + (primary): Use parse_xref_tag. + (class_head_decl): Use parse_handle_class_head. + (class_head_defn): Likewise. + * rtti.c (init_rtti_processing): Adjust call to xref_tag. + (build_dynamic_cast_1): Likewise. + (create_pseudo_type_info): Likewise. + (emit_support_tinfos): Likewise. + * typeck.c (build_object_ref): Adjust call to + build_x_component_ref. + (build_x_component_ref): Remove protect parameter. + +2002-06-25 Mark Mitchell + + * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS. + * class.c (handle_using_decl): Likewise. + (instantiate_type): Likewise. + * cp-tree.h (BASELINK_FUNCTIONS): New macro. + (xref_basetypes): Change prototype. + (begin_mem_initializers): New function. + (get_overloaded_fn): Likewise. + * decl.c (xref_basetypes): Simplify. + * error.c (dump_expr): Use BASELINK_FUNCTIONS. + * init.c (build_offset_ref): Likewise. + * parse.y (base_init): Use begin_mem_initializers(). + (structsp): Adjust call to xref_basetypes. + * pt.c (determine_specialization): Use BASELINK_FUNCTIONS. + (instantiate_class_template): Adjust call to xref_basetypes. + * semantics.c (begin_mem_initializers): New function. + * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS. + (really_overloaded_fn): Likewise. + (get_overloaded_fn): New function.' + (get_first_fn): USe BASELINK_FUNCTIONS. + +2002-06-24 Mark Mitchell + + * cp-tree.h (SCALAR_TYPE_P): New macro. + (check_for_out_of_scope_variable): New function. + (at_class_scope_p): Likewise. + (finish_fname): Likewise. + * class.c (finish_struct): Use at_function_scope_p. + * decl.c (check_for_out_of_scope_variable): New function, split + out from do_identifier. + (finish_enum): Use at_function_scope_p. + * lex.c (do_identifier): Use check_for_out_of_scope_variable. + * parse.y (VAR_FUNC_NAME): Give it . Use finish_fname. + (primary): Use at_function_scope_p. + * search.c (at_class_scope_p): New function. + * semantics.c (finish_fname): Likewise. + (check_multiple_declarators): Use at_function_scope_p. + +2002-06-23 Mark Mitchell + + * parse.y (parse_scoped_id): New function. + (primary): Use it. + * cp-tree.h (do_scoped_id): Adjust declaration. + * lex.c (do_scoped_id): Remove call to yylex. + * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id. + * typeck2.c (add_exception_specifier): Use tree_cons, rather than + expanding it inline. + +2002-06-23 Matt Thomas + + * decl.c (finish_function): Change "#ifdef VMS_TARGET" to + "#if VMS_TARGET". + +2002-06-21 Kaveh R. Ghazi + + * mangle.c (integer_type_codes): Const-ify. + +2002-06-20 Richard Henderson + + PR c++/6747 + * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. + Call put_var_into_stack. + +2002-06-20 Kaveh R. Ghazi + + * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit + array size calculation. + +2002-06-20 Kriang Lerdsuwanakij + + PR c++/6892 + * pt.c (tsubst_expr): Handle FILE_STMT. + +2002-06-20 Kriang Lerdsuwanakij + + PR c++/6723 + * pt.c (lookup_template_class): Don't build complete argument of + BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template + argument. + +2002-06-19 Akim Demaille + + * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with + decl.h's TYPENAME. + * spew.c, lex.c: Adjust. + * parse.y (explicit_instantiation): Add empty action to override + the default $$ = $1 where it introduces a type clash. + +2002-06-14 Jason Merrill + + * semantics.c (begin_for_stmt): Push the 'for' scope before + adding the FOR_STMT. + + C++ ABI changes. + * class.c (build_base_field): Set DECL_PACKED. + (layout_class_type): Don't use tail padding of PODs. + * mangle.c (write_unqualified_name): Fix template conversion op + mangling. + +2002-06-16 Richard Henderson + + PR opt/6793 + * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test + after template instantiation. + +2002-06-16 Richard Henderson + + * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. + +2002-06-15 Gabriel Dos Reis + + * cp-tree.h (compiler_error): Remove declaration. + * lex.c (compiler_error): Remove definition. + +2002-06-14 Steve Ellcey + + * g++spec.c (LIBUNWIND): New. + (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set. + +2002-06-13 Jessica Han + + * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN. + (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE. + (build_vbase_offset_vtbl_entries): Likewise. + * rtti.c (build_headof): Likewise. + (get_tinfo_decl_dynamic): Likewise. + (create_pseudo_type_info): Likewise. + +2002-06-12 Stan Shebs + + * mpw-config.in: Remove file, no longer used. + * mpw-make.sed: Ditto. + +2002-06-07 Zack Weinberg + + * decl2.c: Update call to cpp_handle_option. + +2002-06-07 H.J. Lu (hjl@gnu.org) + + * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. + +2002-06-06 Gabriel Dos Reis + + * error.c (cp_error_at): Fix typo. + +2002-06-04 Gabriel Dos Reis + + * error.c (cp_diagnostic_starter): Adjust call. + (maybe_print_instantiation_context): Change prototype to take a + 'diagnostic_info *'. + (print_instantiation_full_context): Likewise. + (print_instantiation_partial_context): Likewise. + (cp_diagnostic_starter): Likewise. + (cp_diagnostic_finalizer): Likewise. + (cp_print_error_function): Likewise. + (cp_printer): Take a secondary parameter as a 'text_info *'. + Remove output_state savings. Adjust calls. + +2002-06-03 Geoffrey Keating + + * pt.c (inline_parm_levels): Mark for GC. + + * mangle.c (start_mangling): Allocate G.substitutions here... + (init_mangle): ... rather than here. + (finish_mangling): Clear the varray pointer when done with it. + * spew.c (yylexstring): Don't use VARRAY_FREE. + * search.c (bfs_walk): Don't use VARRAY_FREE. + * decl2.c (pending_statics): Use gengtype to mark. + (deferred_fns): Likewise. + (ssdf_decls): Likewise. + (init_decl2): Delete. + * decl.c (pop_from_top_level): Don't use VARRAY_FREE. + (cxx_init_decl_processing): Don't call init_decl2. + (cxx_pop_function_context): Don't use VARRAY_FREE. + * cp-tree.h (struct saved_scope): No need for special marking + of varrays. + (struct language_function): Likewise. + (local_classes): Use gengtype to mark. + (init_decl2): Delete prototype. + * class.c (init_class_processing): Don't use + ggc_add_tree_varray_root. + (build_vtbl_initializer): Don't use VARRAY_FREE. + + * decl.c (typename_compare): Don't use same_type_p. + + * decl.c: Include hashtab.h instead of hash.h. + (typename_hash): Update to use htab_h. + (typename_compare): Likewise. + (typename_htab): Use gengtype to mark. + (build_typename_type): Update to use htab_h. + * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h. + + * Make-lang.in (gt-cp-tree.h): New rule. + (cp/tree.o): Depend on gt-cp-tree.h. + * config-lang.in (gtfiles): Add cp/tree.c. + * tree.c: Include gt-cp-tree.h. + (list_hash_table): Use gengtype to mark. + (init_tree): Use gengtype to mark trees. + + * Make-lang.in (cp/decl.o): Add debug.h dependency. + * call.c (struct z_candidate): Use gengtype. + (USER_CONV_CAND): Use WRAPPER_ZC. + (convert_class_to_reference): Use build_zc_wrapper. + (build_type_conversion_1): Likewise. + (build_over_call): Use WRAPPER_ZC. + (add_warning): Use build_zc_wrapper. + * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete. + * cp-tree.h (struct lang_identifier): Use gengtype. + (struct template_parm_index_s): Likewise. + (struct ptrmem_cst): Likewise. + (struct tree_binding): Likewise. + (struct tree_overload): Likewise. + (struct tree_srcloc): Likewise. + (struct tree_wrapper): Likewise. Also modify to have a pointer + to struct z_candidate rather than void. + (enum cp_tree_node_structure_enum): New. + (union lang_tree_node): New. + (cxx_mark_tree): Delete prototype. + (cp_tree_node_structure): New prototype. + (build_ptr_wrapper): Delete prototype. + (build_int_wrapper): Delete prototype. + (build_zc_wrapper): New prototype. + * decl.c: Include debug.h + (cxx_mark_tree): Delete. + (cp_tree_node_structure): New. + * tree.c (build_ptr_wrapper): Delete. + (build_int_wrapper): Delete. + (build_zc_wrapper): New. + + * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK): + Correct typo. Patch from k_fukui@highway.ne.jp. + + * semantics.c (current_stmt_tree): Update for change to + struct language_function. + (finish_mem_initializers): Likewise. + * decl.c (cxx_init_decl_processing): Don't set mark_lang_status. + * cp-tree.h (struct language_function): Rename from + cp_language_function. Change all uses. + (cp_function_chain): Don't need to cast. + + * class.c (duplicate_tag_error): Reset discriminator. + (check_bases_and_members): Update for data structure changes. + * cp-tree.h (struct lang_id2): Use gengtype. + (flagged_type_tree): Likewise. + (SET_LANG_ID): Use GGC on struct lang_id2. + (struct cp_language_function): Use gengtype. Remove field + 'x_vcalls_possible_p'. + (current_vcalls_possible_p): Delete. + (struct lang_type_header): New. + (struct lang_type_class): Rename from struct lang_type. Include + struct lang_type_header. + (struct lang_type_ptrmem): New. + (struct lang_type): New. + (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros. + (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros. + (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes. + (struct lang_decl_flags): Use gengtype. Add discriminators. + (struct lang_decl): Use gengtype. Add and use discriminators. + Update the macros that reference moved fields. + (LANG_DECL_U2_CHECK): New function. Use it when appropriate. + (SET_DECL_THUNK_P): Set discriminator too. + (clear_inline_text_obstack): Delete prototype. + (finish_inline_definitions): Delete prototype. + (mark_pending_inlines): Delete prototype. + (lang_check_failed): New prototype. + * decl.c (struct named_label_use_list): Use gengtype. + (struct named_label_list): Likewise. + (mark_binding_level): Delete. + (mark_named_label_lists): Delete. + (push_local_name): Set discriminator on DECL_LANG_SPECIFIC. + (cxx_init_decl_processing): Use generated marker routine. + (begin_destructor_body): Delete dead set to + current_vcalls_possible_p. + (mark_lang_function): Delete. + (mark_cp_function_context): Delete. + (lang_mark_tree): Use generated marker routines. + * decl2.c (start_objects): Set discriminator when setting + GLOBAL_INIT_PRIORITY. + * lex.c (retrofit_lang_decl): Set discriminators. + (copy_lang_type): Update for changes to lang_type structure. + (cp_make_lang_type): Set discriminator. + * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers. + * search.c: Include ggc.h. + * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it. + (finish_inline_definitions): Delete. + * spew.c (struct token): Use gengtype. + (struct token_chunk): New. + (struct unparsed_text): Use gengtype. Store tokens in chunks. + (struct feed): Use gengtype. + (feed_obstack): Delete. + (feed): Mark as GC root. + (pending_inlines): Mark as GC root. + (pending_inlines_tail): Likewise. + (processing_these_inlines): Likewise. + (token_obstack): Make static. + (first_token): Likewise. + (init_spew): Don't initialize deleted things; use gengtype for roots. + (clear_inline_text_obstack): Delete. + (feed_input): Use GC for struct feed. Update for changes to + struct unparsed_text. + (mark_pending_inlines): Delete. + (next_token): Rename from add_token. Change all callers. Update + for changes to struct unparsed_text. + (space_for_token): New. + (remove_last_token): New. + (alloc_unparsed_text): New. + (snarf_block): Take an unparsed_text. Update for changes to struct + unparsed_text. + (snarf_method): Update for changes to struct unparsed_text. + (snarf_defarg): Update for changes to struct unparsed_text. + * tree.c (lang_check_failed): New. + + * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h + gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules. + (cp/spew.o): Add dependency on gt-.h. + (cp/decl2.o): Add dependency on gt-.h. + (cp/call.o): Add dependency on gt-.h. + (cp/pt.o): Add dependency on gt-.h. + (cp/repo.o): Add dependency on gt-.h. + (cp/parse.o): Add dependency on gt-.h. + * call.c: Use gengtype for roots. + * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c + decl2.c parse.y pt.c repo.c spew.c. + * cp-tree.h: Use gengtype for roots. + (struct saved_scope): Use GGC, gengtype. + (cp_parse_init): Delete prototype. + (init_pt): Delete prototype. + * decl.c: Use gengtype for roots. + (mark_saved_scope): Delete. + (cxx_init_decl_processing): Don't call deleted initilisation + routines. + (signed_size_zero_node): Delete, unused. + * decl.h: Use gengtype for roots. + * decl2.c: Use gengtype for roots. + * lex.h: Use gengtype for roots. + * parse.y: Use gengtype for roots. + (cp_parse_init): Delete. + * pt.c: Use gengtype for roots. + (init_pt): Delete. + * repo.c: Use gengtype for roots. + * spew.c: Use gengtype for roots. + + * Make-lang.in: Allow for filename changes. Add gtype-cp.h. + (cp/decl.o): Add dependency on gtype-cp.h. + * decl.c: Remove use of add_deletable_root, use GTY marker instead. + Include gtype-cp.h. Allow for filename changes. + + * Make-lang.in (cp/gt-decl.h): Generate using gengtype. + (cp/decl.o): Add cp/gt-decl.h dependency. + * config-lang.in (gtfiles): New. + * tree.h: Rename struct binding_level to struct cp_binding_level. + * decl.c: Rename struct binding_level to struct cp_binding_level. + Include cp/gt-decl.h. + (struct cp_binding_level): Use gengtype. + (make_binding_level): Use GGC on struct cp_binding_level. + (mark_binding_level): Use gt_ggc_m_cp_binding_level. + (cxx_init_decl_processing): Mark free_binding_level as + deletable. + + * decl.c (mark_cp_function_context): Update calling sequence. + + * decl.c (start_function): Don't free 'struct + cp_language_function'. + (pop_cp_function_context): Likewise. + (save_function_data): Allocate it using GC. + * semantics.c (genrtl_start_function): Don't free 'struct + cp_language_function'. + +2002-05-31 Matthew Woodcraft + + * lang-specs.h: Use cpp_debug_options. + +2002-05-28 Zack Weinberg + + * mangle.c, tree.c: Include real.h. + * Make-lang.in: Update dependency lists. + +2002-05-25 Neil Booth + + * lex.c: Don't include c-lex.h. + * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. + +2002-05-23 Neil Booth + + * spew.c (yyungetc, snarf_block): Remove indent_level handling. + +2002-05-22 Richard Henderson + + * decl.c (obscure_complex_init): Check for VAR_DECL + before using DECL_THREAD_LOCAL. + +2002-05-22 Richard Henderson + + * decl.c (check_tag_decl): Handle RID_THREAD. + (obscure_complex_init): Reject run-time init of tls. + (grokvardecl, grokdeclarator): Handle RID_THREAD. + * lex.c (reswords): Add __thread. + (rid_to_yy): Map RID_THREAD to SCSPEC. + +2002-05-22 Neil Booth + + * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. + * cp-tree.h (cxx_post_options): Kill. + * cp-lex.c (cxx_post_options): Kill. + +2002-05-21 Richard Henderson + + * lex.c (rid_to_yy): Add RID_THREAD. + +2002-05-21 Alexandre Oliva + + * init.c (build_vec_init): Test for trivial copy-assignment when + copy-assigning arrays. + +2002-05-20 Andreas Jaeger + + * init.c (build_default_init): Remove unused variable. + +2002-05-20 Alexandre Oliva + + * call.c (any_strictly_viable): New. + (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs. + +2002-05-19 Kriang Lerdsuwanakij + + * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. + +2002-05-19 Kriang Lerdsuwanakij + + PR c++/186, DR 259 + * pt.c (do_decl_instantiation): Don't complain explicit + instantiation after explicit specialization. + (do_type_instantiation): Likewise. + +2002-05-19 Alexandre Oliva + + * cp-tree.h (complete_type_or_diagnostic): Changed prototype, + renamed from... + (complete_type_or_else): ... this. Redefined as macro. + (cxx_incomplete_type_diagnostic): Declare. + (cxx_incomplete_type_error): Define as macro. + * init.c (build_delete): Warn about incomplete types other than + void, and use the built-in operator delete for them. + * typeck.c (complete_type_or_diagnostic): Renamed from + complete_type_or_else. Added warn_only argument, passed to... + * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print + warnings or errors depending on new warn_only argument. Renamed + from... + (cxx_incomplete_type_error): ... this. New implementation in + terms of cxx_incomplete_type_diagnostic. + +2002-05-18 Jason Merrill + + PR c++/6611 + * decl2.c (import_export_decl): If we clear + DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. + +2002-05-15 Kriang Lerdsuwanakij + + PR c++/6620 + * pt.c (verify_class_unification): Don't check if PARM is template + parameter dependent. Simplify. + (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template + parameter dependent expression. + +2002-05-14 Jason Merrill + + * rtti.c (get_tinfo_decl): Don't call comdat_linkage. + Do set DECL_COMDAT. + (synthesize_tinfo_var): Take the public decl. + (create_real_tinfo_var): Likewise. Check DECL_COMDAT. + (emit_tinfo_decl): Adjust. Call import_export_decl. + * decl2.c (import_export_decl): Simplify tinfo decl handling. + +2002-05-14 Alexandre Oliva + + * cp-tree.h (struct lang_type): Added non_zero_init. + (CLASSTYPE_NON_ZERO_INIT_P): New macro. + (zero_init_p, force_store_init_value, build_forced_zero_init): Declare. + * class.c (check_field_decls): Test non_zero_init. + * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for + zero-to-NULL conversions. + * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a + type that needs zero-initialization without zeros. + (check_initializer_decl): Compute zero-initializer for types + that require a non-trivial one. + * init.c (build_forced_zero_init): New function. + (build_default_init): Use it. + * tree.c (zero_init_p): New function. + * typeck2.c (force_store_init_value): New function. + (process_init_constructor): Create non-trivial zero-initializers + for array members and class fields. + +2002-05-14 Neil Booth + + * lang-specs.h: Remove redundant -lang-c++. + +2002-05-13 Jason Merrill + + * class.c (build_vtbl_ref_1): Use fixed_type_or_null. + (fixed_type_or_null): See through reference vars. + (build_base_path): Vtable contents are constant. + * typeck.c (get_member_function_from_ptrfunc): Likewise. + +2002-05-12 Jason Merrill + + * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created + structs are safe. + +2002-05-09 Neil Booth + + * cp-tree.h (flag_ansi): Remove. + * decl2.c (flag_ansi): Remove. + (cxx_decode_option): Set flag_iso and flag_undef. + +2002-05-09 Jason Merrill + + * typeck.c (get_member_function_from_ptrfunc): Reorganize. + Use subtraction rather than a bitmask to get the index. + * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node. + + * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. + +2002-05-07 Neil Booth + + * Make-lang.in (decl2.o): Update. + * cp-tree.h (warn_multichar): Remove. + * decl2.c: Include c-common.h. + (warn_multichar): Remove. + +2002-05-03 Jason Merrill + + * tree.c (build_cplus_array_type): Only const and volatile get + special handling. + + * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. + +2002-04-30 Mark Mitchell + + ABI change, returning simple classes from functions. + * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if + TYPE_HAS_TRIVIAL_INIT_REF is false or + TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true. + +2002-04-30 Jason Merrill + + PR debug/6436 + * decl.c (grokdeclarator): Don't override TYPE_NAME of an + anonymous class with a typedef if there are attributes. + +2002-04-29 Paul Eggert + + * parse.y (nomods_initdcl0): Replace $3 with $$. + +2002-04-29 Jakub Jelinek + + PR c++/6477 + * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is + non-NULL first. + +2002-04-29 Mark Mitchell + + PR c++/6492 + * pt.c (tsubst_friend_class): If the friend has an explicit scope, + enter that scope before name lookup. + + PR c++/6486 + * method.c (do_build_copy_constructor): Avoid building + cv-qualified reference types. + +2002-04-29 Nathan Sidwell + + PR c++/5719 + * decl.c (grok_op_properties): Assignment ops don't have to return + by value. operator% should. + +2002-04-28 Franz Sirl + + PR c/6343 + * decl.c (duplicate_decls): Call merge_weak. + +2002-04-26 Richard Henderson + + * parse.y (malloced_yyss, malloced_yyvs): New. + (yyoverflow): Re-add. Set them. + (free_parser_stacks): New. + +2002-04-26 Mark Mitchell + + PR c++/6497 + * method.c (do_build_assign_ref): Pass a derivation to + build_method_call when calling base class assignment operators. + +2002-04-26 Richard Henderson + + * parse.y (yyoverflow): Revert. + +2002-04-26 Richard Henderson + + PR c/3581 + * parse.y (string): Remove. Update all uses to use STRING + instead, and not call combine_strings. + * rtti.c (tinfo_name): Use fix_string_type. + * semantics.c (finish_asm_stmt): Don't call combine_strings. + * spew.c (yylexstring): New. + (read_token): Use it. + +2002-04-25 Richard Henderson + + PR c/2161 + * parse.y (yyoverflow): New. + +2002-04-25 Jason Merrill + + PR c++/5607 + * search.c (check_final_overrider): No longer static. + * class.c (update_vtable_entry_for_fn): Call it. + * cp-tree.h: Adjust. + +2002-04-25 Neil Booth + + * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. + * cp-tree.h (cxx_set_yydebug): Die. + * lex.c (YYDEBUG): Get from c-lex.h. + (cxx_set_yydebug): Remove. + * parse.y: Include c-lex.h. + (YYDEBUG): Get from c-lex.h. + +2002-04-24 Mark Mitchell + + PR c++/6438. + * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs + void. + +2002-04-24 Neil Booth + + * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, + LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): + Redefine. + * cp-tree.h (cp_attribute_table): Rename. + * decl.c (lang_attribute_table): Remove declaration. + (cxx_init_decl_processing): Don't set it. + * tree.c (cp_attribute_table): Rename. + +2002-04-24 Jason Merrill + + PR c++/6331 + * method.c (do_build_copy_constructor): Use cp_build_qualified_type. + * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals. + The pedwarn for array assignment is now unconditional. + * tree.c (build_cplus_array_type_1): Still process simple array types + normally in templates. + + PR c++/6395 + * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i + stuff for comdats. + +2002-04-23 Jakub Jelinek + + * parse.y (check_class_key): Allow KEY to be union/enum/struct/class + node with attributes. + +2002-2-23 David O'Brien + + * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add. + Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given. + +2002-04-23 Mark Mitchell + + PR c++/6256: + * pt.c (tsubst_friend_class): Handle templates with explicit + nested names. + + PR c++/6331: + * typeck.c (merge_types): Remember the cv-qualification of pointer + types when merging them. + +2002-04-20 Neil Booth + + * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, + LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. + * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, + cxx_mark_function_context): New. + * decl.c (push_cp_function_context, pop_cp_function_context, + mark_cp_function_context): Rename for consistency. + (cxx_init_decl_processing): Don't set old hooks. + +2002-04-19 Neil Booth + + * call.c (convert_type_from_ellipsis): Rename, update. + * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. + * cp-tree.h (convert_type_from_ellipsis): Rename. + * decl.c (cxx_init_decl_processing): Don't set hook. + +2002-04-18 Neil Booth + + * call.c (build_new_method_call): Update. + * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. + * cp-tree.h (cxx_incomplete_type_error): New. + * decl.c (grokdeclarator, grokparms): Update. + * decl2.c (check_classfn): Update. + * pt.c (tsubst): Update. + * typeck.c (complete_type_or_else, expr_sizeof, + decay_conversion): Update. + * typeck2.c (incomplete_type_error): Rename. + (add_exception_specifier): Update. + +2002-04-18 Jason Merrill + + PR c++/5658 + * search.c (setup_class_bindings): A class template qualifies as a + type binding. + +2002-04-17 Jakub Jelinek + + PR c++/6316 + * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop + before expanding. + +2002-04-16 Mark Mitchell + + * init.c (begin_init_stmts): Remove commented out code. + (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. + * semantics.c (begin_gobal_stmt_expr): Adjust call to + expand_start_stmt_expr. + +2002-04-15 Mark Mitchell + + * decl.c (register_dtor_fn): Pass the address of dso_handle, not + dso_handle itself, to __cxa_atexit. + +2002-04-15 Gabriel Dos Reis + + * error.c (cxx_print_error_function): Adjust call to macros. + +2002-04-14 Jakub Jelinek + + * class.c (layout_virtual_bases): Do all dsize computation on trees. + +2002-04-14 Jason Merrill + + * typeck.c (get_member_function_from_ptrfunc): Don't do + gratuitious division and multiplication on + ptrmemfunc_vbit_in_delta targets. + +2002-04-12 Mark Mitchell + + PR c++/5373. + * semantics.c (finish_expr_stmt): Remember the type of the + expression before any conversions are performed. + +2002-04-12 Mark Mitchell + + PR c++/5189. + * call.c (add_template_candidate_real): Do not treat member + templates as copy constructors. + +2002-04-12 Mark Mitchell + + * decl.c (duplicate_decls): Do not copy the RTL for a variable + declaration if the old variable had an incomplete type and the new + variable does not. + (complete_vars): Do not call layout_decl for completed variables. + +2002-04-12 Richard Sandiford + + * decl.c (duplicate_decls): Don't try to unify an implicit typedef + with an explicit one. + (follow_tag_typedef): New. + (lookup_tag): Use it to extract the tag of an explicit typedef. + (xref_tag): Likewise. + +2002-04-11 Andrew Haley + + * typeck.c (type_after_usual_arithmetic_conversions): + If two types have the same variant, return immediately. + When two floating-point operands are the same precision: + convert to float if one of the operands is float; + if neither operand is one of the standard types, return the type + of the first operand. + +2002-04-10 Nathan Sidwell + + PR c++/5507 + * decl.c (make_typename_type): Remove implicit typenameness. + +2002-04-09 Jason Merrill + + PR optimization/6189 + * semantics.c (genrtl_start_function): Don't free + DECL_SAVED_FUNCTION_DATA for inline functions. + + * init.c (build_member_call): For now, don't convert to + intermediate base if it would cause an error. + +2002-04-08 Paolo Carlini + + * parse.y (namespace_qualifier, maybe_identifier, + begin_explicit_instantiation, end_explicit_instantiation, + apparent_template_type, .finish_template_type, + do_id, maybe_init, defarg_again, component_decl_1): + Add ending ';', in accordance with POSIX. + +2002-04-06 Mark Mitchell + + PR c++/5571 + * class.c (layout_class_type): Remember incomplete static + variables. + (finish_struct_1): Call complete_vars, not + hack_incomplete_structures. + * cp-tree.h (hack_incomplete_structures): Rename to ... + (complete_vars): ... this. + (struct saved_scope): Remove incomplete. + (namespace_scope_incomplete): Remove. + * decl.c (struct binding_level): Remove incomplete. + (incomplete_vars): New variable. + (mark_binding_level): Don't mark incomplete. + (print_binding_level): Don't print it. + (mark_saved_scope): Don't mark incomplete. + (pushdecl): Use maybe_register_incopmlete_var. + (cxx_init_decl_processing): Register incomplete_vars for GC. + (start_decl_1): Clarify error message. + (hack_incomplete_vars): Remove. + (maybe_register_incomplete_var): New function. + (complete_vars): Likewise. + +2002-04-06 Jason Merrill + + PR c++/4934 + * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is + set before checking it. + + PR c++/525 + * init.c (build_member_call): Use build_scoped_ref. + (resolve_offset_ref): Likewise. + * call.c (build_scoped_method_call): Likewise. + * tree.c (maybe_dummy_object): Kludge around current_class_type being + wrong. + * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm. + * cp-tree.h: Adjust. + + * init.c (push_base_cleanups): Just use build_scoped_method_call. + + PR c++/6179 + * method.c (implicitly_declare_fn): Pass unqualified type to + synthesize_exception_spec. + +2002-04-04 Neil Booth + + * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. + * cvt.c: Update comment. + * init.c (expand_cleanup_for_base): Update. + * semantics.c (finish_parenthesized_expr): Update. + * typeck.c (cp_truthvalue_conversion): Update. + +2002-04-04 Jason Merrill + + * semantics.c (finish_eh_cleanup): New fn. + * cp-tree.h: Add prototype. + * init.c (perform_member_init, expand_cleanup_for_base): Use + finish_eh_cleanup. + * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove. + * cp-tree.h: Remove references. + * decl.c (begin_constructor_body, end_constructor_body): Likewise. + * dump.c (cp_dump_tree): Likewise. + * pt.c (tsubst_expr): Likewise. + * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove. + (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT. + * tree.c (cp_statement_code_p): Likewise. + + * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup. + + PR c++/5636 + * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on + cleanup for nrv. + + PR c++/5104 + * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception + specifiers. + [METHOD_TYPE]: Use same code as FUNCTION_TYPE. + +2002-04-03 Richard Henderson + + * cp-lang.c (cxx_warn_unused_global_decl): New. + (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. + +2002-04-03 Neil Booth + + * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine. + * tree.c (init_tree): Don't set hook. + +2002-04-03 Roger Sayle + + PR c++/5998: + * decl.c (duplicate_decls): Don't mess with assembler names when + redeclaring builtin functions as static. + +2002-04-01 Neil Booth + + * call.c (build_addr_func): Update. + * class.c (resolve_address_of_overloaded_function): Update. + * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. + * cp-tree.h (cxx_mark_addressable): New. + * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. + * decl2.c (build_cleanup): Update. + * except.c (build_throw): Update. + * init.c (resolve_offset_ref): Update. + * pt.c (convert_nontype_argument): Update. + * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. + * typeck.c (decay_conversion, build_array_ref, build_unary_op, + unary_complex_lvalue): Update. + (mark_addressable): Rename. + +2002-04-01 Roger Sayle + + PR c++/5998: + * decl.c (duplicate_decls): Overwrite the RTL when (and only + when) overwriting a built-in function. Don't use COPY_DECL_RTL, + but follow the SET_DECL_RTL idiom used elsewhere in the function. + +2002-04-01 Neil Booth + + * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, + LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. + * decl.c (grokdeclarator): Update. + * mangle.c (write_integer_cst): Update. + * typeck.c (build_binary_op): Update. + +2002-03-31 Neil Booth + + * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. + * lex.c (cxx_init): Don't set hook. + +2002-03-31 Neil Booth + + * Make-lang.in (error.o): Update. + * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. + * cp-tree.h (struct diagnostic_context): Predeclare. + (cxx_print_error_function): New. + * error.c: Include langhooks-def.h. + (lang_print_error_function): Rename. Update. + (init_error): Don't set hook. + +2002-03-29 Neil Booth + + * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): + Redefine. + * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. + * decl.c (finish_enum): Similarly. + * error.c (dump_type): Similarly. + * lex.c (cxx_init): Similarly. + * mangle.c (write_builtin_type): Similarly. + * typeck.c (comptypes): Similarly. + +2002-03-28 Roger Sayle + + PR c++/5998: + * decl.c (cxx_init_decl_processing): Re-enable built-in functions + in the g++ front-end. + (duplicate_decl): Allow redefinition of anticipated built-ins. + Fix inlining problem by over-writing the old DECL_RTL. + (lookup_namespace_name): Fail to find an identifier in the + specified namespace if its still anticipated. + (builtin_function_1): New function split out from builtin_function + to create a builtin in the current namespace with given context. + (builtin_function): Call builtin_function_1 to define the + appropriate builtins in both the std and global namespaces. + (select_decl): Don't test for anticipated decls here. + (unqualified_namespace_lookup): Instead ignore them whilst + searching through scopes and namespaces. + * decl2.c (do_nonmember_using_decl): If a using declaration + specifies an anticipated built-in function, mark it as no longer + anticipated in that scope. + (ambiguous_decl): Avoid resolving to an anticipated decl. + * lex.c (do_scoped_id): Fail to find an identifier in the global + namespace if its still anticipated. + +2002-03-29 Neil Booth + + * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine. + * cp-tree.h (cp_make_lang_type): Rename. + * lex.c (cp_make_lang_type): Rename. + (make_aggr_type): Update. + * tree.c (init_tree): Don't set make_lang_type_fn. + +2002-03-29 Jakub Jelinek + + PR c++/6073 + * class.c (finish_struct_1): Update static field's DECL_MODE even + if its type is a variant of t. + +2002-03-27 Neil Booth + + * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. + * cp-tree.h (cxx_insert_default_attributes): New. + * decl.c (insert_default_attributes): Rename. + +2002-03-27 Mark Mitchell + + PR c++/4884 + * call.c (build_op_delete_call): Allow for the fact the placement + may be a COMPOUND_EXPR. + +2002-03-27 Neil Booth + + * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. + * cp-tree.h (init_cplus_expand): Remove. + (cxx_expand_expr): New. + * expr.c (cplus_expand_expr): Rename cxx_expand_expr, + fix prototype. + (init_cplus_expand): Remove. + * lex.c (cxx_init): Don't call init_cplus_expand. + +2002-03-26 Mark Mitchell + + PR c++/4884. + * init.c (build_new_1): Allow for the fact the result of + build_function_call may be a COMPOUND_EXPR. + +2002-03-26 Nathan Sidwell + + PR c++/5682 + * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better. + (dfs_skip_nonprimary_vbases_unmarkedp): Remove. + (dfs_skip_nonprimary_vbases_markedp): Remove. + * search.c (get_shared_vbase_if_not_primary): Remove. + (dfs_skip_nonprimary_vbases_unmarkedp): Remove. + (dfs_skip_nonprimary_vbases_markedp): Remove. + (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. + (dfs_marked_real_bases_queue_p): Likewise. + +2002-03-26 Neil Booth + + * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. + * cp-tree.h (cxx_mark_tree): New. + * decl.c (lang_mark_tree): Rename cxx_mark_tree. + +2002-03-25 Neil Booth + + * cp-tree.h (cxx_maybe_build_cleanup): New. + * decl.c (destroy_local_var, hack_incomplete_structures): Update. + (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. + * tree.c (build_target_expr): Update. + * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine. + +2002-03-24 Neil Booth + + * decl2.c (cxx_decode_option): Handle -E. + * lang-specs.h (default_compilers): Preprocess with cc1plus. + * lex.c (cxx_init): Exit quickly if c_common_init returns NULL. + +2002-03-23 Jakub Jelinek + + PR c++/6037 + * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. + +2002-03-23 Gabriel Dos Reis + + * error.c (dump_type): Be careful about implicit typenames. + +2002-03-21 Gabriel Dos Reis + + PR C++/3656 + * semantics.c (finish_base_specifier): Handle erronous base + classes. + +2002-03-22 Zack Weinberg + + * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test + REAL_IS_NOT_DOUBLE. + +2002-03-22 Jeff Knaggs + + * typeck.c (get_member_function_from_ptrfunc): Scale idx down to + an index into the vtable_entry array regardless of + TARGET_PTRMEMFUNC_VBIT_LOCATION. + +2002-03-21 Aldy Hernandez + + * tree.c (cp_cannot_inline_tree_fn): Same. + +2002-03-21 Neil Booth + + * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, + insert_block, getdecls, global_bindings_p): New. + +2002-03-20 Nathan Sidwell + + PR c++/4361 + * mangle.c (struct globals) Add internal_mangling_p member. + (write_template_param): Do internal mangling, if needed. + (mangle_conv_op_name_for_type): Request internal mangling. + +2002-03-20 Jason Merrill + + PR c++/2136 + * init.c (build_delete): Check access for a member op delete here. + * decl2.c (delete_sanity): Not here. + +2002-03-19 Jason Merrill + + PR c++/5118 + * class.c (get_vfield_name): Use the constructor_name. + +2002-03-20 Neil Booth + + * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. + * cp-tree.h (lang_printable_name): Rename. + * error.c (lang_decl_name): Use new hook. + * lex.c (cxx_init): Remove old hook. + * pt.c (tsubst_decl): Use new hook. + * tree.c (lang_printable_name): Rename. + +2002-03-18 Eric Botcazou + + PR c++/3882 + * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling... + (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer + only after recording the declaration. + +2002-03-18 Jason Merrill + + PR c++/2039 + * init.c (resolve_offset_ref): Hand off to build_component_ref. + + PR c++/4222, c++/5995 + * call.c (build_over_call): Fix empty class logic. + + PR c++/3870 + * cp-tree.h (struct saved_scope): Add last_parms field. + * decl.c (maybe_push_to_top_level): Save last_function_parms. + (pop_from_top_level): Restore it. + + PR c++/4377 + * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip + NON_LVALUE_EXPRs. + + PR c++/4003 + * pt.c (tsubst_friend_function): Use decl_namespace_context. + + PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch. + * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a + type with a nontrivial destructor. + +2002-03-17 Jason Merrill + + PR c++/4460 + * class.c (build_base_path): Virtual base layout is fixed in + in-charge [cd]tors. + +2002-03-17 Neil Booth + + * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. + * parse.y (yyparse): Remove macro. + +2002-03-17 Jason Merrill + + PR c++/5757 + * init.c (build_new_1): Pass the right pointer to op delete. + +2002-03-16 Nathan Sidwell + + PR c++/4361 + * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated + conversion operators go. + (struct lang_decl_flags): Add template_conv_p and unused + bitfields. + (DECL_TEMPLATE_CONV_FN_P): New macro. + * call.c (build_user_type_conversion_1): Don't check second type + conversion of overload set first. + * class.c (add_method): Make sure templated conversion operators + all end up on slot 2. + * lex.c (do_identifier): A conversion operator token might be + satisfied by a templated conversion operator. + * pt.c (check_explicit_specialization): Use + CLASSTYPE_FIRST_CONVERSION_SLOT. + (template_parm_this_level_p): New function. + (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P. + * search.c (lookup_fnfields_1): Template conversions will be on + the first slot. + * typeck.c (build_component_ref): Preserve the type of an + conversion operator name on the overload type. + (build_x_function_call): Retrieve the conversion operator name. + +2002-03-15 Richard Henderson + + * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. + +2002-03-15 Mark Mitchell + + * cp-tree.h (CLEANUP_DECL): Remove. + (CLEANUP_EXPR): Likewise. + * decl.c (destroy_local_var): Simplify. + (maybe_build_cleanup): Tidy. + * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT. + * semantics.c (cp_expand_stmt): Likewise. + * cp/tree.c (cp_statement_code_p): Likewise. + +2002-03-15 Jason Merrill + + PR c++/5857 + * decl.c (duplicate_decls): Use merge_types instead of common_type. + * typeck.c (common_type): Just hand off to + type_after_usual_arithmetic_conversions and + composite_pointer_type. + (merge_types): New fn. + (commonparms): Use it instead of common_type. + (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE. + (composite_pointer_type): Also handle attributes. + * cp-tree.h: Declare merge_types. + + * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT + variables. + * decl2.c (maybe_make_one_only): Also mark the decl as needed. + +2002-03-14 Richard Henderson + + * decl.c: Include c-pragma.h. + (start_decl, start_function): Invoke maybe_apply_pragma_weak. + * Make-lang.in: Update dependencies. + +2002-03-14 Jakub Jelinek + + PR c++/5908 + * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too. + * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING. + +2002-03-12 Richard Sandiford + + * mangle.c (write_builtin_type): Handle 128-bit integers even if + they are not a standard integer type. + +2002-03-12 Richard Sandiford + + * cp-tree.h (init_init_processing): Remove declaration. + * init.c (BI_header_type, init_init_processing): Remove old ABI stuff. + * decl.c (cxx_init_decl_processing): Don't call init_init_processing. + +2002-03-12 Kaveh R. Ghazi + + * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): + Define. + * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not + tree_code_length. + * lex.c (cplus_tree_code_type, cplus_tree_code_length, + cplus_tree_code_name): Delete. + (cxx_init): Don't call add_c_tree_codes, instead set + lang_unsafe_for_reeval. Don't try to copy into the various + tree_code arrays. + +2002-03-12 Nathan Sidwell + + PR c++/5659 + * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here. + * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for + definitions. + +2002-03-11 Nathan Sidwell + + Revert 2001-03-26 Nathan Sidwell , + DR209 is now not a defect. + * cp-tree.h (skip_type_access_control): Remove. + * decl.c (grokdeclarator): Do type access control for friend + declarations. + * semantics.c (decl_type_access_control): Don't reset + current_type_lookups. + (save_type_access_control): Always save the lookups. + (skip_type_access_control): Remove. + (finish_class_definition): Don't change type_lookups. + +2002-03-11 Nathan Sidwell + + Revert 2000-12-01 Nathan Sidwell , + It is incorrect. + * typeck.c (build_static_cast): Compare non-qualified types + with pointer to member conversions. + +2002-03-11 Dan Nicolaescu + Daniel Berlin + + * cp-lang.c (ok_to_generate_alias_set_for_type): New function. + (cxx_get_alias_set): Use it. + +2002-03-10 Kaveh R. Ghazi + + * cp-tree.h (stabilize_expr): Prototype. + +2002-03-08 Craig Rodrigues + + * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of + conditional return void. + +2002-03-08 Neil Booth + + * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine. + * cp-tree.h (cxx_unsave): New. + * tree.c (cp_unsave): Rename cxx_unsave, update prototype. + (init_tree): Update. + +2002-03-03 Kaveh R. Ghazi + + * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of + explicit sizeof/sizeof. + * decl2.c (cxx_decode_option): Likewise. + * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise. + +2002-03-02 Nathan Sidwell + + PR c++/775 + * decl.c (lookup_tag): Only reject enum/class mismatch, not + class/union mismatch. + * parse.y (check_class_key): New function. + (structsp): Call it. + +2002-03-01 Michael Matz + + * typeck.c (cp_pointer_int_sum): Complete inner type which is + used later by size_in_bytes(). + +2002-03-01 Phil Edwards + + * cp-tree.h: Require __GNUC__ to be #defined. + (build_init): Add missing prototype. + +2002-03-01 Jason Merrill + + * except.c: Don't include decl.h or obstack.h. Do include + tree-inline.h. + (build_throw): Destroy temporaries from the thrown + expression before calling __cxa_throw. Construct a thrown + temporary directly into the exception object. + (stabilize_throw_expr): New function. + (wrap_cleanups_r): New function. + * tree.c (stabilize_expr): New function. + * init.c (build_init): New function. + * Make-lang.in (cp/except.o): Adjust .h deps. + +2002-02-28 Jason Merrill + + * search.c (lookup_base_r): Don't clear is_non_public just because + we found a friendly scope. + + * decl.c (finish_function): Only warn about missing return + statement with -Wreturn-type. + +2002-02-28 Neil Booth + + * class.c (build_clone): Update. + * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. + * cp-tree.h (cxx_dup_lang_specific_decl): New. + * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl. + (copy_decl): Update. + * method.c (make_thunk): Update. + +2002-02-27 Zack Weinberg + + * decl2.c: Delete traditional-mode-related code copied from + the C front end but not used, or used only to permit the + compiler to link. + +2002-02-24 Craig Rodrigues + + PR c++/4093 + * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition + to void. + +2002-02-22 Jakub Jelinek + + PR other/5746 + * semantics.c (finish_switch_cond): Don't call get_unwidened + if error_mark_node. + +2002-02-22 Nathan Sidwell + + PR c++/2645, DR 295 + * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, + tf_keep_type_decl. + (make_typename_type): Use tsubst_flags_t. + * decl.c (make_typename_type): Adjust. Return non-artificial + TYPE_DECLs, if required. + (grokdeclarator): Simplify CVR qualification handling. Allow bad + qualifiers on typedef types. + * decl2.c (handle_class_head): Adjust make_typename_type call. + * parse.y (nested_name_specifier): Likewise. + (typename_sub0): Likewise. + (typename_sub1): Likewise. + * pt.c (convert_template_argument): Adjust make_typename_type + return value. + (tsubst): Adjust cp_build_qualified_type_real calls. + (check_cv_quals_for_unify): Cope with allowing bad qualifications + on template type parms. + (instantiate_decl): Recheck substitutions to give warnings on bad + qualifications. + * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. + +2002-02-21 Aldy Hernandez + + * cp/decl.c (duplicate_decls): Merge always_inline attribute. + + * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 + unless DECL_ALWAYS_INLINE. + +2002-02-20 Jakub Jelinek + + * typeck.c (cp_pointer_int_sum): Renamed from + pointer_int_sum, call pointer_int_sum. + +2002-02-20 Jakub Jelinek + + * decl.c (duplicate_decls): Return 0 if issued error about + redeclaration. + +2002-02-19 Jason Merrill + + ABI change: Mangle `void (A::*)() const' as + M1AKFvvE, not MK1AFvvE. + * mangle.c (write_function_type): Write cv-quals for member + function type here. + (write_pointer_to_member_type): Not here. + +2002-02-18 Jason Merrill + + * pt.c (do_type_instantiation): Don't pedwarn if in_system_header. + (do_decl_instantiation): Likewise. + +2002-02-17 Craig Rodrigues + + PR c++/5685 + * decl.c (duplicate_decls): Make warning unconditional + if duplicate default argument declarations are present. + +2002-02-17 Jakub Jelinek + + * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit + shortening. + +2002-02-15 Nathan Sidwell + + * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs, + remove incorrect comment. Move #if 0'd code to common path. Use + IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication. + +2002-02-13 Jason Merrill + + * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. + (finish_function): Don't warn if current_function_returns_null. + + * typeck2.c (digest_init): Do handle values of vector type. + + * typeck2.c (digest_init, process_init_constructor): Treat vectors + like arrays. + +2002-02-11 Jason Merrill + + * parse.y (reserved_declspecs): Don't handle attributes. + (reserved_typespecquals): Handle them here. + * Make-lang.in (parse.c): Adjust expected conflicts. + +2002-02-08 Jakub Jelinek + + * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr + instead of compstmt. + (compstmt_or_stmtexpr): Renamed from compstmt. + (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. + +2002-02-07 Nathan Sidwell + + Rename instantiate_type_flags to tsubst_flags_t & expand use. + * cp-tree.h (instantiate_type_flags): Rename to ... + (tsubst_flags_t): ... here. Rename itf_complain to tf_error, + add tf_warning flag. + (instantiate_type): Adjust prototype. + (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, + do_type_instantiation, cp_build_qualified_type_real): Likewise. + cp_build_qualified_type: Adjust. + * class.c (instantiate_type): Adjust parameter. Rename itf_* to + tf_*. + * call.c (standard_conversion): Rename itf_* to tf_*. + (reference_binding): Likewise. + (convert_like_real): Likewise. + * cvt.c (cp_convert_to_pointer): Likewise. + (convert_to_reference): Likewise. + * decl.c (lookup_namespace_name): Use tf_* flags. + (make_typename_type): Likewise. + (grokdeclarator): Likewise. + * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. + (coerce_template_template_parms, convert_template_argument, + coerce_template_parms, maybe_get_template_decl_from_type_decl, + lookup_template_class, tsubst_friend_function, tsubst_friend_class, + instantiate_class_template, tsubst_template_arg_vector, + tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, + tsubst_decl, tsubst_arg_types, tsubst_function_type, + tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, + instantiate_template, fn_type_unification, + resolve_overloaded_unification, verify_class_unification, + unify, get_bindings_real, do_type_instantiation, + regenerate_decl_from_template, instantiate_decl, + tsubst_initializer_list, tsubst_enum, + get_mostly_instantiated_function_type, + invalid_nontype_parm_type_p): Likewise. + * tree.c (cp_build_qualified_type_real): Likewise. + * typeck.c (build_binary_op): Rename itf_* to tf_*. + (build_ptrmemfunc): Likewise. + (convert_for_assignment): Likewise. + +2002-02-07 Nathan Sidwell + + PR c++/109 + * decl.c (grokdeclarator): Allow friend declarations from + dependent types. + * decl2.c (handle_class_head): Don't push into template parm contexts. + * pt.c (push_template_decl_real): Template parm contexts are never + being defined. + +2002-02-05 Alexandre Oliva + + * class.c: Include target.h. + (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, + BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS + bit-field layout. + * Make-lang.in: Adjust deps. + +2002-02-05 Jason Merrill + + * error.c (dump_type): Be more helpful about VECTOR_TYPE. + +2002-02-04 Jakub Jelinek + + * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. + (finish_switch_cond): Set SWITCH_TYPE. + +2002-02-04 Richard Henderson + + * method.c (use_thunk): Always initialize the block tree. Reindent. + * semantics.c (expand_body): Emit thunks after function, not before. + +2002-02-04 Jason Merrill + + * decl.c (start_function): Call cplus_decl_attributes immediately + after grokdeclarator. + + * decl.c (start_function): Combine DECL_RESULT handling code. + +2002-02-03 Jason Merrill + + * xref.c: Remove. + * Make-lang.in (CXX_OBJS): Remove cp/xref.o + (cp/xref.o): Remove dependencies. + * class.c (finish_struct_1, check_methods): Don't call xref fns. + (finish_struct_1): Likewise. + * friend.c (make_friend_class): Likewise. + * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. + * spew.c (read_process_identifier): Likewise. + +2002-02-01 Jason Merrill + + PR c++/4872 + * decl.c (finish_function): Warn about a non-void function with + no return statement and no abnormal exit. + * cp-tree.h (struct cp_language_function): Add returns_abnormally. + (current_function_returns_abnormally): New macro. + * call.c (build_call): Set it. + + * typeck.c (build_component_ref): Always complain about offsetof + constructs on non-PODs. Only make it an error for members of + virtual bases. + + * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. + (dump_function_decl): Always dump parms. + + * decl2.c (finish_static_data_member_decl): Complain about a local + class with a static data member. + + PR c++/4286 + * search.c (lookup_field_1): Don't xref a static data member + just because we looked it up. + +2002-01-31 Jason Merrill + + * Make-lang.in (parse.c): Handle .output file. + + PR c++/3395 + * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, + not TREE_TYPE. + * semantics.c (finish_class_definition): Adjust. + + Allow attributes in parms and casts. + * parse.y (named_parm): Don't strip attrs. + (declmods): Remove 'attributes' production. + (nonempty_cv_qualifiers): Accept attributes. + (ATTRIBUTE): Give precedence. + * decl.c (groktypename): Handle attributes. + (grokparms): Likewise. + +2002-01-29 Jakub Jelinek + + * decl2.c (cxx_decode_option): Pass 0 as last argument to + cpp_handle_option. + * lang-specs.h: Use cpp_unique_options instead of cpp_options + when used together with cc1_options. + +2002-01-29 Nathan Sidwell + + PR c++/5132 + * typeck2.c (digest_init): Make sure non-array core type is + instantiated. + * decl2.c (reparse_absdcl_as_casts): Just store the type in the + constructor, rather than build a new one. + (build_expr_from_tree, CONSTRUCTOR case): Be careful with the + PURPOSE of constructor elts. + +2002-01-23 Zack Weinberg + + * Make-lang.in (parse.c): Adjust expected number of + shift-reduce conflicts. + (decl.o): Depend on diagnostic.h. + * decl.c: Include diagnostic.h. + (grokdeclarator): Check for null pointer. + (finish_function): Don't abort when + current_binding_level->parm_flag != 1, if errors have + occurred; throw away the statement tree and extra binding + levels, and continue. + * lex.c (note_list_got_semicolon): Check for null pointer. + * method.c (hack_identifier): Just return error_mark_node if + value is error_mark_node. + * parse.y (primary: TYPEID(type_id)): No need to use + TYPE_MAIN_VARIANT here. + (handler_seq): Accept an empty list of catch clauses and + generate a fake handler block to avoid later crashes. + (ansi_raise_identifier): Accept the error token too. + * semantics.c (begin_class_definition, + finish_class_definition): Check for error_mark_node. + +2002-01-23 Zack Weinberg + + * typeck2.c (friendly_abort): Delete definition. + * cp-tree.h (friendly_abort): Don't prototype. + (my_friendly_assert): Use fancy_abort. + +2002-01-23 Craig Rodrigues + + * cp-tree.h (my_friendly_abort): Remove. + +2002-01-23 Jakub Jelinek + + * spew.c (pending_inlines, pending_inlines_tail, + processing_these_inlines): Make static. + (mark_pending_inlines): Remove static. + (begin_parsing_inclass_inline): If in function, save pi + for GC to cp_function_chain->unparsed_inlines instead. + (process_next_inline): Likewise. + * cp-tree.h (struct cp_language_function): Add unparsed_inlines. + (mark_pending_inlines): Add prototype. + * decl.c (spew_debug): Remove unused extern. + (mark_lang_function): Call mark_pending_inlines. + +2002-01-23 Craig Rodrigues + + * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, + init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, + semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: + Change my_fancy_abort() to abort(). + +2002-01-23 Jason Merrill + + PR c++/5453 + * class.c (fixed_type_or_null): Fix thinko. + + PR c++/3331 + * init.c (resolve_offset_ref): Use build_indirect_ref. + + * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. + +2002-01-22 Jason Merrill + + * parse.y (function_body): Suppress the block for the outermost + curly braces. + * decl.c (pushdecl): Don't try to skip it. + (begin_function_body): Keep the block we create, not the next one. + * init.c (emit_base_init): Don't mess with keep_next_level. + + * class.c (build_base_path): Tweak formatting. + +2002-01-19 Nathan Sidwell + + Fix regression introduced with patch for c++/775 + * parse.y (class_head_defn): Check for template specializations + with a different class-key. + +2002-01-17 Jason Merrill + + * decl.c (begin_constructor_body, begin_destructor_body): New fns. + (begin_function_body): Call them and keep_next_level. + * init.c (emit_base_init): Call keep_next_level. + * semantics.c (setup_vtbl_ptr): Lose. + * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. + (vtbls_set_up_p): Lose. + * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. + * method.c (do_build_copy_constructor): Likewise. + (synthesize_method): Call finish_mem_initializers. + * parse.y (nodecls): Likewise. + + * error.c (dump_type_suffix): Print the exception specs before + recursing. + (dump_function_decl): Here, too. + + * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. + +2002-01-10 Ira Ruben + + PR c++/907 + * decl.c (start_method): Handle attrlist. + +2002-01-10 Jakub Jelinek + + * decl2.c (max_tinst_depth): Increase default limit to 500. + +2002-01-10 Graham Stott + + * spew.c (YYCHAR): Uppercase macro parameter and add + parenthesis. + (YYCODE): Likewise. + (NAME): Uppercase macro parameter. + +2002-01-09 Graham Stott + + * decl.h (grokdeclarator): Wrap long line. + + * semantics.c (FINISH_COND): Uppercase macro paramaters and + add parenthesis. + +2002-01-08 Graham Stott + + * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis. + (PALLOC): Uppercase macro parameter and whitespace. + (SALLOC): Uppercase macro parameter. + (SFREE): Uppercase macros parameter, add parenthese and + whitespace. + (STREQL): Uppercase macro parameter and whitespace. + (STRNEQ): Likewise. + (STRLSS): Likewise. + (STRLEQ): Likewise. + (STRGTR): Likewise. + (STRGEQ): Likewise. + + * call.c (convert_like): Add parenthesis and wrap. + (convert_like_with_context): Likewise. + (ICS_RANK): Whitespace. + (NEED_TEMPORARY_P): Remove parenthesis. + + * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and + whitespace. + (VTT_MARKED_BINFO_P): Likewise. + + * decl.c (BINDING_LEVEL): Add parenthesis. + (DEF_OPERATOR): Likewise. + + * mangle.c (MANGLE_TRACE): Add parenthesis. + (MANGLE_TRACE_TREE): Likewise. + (write_signed_number): Likewise. + (write_unsigned_number): Likewise. + + * pt.c (ccat): Uppercase macro parameter. + (cat): Likewise + + * search.c (SET_BINFO_ACCESS): Add parenthesis. + +2002-01-07 Jason Merrill + + * decl2.c (coerce_new_type): Downgrade error for size_t mismatch + to pedwarn. + + PR c++/3536 + * method.c (make_thunk): If !flag_weak, give the thunk the + function's linkage. + (use_thunk): Here, too. + +2002-01-07 Graham Stott + + * error.c: Update copyright date. + (print_scope_operator): Add parenthesis. + (print_left_paren): Likewise. + (print_right_paren): Likewise. + (print_left_bracket): Likewise. + (print_right_bracket): Likewise. + (print_template_argument_list_start): Likewise. + (print_template_argument_list_end): Likewise. + (print_non_consecutive_character): Likewise. + (print_tree_identifier): Likewise. + (print_identifier): Likewise. + (NEXT_CODE): Uppercase macro parameter. + (ident_fndecl): Delete unused. + (GLOBAL_THING): Likewise. + +2002-01-06 Graham Stott + + * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. + (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise. + (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise. + (RECORD_OR_UNION_TYPE_CHECK): Likewise. + (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise. + (C_IS_RESERVED_WORD): Uppercase macro parameter. + (C_RID_YYCODE) Likewise. + (ptrmem_cst): Use rtx. + (LOCAL_BINDING_P): Add whitespace. + (INHERITED_VALUE_BINDING_P): Likewise. + (BINDING_SCOPE): Wrap long line. + (BINDING_HAS_LEVEL_P): Remove parenthesis. + (BINDING_VALUE): Wrap long line. + (BINDING_TYPE): Whitespace. + (IDENTIFIER_GLOBAL_VALUE): Add parenthesis. + (SET_IDENTIFIER_GLOBAL_VALUE): Likewise. + (IDENTIFIER_NAMESPACE_VALUE): Likewise. + (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise. + (same_type_p): Uppercase macro parameters. + (same_type_ignoring_top_level_qualifiers_p): Likewise. + (OVL_FUNCTION): Wrap long line. + (OVL_CHAIN): Whitespace. + (OVL_CURRENT): Add parenthesis and whitespace. + (OVL_NEXT): Whitespace. + (OVL_USED): Likewise. + (IDENTIFIER_TYPE_VALUE): Likewise. + (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis. + (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace. + (LANG_ID_FIELD): Whitespace. + (SET_LANG_ID(NODE,VALUE,NAME): Likewise. + (IDENTIFIER_LABEL_VALUE): Whitespace and wrap. + (SET_IDENTIFIER_LABEL_VALUE): Whitespace. + (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap. + (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace. + (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap. + (SET_IDENTIFIER_ERROR_LOCUS); Whitespace. + (IDENTIFIER_VIRTUAL_P): Likewise. + (IDENTIFIER_OPNAME_P): Likewise. + (IDENTIFIER_TYPENAME_P): Remove parenthesis. + (C_TYPE_FIELDS_READONLY): Uppercase macro parameters. + (C_SET_EXP_ORIGINAL_CODE): Likewise. + (TYPE_ASSEMBLER_NAME_STRING): Wrap long line. + (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. + (IS_AGGR_TYPE): Uppercase macro parameter. + (CLASS_TYPE_P): Likewise. + (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis. + (IS_AGGR_TYPE_2): Whitespace. + (TAGGED_TYPE_P): Uppercase macro parameter. + (TYPE_BUILT_IN): Whitespace. + (TYPE_FOR_JAVA): Likewise. + (FUNCTION_ARG_CHAIN): Remove parenthesis. + (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis. + (FUNCTION_FIRST_USER_PARAM): Likewise. + (PROMOTES_TO_AGGR_TYPE): Whitespace. + (DERIVED_FROM_P): Add parenthesis and wrap. + (UNIQUELY_DERIVED_FROM_P): Likewise. + (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise. + (PUBLICLY_UNIQUELY_DERIVED_P): Likewise. + (CLASSTYPE_USE_TEMPLATE): Whitespace. + (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis. + (TYPE_GETS_DELETE): Add parenthesis. + (TYPE_HAS_CONVERSION): Add parenthesis and wrap. + (TYPE_HAS_ASSIGN_REF): Likewise, + (TYPE_HAS_CONST_ASSIGN_REF): Likewise. + (TYPE_HAS_INIT_REF): Likewise. + (TYPE_HAS_CONST_INIT_REF): Likewise. + (TYPE_BEING_DEFINED): Likewise. + (TYPE_LANG_SPECIFIC): Likewise. + (CLASSTYPE_RTTI): Likewise. + (TYPE_OVERLOADS_CALL_EXPR): Likewise. + (TYPE_OVERLOADS_ARRAY_REF): Likewise. + (TYPE_OVERLOADS_ARROW): Likewise. + (TYPE_USES_MULTIPLE_INHERITANCE): Likewise. + (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis. + (CLASSTYPE_METHOD_VEC): Likewise. + (CLASSTYPE_MARKED_N): Likewise. + (CLASSTYPE_MARKED): Likewise. + (CLASSTYPE_MARKED2): Likewise. + (CLASSTYPE_MARKED3): Likewise. + (CLASSTYPE_MARKED4): Likewise. + (CLASSTYPE_MARKED5): Likewise. + (CLASSTYPE_MARKED6): Likewise. + (SET_CLASSTYPE_MARKED): Whitespace. + (CLEAR_CLASSTYPE_MARKED): Likewise. + (SET_CLASSTYPE_MARKED2): Likewise. + (CLEAR_CLASSTYPE_MARKED2): Likewise. + (SET_CLASSTYPE_MARKED3): Likewise. + (CLEAR_CLASSTYPE_MARKED3): Likewise. + (SET_CLASSTYPE_MARKED4): Likewise. + (CLEAR_CLASSTYPE_MARKED4): Likewise. + (SET_CLASSTYPE_MARKED5): Likewise. + (CLEAR_CLASSTYPE_MARKED5): Likewise. + (SET_CLASSTYPE_MARKED6): Likewise. + (CLEAR_CLASSTYPE_MARKED6): Likewise. + (CLASSTYPE_TAGS): Likewise. + (CLASSTYPE_VSIZE): Likewise. + (CLASSTYPE_VBASECLASSES): Likewise. + (CANONICAL_BINFO): Add parenthesis. + (CLASSTYPE_SIZE(NODE): Likewise. + (CLASSTYPE_SIZE_UNIT): Likewise. + (CLASSTYPE_ALIGN(NODE): Likewise. + (CLASSTYPE_USER_ALIGN): Likewise. + (TYPE_JAVA_INTERFACE): Likewise. + (CLASSTYPE_PURE_VIRTUALS): Likewise. + (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap. + (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. + (CLASSTYPE_HAS_MUTABLE): Likewise. + (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise. + (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap. + (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise. + (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise. + (CLASSTYPE_INTERFACE_ONLY): Likewise. + (CLASSTYPE_INTERFACE_KNOWN): Likewise. + (CLASSTYPE_INTERFACE_UNKNOWN): Likewise. + (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. + (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. + (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. + (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap. + (BINFO_UNSHARED_MARKED): Whitespace. + (BINFO_MARKED): Whitespace and wrap. + (SET_BINFO_MARKED): Likewise. + (CLEAR_BINFO_MARKED): Likewise. + (BINFO_VTABLE_PATH_MARKED): Likewise. + (SET_BINFO_VTABLE_PATH_MARKED): Likewise. + (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise. + (BINFO_SUBVTT_INDEX): Remove parenthesis. + (BINFO_VPTR_INDEX): Likewise. + (BINFO_PRIMARY_BASE_OF): Likewise, + (CLASSTYPE_VFIELDS): Whitespace. + (VF_DERIVED_VALUE): Wrap long line. + (NAMESPACE_LEVEL): Whitespace. + (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis. + (DEFARG_POINTER): Whitespace. + (DECL_NEEDED_P): Remove parenthesis. + (DECL_LANGUAGE): Whitespace. + (SET_DECL_LANGUAGE): Add parenthesis. + (DECL_CONSTRUCTOR_P): Whitespace and wrap. + (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis. + (DECL_IN_AGGR_P): Whitespace. + (DECL_FRIEND_P): Likewise. + (DECL_BEFRIENDING_CLASSES): Likewise. + (DECL_STATIC_FUNCTION_P): Whitespace and wrap. + (DECL_NONCONVERTING_P): Whitespace. + (DECL_PURE_VIRTUAL_P): Likewise. + (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise. + (DECL_PENDING_INLINE_INFO): Whitespace. + (DECL_SORTED_FIELDS): Likewise. + (DECL_DEFERRED_FN): Likewise. + (DECL_TEMPLATE_INFO): Likewise. + (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap. + (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise. + (SET_TYPE_TEMPLATE_INFO): Add parenthesis. + (TMPL_ARGS_LEVEL): Likewise. + (SET_TMPL_ARGS_LEVEL): Likewise. + (INNERMOST_TEMPLATE_PARMS): Whitespace. + (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter. + (INTEGRAL_CODE_P(CODE): Add parenthesis. + (CP_INTEGRAL_TYPE_P): Remove parenthesis. + (TYPE_HAS_CONSTRUCTOR): Whitespace. + (TREE_HAS_CONSTRUCTOR): Likewise. + (TYPE_HAS_DESTRUCTOR): Likewise. + (TYPE_HAS_REAL_ASSIGN_REF): Likewise. + (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise. + (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. + (TYPE_HAS_COMPLEX_INIT_REF): Likewise. + (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. + (TYPE_PTRMEMFUNC_P): Likewise. + (TYPE_PTRMEMFUNC_FLAG): Likewise. + (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. + (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. + (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. + (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. + (DECL_ACCESS): Whitespace. + (DECL_GLOBAL_CTOR_P): Remove parenthesis. + (DECL_GLOBAL_DTOR_P): Likewise. + (GLOBAL_INIT_PRIORITY): Likewise. + (DECL_TEMPLATE_PARMS): Likewise. + (DECL_TEMPLATE_RESULT): Likewise. + (DECL_TEMPLATE_INSTANTIATIONS): Likewise. + (DECL_TEMPLATE_SPECIALIZATIONS): Likewise. + (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis. + (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. + (PRIMARY_TEMPLATE_P): Add parenthesis. + (DECL_USE_TEMPLATE): Whitespace. + (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. + (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. + (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. + (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. + (CALL_DECLARATOR_PARMS): Remove parenthesis. + (CALL_DECLARATOR_QUALS): Likewise. + (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. + (TEMP_NAME_P): Wrap. + (VFIELD_NAME_P): Likewise. + (B_SET): Uppercase macro parameters and add parenthesis. + (B_CLR): Likewise. + (B_TST): Likewise. + (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters. + (LOOKUP_TYPES_ONLY): Uppercase macro parameters. + (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters. + (same_or_base_type_p): Likewise. + (cp_deprecated): Likewise. + +2002-01-05 Richard Henderson + + * semantics.c (expand_body): Revert last change. + +2002-01-04 Jason Merrill + + PR c++/4122 + * class.c (update_vtable_entry_for_fn): Set delta to zero for a + lost primary. + + * class.c (build_vtbl_initializer): Check for a lost primary + before calculating the vtable entry to throw away. + +2002-01-02 Jason Merrill + + * semantics.c (expand_body): Call outlining_inline_function when + emitting an inline function out of line. + +2002-01-02 Nathan Sidwell + + PR c++/5116, c++/764 reversion + * call.c (build_new_op): Revert the instantiations. They are + incorrect. + +2002-01-02 Nathan Sidwell + + PR c++/5089 + * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void. + +2002-01-02 Nathan Sidwell + + PR c++/3716 + * pt.c (tsubst_aggr_type): Move pmf handling into tsubst. + (tsubst, case POINTER_TYPE): Handle pmfs here. + (tsubst, case OFFSET_TYPE): Check it is not an offset to + reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE. + +2002-01-02 Nathan Sidwell + + PR c++/35 + * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too. + (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too. + * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the + PARM_DECL. + (tsubst_template_parms): Break up loop statements. + (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template + parm PARM_DECLs don't get promoted. + +2002-01-02 Nathan Sidwell + + PR c++/5123 + * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR. + (build_x_function_call): Cope with a COMPONENT_REF containing a + TEMPLATE_ID_EXPR. + +2002-01-02 Nathan Sidwell + + PR c++/5213 + * pt.c (convert_template_argument): Be more careful determining + when RECORD_TYPE templates are or are not templates. + +2002-01-02 Nathan Sidwell + + PR c++/775 + * cp-tree.h (handle_class_head): Adjust prototype. + * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P + parameters. Use for all class heads. + * parse.y (named_class_head_sans_basetype, named_class_head, + named_complex_class_head_sans_basetype, + named_class_head_sans_basetype_defn, + unnamed_class_head): Remove. + (class_head, class_head_apparent_template): Recognize class heads + (class_head_decl, class_head_defn): New reductions. Process class + heads. + (structsp): Adjust class definition and class declaration + reductions. + (maybe_base_class_list): Give diagnostic on empty list. + +2002-01-02 Nathan Sidwell + + PR c++/4379 + * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a + single non-static member. + (unary_complex_lvalue): If it cannot be a pointer to member, don't + make it so. Check it is not pointer to reference. + +2002-01-02 Nathan Sidwell + + PR c++/5132 + * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we + are processing a template decl. + +2002-01-02 Nathan Sidwell + + PR c++/5116, c++/764 + * call.c (build_new_op): Make sure template class operands are + instantiated. Simplify arglist construction. + diff --git a/gcc/cp/ChangeLog-2003 b/gcc/cp/ChangeLog-2003 new file mode 100644 index 0000000..f0500f4 --- /dev/null +++ b/gcc/cp/ChangeLog-2003 @@ -0,0 +1,6904 @@ +2003-12-30 Nathan Sidwell + + PR c++/13507 + * decl.c (duplicate_decls): Use build_type_attribute_variant to + merge attributes. + + PR c++/13494 + * tree.c (build_cplus_array_type_1): Only build a minimal array + type for dependent types or domains. + +2003-12-29 Nathan Sidwell + + PR c++/12774 + * typeck.c (comp_array_types): Fold non-dependent domains for + ABI-1. + +2003-12-29 Kriang Lerdsuwanakij + + PR c++/13289 + * semantics.c (finish_id_expression): Only check if the type of + a template argument is integral or enumeration when it is not + dependent. + +2003-12-29 Kriang Lerdsuwanakij + + PR c++/12403 + * parser.c (cp_parser_template_declaration_after_export): Set up + template specialization scope in case of explicit specialization. + +2003-12-28 Mark Mitchell + + PR c++/13081 + * decl.c (duplicate_decls): Preserve inline-ness when redeclaring + a function template. + + PR c++/12613 + * decl.c (reshape_init): Reject GNU colon-style designated + initializers in arrays. + + PR c++/13009 + * call.c (build_special_member_call): Do not assume that we have a + pointer to the complete object in an assignment operator. + +2003-12-28 Roger Sayle + + PR c++/13070 + * decl.c (duplicate_decls): When setting the type of an anticipated + declaration, merge the existing type attributes. + +2003-12-25 Andrew Pinski + + PR c++/13268, c++/13339 + * class.c (add_method): Return early when method is error_mark_node. + * pt.c (tsubst_friend_function): Return early when new_friend is + error_mark_node. + +2003-12-23 Mark Mitchell + + * cp-lang.c (cp_expr_size): Return zero for empty classes. + + * cp-tree.h (warn_if_uknown_interface): Remove unused function. + * decl2.c (warn_if_unknown_interface): Likewise. + +2003-12-23 Nathan Sidwell + + PR c++/13387 + * cp-lang.c (cxx_get_alias_set): Correct logic for a base type. + +2003-12-22 Mark Mitchell + + * decl.c (start_function): Do not check + flag_alt_external_templates or flag_external_templates. + * decl2.c (warn_if_unknown_interface): Likewise. + * lex.c (extract_interface_info): Likewise. + * pt.c (lookup_template_class): Likewise. + + PR c++/12862 + * name-lookup.c (pushdecl): Look up all namespace-scope entities + in their corresponding namespace. + + PR c++/12397 + * typeck.c (finish_class_member_access_expr): Don't tree + IDENTIFIER_NODEs as non-dependent expressions. + +2003-12-22 Andrew Pinski + + PR c++/5050 + * tree.c (cp_start_inlining): Remove. + (cp_end_inlining): Remove. + * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define. + (LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define. + * cp-tree.h (cp_start_inlining): Do not declare. + (cp_end_inlining): Do not declare. + +2003-12-22 Mark Mitchell + + PR c++/12479 + * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;" + pedwarn when not in a system header. + +2003-12-21 Mark Mitchell + + * cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE, + CPTI_UNION_TYPE, CPTI_ENUM_TYPE. + (record_type_node): Remove. + (union_type_node): Likewise. + (enum_type_node): Likewise. + * decl.c: Remove mention of above tree nodes in comment. + * lex.c (cxx_init): Do not assign to record_type_node, + union_type_node, or enum_type_node. Simplify handling of + class_type_node. + + PR c++/11554 + * init.c (sort_mem_initializers): Add warning. + +2003-12-21 Kazu Hirata + + * call.c: Fix comment formatting. + * class.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + * cxx-pretty-print.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * error.c: Likewise. + * except.c: Likewise. + * init.c: Likewise. + * name-lookup.c: Likewise. + * parser.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * semantics.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + +2003-12-19 Kazu Hirata + + * cvt.c: Remove uses of "register" specifier in + declarations of arguments and local variables. + * decl.c: Likewise. + * decl2.c: Likewise. + * expr.c: Likewise. + * friend.c: Likewise. + * lex.c: Likewise. + * name-lookup.c: Likewise. + * repo.c: Likewise. + * search.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + +2003-12-19 Mark Mitchell + + PR c++/12795 + * name-lookup.c (pushdecl): Do not treated any functions as being + "nested" in C++. + +2003-12-19 Jason Merrill + + PR c++/13371 + * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing. + * cvt.c (convert_to_void): Don't warn about the RHS of a comma + being useless if TREE_NO_UNUSED_WARNING is set. + +2003-12-18 Richard Henderson + + * cp-tree.h (struct lang_type_header): Remove __extension__. + +2003-12-18 Jason Merrill + + PR c++/12253 + * init.c (build_vec_init): Initialization of an element from + an initializer list is also a full-expression. + + * parser.c, pt.c, semantics.c: Rename constant_expression_p + to integral_constant_expression_p. + +2003-12-18 Kriang Lerdsuwanakij + + PR c++/13262 + * pt.c (instantiate_decl): Wrap push_nested_class and + pop_nested_class around cp_finish_decl call for static member + variable. + +2003-12-18 Giovanni Bajo + + PR c++/9154 + * parser.c (cp_parser_template_argument): A type-id followed by '>>' + is just an user typo, and should be accepted as last resort if any + other parsing fails. + (cp_parser_enclosed_template_argument_list): If the argument list is + parsed correctly, but the next token is '>>', emit a diagnostic. + (cp_parser_next_token_ends_template_argument): Accept '>>' as + delimiter of template argument, it will be later detected as a typo. + +2003-12-17 Kelley Cook + + * Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1. + +2003-12-17 Mark Mitchell + + PR c++/10603 + PR c++/12827 + * parser.c (cp_parser_error): Help c_parse_error print good + messages if the next token is a keyword. + (cp_parser_parameter_declaration_list): When resynchronizing after + a bad parameter declaration, stop if a comma is found. + (cp_parser_parameter_declaration): Avoid backtracking. + +2003-12-16 Mark Mitchell + + PR c++/12696 + * decl.c (reshape_init): Recover quickly from errors. + +2003-12-16 Nathan Sidwell + + PR c++/9043 + C++ ABI change: Mangling array indices in templates. + * decl.c (compute_array_index_type): Reorganize for earlier + template errors. Use value_dependent_expression_p for abi-2. + * mangle.c (write_array_type): Check broken mangling for + expression indices on abi-1 + +2003-12-16 Mark Mitchell + + PR c++/12696 + * decl.c (reshape_init): Recover quickly from errors. + + PR c++/13275 + * lex.c (reswords): Add "__offsetof" and "__offsetof__". + * parser.c (cp_parser): Add in_offsetof_p. + (cp_parser_new): Initialize it. + (cp_parser_primary_expression): Handle __offsetof__ (...). + (cp_parser_postfix_expression): Allow casts to pointer type and + uses of "->" in a constant expression if implementing offsetof. + (cp_parser_unary_expression): Allow the use of "&" in a constant + expression if implementing offsetof. + +2003-12-16 Giovanni Bajo + + PR c++/2294 + * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD + if the declaration comes from an using declaration. + +2003-12-16 Giovanni Bajo + + * semantics.c (finish_id_expression): Refactor the code to handle + template parameters, and emit a more informative error message + when they are used within an integral constant expression. + +2003-12-16 Nathan Sidwell + + PR c++/13387 + * class.c (finish_struct_1): Compute mode and alias set for + CLASSTYPE_AS_BASE. + * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial + assignment of a class, as necessary. + * cp-lang.c (cxx_get_alias_set): The alias set as a base is the + same as for the complete type. + + PR c++/13242 + C++ ABI change. Mangling template parameters of reference type + * mangle.c (write_template_args): Remove unreachable code. + (write_template_arg): Look through an argument of reference type. + +2003-12-16 Giovanni Bajo + + PR c++/2294 + * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD + if the declaration comes from an using declaration. + +2003-12-15 Mark Mitchell + + PR c++/10926 + * decl2.c (grokfield): Robustify. + + PR c++/11116 + * parser.c (cp_parser_throw_expression): Determine whether or not + an assignment-expression is present by doing one-token lookahead. + + PR c++/13269 + * parser.c (cp_parser_function_definition_after_declarator): Stop + scanning tokens when reaching EOF. + + PR c++/12989 + * typeck.c (cxx_sizeof_or_alignof_expr): Robustify. + + PR c++/13310 + * pt.c (dependent_template_p): Handle OVERLOADs. + +2003-12-15 Mark Mitchell + + PR c++/13243 + PR c++/12573 + * parser.c (cp_parser_postfix_expression): Tighten handling of + integral constant expressions. + (cp_parser_unary_expression): Likewise. + * pt.c (value_dependent_expression_p): Remove handling for + COMPONENT_REFs. + +2003-12-15 Nathan Sidwell + + * class.c (add_method): Disallow destructor for java classes. + * decl.c (xref_basetypes): Check java class inheritance. + * decl2.c (check_java_method): Skip artificial params. + + PR c++/13241 + C++ ABI change. Mangling of symbols in expressions. + * mangle.c (write_mangled_name): Add top_level flag. Rework for + nested and unnested mangling. Deal with abi version 1 and version + 2 differences. + (write_expression): Adjust write_mangled_name call. + (mangle_decl_string): Use write_mangled_name for all non-type decls. + +2003-12-14 Mark Mitchell + + PR c++/10779 + PR c++/12160 + * parser.c (struct cp_parser): Add in_template_argument_list_p. + (cp_parser_error): Use c_parse_error. + (cp_parser_name_lookup_error): New function. + (cp_parser_new): Initialize it. + (cp_parser_declarator): Add parenthesized_p parameter. + (cp_parser_nested_name_specifier_opt): Use + cp_parser_name_lookup_error. + (cp_parser_parenthesized_expression_list): Improve comments. + (cp_parser_condition): Adjust call to cp_parser_declarator. + (cp_parser_template_parameter): Adjust call to + cp_parser_parameter_declaration. + (cp_parser_template_argument_list): Set + in_template_argument_list_p. + (cp_parser_explicit_instantiation): Adjust call to + cp_parser_declarator. + (cp_parser_simple_type_specifier): Remove unncessary code. + (cp_parser_using_declaration): Use cp_parser_name_lookup_error. + (cp_parser_init_declarator): Handle member function definitions. + (cp_parser_direct_declarator): Adjust call to + cp_parser_declarator. + (cp_parser_type_id): Adjust call to cp_parser_declarator. + (cp_parser_parameter_declaration_list): Avoid backtracking where + possible. + (cp_parser_parameter_declaration): Add parenthesized_p parameter. + (cp_parser_function_definition): Remove. + (cp_parser_member_declaration): Do not backtrack to look for + function definitions. + (cp_parser_exception_declaration): Adjust call to + cp_parser_declarator. + (cp_parser_single_declaration): Handle function definitions via + cp_parser_init_declarator. + (cp_parser_save_member_function_body): New function. + +2003-12-14 Kriang Lerdsuwanakij + + PR c++/13106 + * decl.c (finish_function): Check if return type is dependent before + issuing no return statement warning. + +2003-12-12 Nathan Sidwell + + PR c++/13118 + * cp-tree.h (lang_decl_u): Add thunk_alias member. + (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL. + (THUNK_ALIAS_P): Remove. + (THUNK_ALIAS): Adjust. + * class.c (update_vtable_entry_for_fn): Get the vbase within the + overriding function's return type. + (dump_thunk): Adjust THUNK_ALIAS printing. + (build_vtbl_initializer): Adjust THUNK_ALIAS use. + * method.c (make_thunk): Revert 12881 test change. Clear + THUNK_ALIAS. + (finish_thunk): Adjust THUNK_ALIAS setting. + (use_thunk): Adjust THUNK_ALIAS use. + * semantics.c (emit_associated_thunks): Likewise. + + PR c++/13114, c++/13115 + * class.c (layout_empty_base): Propagate the move of an empty base + to offset zero. + + PR c++/12881 + * method.c (make_thunk): Deal with thunk aliases when searching + for a thunk. Robustify assertion. + +2003-12-11 Nathan Sidwell + + * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only. + (hash_type): Use TYPE_UID of the identifier's type. + (compare_type): Adjust. + (mangle_conv_op_name_for_type): Store identifier nodes only, use + TYPE_UID has hash value. + +2003-12-10 Mark Mitchell + + * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL. + +2003-12-08 Matt Austern + + PR c/13134 + * decl.c (duplicate_decls): Copy visibility flag when appropriate. + +2003-12-09 Giovanni Bajo + + * init.c (build_new_1): Deal with an OVERLOAD set when + looking up for _Jv_AllocObject. + * except.c (build_throw): Likewise for _Jv_Throw. + +2003-12-08 Jason Merrill + + PR c++/11971 + * tree.c (build_local_temp): Split out from build_cplus_new. + (force_target_expr): New fn. + * call.c (call_builtin_trap): Call it. Take a type parm. + (convert_arg_to_ellipsis): Pass it. + (build_x_va_arg): Use call_builtin_trap. + + PR c++/11929 + * call.c (magic_varargs_p): New fn. + (build_over_call): Do no ellipsis conversions for arguments to + functions with magic varargs. + + * name-lookup.c, init.c, except.c: Revert Giovanni's patch from + yesterday. + + Give the anonymous namespace a null DECL_NAME. + * cp-tree.h: Don't declare anonymous_namespace_name. + * decl.c: Don't define it. + * dump.c (cp_dump_tree): Don't check for it. + * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise. + * error.c (dump_decl): Likewise. + * name-lookup.c: Define it here. + (push_namespace): Put it in DECL_ASSEMBLER_NAME instead. + * mangle.c (write_unqualified_name): Adjust. + +2003-12-07 Giovanni Bajo + + PR c++/2294 + * name-lookup.c (push_overloaded_decl): Always construct an + OVERLOAD unless the declaration is a built-in. + (set_namespace_binding): While binding OVERLOADs with only one + declaration, we still need to call supplement_binding. + * init.c (build_new_1): Deal with an OVERLOAD set when + looking up for _Jv_AllocObject. + * except.c (build_throw): Likewise for _Jv_Throw. + +2003-12-06 Mark Mitchell + + PR c++/13323 + * class.c (same_signature_p): Handle conversion operators + correctly. + (check_for_override): Likewise. + +2003-12-06 Kelley Cook + + * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete. + (c++.install_common, cp/g++.1, c++.install-man): Adjust for above. + (c++.uninstall): Likewise. + +2003-12-05 Danny Smith + Mark Mitchell + + PR c++/13305 + * parser.c (cp_parser_elaborated_type_specifier): Accept + attributes. + +2003-12-05 Mark Mitchell + + PR c++/13314 + * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope + calls. + (cp_parser_class_head): Likewise. + +2003-12-05 Kriang Lerdsuwanakij + + PR c++/13166 + * parser.c (cp_parser_late_parsing_default_args): Make sure the + context is a class before calling push_nested_class and + pop_nested_class. + +2003-12-03 James E Wilson + + * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS + support. + +2003-12-03 Mark Mitchell + + PR c++/9127 + * cp-tree.h (at_namespace_scope_p): New function. + * parser.c (cp_parser_class_head): Handle invalid explicit + specializations. + * search.c (at_namespace_scope_p): New function. + + PR c++/13179 + * semantics.c (finish_handler_parms): Do not call eh_type_info for + types used in templates. + + PR c++/10771 + * parser.c (cp_parser_check_for_invalid_template_id): New + function. + (cp_parser_simple_type_specifier): Use it. + (cp_parser_elaborated_type_specifier): Likewise. + (cp_parser_class_head): Likewise. + +2003-12-02 Giovanni Bajo + + PR c++/10126 + * pt.c (convert_nontype_argument): Handle default conversions + while converting a pointer to member function. + +2003-12-02 Giovanni Bajo + + PR c++/12573 + * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by + looking into them recursively. + +2003-12-02 Richard Henderson + + * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD. + * parser.c (struct cp_token): Likewise. + (struct cp_parser_token_tree_map_node): Likewise. + * lex.c (struct resword): Move const after ENUM_BITFIELD. + +2003-11-30 Mark Mitchell + + PR c++/9849 + * parser.c (cp_lexer_prev_token): New function. + (cp_parser_skip_to_closing_parenthesis): Add consume_paren + parameter. + (cp_parser_nested_name_specifier_opt): Add is_declaration + parameter. + (cp_parser_nested_name_specifier): Likewise. + (cp_parser_class_or_namespace_name): Likewise. + (cp_parser_class_name): Likewise. + (cp_parser_template_id): Likewise. + (cp_parser_template_name): Likewise. + (cp_parser_id_expression): Adjust calls to + cp_parser_nested_name_specifier_op, cp_parser_template_id, + cp_parser_class_name. + (cp_parser_unqualified_id): Likewise. + (cp_parser_postfix_expression): Likewise. + (cp_parser_pseudo_destructor_name): Likewise. + (cp_parser_cast_expression): Likewise. + (cp_parser_mem_initializer_id): Likewise. + (cp_parser_simple_type_specifier): Likewise. + (cp_parser_type_name): Likewise. + (cp_parser_elaborated_type_specifier): Likewise. + (cp_parser_qualified_namespace_specifier): Likewise. + (cp_parser_using_declaration): Likewise. + (cp_parser_using_directive): Likewise. + (cp_parser_ptr_operator): Likewise. + (cp_parser_declarator_id): Likewise. + (cp_parser_class_head): Likewise. + (cp_parser_base_specifier): Likewise. + (cp_parser_constructor_declarator_p): Likewise. + (cp_parser_direct_declarator): Fix typo in comment. + (cp_parser_parenthesized_expression_list): Adjust call to + cp_parser_skip_to_closing_parenthesis. + (cp_parser_selection_statement): Likewise. + +2003-11-23 Kriang Lerdsuwanakij + + PR c++/12924 + * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR + with OVERLOAD and DECL nodes as the first operand. + +2003-11-22 Kriang Lerdsuwanakij + + * pt.c (tsubst) : Remove erroneous argument to build_nt. + +2003-11-22 Kriang Lerdsuwanakij + + PR c++/5369 + * friend.c (is_friend): Handle member function of a class + template as template friend. + (do_friend): Likewise. + * decl2.c (check_classfn): Add template_header_p parameter. + * decl.c (start_decl): Adjust check_classfn call. + (grokfndecl): Likewise. + * pt.c (is_specialization_of_friend): New function. + (uses_template_parms_level): Likewise. + (push_template_decl_real): Use uses_template_parms_level. + (tsubst_friend_function): Adjust check_classfn call. + * cp-tree.h (check_classfn): Adjust declaration. + (uses_template_parms_level): Add declaration. + (is_specialization_of_friend): Likewise. + +2003-11-21 Mark Mitchell + + PR c++/12515 + * pt.c (build_non_dependent_expr): Handle GNU extension to ?: + operator. + +2003-11-21 Jan Hubicka + + * parser.c (cp_parser_postfix_expression): Initialize 's' to + NULL_TREE. + +2003-11-20 Joseph S. Myers + + * Make-lang.in (c++.extraclean): Delete. + +2003-11-20 Joseph S. Myers + + * Make-lang.in (check-g++, lang_checks): Add. + +2003-11-18 Kriang Lerdsuwanakij + + PR c++/12932 + * class.c (currently_open_derived_class): Check if + current_class_type is NULL_TREE. + * semantics.c (finish_call_expr): Check if + currently_open_derived_class returns NULL_TREE. + * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT + parameter. + +2003-11-17 Jason Merrill + + * init.c (build_new_1): Preevaluate placement args. + * call.c (build_op_delete_call): Don't expose placement args to + overload resolution. + +2003-11-16 Jason Merrill + + * Make-lang.in (c++.tags): Create TAGS.sub files in each directory + and TAGS files that include them for each front end. + +2003-11-15 Bernardo Innocenti + + PR c++/2294 + * name-lookup.c: Revert previous patch for PR c++/2294 to prevent + build failure on libjava. + +2003-11-14 Giovanni Bajo + + PR c++/2294 + * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD + unless the declaration is a built-in. + (set_namespace_binding): While binding OVERLOADs with only one + declaration, we still need to call supplement_binding. + +2003-11-14 Mark Mitchell + + PR c++/12762 + * parser.c (cp_parser_enclosed_template_argument_list): New + function. + (cp_parser_template_id): Use it. + (cp_parser_simple_type_specifier): Recognize invalid template + syntax. + +2003-11-14 Giovanni Bajo + + PR c++/2094 + * pt.c (unify): Add support for PTRMEM_CST and + FIELD_DECL unification. + +2003-11-13 Richard Earnshaw + + * decl.c (grokfndecl): Change OK to type tree. + +2003-11-12 Mark Mitchell + + * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like + CONSTRUCTOR. + + * decl.c (cp_make_fname_decl): When creating a top-level + __FUNCTION__-like symbol, do register it with pushdecl. + + * decl.c (finish_case_label): Do not check that we are within a + switch statement here. + * parser.c (struct cp_parser): Add in_iteration_statement_p and + in_switch_statement_p. + (cp_parser_new): Initialize them. + (cp_parser_labeled_statement): Check validity of case labels + here. + (cp_parser_selection_statement): Set in_switch_statement_p. + (cp_parser_iteration_statement): Set in_iteration_statement_p. + (cp_parser_jump_statement): Check validity of break/continue + statements here. + + PR c++/12735 + * cp-tree.h (duplicate_decls): Return a tree. + * decl.c (duplicate_decls): Clarify documentation. Return + error_mark_node to indicate a failed redeclaration. + * friend.c (do_friend): Handle that case. + * name-lookup.c (pushdecl): Likewise. + +2003-11-11 Jason Merrill + + * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro. + * name-lookup.c (parse_using_directive): New fn. + (is_associated_namespace): New fn. + (arg_assoc_namespace): Also check associated namespaces. + * name-lookup.h: Declare new fns. + * pt.c (maybe_process_partial_specialization): Allow + specialization in associated namespace. + * parser.c (cp_parser_using_directive): Accept attributes. Use + parse_using_directive. + +2003-11-10 Richard Henderson + + * cvt.c (convert_to_void): Use void_zero_node after overload failure. + +2003-11-10 Gabriel Dos Reis + + PR c++/12832 + * name-lookup.c (supplement_binding): Gracefully handle names + used at non-class scope prior declaration. + +2003-11-06 Matt Austern + + * decl.c (duplicate_decls): copy DECL_VISIBILITY field. + * method.c (use_thunk): give thunk same visibility as function. + * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field. + +2003-11-05 Kriang Lerdsuwanakij + + PR c++/11616 + * pt.c (instantiate_pending_templates): Save and restore + input_location. + +2003-11-05 Kriang Lerdsuwanakij + + PR c++/2019 + * friend.c (add_friend): Don't display previous declaration in + case of duplicate friend warning. + +2003-11-02 Kriang Lerdsuwanakij + + PR c++/9810 + * call.c (build_over_call): Check access using primary template + if FN is a member function template. + +2003-11-01 Kriang Lerdsuwanakij + + PR c++/12796 + * class.c (handle_using_decl): Set input_location before calling + error_not_base_type. + +2003-10-26 Kriang Lerdsuwanakij + + PR c++/10371 + * semantics.c (finish_non_static_data_member): Handle when + both processing_template_decl and qualifying_scope are true. + +2003-10-24 Kriang Lerdsuwanakij + + PR c++/11076 + * class.c (handle_using_decl): Swap arguments of error_not_base_type. + * parser.c (cp_parser_direct_declarator): Only resolve typename for + namespace scope declarations. + +2003-10-24 Nathan Sidwell + + PR c++/12698, c++/12699, c++/12700, c++/12566 + * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New. + (debug_class, debug_thunks): New. + * class.c (dump_class_hierarchy_1): New break out from ... + (dump_class_hierarchy): ... here. + (dump_thunk, debug_thunks, debug_class): New. + (update_vtable_entry_for_fn): Add ssizetype casts. Correct + continued search for primary binfo via virtual. + (build_vtbl_initializer): Follow covariant thunk alias. + * method.c (make_thunk): Clear DECL_THUNKS of the thunk. + (finish_thunk): Look for an alias of the covariant thunk and point + to it. + (use_thunk): We should never use an alias. + * semantics.c (emit_associated_thunks): Do not emit aliases. + + PR c++/12566 + * cp-tree.h (cp_fname_init): Add TYPE pointer param. + * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't + create an ad-hoc ERROR_MARK. + (cp_make_fname_decl): Adjust. + * pt.c (tsubst_expr): Adjust. + +2003-10-23 Jason Merrill + + PR c++/12726 + * tree.c (build_target_expr_with_type): Don't call force_rvalue + for CONSTRUCTORs. + +2003-10-22 Kazu Hirata + + * call.c: Fix comment formatting. + * class.c: Likewise. + * cxx-pretty-print.c: Likewise. + * init.c: Likewise. + * parser.c: Likewise. + * pt.c: Likewise. + * semantics.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + +2003-10-21 Mark Mitchell + + PR c++/11962 + * typeck.c (build_x_conditional_expr): Handle missing middle + operands in templates. + * mangle.c (write_expression): Issue errors about attempts to + mangle a non-existant middle operator to the ?: operator. + +2003-10-21 Robert Bowdidge + * decl.c (cp_finish_decl): Remove clause intended for asm directives + in struct or class fields: this code is never executed. + +2003-10-22 Kriang Lerdsuwanakij + + * decl.c (start_decl): Exit if push_template_decl returns + error_mark_node. + +2003-10-20 Kazu Hirata + + * ChangeLog: Fix typos. + * call.c: Fix comment typos. + * class.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + * cxx-pretty-print.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * init.c: Likewise. + * mangle.c: Likewise. + * name-lookup.c: Likewise. + * parser.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + +2003-10-20 Jan Hubicka + + * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer + the expansion. + +2003-10-20 Mark Mitchell + + * Make-lang.in (c++.install-info): Remove. + +2003-10-20 Jason Merrill + + * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding + field. + +2003-10-20 Kriang Lerdsuwanakij + + PR c++/9781, c++/10583, c++/11862 + * decl.c (cp_finish_decl): Exit immediately if decl is an + error_mark_node. + * pt.c (push_template_decl_real): Return error_mark_node for + invalid template declaration of variable. + +2003-10-18 Kriang Lerdsuwanakij + + PR c++/12495 + * pt.c (lookup_template_class): Handle when current_class_type + is a local class. + +2003-10-17 Kriang Lerdsuwanakij + + PR c++/2513 + * decl.c (make_typename_type): Use dependent_type_p. + (make_unbound_class_template): Likewise. + * pt.c (instantiate_class_template): Increment + processing_template_decl during substitution of template friend + function. Preincrement processing_template_decl rather than + postincrement. + (get_mostly_instantiated_function_type): Increment + processing_template_decl during partial substitution of function + type. + +2003-10-15 Jan Hubicka + + PR c++/12574 + * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink. + +2003-10-14 Jason Merrill + + PR c++/11878 + * tree.c (build_target_expr_with_type): Call force_rvalue for + classes with non-trivial copy ctors. + + PR c++/11063 + * typeck.c (build_modify_expr): Call convert rather than abort. + +2003-10-14 Gabriel Dos Reis + + Breack out decl.c (3/n) + * name-lookup.c: Include flags.h + (lookup_name_current_level): Make static. + (add_decl_to_level): Likewise. + (push_local_binding): Likewise. + (push_overloaded_decl): Likewise. + (lookup_using_namespace): Likewise. + (qualified_lookup_using_namespace): Likewise. + (lookup_type_current_level): Likewise. + (unqualified_namespace_lookup): Likewise. + (namespace_ancestor): Likewise. + (push_using_directive): Likewise. + * decl.c (pushdecl): Move to name-lookup.c. + (pushdecl_top_level_1): Likewise. + (pushdecl_top_level): Likewise. + (pushdecl_top_level_and_finish): Likewise. + (maybe_push_decl): Likewise. + (push_using_decl): Likewise. + (push_overloaded_decl): Likewise. + (make_anon_name): Likewise. + (anon_cnt): Likewise. + (clear_anon_tags): Likewise. + (maybe_inject_for_scope_var): Likewise. + (check_for_out_of_scope_variable): Likewise. + * Make-lang.in (cp/name-lookup.o): Depend on flags.h. + * decl.c (warn_extern_redeclared_static): Export. + * cp-tree.h (warn_extern_redeclared_static): Declare. + +2003-10-14 Nathanael Nerode + + * Make-lang.in: Replace uses of $(target_alias) with + $(target_noncanonical). + +2003-10-13 Volker Reichelt + + * ChangeLog: Add PR number to patch for PR c++/12370. + +2003-10-13 Gabriel Dos Reis + + * name-lookup.h (cxx_scope_find_binding_for_name): Don't export. + (binding_for_name): Likewise. + (cxx_binding_clear): Move to name-lookup.c. + * name-lookup.c (cxx_scope_find_binding_for_name): Now static. + (binding_for_name): Likewise. + * decl2.c (is_ancestor): Move to name-lookup.c + (namespace_ancestor): Likewise. + (add_using_namespace): Likewise. + (ambiguous_decl): Likewise. + (lookup_using_namespace): Likewise. + (qualified_lookup_using_namespace): Likewise. + (set_decl_namespace): Likewise. + (decl_namespace): Likewise. + (current_decl_namespace): Likewise. + (push_decl_namespace): Likewise. + (pop_decl_namespace): Likewise. + (push_scope): Likewise. + (pop_scope): Likewise. + (struct arg_lookup): Likewise. + (arg_assoc): Likewise. + (arg_assoc_args): Likewise. + (arg_assoc_type): Likewise. + (add_function): Likewise. + (arg_assoc_namespace): Likewise. + (arg_assoc_class): Likewise. + (arg_assoc_template_arg): Likewise. + (do_namespace_alias): Likewise. + (validate_nonmember_using_decl): Likewise. + (do_nonmember_using_decl): Likewise. + (do_toplevel_using_decl): Likewise. + (do_local_using_decl): Likewise. + (do_class_using_decl): Likewise. + (do_using_directive): Likewise. + (constructor_name_full): Likewise. + (constructor_name): Likewise. + (constructor_name_p): Likewise. + +2003-10-13 Gabriel Dos Reis + + Break out decl.c (2/n) + * name-lookup.c: Include diagnostic.h + (cxx_binding_free): Make static. + (cxx_binding_make): Likewise. + (binding_table_new): Likewise + (binding_table_free): Likewise. + (binding_table_insert): Likewise. + (binding_table_find_anon_type): Likewise. + (binding_table_reverse_maybe_remap): Likewise. + (supplement_binding): Likewise. + * name-lookup.h (global_scope_name): Declare extern. + (global_type_node): Likewise. + (cxx_binding_free): Don't export. + (cxx_binding_make): Likewise. + (binding_table_new): Likewise. + (binding_table_free): Likewise. + (binding_table_insert): Likewise. + (binding_table_find_anon_type): Likewise. + (binding_table_reverse_maybe_remap): Likewise. + * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H) + * decl.c (lookup_namespace_name): Move to name-lookup.c + (select_decl): Likewise. + (unqualified_namespace_lookup): Likewise. + (lookup_qualified_name): Likewise. + (lookup_name_real): Likewise. + (lookup_name_nonclass): Likewise. + (lookup_function_nonclass): Likewise. + (lookup_name): Likewise. + (lookup_name_current_level): Likewise. + (lookup_type_current_level): Likewise. + (lookup_flags): Likewise. + (qualify_lookup): Likewise. + (lookup_tag): Likewise. + (lookup_tag_reverse): Likewise. + (getdecls): Likewise. + (storedecls): Remove. + (cxx_remember_type_decls): Move to name-lookup.c. + (global_bindings_p): Likewise. + (innermost_nonclass_level): Likewise. + (toplevel_bindings_p): Likewise. + (namespace_bindings_p): Likewise. + (kept_level_p): Likewise. + (innermost_scope_kind): Likewise. + (template_parm_scope_p): Likewise. + (push_binding): Likewise. + (push_local_binding): Likewise. + (add_decl_to_level): Likewise. Make extern. + (push_class_binding): Move to name-lookup.c. + (resume_level): Likewise. Rename to resume_scope. + (begin_scope): Move to name-lookup.c. + (indent): Likewise. + (binding_depth): Likewise. + (is_class_level): Likewise. + (cxx_scope_descriptor): Likewise. + (cxx_scope_debug): Likewise. + (namespace_scope_ht_size): Likewise. + (leave_scope): Likewise. + (pushlevel_class): Likewise. + (poplevel_class): Likewise. + (clear_identifier_class_values): Likewise. + (pushdecl_with_scope): Likewise. + (pushdecl_namespace_level): Likewise. + (pushdecl_class_level): Likewise. + (push_class_level_binding): Likewise. + (push_using_directive): Likewise. + (identifier_global_value): Likewise. + (keep_next_level_flag): Likewise. + (keep_next_level): Likewise. + (free_binding_level): Likewise. + (set_class_shadows): Likewise. + (maybe_push_cleanup_level): Likewise. + (cp_namespace_decls): Likewise. + (bt_print_entry): Likewise. + (print_binding_level): Likewise. + (print_other_binding_stack): Likewise. + (print_binding_stack): Likewise. + (push_namespace): Likewise. + (pop_namespace): Likewise. + (push_nested_namespace): Likewise. + (pop_nested_namespace): Likewise. + (cxx_saved_binding_make): Likewise. + (struct cxx_saved_binding_make): Likewise. + (store_bindings): Likewise. + (maybe_push_to_top_level): Likewise. + (push_to_top_level): Likewise. + (pop_from_top_level): Likewise. + (identifier_type_value): Likewise. + (set_identifier_type_value): Likewise. + (set_identifier_type_value_with_scope): Likewise. + (pop_everything): Likewise. + (pushtag): Likewise. + (follow_tag_typedef): Likewise. + (maybe_process_template_type_declaration): Likewise. + (pop_binding): Likewise. + * cp-tree.h: Move corresponding declarations to name-lookup.h + +2003-10-12 Steven Bosscher + + * cvt.c (ocp_convert): Move warning to C common code. + +2003-10-09 Jason Merrill + + PR c++/6392 + * tree.c (build_cplus_array_type): Handle all quals the same. + (cp_build_qualified_type_real): Look through arrays first. + + * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL. + (build_target_expr_with_type): Likewise. + + * pt.c (instantiate_class_template): Sanity check that our + enclosing class has been instantiated. + +2003-10-08 Giovanni Bajo + + * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS. + * error.c (dump_function_decl): Use it to skip the dump of the + arguments. + (dump_expr): When dumping a declaration found within an + expression, always set TFF_NO_FUNCTION_ARGUMENTS + in the flags. + +2003-10-08 Giovanni Bajo + + PR c++/11097 + * pt.c (tsubst_decl): Substitute also the DECL_NAME node of + USING_DECL. + +2003-10-06 Mark Mitchell + + PR c++/10147 + * call.c (initialize_reference): Tweak error message. + * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove + pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope. + * cxx-pretty-print.c (pp_cxx_id_expression): Always display + qualified entities using qualified names. + + PR c++/12337 + * init.c (build_new_1): Make sure that the expression returned is + not an lvalue. + + PR c++/12344, c++/12236, c++/8656 + * decl.c (start_function): Do not ignore attributes embedded in a + function declarator. + +2003-10-06 Mark Mitchell + + * Make-lang.in (c++.info): Remove. + (c++.dvi): Remove. + (c++.generated-manpages): Replace with ... + (generated-manpages): ... this. + +2003-10-03 Gabriel Dos Reis + + * decl.c (struct cp_binding_level): Move to name-lookup.h + (current_binding_level): Likewise. + (class_binding_level): Likewise. + * cp-tree.h (enum scope_kind): Likewise. + +2003-10-03 Gabriel Dos Reis + + * name-lookup.c (binding_entry_free): Nullify name and type + fields. + +2003-10-02 Mark Mitchell + + PR c++/12486 + * typeck.c (finish_class_member_access_expr): Issue diagnostic + on erroneous use of qualified name. + +2003-09-30 Richard Henderson + + PR c++/12370 + * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too. + +2003-09-30 Kelley Cook + + * g++spec.c: Convert to ISO C90 prototypes. + * parser.c: Likewise. + +2003-09-30 Gabriel Dos Reis + + * decl.c (pop_binding): Don't mess with nullifying binding->scope + here. + * name-lookup.c: Re-format. + (cxx_binding_free): Nullify binding->scope. + +2003-09-29 Jan Hubicka + + PR C++/12047 + * except.c (build_eh_type_type): Call mark_used on the type. + +2003-09-28 Richard Henderson + + * typeck.c (c_expand_asm_operands): Take location_t, instead of + individual file and line. + +2003-09-28 Andreas Jaeger + + * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function + definition. + * init.c (push_base_cleanups): Likewise. + * decl2.c (finish_file): Likewise. + * mangle.c (init_mangle): Likewise. + (dump_substitution_candidates): Likewise. + * search.c: Likewise. + +2003-09-27 Gabriel Dos Reis + + * name-lookup.h (get_global_value_if_present): New function. + (is_typename_at_global_scope): Likewise. + * except.c (do_begin_catch): Use get_global_value_if_present. + (do_end_catch): Likewise. + (do_allocate_exception): Likewise. + (do_free_exception): Likewise. + (build_throw): Likewise. + * parser.c (cp_parser_member_declaration): Likewise. + * rtti.c (throw_bad_cast): Likewise. + (throw_bad_typeid): Likewise. + * decl.c (check_tag_decl): Use is_typename_at_global_scope. + (grokdeclarator): Likewise. + * cp-tree.h (global_namespace): Move to name-lookup.h + * call.c (call_builtin_trap): Tidy. + +2003-09-27 Kriang Lerdsuwanakij + + PR c++/11415 + * parser.c (cp_parser_nested_name_specifier_opt): Issue correct + error message when parser->scope is global_namespace. + +2003-09-27 Gabriel Dos Reis + + * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to + macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE. + +2003-09-26 Gabriel Dos Reis + + * decl.c (pop_binding_level, suspend_binding_level, + find_class_binding_level): Merge into leave_scope. Remove. + (leave_scope): New function. + (poplevel): Update. + (poplevel_class): Likewise. + (pop_namespace): Likewise. + +2003-09-25 Kriang Lerdsuwanakij + + PR c++/5655 + * parser.c (cp_parser_check_access_in_redeclaration): New function. + (cp_parser_member_declaration): Use it. + (cp_parser_template_declaration_after_export): Likewise. + +2003-09-22 Gabriel Dos Reis + + * cp-tree.h (scope_kind): Add new enumerator. + (keep_next_level): Change parameter type to bool. + (begin_scope): Change prototype. + (pushlevel): Remove declaration. + * decl.c (push_binding_level): Fold in begin_scope. Remove. + (struct cp_binding_level): Remove tag_tranparent field. Make keep + of bitsize one. + (keep_next_level_flag): Make a bool. + (cxx_scope_descriptor): Update scope names table + (make_cxx_scope): Fold in begin_scope. Remove.. + (namespace_scope_ht_size): New function. + (begin_scope): Change prototype. Return a scope. Tidy. + (kept_level_p): Update. + (pushlevel): Remove. + (maybe_push_cleanup_level): Simplify. + (poplevel): Update for sk_cleanup and keep change. + (print_binding_level): Likewise. + (initial_push_namespace_scope): Fold in begin_scope. Remove. + (push_namespace): Update. + (pushtag): Likewise. + (lookup_tag): Likewise. + (lookup_name_current_level): Likewise. + (lookup_type_current_level): Likewise. + (cxx_init_decl_processing): Likewise. + (start_function): Likewise. + (begin_function_body): Likewise. + (start_method): Likewise. + * pt.c (push_inline_template_parms_recursive): Likewise. + (begin_template_parm_list): Likewise. + (begin_specialization): Likewise. + * semantics.c (do_pushlevel): Likewise. + (begin_compound_stmt): Likewise. + (begin_stmt_expr): Likewise. + +2003-09-21 Richard Henderson + + * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, + method.c, optimize.c, pt.c, semantics.c, tree.c: Revert. + +2003-09-21 Richard Henderson + + * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, + method.c, optimize.c, pt.c, semantics.c, tree.c: Update for + DECL_SOURCE_LOCATION rename and change to const. + +2003-09-20 Richard Henderson + + * decl.c, decl2.c, pt.c: Use %J in diagnostics. + +2003-09-20 Kriang Lerdsuwanakij + + PR c++/157 + * parser.c (cp_parser_direct_declarator): Clear + parser->num_template_parameter_lists when parsing function + parameters. + (cp_parser_constructor_declarator_p): Likewise. + +2003-09-19 Kriang Lerdsuwanakij + + PR c++/495 + * pt.c (tsubst_friend_class): Only use innermost template + arguments for the injected friend class template. + +2003-09-19 Nathan Sidwell + + PR c++/12332 + * pt.c (instantiate_class_template): Increment + processing_template_decl around the tsubst of a template member + function. + +2003-09-19 Gabriel Dos Reis + + * decl.c (cxx_scope_descriptor): Fix thinko. + (struct cp_binding_level): Adjust type of binding_depth field. + +2003-09-18 Danny Smith + + PR c++/12320 + * call.c (type_passed_as): Check for incomplete type. + (convert_for_arg_passing): Likewise. + +2003-09-18 Nathan Sidwell + + PR c++/9848 + * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters + here. + * semantics.c (expand_body): Set it here on the remaining clones. + +2003-09-18 Roger Sayle + + * lex.c (init_operators): Remove operator_name_info for FFS_EXPR. + * class.c (instantiate_type): Remove FFS_EXPR case. + +2003-09-18 Volker Reichelt + + * ChangeLog: Fix recent commit. + +2003-09-18 Volker Reichelt + + * ChangeLog: Add PR number to patch for PR c++/12316. + +2003-09-18 Gabriel Dos Reis + + * error.c (dump_type): Simplify. Use pp_type_specifier_seq for + "C" types. + * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko. + +2003-09-17 Richard Henderson + + * semantics.c (expand_body): Don't save/restore input_location. + +2003-09-17 Mark Mitchell + + PR c++/12266 + * cp-tree.h (tsubst_flags_t): Add tf_conv. + * class.c (standard_conversion): Pass tf_conv to + instantiate_type. + (resolve_address_of_overloaded_function): Do not call mark_used + when just checking conversions. + + PR debug/12066 + * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define. + * cp-tree.h (cxx_builtin_type_decls): Declare. + * decl.c (builtin_type_decls): New variables. + (cxx_builtin_type_decls): New function. + (record_builtin_type): Add to builtin_type_decls. + +2003-09-17 Richard Henderson + + PR c++/12316 + * semantics.c (expand_or_defer_fn): Inc/dec function_depth. + +2003-09-16 Kriang Lerdsuwanakij + + PR c++/7939 + * typeck.c (comptypes): Don't ICE when its first argument is + error_mark_node. + (compparms): Reverse the arguments of same_type_p. + +2003-09-15 Nathan Sidwell + + PR c++/12184 + * typeck.c (convert_arguments): Return error_mark_node for an + incomplete parameter. Make error message more informative. + +2003-09-12 Mark Mitchell + + PR c++/3907 + * class.c (maybe_note_name_used_in_class): Refine test for whether + or not we are in a class scope. + + * cp-tree.h (language_function): Remove x_expanding_p. + (expanding_p): Remove. + (doing_semantic_analysis_p): Remove. + (scope_kind): Add sk_function_parms, sk_class, + sk_namespace. + (innermost_scope_kind): New method. + * call.c (cxx_type_promotes_to): Use type_decays_to. + * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine. + (LANG_HOOKS_POPLEVEL): Likewise. + * decl.c (cp_binding_level): Remove parm_flag, template_parms_p, + template_spec_p, namespace_p, is_for_scope, is_try_scope, and + is_catch_scope. Add kind and explicit_spec_p. + (cxx_scope_descriptor): Use a lookup table. + (find_class_binding_level): Use "kind" field in binding_level, not + the various flags. + (pop_binding_level): Likewise. + (innermost_nonclass_level): Likewise. + (toplevel_bindings_p): Likewise. + (namespace_bindings_p): Likewise. + (template_parm_scope_p): Likewise. + (innermost_scope_kind): New method. + (current_tmpl_spec_kind): Use "kind" field in binding_level, not + the various flags. + (pushlevel): Remove check for doing_semantic_analysis_p. + (begin_scope): Simplify. + (add_decl_to_level): Use "kind" field in binding_level, not + the various flags. + (push_local_binding): Likewise. + (pop_label): Remove check for doing_semantic_analysis_p. + (poplevel): Use "kind" field in binding_level, not + the various flags. + (set_block): Remove check for doing_semantic_analysis_p. + (pushlevel_class): Use "kind" field in binding_level, not + the various flags. + (poplevel_class): Likewise. + (initial_push_namespace_scope): Likewise. + (maybe_push_to_top_level): Likewise. + (set_identifier_type_value_with_scope): Likewise. + (pop_everything): Likewise. + (maybe_process_template_type_declaration): Likewise. + (pushtag): Likewise. + (pushdecl): Likewise. + (pushdecl_with_scope): Likewise. + (check_previous_goto_1): Likewise. + (define_label): Likewise. + (finish_case_label): Likewise. + (lookup_tag): Likewise. + (unqualified_namespace_lookup): Likewise. + (lookup_name_real): Likewise. + (lookup_name_current_level): Likewise. + (lookup_type_current_level): Likewise. + (record_builtin_type): Likewise. + (cp_make_fname_decl): Likewise. + (maybe_inject_for_scope_var): Likewise. + (cp_finish_decl): Remove check for doing_semantic_analysis_p. + (start_function): Use begin_scope, not pushlevel. + (finish_function): Use "kind" field in binding_level, not + the various flags. + (start_method): Use begin_scope, not pushlevel. + (make_label_decl): Do not check expanding_p. + (save_function-data): Do not set expanding_p. + (cxx_push_function_context): Do not clear expanding_p. + * semantics.c (cxx_expand_function_start): Do not set expanding_p. + +2003-09-14 Mark Mitchell + + * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for + an bit-field whose width exceeds that of its type. + +2003-09-14 Geoffrey Keating + + * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls. + +2003-09-14 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * parser.c: Likewise. + +2003-09-13 Richard Henderson + + * decl2.c (finish_file): Check cgraph_assemble_pending_functions + during relaxation loop. + +2003-09-11 David Edelsohn + + * decl2.c (var_finalized_p): Swap arms of conditional. + +2003-09-10 Nathan Sidwell + + PR c++/11788 + * typeck.c (build_address): If it is a function, mark it used. + (build_unary_op): Do not lose object's side-effects when taking + address of static member function. + * class.c (resolve_address_of_overloaded_function): Use + tsubst_flags_t parameter. Only expect overload sets. Adjust. + (instantiate_type): Adjust flags passing. Do not lose object's + side-effects when taking address of static member function. + +2003-09-11 Richard Henderson + + * semantics.c (expand_or_defer_fn): Update for new + cgraph_finalize_function argument. + +2003-09-10 Richard Henderson + + * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused. + +2003-09-10 Jan Hubicka + + * decl2.c (var_finalized_p): New. + (maybe_emit_vtables, write_out_vars, finish_file): Use it. + +2003-09-10 Richard Henderson + + * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of + mark_member_pointers. + (lower_function): Remove. + * cp-tree.h: Update to match. + * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New. + (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove. + +2003-09-09 Richard Henderson + + * semantics.c (expand_or_defer_fn): Update call to + cgraph_finalize_function. + + * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function + always. + + * decl2.c (finish_file): Avoid out-of-bounds array reference + during memmove. + +2003-09-09 Richard Henderson + + * decl2.c (mark_member_pointers): Rename from + mark_member_pointers_and_eh_handlers and don't check eh handlers. + +2003-09-09 Christian Ehrhardt + + PR bootstrap/12168 + * method.c (use_thunk): Clear DECL_RTL of copied nodes. + +2003-09-08 Mark Mitchell + + * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to + c_register_builtin_type. + + PR c++/11786 + * decl2.c (add_function): Do not complain about seeing the same + non-function twice. + * semantics.c (perform_koenig_lookup): Improve documentation. + + PR c++/5296 + * pt.c (try_one_overload): Add addr_p parameter. + (resolve_overloaded_unification): Pass it. + +2003-09-08 Richard Henderson + + * optimize.c (maybe_clone_body): Inc/dec function_depth. + +2003-09-08 Richard Henderson + + * decl.c (finish_function): Clear current_function_decl. + * decl2.c (mark_used): Don't push/pop gc context. + * optimize.c (optimize_function): Likewise. + * tree.c (cp_cannot_inline_tree_fn): Likewise. + * pt.c (instantiate_decl): Inc/dec function_depth instead. + * semantics.c (expand_body): Update for tree_rest_of_compilation + nested argument. + +2003-09-07 Gabriel Dos Reis + + PR c++/11762 + * error.c (dump_decl): Handle namespace-alias-definition. + * decl.c (warn_extern_redeclared_static): There is no point in + checking changes in storage class specifier for a namespace + declaration. + (duplicate_decls): Tidy diagnostic message. + * cxx-pretty-print.c (pp_cxx_left_brace): New macro. + (pp_cxx_right_brace): Likewise. + (pp_cxx_original_namespace_definition): New function. + (pp_cxx_namespace_alias_definition): Likewise. + (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs. + +2003-09-07 Jan Hubicka + + * decl2.c (maybe_emit_vtables, write_out_vars, finish_file): + Avoid re-emitting variables in unit-at-a-time mode. + +2003-09-06 Mark Mitchell + + PR c++/11867 + * call.c (standard_conversion): Improve comments. + (perform_direct_initialization): Make sure we return an expression + of the correct type. + * typeck.c (build_static_cast): Check for ambiguity and + accessibility when performing conversions. + +2003-09-06 Gabriel Dos Reis + + * cp-tree.h (add_binding): Remove declaration. + * name-lookup.h (supplement_binding): Declare. + * decl.c (add_binding): Move to name-lookup.c. + (push_local_binding): Adjust. + (push_class_binding): Likewise. + (set_identifier_type_value_with_scope): Likewise. + * name-lookup.c (supplement_binding): Rename from add_binding. + Return a bool. Improve documentation. + (set_namespace_binding): Adjust. + * Make-lang.in (cp/name-lookup.o): Depend on toplev.h + +2003-09-06 Nathan Sidwell + + PR c++/11794 + * class.c (pushclass): Push dependent using decls for nested + classes of templates too. + +2003-09-06 Roger Sayle + + PR c++/11409 + * class.c (resolve_address_of_overloaded_function): When building + list of matching non-template function decls, ignore anticipated + declarations of undeclared or shadowed GCC builtins. + +2003-09-06 Steven Bosscher + + PR c++/11595 + * decl.c (define_label): Remove unreachable timevar pop. + Always return the decl, even if the definition is invalid. + +2003-09-06 Nathan Sidwell + + PR c++/12167 + * parser.c (cp_parser_late_parsing_default_args): Push & pop the + unparsed functions queue. + +2003-09-05 Mark Mitchell + + PR c++/12163 + * call.c (perform_direct_initialization): Correct logic for + direct-initialization of a class type. + + PR c++/12146 + * pt.c (lookup_template_function): Robustify. + +2003-09-05 Nathan Sidwell + + PR c++/11922 + * pt.c (tsubst_qualified_id): Make sure we get a non-type. + (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as + is_type_p to lookup_qualified_name. + + * semantics.c (finish_call_expr): Refactor some code. + + PR c++/12037 + * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New. + (build_min_non_dep): Declare. + * tree.c (build_min): Propagate TREE_SIDE_EFFECTS. + (build_min_non_dep): New. + * cvt.c (convert_to_void): Don't explicitly copy + TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING. + * call.c (build_new_method_call): Use build_min_non_dep. + * decl2.c (grok_array_decl): Likewise. + (build_offset_ref_call_from_tree): Likewise. + * typeck.c (finish_class_member_access_expr, + build_x_indirect_ref, build_x_binary_op, build_x_unary_op, + build_x_conditional_expr, build_x_compound_expr): Likewise. + (build_static_cast, build_reinterpret_cast, + build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template. + * typeck2.c (build_x_arrow): Use build_min_non_dep. + (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a + template. + * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE. + (build_dynamic_cast): Set TREE_SIDE_EFFECTS. + * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED. + +2003-09-04 Richard Henderson + + * decl2.c (mark_member_pointers_and_eh_handlers): Update for + change in cgraph_mark_needed_node arguments. + +2003-09-02 Geoffrey Keating + + PR 12161 + * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context. + * tree.c (cp_cannot_inline_tree_fn): Likewise. + +2003-09-04 Nathan Sidwell + + * cp-tree.h (finish_sizeof, finish_alignof): Remove. + (expr_sizeof): Replace with ... + (cxx_sizeof_or_alignof_expr): ... here. + (cxx_sizeof_or_alignof_type): Make complain parameter a bool. + * parser.c (cp_parser_unary_expression): Commonize alignof and + sizeof handling. + * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof + substitution. + * semantics.c (finish_sizeof, finish_alignof): Remove. + * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter + becomes bool. Set TREE_READONLY. + (expr_sizeof): Replace with ... + (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS. + +2003-09-04 Mark Mitchell + + Remove cast-as-lvalue extension. + * call.c (build_conditional_expr): Correct formatting. + (convert_like_real): Use lvalue_p, not non_cast_lvalue_p. + (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p. + * cp-tree.h (non_cast_lvalue_p): Remove. + (real_non_cast_lvalue_p): Remove. + (non_cast_lvalue_or_else): Remove. + * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter. + (real_lvalue_p): Adjust call to lvalue_p_1. + (non_cast_lvalue_p): Remove. + (non_cast_lvalue_or_else): Remove. + (lvalue_p): Adjust call to lvalue_p_1. + (lvalue_or_else): Simplify. + * typeck.c (build_unary_op): Use lvalue_or_else, not + non_cast_lvalue_or_else. + (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p. + +2003-09-03 DJ Delorie + + * decl.c (finish_function): Pass fndecl to aggregate_value_p. + +2003-09-03 Mark Mitchell + + PR c++/12053 + * class.c (include_empty_classes): Correct logic for ABI version 1. + +2003-09-03 Richard Henderson + + * optimize.c (optimize_function): Push/pop ggc context around + the call to optimize_inline_calls. + +2003-09-02 Scott Brumbaugh + + PR c++/11553 + * parser.c (cp_parser_decl_specifier_seq): Add check for a + duplicate friend decl-specifier. + +2003-09-02 Mark Mitchell + + PR c++/11847 + * pt.c (convert_nontype_argument): Correct representation of + REFERENCE_TYPE expressions. + + PR c++/11808 + * cp-tree.h (KOENIG_LOOKUP_P): New macro. + (finish_call_expr): Change prototype. + * parser.c (cp_parser_postfix_expression): Adjust call to + finish_call_expr. + * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P. + * semantics.c (finish_call_expr): Add koenig_p parameter. + +2003-09-01 Mark Mitchell + + PR c++/12114 + * cp-tree.h (initialize_reference): Change prototype. + * call.c (initialize_reference): Add cleanup parameter. + * decl.c (grok_reference_init): Likewise. + (check_initializer): Likewise. + (cp_finish_decl): Insert a CLEANUP_STMT if necessary. + (duplicate_decls): When replacing an anticipated builtin, do not + honor TREE_NOTHROW. + * typeck.c (convert_for_initialization): Correct call to + initialize_reference. + + PR c++/11972 + * pt.c (dependent_type_p_r): Pass only the innermost template + arguments to any_dependent_template_arguments_p. + +2003-09-01 Josef Zlomek + + * error.c (dump_expr): Kill BIT_ANDTC_EXPR. + * lex.c (init_operators): Kill BIT_ANDTC_EXPR. + * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR. + * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR. + (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR. + +2003-08-29 Mark Mitchell + + PR c++/12093 + * pt.c (build_non_dependent_expr): Do not build a + NON_DEPENDENT_EXPR for a STRING_CST. + + PR c++/11928 + * search.c (add_conversions): Avoid adding two conversion + operators for the same type. + +2003-08-29 Mark Mitchell + + PR c++/6196 + * pt.c (tsubst_copy_and_build): Correct handling of + address-of-label extension. + * semantics.c (finish_goto_stmt): The address of a label must go + through the lvalue-to-rvalue conversion. + +2003-08-29 Richard Henderson + Jason Merrill + + * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New. + (LANG_HOOKS_RTL_EXPAND_STMT): New. + * cp-tree.h (cxx_expand_function_start): Declare. + * decl.c (start_function): Use allocate_struct_function. + Move stmts_are_full_exprs_p assertion from expand_body. + Do not free_after_parsing or free_after_compilation. + (cxx_push_function_context): Move code to set struct function + data from genrtl_start_function. + * optimize.c (optimize_function): Don't inc/dec function_depth. + * semantics.c (expand_body): Use tree_rest_of_compilation. + (cxx_expand_function_start): Rename from genrtl_start_function, + omit bits done by tree_rest_of_compilation. + (genrtl_finish_function): Remove. + (clear_decl_rtl): Move to ../tree-optimize.c. + +2003-08-29 Gabriel Dos Reis + + PR c++/11811 + * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New + function. + * cxx-pretty-print.h: Declare. + * error.c (dump_template_parameter): Use it. + (dump_type): Likewise. + +2003-08-28 Mark Mitchell + + * init.c (decl_constant_value): Deal with COND_EXPR specially. + * call.c (build_conditional_expr): Revert previous patch. + + PR optimization/5079 + * call.c (build_conditional_expr): Use decl_constant_value to + simplify the arguments. + +2003-08-26 Dan Nicolaescu + + * parser.c (struct cp_token): Use enum bitfields. + (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a + 512B allocation unit. + (cp_parser_token_tree_map_node): Use enum bitfields. + +2003-08-26 Nathan Sidwell + + PR c++/11871 + * decl.c (push_class_level_binding): Correct old_decl value from + my 2003-07-29 reorganization. + + * call.c (build_call): Don't set TREE_SIDE_EFFECTS here. + (build_new_method_call): Add goto finish. + * semantics.c (simplify_aggr_init_exprs_r): Don't set + TREE_SIDE_EFFECTS on a call. + +2003-08-25 Richard Henderson + + * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function. + +2003-08-25 Gabriel Dos Reis + + * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag. + (cxx_pretty_printer): Adjust base type. + (pp_cxx_function_specifier): Declare. + * cxx-pretty-print.c (pp_cxx_whitespace): New macro. + (pp_cxx_left_paren): Likewise. + (pp_cxx_right_paren): Likewise. + (pp_cxx_dot): Likewise. + (pp_cxx_arrow): Likewise. + (pp_cxx_semicolon): Likewise. + (pp_cxx_identifier): Likewise. + (pp_cxx_cv_qualifier_seq): Likewise. + (pp_cxx_storage_class_specifier): Likewise. + (pp_cxx_expression_list): Likewise. + (pp_cxx_space_for_pointer_operator): Likewise. + (pp_cxx_init_declarator): Likewise. + (pp_cxx_call_argument_list): Likewise. + (pp_cxx_nonconsecutive_character): Tidy. + (pp_cxx_conversion_function_id): New function. + (pp_cxx_template_id): Likewise. + (pp_cxx_template_keyword_if_needed): Likewise. + (pp_cxx_nested_name_specifier): Likewise. + (pp_cxx_unqualified_id): Tidy + (pp_cxx_qualified_id): Handle more nodes. + (pp_cxx_primary_expression): Tidy. + (pp_cxx_postfix_expression): Likewise. + (pp_cxx_new_expression): Tidy. + (pp_cxx_delete_expression): Likewise. + (pp_cxx_cast_expression): New function. + (pp_cxx_pm_expression): Tidy. + (pp_cxx_conditional_expression): Likewise. + (pp_cxx_assignment_operator): New function. + (pp_cxx_assignment_expression): Tidy. + (pp_cxx_expression): New function. + (pp_cxx_function_specifier): Likewise. + (pp_cxx_decl_specifier_seq): Likewise. + (pp_cxx_simple_type_specifier): Tidy. + (pp_cxx_type_specifier_seq): Likewise. + (pp_cxx_ptr_operator): New function. + (pp_cxx_implicit_parameter_type): Likewise. + (pp_cxx_parameter_declaration): Tidy. + (pp_cxx_parameter_declaration_clause): New function. + (pp_cxx_exception_specification): Likewise. + (pp_cxx_direct_declarator): Tidy. + (pp_cxx_declarator): Likewise. + (pp_cxx_ctor_initializer): New function. + (pp_cxx_function_definition): Likewise. + (pp_cxx_abstract_declarator): Tidy. + (pp_cxx_direct_abstract_declarator): Likewise. + (pp_cxx_type_id): Likewise. + (pp_cxx_exception_declaration): New function. + (pp_cxx_statement): Likewise. + (pp_cxx_simple_declaration): Likewise. + (pp_cxx_template_parameter_list): Likewise. + (pp_cxx_template_parameter): Likewise. + (pp_cxx_template_declaration): Likewise. + (pp_cxx_explicit_specialization): Likewise. + (pp_cxx_explicit_instantiation): Likewise. + (pp_cxx_declaration): Tidy. + (pp_cxx_pretty_printer_init): Initialize more fields. + +2003-08-25 Mark Mitchell + + PR c++/8795 + * cp-tree.h (build_cplus_method_type): Remove. + * call.c (standard_conversion): Use build_method_type_directly + instead of build_cplus_method_type. + * class.c (build_clone): Likewise. + (adjust_clone_args): Likewise. + * decl.c (build_ptrmem_type): Likewise. + (grokdeclarator): Likewise. + (check_function_type): Likewise. + * decl2.c (grok_method_quals): Likewise. + (maybe_retrofit_in_chrg): Likewise. + * pt.c (copy_default_args_to_explicit_spec): Likewise. + (tsubst_function_type): Likewise. + (tsubst): Likewise. + * tree.c (build_cplus_method_type): Remove. + * typeck.c (merge_types): Use build_method_type_directly. + +2003-08-23 Kriang Lerdsuwanakij + + PR c++/3765 + * search.c (dfs_access_in_type): Fix typo in comment. + (dfs_accessible_queue_p): Likewise. + (dfs_accessible_p): Only terminate when a friend is found. + (accessible_p): Return immediately if access_in_type allows + access. + +2003-08-23 Kriang Lerdsuwanakij + + PR c++/641, c++/11876 + * friend.c (add_friend): Add complain parameter. + (make_friend_class): Likewise. + (do_friend): Adjust add_friend call. + * decl.c (grokdeclarator): Adjust make_friend_class call. + * parser.c (cp_parser_member_declaration): Likewise. + (cp_parser_template_declaration_after_export): Likewise. + * pt.c (instantiate_class_template): Adjust make_friend_class + and add_friend call. + * cp-tree.h (make_friend_class): Adjust declaration. + (add_friend): Likewise. + +2003-08-21 Jason Merrill + + PR c++/11283 + * call.c (build_conditional_expr): Ignore cv-qual differences for + non-class types. + +2003-08-21 Mark Mitchell + + PR c++/11551 + * parser.c (cp_parser_id_expression): Add declarator_p parameter. + (cp_parser_primary_expression): Adjust call to + cp_parser_id_expression. + (cp_parser_unqualified_id): Complain about the use of + typedef-names in a destructor declarator. + (cp_parser_postfix_expression): Adjust call to + cp_parser_id_expression. + (cp_parser_type_parameter): Likewise. + (cp_parser_template_argument): Likewise. + (cp_parser_declarator_id): Likewise. + + PR c++/11919 + * call.c (standard_conversion): Use same_type_p, not pointer + equality, to compare types. + + PR c++/10762 + * parser.c (cp_parser_using_declaration): Check for invalid uses + of template-ids here... + * decl2.c (do_class_using_decl): ... rather than here. + +2003-08-20 Mark Mitchell + + PR c++/11834 + * pt.c (more_specialized): Bump processing_template_decl. + +2003-08-21 Jason Merrill + + PR c++/11614 + * decl.c (grokdeclarator): Recognize a flexible array based on the + type, not the form of the declarator. + +2003-08-20 Jason Merrill + + * semantics.c (simplify_aggr_init_expr): Split out from + simplify_aggr_init_exprs_r. Convert slot address to match + the return type. + * cp-tree.h: Declare it. + * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the + DECL_NAME of a user variable. + +2003-08-20 Nathan Sidwell + + PR c++/11945 + * pt.c (build_non_dependent_expr): Look inside COND_EXPR and + COMPOUND_EXPR. + * semantics.c (finish_expr_stmt): Always convert to void. + * typeck.c (build_x_compound_exp): Always convert to void. + +2003-08-19 Mark Mitchell + + PR c++/11684 + * cp-tree.h (grok_op_properties): Change prototype. + * decl.c (grok_op_properties): Add complain parameter. + (grokfndecl): Pass it. + * pt.c (tsubst_decl): Adjust accordingly. + + PR c++/10926 + * decl.c (start_method): Return immediately if push_template_decl + does not like the declaration. + * pt.c (push_template_decl_real): Disallow member template + destructors. + + PR c++/11036 + * cp-tree.h (add_binding): Add prototype. + * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate. + (maybe_warn_about_overly_private_class): Use + CLASSTYPE_DESTRUCTORS. + (pushclass): Adjust call to set_identifier_type_value. + * decl.c (add_binding): Give it external linkage. + (push_local_binding): Adjust call to add_binding. + (push_class_binding): Likewise. + (set_identifier_type_value_with_scope): Change prototype. Use + add_binding for global bindings. + (set_identifier_type_value): Adjust accordingly. + (pushtag): Likewise. + (pushdecl): Use set_identifier_type_value, not + set_identifier_type_value_with_scope. + (pushdecl_namespace_level): Adjust calls to + SET_IDENTIFIER_TYPE_VALUE to pass a DECL. + (pushdecl_class_level): Likewise. + (lookup_tag): Use select_decl. + (select_decl): Improve comment. + (record_builtin_type): Do not call pushdecl. + (cxx_init_decl_processing): Do not call xref_tag for bad_alloc. + (cp_finish_decl): Adjust call to set_identifier_type_value. + (check_elaborated_type_specifier): Improve checks for invalid uses + of typedefs. + (xref_tag): Adjust call to check_elaborated_type_specifier. + * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR. + * name-lookup.c (set_namespace_binding): Use add_binding. + * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL, + rather than an IDENTIFIER_NODE, to represent built-in types, if + requested by the caller. + (cp_parser_postfix_expression): Adjust call. + (cp_parser_type_specifier): Likewise. + (cp_parser_elaborated_type_specifier): Adjust call to + check_elaborated_type_specifier. + * typeck2.c (build_functional_cast): Do not perform name lookups. + + PR c++/10717 + * decl.c (expand_static_init): Remove unnecessary code. + +2003-08-19 Andrew Pinski + + PR c++/10538, PR c/5582 + * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define. + +2003-08-19 Kriang Lerdsuwanakij + + PR c++/11174 + * init.c (build_offset_ref): Perform access checking for + pointer to member correctly. + +2003-08-19 Gabriel Dos Reis + + * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling. + +2003-08-18 Nathan Sidwell + + PR c++/11957 + * cp-tree.h (finish_stmt_expr): Add bool parameter. + * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't + adjust the stmt_expr here. + (build_vec_init): Use finish_stmt_expr_expr, convert result to + array type. + * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr + call. + * pt.c (tsubst_copy): Likewise. + * semantics.c (finish_stmt_expr): Add parameter. + + * pt.c (instantiate_class_template): Push to class's scope before + tsubsting base. + +2003-08-17 Jan Hubicka + + PR C++/11702 + * semantics.c (finish_id_expression): Mark all functions as used. + +2003-08-16 Nathan Sidwell + + PR c++/11512 + * cvt.c (convert_to_void): Indicate which side of conditional has + no effects, and rhs of comma operator. Test for no sideeffect + expressions here and always build a convert expr. + * init.c (expand_default_init): Convert the init to void. + * typeck.c (build_x_compound_expr): Do not check for side effects + here. + (build_compound_expr): Do not convert lhs when building a + template. + +2003-08-15 Nathan Sidwell + + * cp-tree.def (NON_DEPENDENT_EXPR): Add operand. + * decl2.c (build_offset_ref_call_from_tree): Use + build_non_dependent_expr. + * error.c (dump_expr) : Dump the operand. + * pt.c (build_non_dependent_expr): Set operand. + +2003-08-14 Jan Hubicka + + * decl2.c (mark_member_pointers): Rename to... + (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos + (lower_function): Update call. + * except.c (eh_type_info): Break out from ... + (build_eh_type): ... here; tinfo is already used. + (finish_eh_spec_block): Mark tinfos as used. + * semantics.c (finish_handler_params): Mark tinfo as used. + * cp-tree.h (eh_type_info): Declare. + +2003-08-15 Nathan Sidwell + + * pt.c (instantiate_class_template): Set location before + substuting bases. + + * decl.c (make_typename_type): Use my_friendly_assert. + * pt.c (tsubst_aggr_type): Rearrange context substitution. + +2003-08-14 Jan Hubicka + + * method.c (use_thunk): Expand body directly. + +2003-08-12 Mark Mitchell + + PR c++/11703 + * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to + determine whether or not to promote types. + (convert_for_arg_passing): Likewise. + * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in + templates. + * pt.c (tsubst_decl): Do not expect it to be set. + + PR c++/9512 + PR c++/10923 + * cp-tree.h (check_elaborated_type_specifier): Declare. + (handle_class_head): Remove. + (note_got_semicolon): Likewise. + (note_list_got_semicolon): Likewise. + (finish_class_definition): Likewise. + * decl.c (check_elaborated_type_specifier): Make it public. + Robustify. + (handle_class_head): Remove. + * parser.c (cp_parser_elaborated_type_specifier): Use + check_elaborated_type_specifier. + (cp_parser_class_specifier): Do not call finish_class_definition. + (cp_parser_class_head): Or handle_class_head. Check for + over-qualified names. + * semantics.c (finish_class_definition): Remove. + + * parser.c (cp_parser_check_for_definition_in_return_type): New + function. + (cp_parser_simple_declaration): Adjust call to + cp_parser_init_declarator. + (cp_parser_decl_specifier_seq): Change type of + declares_class_or_enum parameter. + (cp_parser_explicit_instantiation): Adjust accordingly. + (cp_parser_type_specifier): Change type of + declares_class_or_enum parameter. + (cp_parser_init_declarator): Add declares_class_or_enum + parameter. + (cp_parser_parameter_declaration): Adjust call to + cp_parser_decl_specifier_seq. + (cp_parser_function_definition): Likewise. + (cp_parser_member_declaration): Likewise. + (cp_parser_single_declaration): Likewise. + + * cp-tree.h (lang_type_class): Remove has_call_overloaded, + has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon. + (TYPE_OVERLOADS_CALL_EXPR): Remove. + (TYPE_OVERLOADS_ARRAY_REF): Likewise. + (TYPE_OVERLOADS_ARROW): Likewise. + (CLASSTYPE_GOT_SEMICOLON): Likewise. + * class.c (check_bases): Do not set them. + (finish_struct_1): Likewise. + * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON. + (build_ptrmemfunc_type): Likewise. + (grok_op_properties): Do not set TYPE_OVERLOADS_*. + (start_function): Do not check CLASSTYPE_GOT_SEMICOLON. + * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON. + * lex.c (note_got_semicolon): Remove. + (note_list_got_semicolon): Likewise. + * parser.c (cp_parser_simple_declaration): Do not call + note_list_got_semicolon. + * pt.c (list_eq): Remove. + (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON. + (instantiate_class_template): Do not set TYPE_OVERLOADS*. + (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON. + * ptree.c (cxx_print_type): Do not print them. + * semantics.c (finish_member_class_template): Do not call + note_list_got_semicolon. + +2003-08-11 Aldy Hernandez + + * call.c (standard_conversion): Opaque pointers interconvert. + + * testsuite/g++.dg/other/opaque-3.C: New. + +2003-08-11 Mark Mitchell + + * typeck.c (merge_types): Handle cv-qualified pointer-to-member + types correctly. + +2003-08-10 Mark Mitchell + + PR c++/11789 + * cp-tree.h (get_vbase): Remove. + (get_vbase_types): Remove. + * init.c (expand_member_init): Correct logic for looking up base + classes. + +2003-08-10 Gabriel Dos Reis + + * error.c (dump_expr): Tidy. + * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New. + (pp_cxx_begin_template_argument_list): Likewise. + (pp_cxx_end_template_argument_list): Likewise. + (is_destructor_name): Likewise. + (pp_cxx_unqualified_id): Likewise. + (pp_cxx_qualified_id): Likewise. + (pp_cxx_id_expression): Likewise. + (pp_cxx_new_expression): Likewise. + (pp_cxx_delete_expression): Likewise. + (pp_cxx_pm_expression): Likewise. + (pp_cxx_type_specifier): Rework. + (pp_cxx_type_id): Likewise. + (pp_cxx_primary_expression): Likewise. + (pp_cxx_postfix_expression): Likewise. + (pp_cxx_unary_expression): Likewise. + (pp_cxx_multiplicative_expression): Likewise. + (pp_cxx_conditional_expression): Likewise. + (pp_cxx_assignment_expression): Likewise. + (pp_cxx_pretty_printer_init): Tidy. + +2003-08-10 Nathan Sidwell + + * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL + NODE is always a TREE_VEC of nonzero size. + (NUM_TMPL_ARGS): NODE is always a TREE_VEC. + * decl2.c (arg_assoc): Template args will be a vec. + * error.c (dump_decl) : Call + dump_template_argument_list. + (dump_template_parms): Args will be a vec. + * parser.c (cp_parser_template_argument_list): Produce a + vector, not a list. + * pt.c (coerce_template_parms): Args are always vectors. + (mangle_class_name_for_template): Likewise. + (lookup_template_function): Likewise. + (lookup_template_class): Likewise. + (tsubst_template_args): Likewise. + (tsubst_baselink): Use tsubst_template_args. + (tsubst_qualified_id): Likewise. + (tsubst_copy) : Likewise. + (tsubst_copy_and_build) : Likewise. + (any_dependent_template_args_p): Args are always vectors. + * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case. + + PR c++/11670 + * call.c (convert_like_real): Add rvalue binding error message. + * error.c (dump_expr) : Detect when the no expr is + really a cast. + + PR c++/10530 + * pt.c (dependent_type_p_r): A dependent template-id is a class + type with dependent template arguments, or a bound template + template parameter. + (type_dependent_expression_p): A template function decl cannot + have a dependent context. + +2003-08-07 Kriang Lerdsuwanakij + + PR c++/5767 + * parser.c (cp_parser_class_name): Return immediately when scope + is error_mark_node. + +2003-08-07 Aldy Hernandez + + * cp/Make-lang.in (cp/call.o): Add dependency for target.h. + + * cp/call.c (standard_conversion): Support opaque types. + Include target.h. + (strip_top_quals): Use cp_build_qualified_type instead of + TYPE_MAIN_VARIANT. + + * cp/typeck.c (convert_for_assignment): Support opaque types. + + * testsuite/g++.dg/other/opaque-1.C: New. + + * testsuite/g++.dg/other/opaque-2.C: New. + +2003-08-06 Aldy Hernandez + + * decl.c (grokparms): Use cp_build_qualified_type instead + TYPE_MAIN_VARIANT. + +2003-08-05 Gabriel Dos Reis + + * cxx-pretty-print.h: New file. + * cxx-pretty-print.c: Likewise. + * error.c (scratch_pretty_printer): Change type. + (init_error): Tidy. + (dump_aggr_type): Likewise. + (dump_global_iord): Likewise. + (dump_expr): Likewise. + (dump_char): Remove. + * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. + (cxx_initialize_diagnostics): New function. + * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o + (CXX_PRETTY_PRINT_H): New variable. + (cp/cxx-pretty-print.o): New rule. + (cp/cp-lang.o): Update dependence. + (cp/error.o): Likewise. + +2003-08-05 Steven Bosscher + + * cp-tree.h (struct lang_decl): Don't include c_lang_decl. + (DECL_DECLARED_INLINE_P): Remove. + * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P + if decl is a FUNCTION_DECL. This never made sense, but now it is + required to avoid a tree check failure. + * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC. + * optimize.c (maybe_clone_body): Likewise. + +2003-08-04 Roger Sayle + + * decl.c (cxx_insert_default_attributes): Delete. + * cp-tree.h (cxx_insert_default_attributes): Don't prototype. + * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. + +2003-08-03 Nathan Sidwell + + PR c++/11704 + * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with + unknown type. + + PR c++/11766 + * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to + member functions. + +2003-08-02 Nathan Sidwell + + PR c++/9447 + * cp-tree.def (USING_DECL): Document its type. + * class.c (pushclass): If we're entering a template, push any + dependent using decls it has. + * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is + a dependent scope. + * pt.c (tsubst_decl) : Set type. + (tsubst): Remove USING_DECL checks. + (type_dependent_expression_p): Remove USING_DECL case. + * semantics.c (finish_member_declaration): A USING_DECL's type + indicates whether it is dependent. + +2003-08-02 Nathan Sidwell + + * cp-tree.h (pushclass): Remove unneeded parameter. + * class.c (pushclass): Remove unneeded MODIFY parm. Adjust. + (push_nested_class): Adjust pushclass call. + * pt.c (instantiate_class_template): Likewise. + * semantics.c (begin_class_definition): Likewise. + +2003-08-01 Nathanael Nerode + + * typeck2.c (add_exception_specifier): Use 'bool' where appropriate. + +2003-08-01 Mark Mitchell + + PR c++/11697 + * decl.c (decls_match): Don't ignore the types of template + classes. + + PR c++/11744 + * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic. + +2003-08-01 Kriang Lerdsuwanakij + + PR c++/8442, c++/8806 + * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are + preferred. + (check_elaborated_type_specifier): Add allow_template_p + parameter. Check tag mismatch and class template. + (xref_tag): Add template_header_p parameter. Add assertion + that name is an IDENTIFIER_NODE. Remove implicit typename + warning. Simplify lookup process if globalize is true. + (cxx_init_decl_processing): Adjust call to xref_tag. + (xref_tag_from_type): Likewise. + * decl2.c (handle_class_head): Likewise. + * parser.c (cp_parser_elaborated_type_specifier, + cp_parser_class_head): Likewise. + * rtti.c (init_rtti_processing, build_dynamic_cast1, + tinfo_base_init, emit_support_tinfos): Likewise. + * class.c (is_base_of_enclosing_class): Remove. + * pt.c (convert_template_argument): Don't accept RECORD_TYPE as + template template argument. + * cp-tree.h (xref_tag): Adjust declaration. + (is_base_of_enclosing_class): Remove. + * NEWS: Document template template argument change. + +2003-08-01 Nathan Sidwell + + * parser.c (cp_parser_init_declarator, + cp_paser_member_declaration): Reformat. + * pt.c (lookup_template_class, type_unification_real, unify, + type_dependent_expression_p): Reformat. + + PR c++/11295 + * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd, + tf_stmt_expr_body. + (finish_stmt_expr_expr): Declare. + * parser.c (cp_parser_primary_expression): Tell + cp_parser_compount_statement that it is a statement expression. + (cp_parser_statement, cp_parser_labeled_statement, + cp_parser_compound_statement, cp_parser_statement_seq_opt): Add + in_statement_expr_p parameter. + (cp_parser_expression_statement): Likewise. Call + finish_stmt_expr_expr for final expression of a statement + expression. + (cp_parser_for_init_statement, + cp_parser_implicitly_scoped_statement, + cp_parser_already_scoped_statement, cp_parser_function_definition, + cp_parser_try_block, cp_parser_handled): Adjust. + * pt.c (tsubst_copy) : Pass tf_stmt_expr. + (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags. + (tsubst_expr) : Check tf_stmt_exprs flag. + * semantics.c (finish_expr_stmt): Do not deal with statement + expressions. + (begin_stmt_expr): Clear last_expr_type. + (finish_stmt_expr_expr): New. + (finish_stmt_expr): Process the value expression. + + * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the + compound expr inside the target's initializer. + + PR c++/11525 + * parser.c (cp_parser_primary_expression): Do not set + non-constant-p merely because it is a dependent scope. + + PR c++/9447 + * decl2.c (do_class_using_decl): Set type to NULL_TREE. + * semantics.c (finish_expr_stmt): Do not convert to void in a + template. + +2003-07-31 Nathan Sidwell + + * pt.c (coerce_template_parms): Refactor. + (fn_type_unification): Increment processing_template_decl when + tsubsting an incomplete set of explicit args. + + PR c++/11347 + * pt.c (instantiate_class_template): Increment + processing_template_decl around the tsubst of a template member + class. + (tsubst_qualified_id): Assert we do not have a dependent scope. + + * pt.c (coerce_template_template_parms, lookup_template_class, + can_complete_type_without_circularity, instantiate_class_template, + tsubst_decl, unify): Reformat. + +2003-07-31 Jan Hubicka + + * decl2.c (maybe_make_one_only): Use mark_referenced. + * method.c (use_thunk): Likewsie. + +2003-07-30 Jan Hubicka + + * class.c (build_vtable_entry_ref): Kill. + (build_vtbl_ref_1): Do not call build_vtable_entry_ref. + (build_vfn_ref): Do not call build_vtable_entry_ref. + * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill. + * cp-tree.h (prepare_assemble_variable): Kill. + * cp-decl.c (prepare_assemble_variable): Kill. + +2003-07-29 Geoffrey Keating + + * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead + of setting valid_pch by hand. + +2003-07-29 Rainer Orth + + * decl.c (finish_enum): Initialize underlying_type. + +2003-07-29 Nathan Sidwell + + PR c++/9447 + * decl.c (add_binding): Add bval local variable. + (push_class_level_binding): Likewise. Allow a USING_DECL to be + pushed. + * decl2.c (do_class_using_decl): The type of a using decl is + unknown. + * parser.c (cp_parser_postfix_expression): Refactor unqualified-id + function call lookup code. + * pt.c (tsubst): A USING_DECL will have unknown type. + (tsubst_copy_and_build): Allow a using decl. + (type_dependent_expression_p): A USING_DECL will make it + dependent. + * semantics.c (finish_member_declaration): Push a dependent using + declaration. + +2003-07-28 Mark Mitchell + + PR c++/11530 + * parser.c (cp_parser_postfix_expression): Do not call mark_used. + * semantics.c (finish_id_expression): Call mark_used for all + declarations. + +2003-07-28 Mark Mitchell + + PR c++/11667 + * call.c (standard_conversion): Allow all integral->enumeral + conversions, after marking them as bad. + * decl.c (finish_enum): Make sure that all enumerators are + properly converted to the underlying type. + (build_enumerator): Set DECL_CONTEXT for namespace-scope + enumeration types. + * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly. + (tsubst_enum): Tidy. + + * Make-lang.in (typeck.o): Depend on convert.h. + (class.o): Likewise. + (rtti.o): Likewise. + * call.c: Include convert.h. + (convert_arg_to_ellipsis): Use convert_to_real. + * class.c: Include convert.h. + (build_base_path): Use convert_to_integer. + * rtti.c: Include convert.h. + (build_headof): Use convert_to_integer. + * typeck.c: Include convert.h. + (decay_conversion): Use convert_to_integer. + (build_unary_op): Use build_nop. + (get_delta_difference): Use convert_to_integer. + (build_ptrmemfunc): Avoid unnecessary conversions. + +2003-07-28 Jan Hubicka + + * decl2.c (mark_member_pointers): Verify that member pointer points to + the function. + +2003-07-28 Nathan Sidwell + + * cp-tree.h (begin_compound_stmt): No scope arg is a bool. + (finish_compound_stmt): Remove no scope arg. + * decl.c (register_dtor_fn): Adjust begin_compound_stmt and + end_compound_stmt calls. + (expand_static_init, begin_destructor_body, begin_function_body, + finish_function_body): Likewise. + * decl2.c (start_objects, finish_objects, + start_static_storage_duration_function, + finish_static_storage_duration_function): Likewise. + * init.c (begin_init_stmts, finish_init_stmts, + construct_virtual_base, build_vec_init): Likewise. + * method.c (do_build_assign_ref, synthesize_method): Likewise. + * parser.c (cp_parser_compound_statement, + cp_parser_implicitly_scoped_statement, + cp_parser_already_scoped_statement): Likewise. + * pt.c (tsubst_expr): Likewise. + * semantics.c (begin_compound_stmt): No scope arg is a bool. + (finish_compound_stmt): Remove no scope arg. + + * error.c (dump_expr) : A compound expr is + always dyadic. + +2003-07-27 Mark Mitchell + + * call.c (standard_conversion): Tweak handling of + pointer-to-member types. + * pt.c (tsubst): Correctly qualify pointers-to-data member types. + * typeck.c (comp_ptr_ttypes_real): Check qualifiers on + pointer-to-data member types. + +2003-07-27 Nathan Sidwell + + * parser.c (cp_parser_type_parameter): Reformat. + (cp_parser_parameter_declaration): Deprecate default args where + not allowed. + +2003-07-26 Nathan Sidwell + + * cfns.h: Rebuilt. + + * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove. + (begin_global_stmt_expr, finish_global_stmt_expr): Remove. + * init.c (begin_init_stmts): Make static. Return is_global + value. Always call begin_stmt_expr. + (finish_init_stmts): Make static. Add is_global parm. Always + building a stmt tree. + (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls. + (build_vec_init): Likewise. Always building a stmt tree. + (expand_default_init): Always building a stmt tree. + (get_temp_regvar): Likewise. + * semantics.c (begin_global_stmt_expr, + finish_global_stmt_expr): Remove. + +2003-07-25 Nathan Sidwell + + * cp-tree.h (build_compound_expr): Take LHS & RHS args. + (build_x_compound_expr_from_list): Declare. + * typeck.c (build_x_compound_expr_from_list): New. + (build_x_compound_expr): Adjust. + (build_compound_expr): Remove unreachable code. Take two + parameters, adjust. + * decl.c (grok_reference_init): Use + build_x_compound_expr_from_list. + (expand_static_init): Adjust build_compound_expr call. + (cxx_maybe_build_cleanup): Likewise. + * init.c (perform_member_init): Use + build_x_compound_expr_from_list. + (build_new_1): Likewise. + (build_vec_delete): Adjust build_compound_expr calls. + (build_vbase_delete): Likewise. + * typeck2.c (store_init_value): Use + build_x_compound_expr_from_list. + (build_functional_cast): Likewise. + +2003-07-25 Nathan Sidwell + + * cp-tree.h (enum tsubst_flags_t): Add tf_user. + * decl.c (make_typename_type): Pass it. + * pt.c (lookup_template_class): Use it. + (resolve_typename_type): Pass it. + * semantics.c (finish_template_type): Pass it. + +2003-07-25 Nathan Sidwell + + PR c++/11617 + * cp-tree.h (qualified_name_lookup_error): Declare. + * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for + errors. + (tsubst_expr) : Likewise. + (tsubst_copy_and_build) : Likewise. + * semantics.c (qualified_name_lookup_error): New, broken out of ... + (finish_id_expression): ... here. Use it. + +2003-07-25 Falk Hueffner + + * cfns.gperf: Add '%%' delimiter to placate gperf 3.0. + +2003-07-25 Nathan Sidwell + + PR c++/11596 + * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove. + (tsubst_template_arg): New. + (tsubst_template_arg_vector): Rename to ... + (tsubst_template_args): ... this. Accept a TREE_LIST form. Use + tsubst_template_arg. + (coerce_template_parms): Use tsubst_template_arg for default + value. + (tsubst_template_parms): Likewise. + (tsubst_aggr_type): Adjust. + (tsubst_decl): Likewise. + (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust. + (tsubst_copy) : Use tsubst_template_args. + +2003-07-25 Gabriel Dos Reis + + * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H. + * error.c: Use the new pretty-printer framework. + +2003-07-24 Per Bothner + + * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc + which causes errors messages to incorrectly mention included files. + +2003-07-24 Mark Mitchell + + * cp-tree.h (convert_to_base_statically): Declare. + * call.c (build_special_member_call): Convert INSTANCE to the base + type. + * class.c (convert_to_base_statically): New method. + * init.c (construct_virtual_base): Use it. + * method.c (do_build_assign_ref): Fix typo in comment. + +2003-07-24 Jason Merrill + + * decl.c: Just set truthvalue_* to boolean_*. + +2003-07-24 Nathan Sidwell + + * decl.c (reshape_init): Remove unreachable code. + +2003-07-24 Kriang Lerdsuwanakij + + PR c++/11513 + * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope. + +2003-07-23 Mark Mitchell + + PR c++/11645 + * cp-tree.h (accessible_base_p): Declare. + * call.c (build_over_call): Use it. + * search.c (accessible_base_p): New function, split out from ... + (lookup_base): ... here. + + PR c++/11517 + * call.c (build_conditional_expr): Use perform_implicit_conversion + and error_operand_p. Robustify. + * typeck.c (build_unary_op): Use perform_implicit_conversion. + +2003-07-23 Nathan Sidwell + + PR c++/10953 + * parser.c (cp_parser_nested_name_specifier): Reset scope on + failure. + (cp_parser_elaborated_type_specifier): Likewise. + +2003-07-22 Mark Mitchell + + Eliminate use of POINTER_TYPE for pointers-to-members. + * call.c (standard_conversion): Rework pointer-to-member handling. + Add comments. + (add_builtin_candidate): Likewise. + (resolve_scoped_fn_name): Remove. + (build_conditional_expr): Rework pointer-to-member handling. + (compare_ics): Likewise. + * class.c (check_field_decls): Use TYPE_PTR_P. + * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member + handling. + * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P. + (TYPE_PTRMEM_P): Add comment. + (TYPE_PTR_P): Simplify. + (TYPE_PTROB_P): Correct definition. + (TYPE_PTR_TO_MEMBER_P): New macro. + (TYPE_PTRMEM_CLASS_TYPE): Adjust. + (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. + (resolved_scoped_fn_name): Remove declaration. + (build_offset_ref): Change prototype. + (resolve_offset_ref): Remove. + (comp_target_types): Remove. + * cvt.c (cp_convert_to_pointer): Rework pointer-to-member + handling. + (convert_to_reference): Use can_convert. + (ocp_convert): Improve error handling. Rework pointer-to-member + handling. + (perform_qualification_conversions): Rework pointer-to-member + handling. + * decl.c (build_ptrmem_type): Handle functions too. + (create_array_type_for_decl): Remove OFFSET_TYPE error message. + (grokdeclarator): Use OFFSET_TYPE for pointers to data members. + (grokparms): Remove OFFSET_TYPE error message. + * dump.c (cp_dump_tree): Rework pointer-to-member handling. + * error.c (dump_type_prefix): Likewise. + * expr.c (cplus_expand_constant): Use build_nop. + * init.c (build_offset_ref): Add address_p parameter. Fold in + necessary bits from resolve_offset_ref. + (resolve_offset_ref): Remove. + * parser.c (cp_parser_postfix_expression): Remove special case + code for OFFSET_TYPE. + * pt.c (convert_nontype_argument): Rework pointer-to-member + handling. + (convert_template_argument): Likewise. + (unify): Likewise. + (invalid_nontype_parm_type_p): Likewise. + (dependent_type_p_r): Likewise. + * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case. + (target_incomplete_p_): Rework pointer-to-member + handling. + (get_pseudo_ti_init): Likewise. + (get_pseudo_ti_desc): Likewise. + * semantics.c (finish_qualified_id_expr): Adjust call to + build_offset_ref. Remove use of resolve_offset_ref. + * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P. + * typeck.c (target_type): Use TYPE_PTRMEM_P. + (type_unknown_p): Remove obsolete code about the time before + non-dependent expressions were handled correctly. + (qualify_type_recursive): Remove. + (composite_pointer_type_r): New function. + (composite_pointer_type): Use it. + (merge_types): Remove dead comments. + (comp_cv_target_types): Remove. + (comp_target_types): Likewise. + (comp_target_parms): Likewise. + (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error. + (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P. + (build_binary_op): Do not use of comp_target_types. + (pointer_diff): Remove OFFSET_TYPE case. + (build_unary_op): Adjust pointer-to-member handling. + (unary_complex_lvalue): Likewise. + (check_for_casting_away_constness): Add description parameter. + (build_static_cast): Pass it. + (build_reinterpret_cast): Use check_for_casting_away_constness. + (build_const_cast): Adjust pointer-to-member handling. + (build_c_cast): Likewise. + (convert_for_assignment): Remove OFFSET_TYPE error message. + (comp_ptr_ttypes_real): Adjust pointer-to-member handling. + (comp_ptr_ttypes_reinterpret): Remove. + (casts_away_constness_r): Adjust pointer-to-member handling. + (casts_away_constness): Liekwise. + (strip_all_pointer_quals): Remove. + * typeck2.c (digest_init): Adjust pointer-to-member handling. + (build_m_component_ref): Likewise. + +2003-07-22 Wolfgang Bangerth + + * lex.c (unqualified_fn_lookup_error): Mention that the error + message needs to be kept in synch with the manual. + +2003-07-22 Nathan Sidwell + + PR c++/11614 + * decl.c (grokdeclarator): An array member is only a flexible + array member if the field itself is the array. + +2003-07-22 Kriang Lerdsuwanakij + + PR c++/10793 + * decl.c (xref_basetypes): Handle error_mark_node. + +2003-07-22 Nathan Sidwell + + * cp-tree.h (enum cp_lvalue_kind): Add clk_packed. + * tree.c (lvalue_p_1): Set it. + * class.c (check_field): Don't allow non-packed non-POD fields to + be packed. + * call.c (reference_binding): Need a temporary for all bitfield + and packed fields. + (convert_like_real): Check it is ok to make a temporary here. + +2003-07-21 Nathan Sidwell + + * cp-tree.h (hack_identifier): Remove. + * method.c (hack_identifier): Remove. + * semantics.c (finish_id_expression): Expand hack_identifier + here. Simplify. + +2003-07-19 Kaveh R. Ghazi + + * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c + semantics.c typeck.c: Remove unnecessary casts. + +2003-07-18 Nathan Sidwell + + * cp-tree.h (hack_identifier): Remove. + * method.c (hack_identifier): Remove. + * semantics.c (finish_id_expression): Expand hack_identifier + here. Simplify. + +2003-07-18 Nathan Sidwell + + * cp-tree.h (finish_non_static_data_member): Add object param. + * method.c (hack_identifier): Adjust. + * pt.c (tsubst_copy_and_build) : Don't search + again for a FIELD_DECL. + * semantics.c (finish_non_static_data_member): Add object + parameter. Always save the DECL in the COMPONENT_REF. + * call.c (resolve_scoped_fn_name): Adjust. + +2003-07-17 Zack Weinberg + + * pt.c (get_bindings): Make definition consistent with + forward declaration. + +2003-07-17 Kriang Lerdsuwanakij + + PR c++/7809 + * friend.c (add_friend): Check access for member functions + and templates. + +2003-07-17 Gabriel Dos Reis + + PR c++/10668 + * typeck.c (build_class_member_access_expr): Improve diagnostic. + +2003-07-16 Mark Mitchell + + PR c++/11547 + * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New + macro. + (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK. + * decl.c (duplicate_decls): Merge + DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. + * parser.c (cp_parser_postfix_expression): Adjust call to + cp_parser_initializer_list and + cp_parser_parenthesized_expression_list. + (cp_parser_parenthesized_expression_list): Add non_constant_p. + (cp_parser_new_placement): Adjust call to + cp_parser_parenthesized_expression_list. + (cp_parser_direct_new_declarator): Likewise. + (cp_parser_conditional_expression): Remove. + (cp_parser_constant_expression): Parse an assignment-expression, + not a conditional-expression. + (cp_parser_simple_declaration): Resolve expression/declaration + ambiguity more quickly. + (cp_parser_mem_initializer): Adjust call to + cp_parser_parenthesized_expression_list. + (cp_parser_init_declarator): Keep track of whether or not the + initializer is a constant-expression. + (cp_parser_initializer): Add non_constant_p parameter. + (cp_parser_initializer_clause): Likewise. + (cp_parser_initializer_list): Likewise. + (cp_parser_attribute_list): Adjust call to + cp_parser_parenthesized_expression_list. + (cp_parser_functional_cast): Likewise. + * pt.c (tsubst_decl): Copy + DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. + (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P. + * semantics.c (finish_id_expression): Use + DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. + +2003-07-16 Neil Booth + + * lang-options.h: Remove. + +2003-07-16 Andrew Pinski + + PR c/10962 + * class.c (field_decl_cmp): Remove. + (resort_field_decl_cmp): Remove. + (resort_sorted_fields): Remove. + (add_fields_to_vec): Rename to ... + (add_fields_to_record_type): this. + (finish_struct_1): Change to be using + sorted_fields_type's fields. + * cp-tree.h (lang_decl): In lang_decl_u3 + change sorted_fields to be a pointer to + sorted_fields_type. + (resort_sorted_fields): Remove prototype. + * search.c (lookup_field_1): Change to be using + sorted_fields_type's fields. + +2003-07-16 Kriang Lerdsuwanakij + + PR c++/5421 + * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend + is a member of other class. + * friend.c (do_friend): Don't build TEMPLATE_DECL if friend + is a specialization of function template. + +2003-07-16 Gabriel Dos Reis + + PR c++/10903 + * pt.c (convert_nontype_argument): Fix thinko in diagnostic. + Improve. + +2003-07-15 Mark Mitchell + + * cp-tree.def (LOOKUP_EXPR): Remove. + * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT. + (LOOKUP_EXPR_GLOBAL): Remove. + (get_bindings): Remove. + (is_aggr_type_2): Remove. + * call.c (resolved_scoped_fn_name): Remove support for + LOOKUP_EXPR. + * decl.c (grokfndecl): Likewise. + (grokdeclarator): Likewise. + * error.c (dump_decl): Likewise. + (dump_expr): Likewise. + * friend.c (do_friend): Likewise. + * init.c (build_offset_ref): Likewise. + * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create + LOOKUP_EXPRs + * mangle.c (write_expression): Remove support for LOOKUP_EXPR. + * parser.c (cp_parser_postfix_expression): Modify Koenig lookup + test. + * pt.c (get_bindings): Give it internal linkage. + (check_explicit_specialization): Remove support for LOOKUP_EXPR. + (lookup_template_function): Likewise. + (for_each_tempalte_parm_r): Likewise. + (tsubst_decl): Likewise. + (tsubst_qualified_id): Handle template template parameters. + (tsubst_copy): Remove support for LOOKUP_EXPR. + (tsubst_copy_and_build): Likewise. + (most_general_template): Likewise. + (value_dependent_expression_p): Likewise. + (type_dependent_expression_p): Note that IDENTIFIER_NODEs are + always dependent. + * semantics.c (perform_koenig_lookup): Do not create + IDENTIFIER_NODEs. + (finish_fname): Likewise. + (finish_id_expression): Likewise. + * tree.c (is_aggr_type_2): Remove. + +2003-07-16 Gabriel Dos Reis + + PR c++/11531 + * typeck.c (check_return_expr): Fix thinko in diagnostic. + +2003-07-15 Kriang Lerdsuwanakij + + PR c++/10108 + * pt.c (tsubst_decl) : Add a check for + error_mark_node. + +2003-07-14 Mark Mitchell + + PR c++/11509 + * pt.c (dependent_scope_ref_p): New function. + (value_dependent_expression_p): Use it. + (type_dependent_expression_p): Likewise. + + * pt.c (tsubst_friend_function): Use reregister_specialization. + + PR c++/7019 + * cp-tree.h (lookup_qualified_name): Adjust prototype. + * decl.c (lookup_qualified_name): Add complain parameter. Adjust + call to is_aggr_type. + * parser.c (cp_parser_lookup_name): Adjust call to + lookup_qualified_name. + * pt.c (tsubst_qualified_id): Likewise. + (tsubst_copy_and_build): Likewise. + * semantics.c (finish_qualified_id_expr): Deal with erroneous + expressions. + +2003-07-14 Gabriel Dos Reis + + PR c++/11510 + * call.c (op_error): Properly format REALPART_EXPR and + IMAGPART_EXPR. + * error.c (dump_expr): Likewise. + +2003-07-14 Gabriel Dos Reis + + * error.c (dump_expr): Handle EMPTY_CLASS_EXPR. + +2003-07-14 Gabriel Dos Reis + + PR c++/5293 + * call.c (initialize_reference): Improve diagnostic. + +2003-07-14 Kriang Lerdsuwanakij + + PR c++/11154 + * pt.c (more_specialized_class): Add full_args parameter. + (most_specialized_class): Adjust calls to more_specialized_class. + * cp-tree.h (more_specialized_class): Adjust declaration. + +2003-07-14 Dan Nicolaescu + + * lex.c (enum tree_node_kind): Delete. + +2003-07-13 Mark Mitchell + + PR c++/11503 + * cp-tree.h (DECL_SELF_REFERENCE_P): New macro. + (SET_DECL_SELF_REFERENCE_P): Likewise. + * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P. + * pt.c (tsubst_decl): Copy it. + * search.c (lookup_base): Use DECL_SELF_REFERENCE_P. + + * pt.c (reregister_specialization): Fix thinko in previous change. + + * cp-tree.h (cp_id_kind): New type. + (unqualified_name_lookup_error): Change prototype. + (unqualified_fn_lookup_error): New function. + (do_identifier): Remove. + (do_scoped_id): Likewise. + (tsubst_copy_and_build): Change prototype. + (reregister_specialization): New function. + (perform_koenig_lookup): Likewise. + (finish_id_expression): Likewise. + * call.c (build_method_call): Adjust call to + unqualified_name_lookup_error. + * decl.c (duplicate_decls): Use reregister_specialization. + * lex.c (is_global): Remove. + (unqualified_name_lookup_error): Return a value. + (do_identifier): Remove. + (do_scoped_id): Likewise. + (identifier_typedecl_value): Remove. + (unqualified_fn_lookup_error): New function. + * parser.c (cp_parser_id_kind): Remove. + (cp_parser_non_constant_id_expression): Remove. + (cp_parser_primary_expression): Use finish_id_expression. + (cp_parser_class_or_namespace_name): Use cp_id_kind, not + cp_parser_id_kind. + (cp_parser_postfix_expression): Use perform_koenig_lookup. + (cp_parser_template_argument): Use cp_id_kind. + (cp_parser_fold_non_dependent_expr): Adjust call to + tsubst_copy_and_build. + * pt.c (unregister_specialization): Rename to ... + (reregister_specialization): This. + (tsubst_friend_function): Use it. + (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build. + (tsubst_qualified_id): Likewise. + (tsubst_expr): Likewise. + (tsubst_copy_and_build): Add function_p parameter. Use + finish_id_expression. Introduce RECUR macro. + (tsubst_non_call_postfix_expression): New function. + (regenerate_decl_from_template): Use reregister_specialization. + * semantics.c (perform_koenig_lookup): New function. + (finish_id_expression): Likewise. + +2003-07-13 Kriang Lerdsuwanakij + + * pt.c (push_access_scope_real): Remove. + (push_access_scope): Move code from push_access_scope_real. + (pop_access_scope): Don't check for TEMPLATE_DECL. + (instantiate_template): Defer access checking during template + substitution. + (regenerate_decl_from_template): Tidy. + +2003-07-11 Nathanael Nerode + + PR c++/11437 + * operators.def: Add definitions for __imag__, __real__. + +2003-07-11 Nathan Sidwell + + PR c++/11050 + * parser.c (cp_parser_expression_list): Rename to ... + (cp_parser_parenthesized_expression_list): ... here. Add attribute + parameter, parse the surounding parentheses. + (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma + parameters. Return int. + (cp_parser_skip_to_closing_parenthesis or comma): Remove. + (cp_parser_postfix_expression): Adjust function call parsing. + (cp_parser_new_placement): Adjust. + (cp_parser_new_initializer): Likewise. + (cp_parser_cast_expression): Likewise. + (cp_parser_selection_statement): Likewise. + (cp_parser_mem_initializer): Likewise. + (cp_parser_asm_definition): Likewise. + (cp_parser_init_declarator): Likewise. + (cp_parser_declarator): Make + cdtor_or_conv_p an int ptr. + (cp_parser_direct_declarator): Likewise. Check for a parameter + list on cdtors & conv functions. + (cp_parser_initializer): Adjust. + (cp_parser_member_declaration): Adjust. + (cp_parser_attribute_list): Move code into + cp_parser_parens_expression_list. + (cp_parser_functional_cast): Adjust. + * pt.c (type_dependent_expression_p): Erroneous expressions are + non-dependent. + +2003-07-11 Geoffrey Keating + + * decl.c (cp_finish_decl): Handle 'used' attribute. + + * cp-lang.c (c_reset_state): New dummy routine. + * cp-tree.h (finish_file): Move prototype to c-common.h. + * parser.c (c_parse_file): Rename from yyparse; don't call finish_file. + +2003-07-11 Mark Mitchell + + PR c++/8327 + * pt.c (tsubst_qualified_id): Implement suggested resolution for + Core Issue 2. + (type_dependent_expression_p): Likewise. + +2003-07-10 Mark Mitchell + + * typeck.c (build_binary_op): Do not warn about signed + vs. unsigned comparisons in the bodies of templates. + + PR c++/9411 + * parser.c (cp_parser_postfix_expression): Check dependency of + functions. + +2003-07-09 Mark Mitchell + + PR c++/10032 + * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are + still errors. + + PR c++/10527 + * error.c (decl_to_string): Do not print default argument + expressions. + + * cp-tree.h (break_out_calls): Remove declaration. + * tree.c (break_out_calls): Remove. + * typeck.c (build_modify_expr): Avoid invalid sharing of trees. + +2003-07-09 Nathan Sidwell + + PR c++ 9483 + * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p. + * decl2.c (constructor_name_p): Avoid repeated constructor_name + calls. + * decl.c (grokdeclarator): Refactor ctor/dtor detection. + +2003-07-09 Mark Mitchell + + * typeck.c (build_x_unary_op): Take note of the fact that + PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on + trees. + + * parser.c (cp_parser_primary_expression): Preserve the form of + qualified expressions in templates, even if they are not + dependent. + * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs. + (tsubst_qualified_id): Likewise. + * search.c (accessible_p): Treat everything in the body of a + template as accessible. + +2003-07-08 Mark Mitchell + + * cp-tree.def (NON_DEPENDENT_EXPR): New node. + * cp-tree.h (build_call_from_tree): Remove. + (build_member_call): Likewise. + (dependent_template_arg_p): Remove. + (any_dependent_template_arguments_p): New function. + (dependent_template_id_p): Likewise. + (any_type_dependent_arguments_p): Likewise. + (build_non_dependent_expr): Likewise. + (build_non_dependent_args): Likewise. + (build_x_compound_expr): Adjust prototype. + * call.c (build_new_method_call): Handle non-dependent expressions + correctly. + * decl2.c (grok_array_decl): Likewise. + (build_offset_ref_call_from_tree): Likewise. + (build_call_from_tree): Remove. + * error.c (dump_decl): Handle NON_DEPENDENT_EXPR. + (dump_expr): Likewise. + * init.c (build_member_call): Remove. + * mangle.c (write_expression): Update handling for template-ids. + * parser.c (cp_parser_primary_expression): Use + any_dependent_template_arguments_p. Update constant-expression + handling. + (cp_parser_postfix_expression): Use + any_type_dependent_arguments_p. Simplify call processing. + (cp_parser_unary_expression): Simplify. + (cp_parser_expression): Adjust for changes to + build_x_compound_expr. + (cp_parser_template_argument): Implement standard-conforming + parsing of non-type template arguments. + (cp_parser_direct_declarator): Use + cp_parser_fold_non_dependent_expr. + (cp_parser_fold_non_dependent_expr): New function. + (cp_parser_next_token_ends_template_argument_p): Likewise. + * pt.c (convert_template_argument): Do not call + maybe_fold_nontype_arg. + (tsubst_baselink): Likewise. + (tsubst_copy_and_build): Share common code. Make sizeof/alignof + processing work correctly for non-dependent expressions. Adjust + handling of COMPOUND_EXPR. Simplify call processing. + (value_dependent_expression_p): Deal with functional casts and + sizeof/alignof correctly. + (type_dependent_expression_p): Handle overloaded functions. + (any_type_dependent_arguments_p): New function. + (any_dependent_template_arguments_p): Likewise. + (dependent_template_p): Treat SCOPE_REFs as dependent. + (dependent_template_id_p): Simplify. + (build_non_dependent_expr): New function. + (build_non_dependent_args): Likewise. + * semantics.c (finish_stmt_expr): Don't make dependent + statement-expresions have void type. + (finish_call_expr): Handle non-dependent expressions + correctly. + * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues. + * typeck.c (cxx_sizeof_or_alignof_type): Give the expression + type size_t, even in templates. + (expr_sizeof): Likewise. + (finish_class_member_access_expr): Handle non-dependent expressions + correctly. + (build_x_indirect_ref): Likewise. + (build_x_binary_op): Likewise. + (build_x_unary_op): Likewise. + (build_x_conditional_expr): Likewise. + (build_x_compound_expr): Likewise. + * typeck2.c (build_x_arrow): Likewise. + +2003-07-09 Jan Hubicka + + * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. + * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS. + (start_function): Use DECL_ESTIMATED_INSNS. + * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS. + + * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in + unit-at-a-time + +2003-07-08 Kriang Lerdsuwanakij + + PR c++/11030 + * pt.c (instantiate_class_template): Don't call xref_tag to + inject name when the friend class is a specialization. + +2003-07-07 Mark Mitchell + + * cp-tree.h (build_scoped_method_call): Remove. + (lookup_qualified_name): Remove parameter. + (tsubst_copy_and_build): Declare. + (finish_qualified_object_call_expr): Remove. + (check_accessibility_of_qualified_id): New function. + (finish_qualified_id_expr): Likewise. + (non_reference): Likewise. + (build_expr_from-tree): Remove. + * call.c (non_reference): Remove. + (build_scoped_method_call): Likewise. + (build_method_call): Use error_operand_p. Assert that we are not + processing a template. + (standard_conversion): Use non_reference. + * class.c (build_vtbl_entry_ref): Likewise. + (build_vtbl_ref_1): Likewise. + * cvt.c (build_expr_type_conversion): Use non_reference. + * decl.c (lookup_qualified_name): Remove flags parameter. + (grok_op_properties): Use non_reference. + * decl2.c (grok_array_decl): Likewise. + (build_expr_from_tree): Remove. + (build_offset_ref_call_from_tree): Update comment. + * error.c (parm_to_string): Call reinit_global_formatting_buffer. + * except.c (prepare_eh_types): Use non_reference. + (can_convert_eh): Likewise. + * init.c (build_dtor_call): Avoid using build_method_call. + * mangle.c (write_template_param): Remove misleading comment. + * method.c (locate_copy): Use non_reference. + * parser.c (cp_parser_scope_through_which_access_occurs): Remove. + (cp_parser_primary_expression): Do not create SCOPE_REFs is + non-dependent contexts. + (cp_parser_postfix_expression): Use finish_qualified_id_expr. + (cp_parser_direct_declarator): Use tsubst_copy_and_build, not + build_expr_from_tree. + (cp_parser_lookup_name): Adjust call to lookup_qualified_name. + Use check_accessibility_of_qualified_id. + * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not + build_expr_from_tree. + (tsubst_baselink): New function. + (tsubst_qualified_id): Likewise. + (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR. + (tsubst_expr): Adjust call to lookup_qualified_name. + (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust + handling of CALL_EXPRs. + (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P. + * rtti.c (get_tinfo_decl_dynamic): Use non_reference. + * search.c (check_final_overrider): Likewise. + * semantics.c (check_accessibility_of_qualified_id): New function. + (finish_qualified_object_call_expr): Remove. + * typeck.c (target_type): Use non_reference. + (cxx_sizeof_or_alignof_type): Likewise. + (dubious_conversion_warnings): Likewise. + (convert_for_initialization): Likewise. + (non_reference): New function. + +2003-07-07 Kaveh R. Ghazi + + * decl.c (print_binding_level, print_other_binding_stack, + print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent + stdio calls. + * ptree.c (cxx_print_decl, cxx_print_binding): Likewise. + +2003-07-07 Andreas Jaeger + + * friend.c: Convert to ISO C90 prototypes. + + * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output + language. + * cfns.h: Regenerate. + + * typeck.c: Convert remaining prototypes to ISO C90. + * search.c: Likewise. + + * decl2.c (build_expr_from_tree): Convert prototype to ISO C90. + * semantics.c (expand_or_defer_fn): Likewise + * mangle.c (discriminator_for_string_literal): Likewise. + * g++spec.c (lang_specific_driver): Likewise. + + * search.c (lookup_base_r): Remove unused variable. + +2003-07-07 Nathan Sidwell + + * semantics.c: (genrtl_try_block) Adjust emit_line_note + calls. + +2003-07-07 Andreas Jaeger + + * search.c (lookup_base_r): Remove unused variable. + +2003-07-06 Michael Chastain + + PR debug/10055 + * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than + assigning to input_filename directly. + +2003-07-06 Kazu Hirata + + * call.c: Fix comment formatting. + * class.c: Likewise. + * cp-tree.h: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * error.c: Likewise. + * method.c: Likewise. + * name-lookup.c: Likewise. + * parser.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * typeck.c: Likewise. + +2003-07-06 Mark Mitchell + + PR c++/11345 + * search.c (lookup_base_r): Remove is_non_public and + within_current_scope parameters. Remove other dead code. + (lookup_base): Adjust call to lookup_base_r. + (adjust_result_of_qualified_name_lookup): Improve comment. + * semantics.c (finish_call_expr): Use maybe_dummy_object. + +2003-07-06 Neil Booth + + * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME, + LANG_HOOKS_MISSING_ARGUMENT): Override. + +2003-07-05 Mark Mitchell + + PR c++/11431 + * typeck.c (build_static_cast): Check for reference conversions + earlier. + +2003-07-04 Mark Mitchell + + * cp-tree.h (perform_integral_promotions): Declare. + * call.c (build_addr_func): Use decay_conversion. + (convert_arg_to_ellipsis): Likewise. Remove misleading comment. + (convert_for_arg_passing): Use perform_integral_promotions. + * cvt.c (build_expr_type_conversion): Use decay_conversion. + (type_promotes_to): Do not return a cv-qualified type. + * decl.c (grok_reference_init): Fix formatting. + (get_atexit_node): Use decay_conversion. + (build_enumerator): Use perform_integral_promotions. + * init.c (build_vec_init): Use decay_conversion. + * semantics.c (finish_expr_stmt): Likewise. + (finish_switch_cond): Use perform_integral_promotions. + * typeck.c (default_conversion): Likewise. + (perform_integral_promotions): New function. + (build_indirect_ref): Use decay_conversion. + (build_array_ref): Use perform_integral_promotions. + (convert_arguments): Use decay_conversion. + (build_unary_op): Use perform_integral_promotions. + (build_c_cast): Use decay_conversion. + (build_modify_expr): Likewise. + (convert_for_initialization): Likewise. + * typeck2.c (build_x_arrow): Likewise. + +2003-07-04 Kazu Hirata + + * call.c: Fix comment typos. + * class.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + * decl2.c: Likewise. + * decl.c: Likewise. + * init.c: Likewise. + * mangle.c: Likewise. + * parser.c: Likewise. + * pt.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + +2003-07-04 Zack Weinberg + + * parser.c (cp_lexer_read_token): No need to handle string + constant concatenation. + +2003-07-03 Kaveh R. Ghazi + + * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define. + (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with + ATTRIBUTE_GCC_CXXDIAG. + +2003-07-03 Mark Mitchell + + * call.c (build_addr_func): Handle bound pointers-to-members. + (build_method_call): Do not call resolve_offset_ref. + (implicit_conversion): Likewise. + (resolve_scoped_fn_name): Use finish_non_static_data_member, not + resolve_offset_ref. + (resolve_args): Do not call resolve_offset_ref. + (build_conditional_expr): Likewise. + (build_new_method_call): Likewise. + * cp-tree.def (OFFSET_REF): Update documentation. + * cvt.c (cp_convert_to_pointer): Update handling of conversions from + pointers to members to pointers. + (ocp_convert): Do not call resolve_offset_ref. + (convert_to_void): Likewise. + (build_expr_type_conversion): Likewise. + * decl2.c (delete_sanity): Likewise. + * init.c (resolve_offset_ref): Simplify greatly. + (build_vec_delete): Do not call resolve_offset_ref. + * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref + if appropriate. + (cp_parser_unary_expression): Use + cp_parser_simple_cast_expression. + (cp_parser_delete_expression): Likewise. + (cp_parser_cast_expression): Likewise. + (cp_parser_pm_expression): Use cp_parser_binary_op. + (cp_parser_simple_cast_expression): New function. + * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref. + * semantics.c (finish_increment_expr): Likewise. + (finish_typeof): Likewise. + * tree.c (lvalue_p_1): Do not handle OFFSET_REF. + * typeck.c (require_complete_type): Do not handle OFFSET_REFs. + (decay_conversion): Do not call resolve_offset_ref. + (finish_class_member_access_expr): Likewise. + (convert_arguments): Likewise. + (build_x_binary_op): Handle DOTSTAR_EXPR. + (condition_conversion): Do not call resolve_offset_ref. + (unary_complex_lvalue): Likewise. + (build_static_cast): Likewise. + (build_reinterpret_cast): Likewise. + (build_const_cast): Likewise. + (build_c_cast): Likewise. + (build_modify_expr): Likewise. + (convert_for_assignment): Likewise. + (convert_for_initialization): Likewise. + * typeck2.c (build_x_arrow): Likewise. + (build_m_component_ref): Simplify. + + * call.c (build_scoped_method_call): Use convert_to_void. + (build_method_call): Likewise. + * class.c (check_field_decls): Remove dead code. + * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling. + * decl2.c (grok_array_decl): Remove dead code. + (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE + as pointer-to-member representation. + * init.c (build_offset_ref): Tidy. + (build_vec_delete_1): Use convert_to_void. + * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE + as pointer-to-member representation. + +2003-07-03 Nathan Sidwell + + PR c++/9162 + * decl.c (grokdeclarator): Return friend decls, not + void_type_node. + * decl2.c (grokfield): Alter friend decl check. + * parser.c (struct cp_parser): Document default_arg chain on + unparsed_functions_queue. + (cp_parser_save_default_args): New. + (cp_parser_init_declarator, cp_parser_function_definition, + cp_parser_member_declaration): Call it. + (cp_parser_class_specifier): Remove unused variable. Alter + processing of unparsed_functions_queue. + +2003-07-03 Kaveh R. Ghazi + + * class.c (add_method, check_field_decl): Fix format specifier. + * decl.c (duplicate_decls, pushdecl, check_goto, + fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator, + start_enum): Likewise. + * decl2.c (ambiguous_decl): Likewise. + * pt.c (redeclare_class_template): Likewise. + +2003-07-02 Nathan Sidwell + + PR c++/10219 + * pt.c (type_unification_real): Don't unify exprs of error type. + * tree.c (error_type): Don't die on error_type. + + PR c++/9779 + * decl2.c (arg_assoc_class): Don't die on NULL type. + * typeck.c (type_unknown_p): Don't die on untyped expressions. + +2003-07-01 Mark Mitchell + + PR c++/6949 + * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local + classes. + +2003-07-01 Kaveh R. Ghazi + + * error.c (locate_error): %P takes an `int', not a `tree'. + +2003-07-02 Jan Hubicka + + * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT. + (finish-file): Do not process function with DECL_DEFER_OUTPUT clear; + clear DECL_DEFER_OUTPUT once function is processed; avoid flags + massaging. + + * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time + (expand_or_defer_fn): Declare. + (lower_function): Declare. + * decl.c (start_cleanup_fn): Use expand_or_defer_fn. + * decl2.c: Include cgraph.h and varpool.h + (maybe_emit_vtables): Make explicit instantations as needed. + (mark_member_pointers, lower_function): New functions. + (finish_file): Do unit-at-a-time. + * method.c (synthesize_method): Use expand_or_defer_fn. + * optimize.c (maybe_clone_body): Use expand_or_defer_fn. + * parser.c (cp_parser_function_definition_after_decl): Use + expand_or_defer_fn. + * pt.c (instantiate_decl): Likewise. + * semantics.c: Include cgraph.h + (expand_or_defer_fn): Break out from ... + (expand_body): ... here; deal with unit-at-a-time. + * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, + LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define. + +2003-07-01 Mark Mitchell + + * call.c (resolve_scoped_fn_name): Return error_mark_node for + erroneous cases. + +2003-07-01 Mark Mitchell + + PR c++/11149 + * call.c (resolve_scoped_fn_name): Check that the qualifying scope + is a class type. + +2003-07-01 Giovanni Bajo + + PR c++/8046 + * error.c (dump_decl): Handle BIT_NOT_EXPR as + pseudo destructor calls. + +2003-07-01 Nathan Sidwell + + * cp-tree.h (define_label): Replace filename and lineno + arguments with a location_t. + * decl.c (pop_label): Adjust define_label call. + (define_label): Replace filename and lineno arguments with a + location_t. + * semantics.c (finish_label): Adjust define_label call. + +2003-07-01 Mark Mitchell + + PR c++/9559 + * decl2.c (grokfield): Do not build NOP_EXPRs around the + error_mark_node. + +2003-06-30 Neil Booth + + * Make-lang.in: Update. + * cp-lang.c (c_language): Define. + (LANG_HOOKS_INIT_OPTIONS): Use common hook. + * cp-tree.h (cxx_init_options): Remove. + * lex.c: Don't include diagnostic.h. + (cxx_init_options): Remove. + +2003-06-30 Giovanni Bajo + + PR c++/4933 + * error.c (dump_expr): Support correctly the COMPOUND_EXPR + tree generated within a template. Use dump_expr to dump an + expression sizeof. + +2003-06-30 Giovanni Bajo + + * mangle.c (write_expression): Exit gracefully when trying to + mangle a CALL_EXPR. + +2003-06-30 Giovanni Bajo + + PR c++/10750 + * parser.c (cp_parser_primary_expression): A VAR_DECL with a + (value- or type-) dependent expression as DECL_INITIAL is a + valid constant-expression (at parser time). + +2003-06-30 Giovanni Bajo + + PR c++/11106 + * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a + USING_DECL, instead of print_tree_identifier. + +2003-06-29 Gabriel Dos Reis + + * cp-tree.h (language_to_string): Adjust declaration. + * dump.c (cp_dump_tree): Adjust usage. + * error.c (dump_char): Use output_formatted_scalar. Tidy. + (parm_to_string): Lose unused parameter. Tidy. + (expr_to_string): Likewise. + (code_to_string): Likewise. + (language_to_string): Likewise. + (op_to_string): Likewise. + (assop_to_string): Likewise. + (digit_buffer): Remove. + (dump_type): Format builtin vector type as __vector__. + +2003-06-29 Gabriel Dos Reis + + * error.c (print_integer): Remove. + (dump_type_suffix): Adjust. + (dump_expr): Likewise. + +2003-06-28 Nathan Sidwell + + * error.c (print_instantiation_partial_context): Take a + location_t. + (print_instantiation_full_context): Adjust. + (print_instantiation_context): Adjust. + + * cp-tree.h (cp_line_of, cp_file_of): Remove. + * error.c (cp_line_of, cp_file_of): Merge into ... + (location_of): ... here. Make static, return a location_t. + (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust. + +2003-06-28 Nathan Sidwell + + PR c++/10784 + * call.c (joust): Move warn_conversion check outwards. + +2003-06-27 Zack Weinberg + + * decl.c (build_typename_type) + * mangle.c (write_template_template_arg) + * parser.c (cp_parser_scope_through_which_access_occurs) + * pt.c (push_access_scope_real, push_access_scope, pop_access_scope) + * repo.c (get_base_filename) + * semantics.c (maybe_convert_cond): + Mark the definition static, matching the forward declaration. + +2003-06-27 Mark Mitchell + + PR c++/10468 + * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly. + +2003-06-27 Mark Mitchell + + PR c++/10796 + * decl.c (finish_enum): Implement DR377. + + * decl.c (cp_finish_decl): Don't make variables with reference + type readonly while they are being initialized. + +2003-06-26 Mark Mitchell + + PR c++/11332 + * typeck.c (build_static_cast): Avoid returning expressions with + reference type. + +2003-06-26 Nathan Sidwell + + * call.c (build_op_delete_call): Use strip_array_call. Correct + error message to say 'delete' or 'delete[]'. + +2003-06-26 Giovanni Bajo + + PR c++/8266 + * pt.c (check_explicit_specialization): When looking up a + template function from an identifier outside class-scope, bind + it to CP_DECL_CONTEXT. + +2003-06-25 Mark Mitchell + + PR c++/10990 + * search.c (lookup_base_r): Rely on accessible_p, rather than + trying to emulate that logic here. + + PR c++/10931 + * call.c (convert_like): Pass issue_conversion_warnings. + (convert_like_with_context): Likewise. + (convert_like_real): Add issue_conversion_warnings parameter. + (perform_direct_initialization_if_possible): New function. + * cp-tree.h (perform_direct_initialization_if_possible): Declare it. + * typeck.c (check_for_casting_away_constness): New function. + (build_static_cast): Rewrite. + +2003-06-24 Nathan Sidwell + + * call.c (enforce_access): Assert we get a binfo. + (build_op_delete_call): Pass a binfo to + perform_or_defer_access_check. + * class.c (alter_access): Likewise. + * decl.c (make_typename_type): Likewise. + (make_unbound_class_template): Likewise. + * lex.c (do_identifier): Likewise. + * method.c (hack_identifier): Likewise. + * parser.c (cp_parser_lookup_name): Likewise. + * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE + test. + * semantics.c (finish_non_static_data_member): Likewise. + (perform_or_defer_access_check): Expect a binfo. + * typeck.c (comptypes): Expect types. + + * mangle.c (find_substitution): Don't pass a non-type to same_type_p + * friend.c (make_friend_class): Likewise. + * pt.c (check_default_tmpl_args): Likewise. + (lookup_template_class): Likewise. + +2003-06-24 Jan Hubicka + + * method.c (thunk_labelno): Move outside ifdef block to make garbage + collector happy. + +2003-06-24 Jan Hubicka + + * class.c (build_vtable): Make vtables. + * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro. + * decl2.c (output_vtable_inherit): Rename to ... + (prepare_assemble_variable): ... this one; change interface. + (maybe_emit_vtables): Do not call output_vtable_inherit. + * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define. + * cp-tree.h (prepare_assemble_variable): New. + +2003-06-23 Andrew Pinski + + * method.c: add prototype for make_alias_for_thunk. + (thunk_labelno, make_alias_for_thunk): only define + if ASM_OUTPUT_DEF is defined. + +2003-06-23 Jakub Jelinek + + * method.c (thunk_labelno): New variable. + (make_alias_for_thunk): New function. + (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk + into the same section as the function it is calling. + Include gt-cp-method.h. + * Make-lang.in (gt-cp-method.h): Depend on s-gtype. + (cp/method.o): Depend on gt-cp-method.h. + * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c. + +2003-06-23 Jan Hubicka + + * decl.c (register_dtor_fn): Mark cleanup as used. + * decl2.c (mark_vtable_entries): Skip nops. + * rtti.c (get_tinfo_ptr): Mark tinfo as used. + (build_dynamic_cast_1): Likewise. + (tinfo_base_init): Likewise. + (emit_tinfo_decl): Likewise. + +2003-06-23 Jakub Jelinek + + * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer + to it. + +2003-06-21 Gabriel Dos Reis + + PR c++/10784 + * call.c (joust): Warn about choosing conversion sequence only if + -Wconversion. + +2003-06-21 Gabriel Dos Reis + + PR c++/10864 + * call.c (op_error): Tidy. + * error.c (dump_expr): Properly format 'T()' when T is an + aggregate type. + +2003-06-21 Gabriel Dos Reis + + PR c++/10915 + * decl.c (grok_op_properties): Warn possible confusing conversion + only if -Wconversion. + +2003-06-20 Mark Mitchell + + PR c++/10749 + * parser.c (cp_parser_class_head): See through dependent names + when parsing a class-head. + + PR c++/10845 + * pt.c (try_class_unification): Correct handling of member class + templates. + +2003-06-20 Nathan Sidwell + + * semantics.c (genrtl_finish_function): Adjust + expand_function_end call. + +2003-06-19 Mark Mitchell + + PR c++/10939 + * pt.c (tsubst_decl): Do not try to substitute into non-dependent + functions. + (value_dependent_expression_p): Correct logic for FUNCTION_DECLs. + + PR c++/9649 + * cp-tree.h (pushdecl_class_level): Change prototype. + (push_class_level_binding): Likewise. + * decl.c (add_binding): Reject duplicate static data members. + (pushdecl_class_level): Return a value indicating whether or not + the binding was valid. + (push_class_level_binding): Likewise. + * semantics.c (finish_member_declaration): Don't keep invalid + declarations. + + PR c++/11041 + * call.c (initialize_reference): Do not use cp_finish_decl to emit + temporary variables. + * cp-tree.h (static_aggregates): Declare. + (pushdecl_top_level_and_finish): Likewise. + * decl.c (pushdecl_top_level_1): New function. + (pushdecl_top_level): Use it. + (pushdecl_top_level_and_finish): New function. + (initialize_local_var): Remove redundant code. + (cp_finish_decl): Remove support for RESULT_DECLs. Don't check + building_stmt_tree. + * decl.h (static_aggregates): Remove. + * decl2.c (get_guard): Use pushdecl_top_level_and_finish. + * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish. + (tinfo_base_init): Likewise. + +2003-06-19 Matt Austern + + PR c++/11228 + * init.c (build_zero_init): Assert that number of array elements + is an integer constant. + (build_default_init) Don't use build_zero_init for arrays with + variable number of elements. + +2003-06-19 Andreas Jaeger + + * cp-tree.h: Remove duplicated declarations. + +2003-06-18 Nathanael Nerode + + * pt.c: Convert to ISO C. + * semantics.c: Convert to ISO C. + +2003-06-18 Nathan Sidwell + + * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p, + at_least_as_qualified_p, more_qualified_p): Return bool. + * typeck.c: ANSIFY function definitions. + (comp_array_types): Take redeclaration bool parameter. + (comptypes): Rearrange STRICT handling. + (at_least_as_qualified_p, more_qualified_p, + comp_cv_qualification): Cache cv quals. + (compparms): Rearrange loop. + +2003-06-18 Nathan Sidwell + + * cp-tree.h (COMPARE_RELAXED): Rename to ... + (COMPARE_DERIVED): ... here. Adjust comment. + (resolve_typename_type_in_current_instantiation): Remove. + (cp_tree_equal, comptypes): Return a bool. + * cvt.c (convert_to_reference): Adjust comptypes call. + * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call. + (resolve_typename_type_in_current_instantiation): Remove. + * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and + IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive + calls. Refactor code. + * typeck.c (comp_array_types): Return bool. Lose callback. + parameter. Adjust cp_tree_equal calls. + (comptypes): Return bool. Adjust strict handling. Remove relaxed + enumeration and java type handling. Deal with typename types here. + Adjust recursive and cp_tree_equals calls. Adjust base and derived + checking. + (comp_target_types): Remove unreachable code. Adjust + same_or_base_type_p calls. + (ptr_reasonably_similar): Adjust base and derived check. + + * typeck.c (maybe_warn_about_returning_address_of_local): Remove + unused calculation. + (check_return_expr): Adjust error messages. + * cp-tree.def (SCOPE_REF): Correct comment. + +2003-06-17 Mark Mitchell + + * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format + string again. + +2003-06-17 Robert Abeles + + * optimize.c (dump_function): Form complete flag name by + prefixing 'fdump-' to string returned by dump_flag_name(). + +2003-06-17 Mark Mitchell + + * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format + string. + +2003-06-17 Jason Merrill + + PR c++/10929 + * decl.c (grokfndecl): Don't mark a function inline for + -finline-functions if it isn't defined. + +2003-06-17 Mark Mitchell + + PR c++/10712 + * class.c (handle_using_decl): Robustify. + + PR c++/11105 + * cp-tree.h (DECL_CONV_FN_TYPE): New method. + * mangle.c (struct globals): Remove internal_mangling_p. + (write_unqualified_name): Use DECL_CONV_FN_TYPE. + (write_template_parm): Don't write out the level number. + (conv_type_names): New variable. + (hash_type): New function. + (compare_type): Likewise. + (mangle_conv_op_name_for_type): Don't try to mangle conversion + operator names. + * search.c (lookup_conversion_operator): New function. + (lookup_fnfields_1): Use it. + +2003-06-17 Andreas Jaeger + + * except.c: Remove duplicate declaration of push_eh_cleanup. + + * call.c: Remove extra declaration of inhibit_warnings. + +2003-06-16 Nathanael Nerode + + 2003-06-16 Jens-Michael Hoffmann + * mangle.c: Convert to ISO C. + +2003-06-16 Kaveh R. Ghazi + + * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR + macro. + +2003-06-16 Nathanael Nerode + + * tree.c: Convert to ISO C. + +2003-06-16 Kazu Hirata + + * cp-tree.h: Follow spelling conventions. + * mangle.c: Likewise. + * method.c: Likewise. + * parser.c: Likewise. + +2003-06-14 Nathan Sidwell + + * decl.c (start_function): Adjust init_function_start call. + * method.c (use_thunk): Likewise. + * semantics.c (genrtl_start_function): Likewise. + +2003-06-14 Neil Booth + + * Make-lang.in: Remove c-options.o. + +2003-06-13 Nathanael Nerode + + * lex.c: Convert to ISO C. + + 2003-05-19 Jens-Michael Hoffmann + * init.c: removes use of PARAMS macro. Use ISO style function + declarations. (Not copyright-significant change.) + + * rtti.c: Remove PARAMS. + + * typeck2.c: Convert to ISO C. + +2003-06-12 Mark Mitchell + + PR c++/10635 + * typeck.c (build_c_cast): Check that the destination type is + complete. + +2003-06-11 Mark Mitchell + + PR c++/10432 + * cp-tree.h (finish_declarator): Remove. + * decl.c (cp_finish_decl): Make sure to pop_nested_class even for + erroneous declarations. + * semantics.c (finish_declarator): Remove. + +2003-06-11 Roger Sayle + + * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a + global static constructor/destructor if it will be empty, i.e. + either doesn't call any ctors/dtors or only calls pure or const + ctors/dtors. + +2003-06-11 Mark Mitchell + + * mangle.c (tm_p.h): Include it. + * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H). + + PR c++/11131 + * tree.c (cp_cannot_inline_fn): Check for "inline" before + instantiation. + +2003-06-10 Jason Merrill + + PR c++/10968 + * pt.c (mark_decl_instantiated): Clear DECL_COMDAT. + +2003-06-10 Andrew Pinski + + * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY. + (start_cleanup_cnt): New. + +2003-06-10 Mark Mitchell + + PR c++/11131 + * cp-tree.h (template_for_substitution): Declare. + * decl2.c (mark_used): Use it when figuring out whether or not a + function is inline. + * pt.c (template_for_substitution): Give it external linkage. + * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as + possible. + +2003-06-09 Zack Weinberg + + PR 8861 + * mangle.c (write_real_cst): New function. Implement + ABI-compliant mangling of floating-point literals when + -fabi-version>=2; provide backward compatibility with 3.3 when + -fabi-version=1 (with warning). Clarify commentary. + (write_template_arg_literal): Use write_real_cst. + +2003-06-07 Andreas Jaeger + + * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES. + +2003-06-07 Neil Booth + + * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. + (LANG_HOOKS_HANDLE_OPTION): Override. + * cp-tree.h (cxx_init_options): Update. + * lex.c (cxx_init_options): Update. + +2003-06-05 Jan Hubicka + + * Make-lang.in: Add support for stageprofile and stagefeedback + +2003-06-04 J"orn Rennecke + + * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out. + +2003-06-04 Andreas Jaeger + + * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage. + +2003-06-03 Jason Merrill + + * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors. + + * cp/decl.c (reshape_init): Handle vectors. + + * testsuite/g++.dg/init/array10.C: New. + +2003-06-03 Kriang Lerdsuwanakij + + PR c++/10940 + * pt.c (check_explicit_specialization): Check for 'static' + earlier. + +2003-05-31 Diego Novillo + + * class.c (dump_array): Call CONSTRUCTOR_ELTS to access + the operand of a CONSTRUCTOR node. + +2003-05-31 Gabriel Dos Reis + + * decl.c (cp_binding_level::this_entity): Rename from this_class. + (cxx_scope_descriptor): New function. + (cxx_scope_debug): Likewise. + (push_binding_level): Use it. + (pop_binding_level): Likewise. + (suspend_binding_level): Likewise. + (resume_binding_level): Likewise. + (pushlevel_class): Adjust use of this_class. + (pushtag): Likewise. + (lookup_name_real): Likewise. + (global_scope_name): New variable. + (initialize_predefined_identifiers): Initialize it. + (push_namespace): Use it. + (make_cxx_scope): New function. + (pushlevel): Use it. + (pushlevel_class): Likewise. + (push_binding_level): Simplify. Loose the last two arguments. + (make_binding_level): Remove. + (initial_push__namespace_scope): New function. + (push_namespace): Use it. Simplify. + (cxx_init_decl_processing): Likewise. + (declare_namespace_level): Remove. + +2003-05-31 Kriang Lerdsuwanakij + + PR c++/10956 + * pt.c (instantiate_decl): Don't use full template arguments if + we are dealing with specializations. + +2003-05-29 Gabriel Dos Reis + + * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS. + (binding_depth): Unconditionally define. + (is_class_level): Likewise. + (indent): Likewise. Take an indenting parameter. + (push_binding_level): Remove conditional definittion. + (pop_binding_level): Likewise. + (suspend_binding_level): Likewise. + (resume_binding_level): Likewise. + (pushlevel): Likewise. + (pushlevel_class): Likewise. + (poplevel_class): Likewise. + (pop_everything): Likewise. + +2003-05-27 Gabriel Dos Reis + + * name-lookup.h (global_scope_p): New macro. + * decl.c (pop_binding_level): Use it. Don't refer directly to + global_binding_level. + (suspend_binding_level): Likewise. + (global_bindings_p): Likewise. + (print_other_binding_stack): Likewise. + (print_binding_stack): Likewise. + (maybe_push_to_top_level): Likewise. + (pushdecl_namespace_level): Likewise. + (cxx_init_decl_processing): Likewise. + (start_decl): Likewise. + (cp_finish_decl): Likewise. + (start_function): Likewise. + (global_binding_level): Remove. + +2003-05-25 Kriang Lerdsuwanakij + + * parser.c (cp_parser_explicit_instantiation): Restore old + access before template instantiation. + +2003-05-23 Geoffrey Keating + + * lang-specs.h: Use -o to specify preprocessor's output file. + Make -no-integrated-cpp work when building PCH files. + +2003-05-23 Kriang Lerdsuwanakij + + PR c++/10682 + * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to + check for implicitly created typedef to an enum. + +2003-05-21 Jason Merrill + + * init.c (build_vec_delete): Copy the address into a temporary + variable before calling build_vec_delete_1. + * decl2.c (delete_sanity): Don't call stabilize_reference. + +2003-05-21 Nathan Sidwell + + * pt.c (register_specialization): Update the decl's location, + if necessary. + (check_explicit_specialization): Likewise. + +2003-05-20 Kaveh R. Ghazi + + * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX. + +2003-05-21 Danny Smith + + PR c++/9738 + * decl.c (duplicate_decls): Re-invoke make_decl_rtl + if the old decl had instantiated DECL_RTL. + (Base on Richard Henderson 2003-05-13 patch to c-decl.c). + +2003-05-19 Matt Austern + + * lang-options.h: Document -Wno-invalid-offsetof + * typeck.c (build_class_member_access_expr): Don't complain about + (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero. + +2003-05-18 Andrew Pinski + + * name-lookup.c (free_binding_entry): fix where the GTY markers are. + (binding_entry_make): Make entry->chain NULL after getting an entry. + fix the spelling of chain in a comment. + (binding_table_free): speed up by having temporary variable. + (binding_table_new): set table->chain to be NULL after allocating + a table. + (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set + binding->previous to NULL after getting an binding for speed. + +2003-05-18 Gabriel Dos Reis + + * cp-tree.h (struct lang_type_class): Replace data member tags + with hash-table nested_udts. + (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS. + * class.c (unreverse_member_declarations): Don't touch + CLASSTYPE_TAGS. + (pushclass): Use cxx_remember_type_decls. + * decl.c (struct cp_binding_level): Replace data member tags with + hash-table type_decls. + (pop_binding_level): Handle level->type_decls. + (kept_level_p): Adjust. + (poplevel): Remove unused local variable. + (bt_print_entry): New function. + (print_binding_level): Use it. + (push_namespace): Build current_binding_level->type_decls. + (maybe_process_template_type_declaration): Adjust. + (pushtag): Likewise. + (clear_anon_tags): Use binding_table_remove_anonymous_types. + (gettags): Remove. + (cxx_remember_type_decls): Rename from storetags. Adjust. + (lookup_tag): Use binding_table_find_anon_type. Tidy. + (lookup_tag_reverse): Use binding_table_reverse_maybe_remap. + (cxx_init_decl_processing): Build global_binding_level->type_decls. + (store_parm_decls): Remove pointless code. + * name-lookup.c (free_binding_entry): New variable. + (ENTRY_INDEX): New macro. + (struct binding_table_s): New datatype. + (binding_entry_make): New function. + (binding_entry_free): Likewise. + (binding_table_construct): Likewise. + (binding_table_free): Likewise. + (binding_table_new): Likewise. + (binding_table_expand): Likewise. + (binding_table_insert): Likewise. + (binding_table_find): Likewise. + (binding_table_find_anon_type): Likewise. + (binding_table_reverse_maybe_remap): Likewise. + (binding_table_remove_anonymous_types): Likewise. + (binding_table_foreach): Likewise. + * name-lookup.h (binding_table): New type. + (binding_entry): Likewise. + (bt_foreach_proc): Likewise. + (struct binding_entry_s): New datatype. + (SCOPE_DEFAULT_HT_SIZE): New macro. + (CLASS_SCOPE_HT_SIZE): Likewise. + (NAMESPACE_ORDINARY_HT_SIZE): Likewise. + (NAMESPACE_STD_HT_SIZE): Likewise. + (GLOBAL_SCOPE_HT_SIZE): Likewise. + (binding_table_new): Declare. + (binding_table_free): Likewise. + (binding_table_insert): Likewise. + (binding_table_find_anon_type): Likewise. + (binding_table_reverse_maybe_remap): Likewise. + (binding_table_remove_anonymous_types): Likewise. + (binding_table_foreach): Likewise. + (binding_table_find): Likewise. + (cxx_remember_type_decls): Likewise. + * pt.c (bt_instantiate_type_proc): New function. + (do_type_instantiation): Use it. + * search.c (lookup_field_r): Use binding_table_find. + +2003-05-18 Kriang Lerdsuwanakij + + * semantics.c (perform_deferred_access_checks): Don't discard + checked access. + +2003-05-17 Kaveh R. Ghazi + + * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate + libiberty VA_ macros, always use stdarg. + * rtti.c (create_pseudo_type_info): Likewise. + * tree.c (build_min_nt, build_min): Likewise. + +2003-05-16 Kaveh R. Ghazi + + * ptree.c (cxx_print_type, cxx_print_xnode): Use string + concatentation on HOST_WIDE_INT_PRINT_* format specifier to + collapse multiple function calls into one. + * tree.c (debug_binfo): Likewise. + +2003-05-15 Jason Merrill + + PR c++/5388 + * call.c (conditional_conversion): Don't consider implicit + conversions if T2 is a base of T1. + * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean. + (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise. + + * parser.c (cp_parser_primary_expression): Convert a static data + member from reference. + +2003-05-15 Mark Mitchell + + * call.c (build_op_delete_call): Avoid creating unnecessary types. + * class.c (instantiate_type): Remove tests for tf_no_attributes. + * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes. + (COMPARE_NO_ATTRIBUTES): Remove. + * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES. + + PR c++/8385 + * semantics.c (finish_typeof): Refine type-dependency check. + +2003-05-13 Jason Merrill + + * typeck.c (build_modify_expr): Don't always stabilize the lhs and + rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs. + +2003-05-11 Kriang Lerdsuwanakij + + * method.c (synthesize_method): Call push/pop_deferring_access_checks. + +2003-05-11 Kriang Lerdsuwanakij + + PR c++/10230, c++/10481 + * semantics.c (finish_non_static_data_member): Handle when the + non-static member is not from a base of the current class type. + +2003-05-11 Kriang Lerdsuwanakij + + PR c++/10552 + * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class + template and has dependent context. + +2003-05-10 Kriang Lerdsuwanakij + + * pt.c (instantiate_decl): Call push/pop_deferring_access_checks. + +2003-05-10 Kriang Lerdsuwanakij + + PR c++/9252 + * cp-tree.h (saved_scope): Remove check_access field. + (tsubst_flags_t): Remove tf_parsing. + * decl.c (maybe_push_to_top_level): Don't initialize + scope_chain->check_access. + (make_typename_type, make_unbound_class_template): Don't use + tf_parsing. + (register_dtor_fn): Use push/pop_deferring_access_checks + instead of scope_chain->check_access. + * method.c (use_thunk): Likewise. + * parser.c (cp_parser_explicit_instantiation + (cp_parser_constructor_declarator_p): Don't call + push/pop_deferring_access_checks here. + (cp_parser_template_argument, cp_parser_class_name): Don't use + tf_parsing. + (yyparse): Check flag_access_control. + * pt.c (instantiate_class_template): Call + push/pop_deferring_access_checks. + * semantics.c (push_deferring_access_checks): Propagate + dk_no_check. + (perform_or_defer_access_check): Make sure basetype_path is + a type before comparison. + * call.c (build_op_delete_call, build_over_call): Use + perform_or_defer_access_check. + * class.c (alter_access): Likewise. + * init.c (build_offset_ref): Likewise. + * lex.c (do_identifier): Likewise. + * method.c (hack_identifier): Likewise. + * search.c (lookup_member): Likewise. + * semantics.c (finish_non_static_data_member): Likewise. + (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks + instead of flag_access_control. + +2003-05-10 Kriang Lerdsuwanakij + + PR c++/9554 + * parser.c (cp_parser_class_name): Remove check_access parameter. + All caller adjusted. Update declaration. + (cp_parser_lookup_name): Likewise. + * semantics.c (push_deferring_access_checks): Change parameter type + to enum deferring_kind. All caller adjusted. + (resume_deferring_access_checks): Adjust to use new enum. + (stop_deferring_access_checks): Likewise. + (perform_or_defer_access_check): Likewise. + * cp-tree.h (deferring_kind): New enum. + (deferred_access): Adjust field type. + (push_deferring_access_checks): Update declaration. + +2003-05-09 Kriang Lerdsuwanakij + + PR c++/10555, c++/10576 + * pt.c (lookup_template_class): Handle class template with + multiple levels of parameters when one of the levels contain + errors. + +2003-05-08 Jason Merrill + + * init.c (build_new_1): Don't reuse a TARGET_EXPR in an + expression. Undo some of the recent reorg. + +2003-05-07 Richard Henderson + + PR c++/10570 + * cfns.gperf: Comment out POSIX thread cancellation points, + plus abort and raise. + * cfns.h: Regenerate. + +2003-05-07 Jason Merrill + + * call.c (build_conditional_expr): Don't assume that the folded + expression has result_type. + +2003-05-06 Kriang Lerdsuwanakij + + * typeck.c (build_unary_op): Deal with const qualifier in + invalid pointer-to-member earlier. + +2003-05-05 Jason Merrill + + PR c++/9537 + * call.c (conditional_conversion): Build an RVALUE_CONV if + we're just changing the cv-quals. + (build_conditional_expr): Don't call convert to change + cv-quals. + +2003-05-05 Kriang Lerdsuwanakij + + PR c++/10496 + * typeck.c (build_unary_op): Don't output const qualifier when + output invalid pointer-to-member diagnostics. + +2003-05-05 Kriang Lerdsuwanakij + + * decl.c: Fix typos. + +2003-05-05 Kriang Lerdsuwanakij + + PR c++/4494 + * decl.c (start_function): Use same_type_p to check return type + of main. + +2003-05-03 Zack Weinberg + + PR c/10604 + * cp/typeck.c (build_x_compound_expr): No need to check + extra_warnings as well as warn_unused_value. + +2003-05-03 Kriang Lerdsuwanakij + + PR c++/9364, c++/10553, c++/10586 + * decl.c (make_typename_type): Don't crash on illegal code. + +2003-05-03 Nathan Sidwell + + * class.c (finish_struct): Use location_t and input_location + directly. + * decl.c (make_label_decl): Likewise. + (use_label): Likewise. + * decl2.c (warn_if_unknown_interface): Likewise. + (start_static_initialization_or_destruction): Likewise. + (generate_ctor_or_dtor_function): Likewise. + (finish_file): Likewise. + * error.c (print_instantiation_full_context): Likewise. + * init.c (create_temporary_var): Likewise. + * method.c (synthesize_method): Likewise. + * parser.c (cp_token): Likewise. + (cp_lexer_set_source_position_from_token): Likewise. + (cp_lexer_get_preprocessor_token): Likewise. + (cp_parser_statement): Likewise. + * pt.c (tsubst_friend_function): Likewise. + (instantiate_class_template): Likewise. + (tsubst_decl): Likewise. + (tsubst): Likewise. + (instantiate_decl): Likewise. + * semantics.c (begin_class_definition): Likewise. + (expand_body): Likewise. + +2003-05-01 Nathan Sidwell + + * class.c (finish_struct): Rename lineno to input_line. + * decl.c (push_binding_level, pop_binding_level, + suspend_binding_level, resume_binding_level, make_label_decl, + use_label, start_function): Likewise. + * decl2.c (warn_if_unknown_interface, + start_static_initialization_or_destruction, + generate_ctor_or_dtor_function, finish_file): Likewise. + * error.c (cp_line_of, print_instantiation_full_context, + print_instantiation_context): Likewise. + * except.c (check_handlers_1, check_handlers): Likewise. + * init.c (create_temporary_var): Likewise. + * method.c (use_thunk, synthesize_method): Likewise. + * parser.c (cp_lexer_set_source_position_from_token, + cp_lexer_get_preprocessor_token): Likewise. + * pt.c (push_tinst_level, pop_tinst_level, + tsubst_friend_function, instantiate_class_template, tsubst_decl, + tsubst, tsubst_expr, instantiate_decl): Likewise. + * semantics.c (genrtl_try_block, finish_label_stmt, + begin_class_definition, expand_body, + genrtl_finish_function): Likewise. + * tree.c (build_min_nt, build_min): Likewise. + +2003-05-01 Mark Mitchell + + * decl2.c (comdat_linkage): Don't externalize explicit + instantiations. + +2003-05-01 Kriang Lerdsuwanakij + + PR c++/10554 + * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF + is not NULL. + +2003-05-01 Steven Bosscher + + * cp-tree.h (struct lang_id2): Remove. Move fields from here... + (struct lang_identifier): ... to here. + (LANG_ID_FIELD): Remove. + (SET_LANG_ID): Remove. + (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier. + (SET_IDENTIFIER_LABEL_VALUE): Likewise. + (IDENTIFIER_IMPLICIT_DECL): Likewise. + (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise. + (IDENTIFIER_ERROR_LOCUS): Likewise. + (SET_IDENTIFIER_ERROR_LOCUS): Likewise. + +2003-05-01 Kriang Lerdsuwanakij + + PR c++/8772 + * pt.c (convert_template_argument): Correct diagnostic. + +2003-04-30 Kriang Lerdsuwanakij + + PR c++/9432, c++/9528 + * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF. + +2003-04-30 Garbiel Dos Reis + + * decl.c (check_previous_goto_1): Adjust prototype. + (check_previous_goto): Adjust use. + (check_switch_goto): Likewise. + (use_label): Adjust. + (check_previous_goto_1): Don't use pedwarn_with_file_and_line. + (struct named_label_use_list): Use location_t datatype. + +2003-04-29 Mark Mitchell + + PR c++/10551 + * pt.c (mark_decl_instantiated): Defer all explicit instantiations + that have not yet been written out. + +2003-04-29 Mark Mitchell + + PR c++/10549 + * class.c (layout_class_type): Mark overlong bitfields as having + the maximum size permitted by their type, after layout. + + PR c++/10527 + * error.c (dump_expr): Correctly handling of NEW_EXPR.4 + +2003-04-29 Kriang Lerdsuwanakij + + * call.c (build_operator_new_call): Fix typo. + * lang-options.h: Likewise. + +2003-04-29 Mark Mitchell + + PR c++/10515 + * cp-tree.h (lookup_field_1): Declare it. + * search.c (lookup_field_1): Make it public. + * decl.c (reshape_init): Handle designated initializers. + + * decl.c (maybe_commonize_var): Further tweak support for systems + without weak symbols. + +2003-04-27 Mark Mitchell + + * decl.c (maybe_commonize_var): Fix thinko in last patch. + +2003-04-27 Mark Mitchell + + PR c++/10506 + * method.c (use_thunk): Decrement immediate_size_expand. + + PR c++/10503 + * cp-tree.h (DECL_VAR_MARKED_P): New macro. + (DECL_MAYBE_TEMPLATE): Remove. + * class.c (fixed_type_or_null): Avoid infinite recursion. + + * decl.c (maybe_commonize_var): Make the code match the comments. + * pt.c (instantiate_decl): Move call to import_export_decl. + +2003-04-26 Mark Mitchell + + * decl2.c (finish_file): Fix merge botch. + +2003-04-25 Mark Mitchell + + * decl2.c (finish_file): Don't call import_export_decl for + functions that are not defined. + (handle_class_head): Robustify. + * pt.c (instantiate_decl): Do not call cp_finish_decl for + variables that are not defined. + +2003-04-24 Sylvain Pion + + * call.c (print_z_candidates): Fix off by one error. + +2003-04-24 Nathan Sidwell + + PR c++/10337 + * call.c (joust): Don't warn about conversion ops that are exact + or cv-conversions. Rearrange to avoid multiple type comparisons. + +2003-04-23 Mark Mitchell + + PR c++/10471 + * call.c (build_cxx_call): Robustify. + +2003-04-23 Neil Booth + + * Make-lang.in (lex.o): Remove mbchar.h. + * lex.c (MULTIBYTE_CHARS): Lose. + * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled + in c-lex.c. + +2003-04-23 Mark Mitchell + + PR c++/9847 + * cp-tree.h (duplicate_tag_error): Remove. + * class.c (duplicate_tag_error): Remove. + * semantics.c (begin_class_definition): Return immediately for a + duplicate class definition. + + PR c++/10451 + * decl.c (grokdeclarator): Correct logic for "mutable" errors. + +2003-04-22 Mark Mitchell + + PR c++/10446 + * search.c (lookup_fnfields_1): Handle empty slots in the method + vector. + + PR c++/10428 + * decl.c (check_elaborated_type_specifier): New function, split + out from ... + (xref_tag): ... here. Use the new function in more places. + + * rtti.c (throw_bad_typeid): Use build_cxx_call. + +2003-04-21 Mark Mitchell + + * call.c (build_over_call): Use build_cxx_call. + (build_cxx_call): New method, split out of build_over_call. + * cp-tree.h (language_function): Add can_throw. + (build_cxx_call): Declare it. + * decl.c (finish_function): If a function does not contain any + calls to functions that can throw an exception, indicate that + fact. + * decl2.c (mark_used): Do not defer the instantiation of + functions, if the current function does not throw. + * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones. + * pt.c (instantiate_decl): Make sure import_export_decl is called + before emitting things. + * rtti.c (throw_bad_cast): Use build_cxx_call. + (build_dynamic_cast_1): Likewise. + * typeck.c (build_function_call): Likewise. + +2003-04-21 Nathan Sidwell + + PR c++/9881 + * typeck.c (build_unary_op): Fold all COMPONENT_REF addr + expressions. Reverts my 2002-08-08 patch. + + * typeck.c (comp_ptr_ttypes_real): Swap final && operands for + cheaper early exit. + +2003-04-20 Nathan Sidwell + + * cp/decl2.c (start_static_storage_duration_function): Take count + arg, don't check if it wraps round. + (generate_ctor_or_dtor_function): Add locus arg, use it. + (generate_ctor_and_dtor_functions_for_priority): Data arg is a + locus. + (finish_file): Set line numbers to past EOF for synthesized + functions. + +2003-04-20 Nathan Sidwell + + PR c++/10405 + * search.c (lookup_field_1): Final scan goes backwards for + types, forwards for non-types. + +2003-04-17 Roger Sayle + + PR c/10375 + * decl.c (duplicate_decls): Preserve "const", "noreturn" and + "nothrow" function attributes. + +2003-04-17 Kriang Lerdsuwanakij + + PR c++/10347 + * pt.c (type_dependent_expression_p): Handle array new. + +2003-04-15 Mark Mitchell + + PR c++/10381 + * parser.c (cp_parser_primary_expression): Reorganize logic for + dealing with name lookup failures. + +2003-04-15 Jason Merrill + + * decl2.c (mark_used): Don't instantiate anything if + skip_evaluation. + +2003-04-14 Ziemowit Laski + + * tree.c (build_cplus_array_type_1): Do not call + uses_template_parms() on a NULL index_type. + +2003-04-13 Roger Sayle + + * decl.c (duplicate_decls): Preserve pure and malloc attributes. + +2003-04-12 Mark Mitchell + + PR c++/10300 + * init.c (build_new_1): Reorganize. + +2003-04-12 Zack Weinberg + + * class.c (initialize_array) + * decl.c (reshape_init) + * decl2.c (build_expr_from_tree) + * init.c (build_zero_init) + * pt.c (tsubst_copy, tsubst_copy_and_build) + * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer) + (ptm_initializer, class_initializer, get_pseudo_ti_init) + * semantics.c (finish_compound_literal) + * typeck.c (build_ptrmemfunc1) + * typeck2.c (store_init_value, process_init_constructor) + (build_functional_cast): Use build_constructor. + +2003-04-12 Zack Weinberg + + * call.c (print_z_candidates): Use gcc_gettext_width, not + strlen, to determine how much padding to use. + +2003-04-10 Zack Weinberg + + * decl.c: Update all calls to shadow_warning. + +2003-04-10 Mark Mitchell + + * class.c (layout_class_type): Correct handling for overlong + bit-fields whose width is the same as an integer type. + +2003-04-06 Zack Weinberg + + * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero. + * cp-lang.c (cp_tree_size): New function. + (LANG_HOOKS_TREE_SIZE): Override. + + * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct + tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill. + (union lang_tree_node): Remove common and srcloc members. + (build_srcloc_here): Don't prototype. + * decl.c (cp_tree_node_structure): Kill SRCLOC case. + * pt.c (pending_templates): Correct comment. + * tree.c (build_srcloc, build_srcloc_here): Kill. + +2003-04-06 Zack Weinberg + + * call.c: Include intl.h. + (print_z_candidate): Always use inform; get rid of errfn + argument. Reorganize so that all the strings get picked up + by xgettext. Note obligation of caller to pass first argument + through gettext. + (print_z_candidates): Update to match. Indent second and + successive candidates by strlen() of translated message. + (joust): Restructure ambiguous-conversion pedwarn so that + translators see a complete sentence. Update calls to + print_z_candidate. + + * Make-lang.in (cp/call.o): Update dependencies. + +2003-04-05 Kaveh R. Ghazi + + * decl.c (set_current_binding_level): Delete, revert last change. + (current_binding_level): Modify to allow it as as lvalue. + +2003-04-04 Kaveh R. Ghazi + + * name-lookup.c (find_binding): Pass appropriate pointer type to + POP_TIMEVAR_AND_RETURN. + +2003-04-03 Kaveh R. Ghazi + + * Make-lang.in (cp-warn): Add $(STRICT_WARN). + * cp-tree.h: Don't insist on having GNUC. + +2003-04-03 Jason Merrill + + * cvt.c (ocp_convert): Only abort if we try to convert an object + of TREE_ADDRESSABLE type. + + * class.c (build_vtable): Set DECL_ALIGN here. + (get_vtable_decl): Not here. + (layout_vtable_decl): Or here. + (create_vtable_ptr): Or here. + (layout_class_type): Or here. + (check_bitfield_decl): Don't mess with field alignment. + +2003-04-03 Kaveh R. Ghazi + + * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR, + DEF_ASSN_OPERATOR): Delete spurious semi-colon. + * rtti.c (dfs_class_hint_mark): Likewise. + + * decl.c (push_local_name, push_class_level_binding, + maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in + functions returning void. + * decl2.c (add_using_namespace): Likewise. + + * decl.c (print_binding_level, print_other_binding_stack, + print_binding_stack): Cast argument of %p specifier to void*. + * ptree.c (cxx_print_decl): Likewise. + + * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK, + VAR_FUNCTION_OR_PARM_DECL_CHECK, + VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK, + BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK, + LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__. + + * decl.c (set_current_binding_level): New macro. Use throughout + when setting the current binding level. + + * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma + in enum. + * method.c (mangling_flags): Likewise. + + * cp-tree.h (lang_type_header): Add __extension__ and use + CHAR_BITFIELD for members. + +2003-04-02 Geoffrey Keating + + PR other/9274 + * mangle.c: Include gt-cp-mangle.h. + (subst_identifiers): Mark with GTY. + * config-lang.in (gtfiles): Add cp/mangle.c. + * Make-lang.in: (gt-cp-mangle.h): New rule. + (cp/mangle.o): Depends on gt-cp-mangle.h. + +2003-04-01 Andrew Pinski + + * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c + after \$(srcdir)/cp/name-lookup.h. + * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead + of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file. + * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype. + (cp/name-lookup.o): Depends on gt-cp-name-lookup.h. + +2003-03-31 Jason Merrill + + PR java/10145 + * class.c (check_field_decl): Don't set DECL_ALIGN. + +2003-03-30 Mark Mitchell + + PR c++/7647 + * decl.c (grokdeclarator): Tidy, slightly. + * search.c (lookup_field_1): Add want_type parameter. + (lookup_field_r): Adjust call to lookup_field_1. + +2003-03-30 Gabriel Dos Reis + + * Make-lang.in (cp/name-lookup.o): Add more dependencies. + +2003-03-30 Gabriel Dos Reis + + * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust + prototype. + (cxx_scope_find_binding_for_name): Likewise. + * decl.c (find_binding: Move to name-lookup.c. + (binding_for_name): Likewise. + (cxx_scope_find_binding_for_name): Likewise. + (BINDING_LEVEL): Remove. + (push_binding): Tidy. + (push_class_binding): Likewise. + (pop_binding): Likewise. + (poplevel): Likewise. + (poplevel_class): Likewise. + (set_identifier_type_value_with_scope): Likewise. + (push_overloaded_decl): Likewise. + (lookup_tag): Likewise. + (unqualified_namespace_lookup): Likewise. + (lookup_name_current_level): Likewise. + (maybe_inject_for_scope_var): Likewise. + (namespace_binding): Move to name-lookup.c. + (set_namespace_binding): Likewise. + * decl2.c (lookup_using_namespace): Tidy. + (qualified_lookup_using_namespace): Likewise. + (do_toplevel_using_decl): Likewise. + * name-lookup.c: Include "timevar.h" + * name-lookup.h (cxx_scope): Declare. + (struct cxx_binding): Lose member "has_level". Adjust "scope" + member declaration. + (BINDING_SCOPE): Adjust definition. + (BINDING_HAS_LEVEL_P): Remove. + +2003-03-30 Gabriel Dos Reis + + * name-lookup.c: New file. + * name-lookup.h: Likewise.. + * decl.c (push_binding): Adjust use cxx_binding_make. + (free_bindings): Move to name-lookup.c + (pop_binding): Use cxx_binding_free. + (binding_for_name): Tidy. + * cp-tree.h: Include "name-lookup.h" + (cxx_binding_make): Move to name-lookup.h + (cxx_binding_clear): Likewise. + (struct cxx_binding): Likewise. + (LOCAL_BINDING_P): Likewise. + (INHERITED_VALUE_BINDING_P): Likewise. + (BINDING_SCOPE): Likewise. + (BINDING_HAS_LEVEL_P): Likewise. + (BINDING_VALUE): Likewise. + (BINDING_TYPE): Likewise. + * config-lang.in (gtfiles): Add cp/name-lookup.h + * Make-lang.in (cp/name-lookup.o): New rule. + (CXX_OBJS): Add cp/name-lookup.o + (CXX_TREE_H): Add cp/name-lookup.h + +2003-03-28 Jason Merrill + + PR c++/10245 + * cvt.c (force_rvalue): New fn. + * call.c (build_conditional_expr): Use it. + * cp-tree.h: Declare it. + +2003-03-28 Mike Stump + + * error.c (dump_expr): Add 0x to printed hex numbers to make + output match source code better. + +2003-03-28 Mark Mitchell + + PR c++/10218 + * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class + definitions. + + * decl2.c (generate_ctor_or_dtor_function): Tolerate a + non-existant ssdf_decls array. + (finish_file): Call generator_ctor_or_dtor_function when there are + static constructors or destructors and no other static + initializations. + +2003-03-28 Nathan Sidwell + + PR c++/10047 + * decl2.c (finish_file): Don't warn about explicitly instantiated + inline decls. + +2003-03-27 Nathan Sidwell + + PR c++/10224 + * pt.c (lookup_template_class): Only check instantiated args if + they do not contain template parameters. + +2003-03-27 Nathan Sidwell + + PR c++/10158 + * parser.c (cp_parser_function_definition): Set + DECL_INITIALIZED_IN_CLASS for members. + * pt.c (instantiate_decl): Only reduce the template args for + friends that are not defined in class. + +2003-03-25 Jason Merrill + + * call.c (print_z_candidate): Change name of first arg to msgid. + (joust): Add comment for translators. + +2003-03-24 Nathan Sidwell + + PR c++/9898, PR c++/383, DR 322 + * pt.c (maybe_adjust_types_for_deduction) : Look + through reference types on both PARM and ARG. + +2003-03-24 Nathan Sidwell + + PR c++/10119 + * error.c (dump_expr) : Use dump_expr. + * pt.c (maybe_fold_nontype_args): New function. + (tsubst_copy) : Subst any template_id args. + : Break out folding code, call it. + (tsubst_copy_and_build) : Call + maybe_fold_nontype_args. + +2003-03-24 Nathan Sidwell + + PR c++/10026 + * decl2.c (arg_assoc_type) : Don't die. + +2003-03-23 Mark Mitchell + + PR c++/7086 + * typeck.c (cxx_mark_addressable): Adjust call to + gen_mem_addressof or put_var_into_stack. + +2003-03-22 Nathan Sidwell + + PR c++/9978, c++/9708 + * cp-tree.h (instantiate_template): Add tsubst_flags parameter. + * call.c (add_template_candidate_real): Adjust + instantiate_template call. + * class.c (resolve_address_of_overloaded_function): Likewise. + * decl.c (build_enumerator): Set TREE_CONSTANT. + * pt.c (check_instantiated_args): New. + (push_inline_template_parms_recursive): Set TREE_CONSTANT, + TREE_READONLY. + (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY. + (reduce_template_parm_level): Likewise. + (process_template_parm): Likewise. + (check_explicit_specialization): Adjust instantiate_template call. + (convert_template_argument): Don't check non-type argument here. + (lookup_template_class): Check them here. + (tsubst_friend_function): Adjust instantiate_template call. + (instantiate_template): Add tsubst_flags parameter, use it. Check + instantiated args. + +2003-03-21 Zack Weinberg + + * decl.c: Update calls to shadow_warning. + +2003-03-21 Nathan Sidwell + + PR c++/9898 + * error.c (dump_decl) [CONST_DECL]: Print ''. + (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call. + +2003-03-20 Mark Mitchell + + * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope + friends. + * cp/pt.c (instantiate_class_template): Fix formatting. + +2003-03-14 Matt Austern + + * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray. + (unemitted_tinfo_decl_p): Remove. + (emit_tinfo_decl): Change declaration to remove unused parameter. + * decl2.c (finish_file): Change tinfo emission to loop through + unemitted_tinfo_decls array instead of looping through all decls. + * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove + unused second parameter. + (init_rtti_processing): initialize unemitted_tinfo_decls varray. + (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls. + (emit_tinfo_decl): remove unused second parameter, add assertion + that decl hasn't already been emitted. + +2003-03-19 Nathanael Nerode + + * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return + type from 'int' to 'bool'. Replace 0 and 1 with true and false in + return statements. + +2003-03-19 Jason Merrill + + PR c++/8316, c++/9315, c++/10136 + * call.c (print_z_candidate): Split out from... + (print_z_candidiates): ...here. + (joust): Use it. + +2003-03-17 Roger Sayle + + PR c++/10031 + * decl.c (duplicate_decls): Use the new type when prototyping + anticipated decls, even when the types match. This defines the + exception list for the built-in function. + +2003-03-17 Jason Merrill + + PR c++/10091 + * typeck.c (build_class_member_access_expr): Compare + TYPE_MAIN_VARIANTs. + +2003-03-17 Mark Mitchell + + PR c++/9639 + * parser.c (cp_parser_declarator_id): Clear parser->scope. + +2003-03-16 Jason Merrill + + PR c++/9993 + * decl.c (finish_function): Only allow the NRVO to use variables + declared at function scope. + +2003-03-17 Andreas Jaeger + + * Make-lang.in (cp/TAGS): Remove. + +2003-03-16 Nathan Sidwell + + PR c++/9629 + * cp-tree.h (struct language_function): Add in_base_initializer. + (in_base_initializer): define it. + (expand_member_init): Remove INIT param. + * init.c (expand_member_init): Remove INIT param, return the member. + (emit_mem_initializers): Set in_base_initializer. + * class.c (build_base_path): Check in_base_initializer. + * parser.c (cp_parser_mem_initializer): Set in_base_initializer. + * pt.c (tsubst_initializer_list): Likewise. + +2003-03-16 Gabriel Dos Reis + + * decl.c (binding_for_name): Fix initialization thinko. + +2003-03-15 Gabriel Dos Reis + + Compile-time improvement: 2/n. + * cp-tree.h (struct cxx_binding): New datatype; + (struct lang_identifier): Use it. + (LOCAL_BINDING_P): Adjust definition. + (INHERITED_VALUE_BINDING_P): Likewise. + (BINDING_SCOPE): Likewise. + (BINDING_HAS_LEVEL_P): Likewise. + (BINDING_VALUE): Likewise. + (BINDING_TYPE): Likewise. + (IDENTIFIER_VALUE): Likewise. + (struct tree_binding): Remove. + (TS_CP_BINDING): Likewise. + ((union lang_tree_node): Remove field "binding". + (cxx_binding_clear): New macro. + (binding_for_name): Adjust return type. + (qualified_lookup_using_namespace): Adjust prototype. + (lookup_using_namespace): Adjust prototype. + (cxx_scope_find_binding_for_name): Declare. + * cp-tree.def: Remove CPLUS_BINDING definition. + * decl.c (push_binding): Adjust local variable type. + (add_binding): Likewise. + (push_class_binding): Likewise. + (pop_binding): Likewise. + (poplevel): Likewise. + (poplevel_class): Likewise. + (free_bindings): Adjust type. + (find_binding): Adjust return type, add a third parameter. Remove + non-useful assertion now that we use static typing. + (cxx_scope_find_binding_for_name): New function. + (binding_for_name): Use it. Adjust local variable type. Simplify. + (namespace_binding): Simplify. + (set_namespace_binding): Likewise. + (set_identifier_type_value_with_scope): Adjust local variable type. + (lookup_tag): Don't type-abuse of local variable 'old'. + (lookup_namespace_name): Likewise. Allocate binding on stack. + (select_decl): Adjust prototype. + (unqualified_namespace_lookup): Allocate binding on stack. + Don't type-abuse of local variable 'val'. + (lookup_name_real): Likewise. + (maybe_inject_for_scope_var): Adjust local variable type. + (cp_tree_node_structure): Remove CPLUS_BINDING case label. + (namespace_binding): Adjust logic, simplify. + (BINDING_LEVEL): Adjust definition. + (push_class_level_binding): Adjust local variable type. + (struct cxx_saved_binding): Adjust field 'binding' type. + * decl2.c (ambiguous_decl): Adjust prototype. + (lookup_using_namespace): Adjust local variable type. + (qualified_lookup_using_namespace): Catch type error and correct + ensueing logic error. + (do_nonmember_using_decl): Adjust local variable type. Allocate + temporary cxx_binding on stack. + (do_toplevel_using_decl): Adjust local variable type. + * ptree.c (cxx_print_cxx_binding): New function. + (cxx_print_identifier): Use it. + (cxx_print_xnode): Delete CPLUS_BINDING case label. + +2003-03-15 Roger Sayle + + * tree.c (count_functions): Fix whitespace. + +2003-03-15 Neil Booth + + * Make-lang.in: Update. + +2003-03-15 Kriang Lerdsuwanakij + + PR c++/6440 + * pt.c (maybe_process_partial_specialization): Handle + member class template when enclosing class template is + explicit specialized. + (most_general_template): Stop looking when DECL is already + specialized. + +2003-03-13 Jason Merrill + + PR c++/9420 + * search.c (lookup_conversions): Call complete_type here. + * call.c (implicit_conversion): Not here. + +2003-03-13 Mark Mitchell + + * decl2.c (do_nonmember_using_decl): Correct handling of + simultaneous type/non-type bindings. + + * call.c (initialize_reference): Remove bogus assertion. + * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09. + +2003-03-12 Andrew Lewycky + + PR c++/7050 + * expr.c (cxx_expand_expr): Return const0_rtx for throw + expressions. + +2003-03-11 Mark Mitchell + + PR c++/9474 + * decl2.c (do_nonmember_using_decl): Do not call duplicate decls + to merge old and new declarations. + +2003-03-12 Alexandre Oliva + + * g++.1: Remove. + * Make-lang.in (c++.generated-manpages): Build cp/g++.1. + (cp/g++.1): Build it from scratch in the build tree. + (c++.install-man): Depend on it. Install it from the build tree. + (c++.mostlyclean): Clean it. + +2003-03-11 Mark Mitchell + + PR c++/9474 + * decl2.c (do_nonmember_using_decl): Do not call duplicate decls + to merge old and new declarations. + + PR c++/9924 + * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins. + +2003-03-11 Jason Merrill + + PR c++/9820 + * search.c (lookup_member): Fix handling of functions in a class + being defined. + +2003-03-11 Mark Mitchell + + PR c++/8700 + * call.c (convert_class_to_reference): Adjust usage of + splice_viable. + (any_viable): Remove. + (splice_viable): Combine with any_viable. + (print_z_candidates): Avoid printing duplicates. + (build_user_type_conversion_1): Adjust usage of splice_viable. + (build_new_function_call): Likewise. + (build_operator_new_call): Likewise. + (build_object_call): Likewise. + (build_conditional_expr): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + (joust): Remove spurious comment. + * cp-tree.h (DECL_FRIENDLIST): Correct documentation. + * decl2.c (arg_assoc_class): Simplify. + * friend.c (add_friend): Likewise. + +2003-03-11 Jason Merrill + + PR c++/8660 + * decl2.c (check_classfn): A member template only matches a + member template. + +2003-03-11 Neil Booth + + * Make-lang.in (CXX_C_OBJS): Update. + * lang-specs.h: Don't define __GNUG__ here. + +2003-03-10 Mark Mitchell + + * call.c (perform_overload_resolution): New function. + (build_new_function_call): Use it. + (build_operator_new_call): Likewise. + (add_candidates): Add explicit_targs and template_only parameters. + (build_new_op): Adjust accordingly. + * cp-tree.h (build_operator_new_call): New function. + (build_function_call_real): Remove. + (build_function_call_maybe): Likewise. + * init.c (build_new_1): Use build_operator_new_call. + * typeck.c (build_function_call_real): Rename to ... + (build_function_call): ... this. + +2003-03-10 Devang Patel + + PR c++/9394 + * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG. + +2003-03-10 Jason Merrill + + PR c++/9798 + * decl.c (push_using_directive): Push before recursing. + + PR c++/9868, c++/9524 + * call.c (resolve_scoped_fn_name): Handle the case of a function + pointer member. + + * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this' + argument in the pointer-to-member case. + +2003-03-09 Mark Mitchell + + PR c++/9373 + * cp-lang.c (cxx_get_alias_set): Use alias set zero for + pointers to member functions. + + PR c++/8534 + * decl.c (build_ptrmemfunc_type): Do not allow default arguments + in pointer-to-member-function types. + +2003-03-10 Gabriel Dos Reis + + * expr.c (cplus_expand_constant): Use C90 prototype style. + (cxx_expand_expr): Likewise. + +2003-03-09 Kriang Lerdsuwanakij + + PR c++/9970 + * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual + functions. + +2003-03-08 Geoffrey Keating + + * lang-specs.h (c++-header): Change .pch to .gch. + +2003-03-08 Neil Booth + + * cp-tree.h (cxx_init): Update prototype. + * lex.c (cxx_init): Similarly. + +2003-03-08 Mark Mitchell + + PR c++/9823 + * cp-tree.h (begin_mem_initializers): Remove. + * parser.c (cp_parser_mem_initializer_list): Inline it here. + Do not call finish_mem_initializers if not in a constructor. + (cp_parser_class_head): Fix typo in error message. + * semantics.c (begin_mem_initializers): Remove. + * testsuite/g++.dg/parser/constructor1.C: New test. + + PR c++/9809 + * call.c (add_function_candidate): Skip builtin fuctions that have + not yet been declared. + + PR c++/9982 + * init.c (build_new_1): Correct logic for determining whether or + not to use an array cookie. + + PR c++/9524 + * parser.c (cp_parser_postfix_expression): Call + finish_non_static_data_member, even when processing_template_decl. + + PR c++/9912 + * cp-tree.h (is_ancestor): New function. + (handle_class_head): Change prototype. + * decl2.c (is_namespace_ancestor): Rename to ... + (namespace_anecestor): ... this. + (set_decl_namespace): Adjust accordingly. + (handle_class_head): Remove unnecessary parameters. + * parser.c (cp_parser_class_head): Check that + nested-name-specifiers are used appropriately. + +2003-03-07 Mark Mitchell + + * call.c (reference_binding): Remove REF_IS_VAR parameter. + (implicit_conversion): Adjust call to reference_binding. + (make_temporary_var_for_ref_to_type): Add TYPE parameter. + (initialize_reference): Adjust handling for references bound to + rvalues. + * cp-tree.h (make_temporary_var_for_ref_to_temp): Change + prototype. + (real_non_cast_lvalue_p): New method. + * cvt.c (build_up_reference): Adjust use of + make_temporary_var_for_ref_to_temp. + * tree.c (real_non_cast_lvalue_p): New method. + +2003-03-07 Gabriel Dos Reis + + * except.c (init_exception_processing): Use C90 prototype style. + (cp_protect_cleanup_actions): Likewise. + (prepare_eh_type): Likewise. + (build_eh_type_type): Likewise. + (build_exc_ptr): Likewise. + (do_begin_catch): Likewise. + (dtor_nothrow): Likewise. + (do_end_catch): Likewise. + (push_eh_cleanup): Likewise. + (decl_is_java_type): Likewise. + (choose_personality_routine): Likewise. + (initialize_handler_parm): Likewise. + (expand_start_catch_block): Likewise. + (expand_end_catch_block): Likewise. + (begin_eh_spec_block): Likewise. + (finish_eh_spec_block): Likewise. + (do_allocate_exception): Likewise. + (do_free_exception): Likewise. + (wrap_cleanups_r): Likewise. + (stabilize_throw_expr): Likewise. + (build_throw): Likewise. + (complete_ptr_ref_or_void_ptr_p): Likewise. + (is_admissible_throw_operand): Likewise. + (nothrow_libfn_p): Likewise. + (can_convert_eh): Likewise. + (check_handlers_1): Likewise. + (check_handlers): Likewise. + +2003-03-06 Mark Mitchell + + * call.c (merge_conversion_sequences): New function. + (build_conv): Set ICS_USER_FLAG for USER_CONVs. + (convert_class_to_reference): Correct handling of second + standard conversion sequence in a user-defined conversion + sequence. + (build_user_type_conversion_1): Use merge_conversion_sequences. + * cp-tree.def: Add comments for CONV nodes. + * rtti.c (get_tinfo_decl): Use build_address/build_nop. + +2003-03-07 Gabriel Dos Reis + + * error.c (init_error): Use C90 prototype style. + (dump_scope): Likewise. + (dump_qualifiers): Likewise. + (dump_template_argument): Likewise. + (dump_template_argument_list): Likewise. + (dump_template_parameter): Likewise. + (dump_template_bindings): Likewise. + (dump_type): Likewise. + (dump_typename): Likewise. + (class_key_or_enum): Likewise. + (dump_aggr_type): Likewise. + (dump_type_prefix): Likewise. + (dump_type_suffix): Likewise. + (dump_global_iord): Likewise. + (dump_simple_decl): Likewise. + (dump_decl): Likewise. + (dump_template_decl): Likewise. + (dump_function_decl): Likewise. + (dump_parameters): Likewise. + (dump_exception_spec): Likewise. + (dump_function_name): Likewise. + (dump_template_parms): Likewise. + (dump_char): Likewise. + (dump_expr_list): Likewise. + (dump_expr): Likewise. + (dump_binary_op): Likewise. + (dump_unary_op): Likewise. + (type_as_string): Likewise. + (expr_as_string): Likewise. + (decl_as_string): Likewise. + (context_as_string): Likewise. + (lang_decl_name): Likewise. + (cp_file_of): Likewise. + (cp_line_of): Likewise. + (decl_to_string): Likewise. + (expr_to_string): Likewise. + (fndecl_to_string): Likewise. + (code_to_string): Likewise. + (language_to_string): Likewise. + (parm_to_string): Likewise. + (op_to_string): Likewise. + (type_to_string): Likewise. + (assop_to_string): Likewise. + (args_to_string): Likewise. + (cv_to_string): Likewise. + (cxx_print_error_function): Likewise. + (cp_diagnostic_starter): Likewise. + (cp_diagnostic_finalizer): Likewise. + (cp_print_error_function): Likewise. + (function_category): Likewise. + (print_instantiation_full_context): Likewise. + (print_instantiation_partial_context): Likewise. + (maybe_print_instantiation_context): Likewise. + (print_instantiation_context): Likewise. + (cp_printer): Likewise. + (print_integer): Likewise. + (print_non_consecutive_character): Likewise. + (locate_error): Likewise. + +2003-03-06 Mark Mitchell + + PR c++/9965 + * call.c (reference_binding): Add ref_is_var parameter. + (implicit_conversion): Adjust call to reference_binding. + (initialize_reference): Likewise. + + PR c++/9400 + * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL + PARM_DECLs. + + PR c++/9791 + * class.c (get_basefndecls): Use lookup_fnfields_1. + +2003-03-06 Kriang Lerdsuwanakij + + PR c++/9188 + * parser.c (cp_parser_type_parameter): Remove redundant `expect' + in error message. + (cp_parser_single_declaration): Likewise. + +2003-03-05 Jason Merrill + + PR c++/9440 + * call.c (build_conditional_expr): Use convert rather than an + explicit NOP_EXPR. + +2003-03-02 Matt Austern + + * decl.c (cp_binding_level): Add static_decls varray member. + (add_decl_to_level): Add static/inline namespace scope + declarations to static_decls array. + (wrapup_global_for_namespace): Pass static_decls only, instead of + all decls, to wrapup_global_declarations/check_global_declarations. + (push_namespace): Initialize static_decls for ordinary namespaces. + (cxx_init_decl_processing): Initialize static_decls for global + namespace. + +2003-03-05 Mark Mitchell + + * class.c (end_of_class): Correct thinko. + +2003-03-04 Nathanael Nerode + + * config-lang.in: Replace ${libstdcxx_version} by its value. + +2003-03-04 Gabriel Dos Reis + + * cp-tree.h (cxx_saved_binding): Declare. + (struct saved_scope): Adjust type of field 'old_binding'. + * decl.c (cxx_saved_binding_make): New macro. + (struct cxx_saved_binding): Define. + (store_bindings): Adjust prototype. Use cxx_saved_binding to save + C++ bindings. + (maybe_push_to_top_level): Adjust local variable type. + (pop_from_top_level): Likewise. + +2003-03-04 Tom Tromey + + * Make-lang.in (c++.tags): New target. + +2003-03-04 Neil Booth + + * Make-lang.in: Update. + +2003-03-03 Jason Merrill + + * decl.c (finish_enum): Do set the type in a template. Simplify. + * pt.c (tsubst_enum, tsubst_copy): Revert last patch. + +2003-03-03 Mark Mitchell + + PR c++/9878 + * call.c (convert_class_to_reference): Correct conversion + sequences. + (reference_binding): Add ref_bound_directly_to_rvalue_p parameter. + (implicit_conversion): Adjust call to reference_binding. + (add_candidate): Change type of candidates parameter. + (add_function_candidate): Likewise. + (add_conv_candidate): Likewise. + (build_builtin_candidate): Likewise. + (add_builtin_candidate): Likewise. + (add_builtin_candidates): Likewise. + (add_template_candidate_real): Likewise. + (add_template_candidate): Likewise. + (add_template_conv_candidate): Likewise. + (build_user_type_conversion_1): Adjust accordingly. + (build_object_call): Likewise. + (build_conditional_expr): Likewise. + (add_candidates): Likewise. + (build_new_op): Likewise. + (convert_like_real): Use USER_CONV_CAND. Use build_nop. + (build_new_method_call): Adjust calls to add_function_candidate. + (make_temporary_var_for_ref_to_temp): New function. + (initialize_reference): Add decl parameter. + * class.c (build_rtti_vtbl_entries): Use build_address and + build_nop. + * cp-tree.h (initialize_reference): Change prototype. + (make_temporary_var_for_ref_to_temp): New function. + (build_type_conversion): Change prototype. + (build_address): New function. + (build_nop): Likewise. + * cvt.c (cp_convert_to_pointer): Adjust call to + build_type_conversion. Avoid indicating redundant NOP_EXPRs. + Use build_nop. + (convert_to_pointer_force): Use build_nop. + (build_up_reference): Use make_temporary_var_for_ref_to_temp. + (convert_to_reference): Adjust call to build_type_conversion. + (ocp_convert): Likewise. + (build_type_conversion): Remove for_sure parameter. + * decl.c (grok_reference_init): Use initialize_reference. + * typeck.c (build_address): New function. + (build_nop): Likewise. + (build_unary_op): Use them. + (build_ptrmemfunc): Tidy slightly. + (convert_for_initialization): Adjust call to + initialize_reference. + * typeck2.c (store_init_value): Remove #if 0'd code. + +2003-03-03 Jason Merrill + + * decl.c (start_function): Clear DECL_NUM_STMTS. + + * class.c (get_vtable_decl): Use vtbl_type_node. + (build_primary_vtable): Check for it. + +2003-03-02 Aldy Hernandez + + * decl.c (check_initializer): Check for vector_opaque_p. + +2003-03-02 Ashif Harji + + * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to + invoke an external cpp during compilation. + +2003-03-01 Gabriel Dos Reis + + * decl.c (duplicate_decls): Convert use of warning_with_decl() to + that of warning(). + (start_decl): Likewise. + (start_function): Likewise. + +2003-03-01 Neil Booth + + * Make-lang.in (CXX_C_OBJS): Update. + +2003-02-28 Mark Mitchell + + PR c++/9892 + * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when + instantiating it. + +2003-02-28 Aldy Hernandez + + * parser.c (cp_parser_init_declarator): Revert opaque + vector_opaque_p change. + Do not include target.h. + +2003-02-28 Mark Mitchell + + PR c++/9879 + * cp-tree.h (build_zero_init): Add parameter. + * decl.c (cp_finish_decl): Adjust call. + * init.c (build_zero_init): Add nelts parameter. Adjust recursive + calls. + (build_default_init): Add nelts parameter. Adjust calls to + build_zero_init. + (build_new_1): Adjust call to build_default_init. + * typeck2.c (process_init_constructor): Adjust call to build_zero_init. + +2003-02-26 Devang Patel + + * decl.c (finish_enum): Merge two 'for' loops. Copy value node if + required. Postpone enum setting for template decls. + (build_enumerator): Delay copying value node until finish_enum + (). Remove #if 0'ed code. + * pt.c (tsubst_enum): Set TREE_TYPE and copy value node. + (tsubst_copy): Add check for enum type. + +2003-02-25 Mark Mitchell + + PR c++/9683 + * decl2.c (prune_vars_needing_no_initialization): Do not throw + away initializations for DECL_EXTERNAL VAR_DECLs. + (finish_file): Adjust accordingly. + * pt.c (instantiate_decl): Do not defer VAR_DECLs. + +2003-02-24 Gabriel Dos Reis + + * decl.c (add_binding): Time TV_NAME_LOOKUP. + (push_class_binding): Likewise. + (set_namespace_binding): Likewise. + +2003-02-24 Mark Mitchell + + PR c++/9836 + * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from + specializations back to the main template. + * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use. + * pt.c (resolve_typename_type): Likewise. + +2003-02-24 Jeffrey D. Oldham + + PR c++/9778 + * pt.c (tsubst_copy_and_build): For a templated function inside a + scope, process template arguments. + +2003-02-24 Kriang Lerdsuwanakij + + PR c++/9602 + * typeck2.c (abstract_virtuals_error): Don't check when + TYPE is still template parameter dependent. + +2003-02-23 Mark Mitchell + + PR c++/5333 + * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro. + * parser.c (cp_parser_diagnose_invalid_type_name): Use it. + * pt.c (instantiate_class_template): Don't try to instantiate + dependent types. + (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE. + +2003-02-21 Mark Mitchell + + PR c++/9749 + * decl.c (grokdeclarator): Do not allow parameters with variably + modified types. + +2003-02-21 Nathan Sidwell + + * search.c (grow_bfs_bases): Remove. Fold into ... + (bfs_walk): ... here, fix fencepost error. Fix merge lossage + in previous patch. + +2003-02-20 Mark Mitchell + + PR c++/9729 + * mangle.c (mangle_conv_op_name_for_type): Issue an error message + when the G++ 3.2 ABI prevents correct compilation. + +2003-02-20 Nathan Sidwell + + Change base class access representation. Share virtual base + binfos. + * cp/call.c (build_special_member_call): Remove binfo_for_vbase + call. + * cp/class.c (build_base_path): Likewise. + (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use. + (build_secondary_vtable): Remove FOR_TYPE arg. Adjust. + (make_new_vtable): Adjust. + (force_canonical_binfo_r): Delete. + (force_canonical_binfo): Delete. + (mark_primary_virtual_base): Delete. + (dfs_unshared_virtual_bases): Delete. + (mark_primary_bases): Adjust. + (maybe_warn_about_overly_private_class): Adjust. + (dfs_base_derived_from): Delete. + (base_derived_from): Follow the inheritance chain. + (struct find_final_overrider_data): Add vpath member. + (dfs_find_final_overrider): Adjust. + (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New. + (find_final_overrider): Adjust. + (update_vtable_entry_for_fn): Adjust. + (modify_all_vtables): Adjust. + (walk_subobject_offsets): Adjust. + (layout_nonempty_base_or_field): Adjust. + (layout_empty_base): Remove last parameter. Adjust. + (build_base_field): Adjust. + (build_base_fields): Adjust. + (propagate_binfo_offsets): Remove last parameter. Adjust. + (dfs_set_offset_for_unshared_vbases): Delete. + (layout_virtual_bases): Adjust. + (finish_struct_1): Adjust. + (init_class_processing): Don't init access nodes. + (dfs_get_primary_binfo): Delete. + (get_primary_binfo): Adjust. + (dump_class_hierarchy_r): Remove most derived arg, add IGO + parameter. Adjust. + (dump_class_hierarchy): Adjust. + (finish_vtbls): Adjust. + (get_original_base): Delete. + (build_vtt_inits): Adjust. + (dfs_build_secondary_vptr_vtt_inits): Adjust. + (dfs_ctor_vtable_bases_queue_p): Adjust. + (build_ctor_vtbl_group): Adjust. + (dfs_accumulate_vtbl_inits): Adjust. + (build_vtbl_initializer): Adjust. + (build_vbase_offset_vtbl_entries): Adjust. + (add_vcall_offset_vtbl_entries_1): Adjust. + * cp/cp-tree.h (CPTI_ACCESS_*): Remove. + (access_*_node): Remove. + (CANONICAL_BINFO): Delete. + (BINFO_UNSHARED_MARKED): Remove. + (BINFO_MARKED): Set LANG_FLAG_0 directly. + (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete. + (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly. + (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED): + Delete. + (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly. + (SET_BINFO_NEW_VTABLE_MARKED): Adjust. + (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED): + Delete. + (BINFO_DEPENDENT_BASE_P): New. + (dfs_walk, dfs_walk_real): Queue function takes derived binfo and + index. + (markedp, unmarkedp): Adjust. + (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p, + dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp, + find_vbase_instance, binfo_for_vbase): Delete. + (copied_binfo, original_binfo): Declare. + (finish_base_specifier): Add virtual_p arg. + (unshare_base_binfos): Delete. + (copy_base_binfos): Declare. + (reverse_path): Delete. + * cp/decl.c (xref_basetypes): Access and virtuality passed + differently. Don't copy direct base binfos here. Call + copy_base_binfos. + * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust. + (initialize_vtbl_ptrs): Adjust. + (expand_member_init): Adjust. + * cp/parser.c (cp_parser_base_specifier): Adjust. + * cp/pt.c (instantiate_class_template): Adjust. + (get_template_base_recursive): Adjust. + * cp/rtti.c (get_pseudo_ti_init): Adjust. + (get_pseudo_ti_desc): Adjust. + * cp/tree.c (unshare_base_binfos): Rename to ... + (copy_base_binfos): ... here, reimplement. + (make_binfo): Set BINFO_DEPENDENT_BASE_P. + (reverse_path): Remove. + * cp/typeck.c (get_delta_difference): Adjust error messages. + * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust. + * cp/search.c (lookup_base_r): Adjust. + (dynamic_cast_base_recurse): Adjust. + (canonical_binfo): Remove. + (dfs_canonical_queue): Remove. + (dfs_assert_unmarked_p): Remove. + (assert_canonical_unmarked): Remove. + (shared_marked_p, shared_unmarked_p): Remove. + (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE. + (dfs_access_in_type): Adjust. + (access_in_type): Adjust. + (dfs_accessible_queue_p): Adjust. + (dfs_accessible_p): Adjust. + (is_subobject_of_p_1, is_subobject_of_p): Remove. + (struct lookup_field_info): Remove from_dep_base_p field. + (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P. + (lookup_field_r): Remove dependent base code. + (lookup_member): Likewise. + (dfs_walk, dfs_walk_real): Add access arg to queue fn. + (dfs_unmarked_real_bases_queue_p): Remove. + (dfs_marked_real_bases_queue_p): Remove. + (dfs_skip_vbases): Remove. + (dfs_get_pure_virtuals): Adjust. + (markedp, unmarkedp): Adjust. + (marked_vtable_pathp, unmarked_vtable_pathp): Remove. + (marked_pushdecls_p, unmarked_pushdecls_p): Adjust. + (dfs_unmark): Adjust. + (dfs_get_vbase_types):Remove. + (dfs_build_inheritance_graph_order): Remove. + (get_vbase_types): Remove + (dfs_find_vbase_instance): Remove. + (find_vbase_instance): Remove. + (dfs_debug_unmarkedp): Adjust. + (dependent_base_p): Remove. + (dfs_push_type_decls): Adjust. + (dfs_push_decls): Adjust. + (dfs_no_overlap_yet): Adjust. + (copied_binfo): New function. + (original_binfo): New function. + (binfo_for_vbase): Remove. + +2003-02-18 Zack Weinberg + + * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk. + (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES + vectors, for speed. + +2003-02-18 Mark Mitchell + + PR c++/9704 + * class.c (layout_class_type): In the 3.2 ABI, take into account + trailing bit fields when computing CLASSTYPE_SIZE_UNIT. + +2003-02-18 Matt Austern + + * cp/cp-lang.c: Change lang hooks so that final_write_globals does + nothing for C++. + * cp/decl.c (wrapup_globals_for_namespace): Remove special + handling of global namespace. + +2003-02-18 Geoffrey Keating + + * cp-tree.h (rid_to_yy): Delete. + (C_RID_YYCODE): Delete. + (finish_file): Delete redundant declaration. + +2003-02-18 Jason Merrill + + PR c++/9623 + * decl.c (reshape_init): Don't mess with initializer labels. + + PR c++/9485 + * parser.c (cp_parser_postfix_expression): Set idk properly for + object->scope::member. + +2003-02-18 Ben Elliston + + PR other/7350 + * decl.c (duplicate_decls): Fix typo in comment. + +2003-02-17 Michael Elizabeth Chastain + + PR debug/9717 + * class.c (build_base_field): Mark fields for base classes with + DECL_IGNORED_P. + +2003-02-17 Kriang Lerdsuwanakij + + PR c++/9457 + * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute + CONSTRUCTOR_ELTS only once. + +2003-02-16 Kriang Lerdsuwanakij + + PR c++/9459 + * error.c (dump_type_prefix): Handle TYPEOF_TYPE. + (dump_type_suffix): Likewise. + +2003-02-14 Nathan Sidwell + + * search.c: ANSIfy function declarations and definitions. + * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool. + * call.c (build_method_call, resolve_scoped_fn_name, + build_java_interface_fn_ref): Adjust lookup_field, lookup_member + calls. + * class.c (handle_using_decl): Likewise. + * decl.c (make_typename_type, make_unmound_class_template, + start_decl, compute_array_index_type): Likewise. + * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise. + * init.c (expand_member_init, build_member_call): Likewise. + * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation, + resolve_typename_type): Likewise. + * typeck.c (lookup_destructor, finish_class_member_access_exprm + build_prememfunc_access_expr): Likewise. + +2003-02-13 Gabriel Dos Reis + + * decl2.c: Include "timevar.h". + (namespace_ancestor): Time name lookup. + (add_using_namespace): Likewise. + (lookup_using_namespace): Likewise. + (qualified_lookup_using_namespace): Likewise. + (decl_namespace): Likewise. + (lookup_arg_dependent): Likewise. + * lex.c (do_identifier): Likewise. + (do_scoped_id): Likewise. + * pt.c (lookup_template_class): Likewise. + +2003-02-14 Andrew Pinski + + * decl.c: (define_label): Fix warning for return 0 instead of NULL. + +2003-02-13 Gabriel Dos Reis + + * decl.c: Include "timevar.h". + (poplevel): Time name lookup. + (find_binding): Likewise. + (push_namespace): Likewise. + (pop_nested_namespace): Likewise. + (store_bindings): Likewise. + (maybe_push_to_top_level): Likewise. + (pop_from_top_level): Likewise. + (push_local_name): Likewise. + (pushtag): Likewise. + (pushdecl): Likewise. + (pushdecl_with_scope): Likewise. + (pushdecl_namespace_level): Likewise. + (pushdecl_top_level): Likewise. + (pushdecl_class_level): Likewise. + (push_class_level_binding): Likewise. + (push_using_decl): Likewise. + (push_using_directive): Likewise. + (push_overloaded_decl): Likewise. + (lookup_label): Likewise. + (define_label): Likewise. + (lookup_tag): Likewise. + (lookup_tag_reverse): Likewise. + (lookup_namespace_name): Likewise. + (select_decl): Likewise. + (unqualified_namespace_lookup): Likewise. + (lookup_name_real): Likewise. + (lookup_name_current_level): Likewise. + (lookup_type_current_level): Likewise. + (maybe_inject_for_scope_var): Likewise. + (xref_tag): Likewise. + + * Make-lang.in (cp/decl.o): Add dependency on timevar.h + +2003-02-12 Phil Edwards + + * decl.c (build_enumerator): Remove unneeded test. + +2003-02-09 Dan Nicolaescu + + * cp-tree.h (struct lang_type_header): Make all fields unsigned + char. + +2003-02-03 Mark Mitchell + + PR c++/7129 + * call.c (z_candidate): Add args. + (convert_class_to_reference): Set it. + (implicit_conversion): Tidy. + (add_candidate): Add args parameter. + (add_function_candidate): Adjust call to add_candidate. + (add_conv_candidate): Likewise. + (build_builtin_candidate): Likewise. + (build_user_type_conversion_1): Eliminate wasteful tree_cons + usage. + (build_new_function_call): Likewise. + (build_object_call): Likewise. + (add_candidates): New function. + (build_new_op): Use it. + (covert_like_real): Adjust call to build_over_call. + (build_over_call): Remove args parameter. + * operators.def: Add ?=. + +2003-02-01 Richard Sandiford + + * typeck.c (build_indirect_ref): Don't check flag_volatile. + +2003-01-31 Kriang Lerdsuwanakij + + PR c++/8849 + * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL. + +2003-01-31 Nathan Sidwell + + * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, + BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS. + (BINFO_LANG_ELTS): New #define. + * tree.c (make_binfo): Use BINFO_LANG_ELTS. + +2003-01-30 Geoffrey Keating + + * cp/Make-lang.in: Remove -Wno-error from cp/decl.o. + +2003-01-30 Mark Mitchell + + * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY + for class types. + * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit + rather than TYPE_LANG_FLAG_0. + (TYPE_BUILT_IN): Remove. + (TYPE_DEPENDENT_P): New macro. + (TYPE_DEPENDENT_P_VALID): Likewise. + (lang_type_class): Add fields_readonly. + * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN. + * pt.c (dependent_type_p_r): New function, split out from ... + (dependent_type_p): ... here. Memoize results. + * search.c (dependent_base_p): Use dependent_type_p, not + uses_template_parms. + * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY + for class types. + +2003-01-29 Mark Mitchell + + * call.c (build_field_call): Use build_new_op, not build_opfncall. + (prep_operand): New function. + (build_new_op): Use it. Remove dead code. + * class.c (pushclass): Change "modify" parameter type from int to + bool. + (currently_open_class): Use same_type_p, not pointer equality. + (push_nested_class): Adjust calls to pushclass, remove modify + parameter. + * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro. + (pushclass): Change prototype. + (push_nested_class): Likewise. + (grokoptypename): Remove. + (build_opfncall): Remove. + (value_dependent_expression_p): Declare. + (resolve_typename_type): Likewise. + (resolve_typename_type_in_current_instantiation): Likewise. + (enter_scope_of): Remove. + (tsubst): Remove. + (tsubst_expr): Likewise. + (tsubst_copy): Likewise. + (tsubst_copy_and_build): Likewise. + * decl.c (warn_about_implicit_typename_lookup): Remove. + (finish_case_label): Return error_mark_node for erroneous labels. + (start_decl): Adjust calls to push_nested_class. + (grokfndecl): Call push_scope/pop_scope around call to + duplicate_decls. + (grokdeclarator): Do not call tsubst. + (start_function): Adjust calls to push_nested_class. + * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall. + (check_classfn): Use push_scope/pop_scope around type comparisions. + (grokoptypename): Remove. + (push_sscope): Adjust call to push_nested_class. + * error.c (dump_type): Show cv-qualification of typename types. + * init.c (build_member_call): Use build_new_op, not + build_opfncall. + * method.c (build_opfncall): Remove. + * parser.c (cp_parser): Add allow_non_constant_expression_p and + non_constant_expression_p. + (cp_parser_constant_expression): Adjust prototype. + (cp_parser_resolve_typename_type): Remove. + (cp_parser_non_constant_expression): New function. + (cp_parser_non_constant_id_expression): Likewise. + (cp_parser_new): Set allow_non_constant_expression_p and + non_constant_expression_p. + (cp_parser_primary_expression): Reject `this' and `va_arg' in + constant-expressions. Note that dependent names aren't really + constant. + (cp_parser_postfix_expression): Reject conversions to non-integral + types in constant-expressions. Neither are increments or + decrements. + (cp_parser_unary_expression): Reject increments and decrements in + constant-expressions. + (cp_parser_direct_new_declarator): Adjust call to + cp_parser_constant_expression. + (cp_parser_cast_expression): Reject conversions to non-integral + types in constant-expressions. + (cp_parser_assignment_expression): Rejects assignments in + constant-expressions. + (cp_parser_expression): Reject commas in constant-expressions. + (cp_parser_labeled_statement): Adjust call to + cp_parser_constant_expression. + (cp_parser_direct_declarator): Simplify array bounds, even in + templates, when they are non-dependent. Use + resolve_typename_type, not cp_parser_resolve_typename_type. + (cp_parser_class_head): Use resolve_typename_type, not + cp_parser_resolve_typename_type. + (cp_parser_member_declaration): Adjust call to + cp_parser_constant_expression. + (cp_parser_constant_initializer): Likewise. + (cp_parser_constructor_declarator): Use resolve_typename_type, not + cp_parser_resolve_typename_type. + (cp_parser_late_parsing_default_args): Adjust call to + push_nested_class. + * pt.c (tsubst): Give it internal linkage. + (tsubst_expr): Likewise. + (tsubst_copy): Likewise. + (tsubst_copy_and_build): Likewise. + (push_access_scope_real): Likewise. + (tsubst_friend_class): Likewise. + (instantiate_class_template): Adjust call to pushclass. + (value_dependent_expression_p): Give it external linkage. + Robustify. + (resolve_typename_type): New function. + * semantics.c (finish_call_expr): Use build_new_op, not + build_opfncall. + (begin_constructor_declarator): Remove. + (begin_class_definition): Adjust call to pushclass. + (enter_scope_of): Remove. + * typeck.c (comptypes): Resolve typename types as appropriate. + (build_x_indirect_ref): Use build_new_op, not build_opfncall. + (build_x_compound_expr): Likewise. + (build_modify_expr): Likewise. + (build_x_modify_expr): Likewise. + * typeck2.c (build_x_arrow): Likewise. + +2003-01-29 Fariborz Jahanian + + * pt.c (last_pending_template) Declare GTY(). + +2003-01-29 Kriang Lerdsuwanakij + + PR c++/8591 + * parser.c (cp_parser_elaborated_type_specifier): Convert + TEMPLATE_DECL to TYPE_DECL only when processing template friends. + (cp_parser_maybe_treat_template_as_class): Remove redundant tests. + +2003-01-28 Nathan Sidwell + + PR c++/9437 + * pt.c (unify): Don't unify '*T' with 'U C::*'. + + PR c++/3902 + * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor + inside a declarator. + +2003-01-27 Nathan Sidwell + + * class.c (update_vtable_entry_for_fn): Add index parameter. + Generate vcall thunk for covariant overriding from a virtual + primary base. + (dfs_modify_vtables): Adjust. + +2003-01-25 Nathan Sidwell + + PR c++/9403 + * parser.c (cp_parser_class_or_namespace_name): Reject duplicate + template keyword. + (cp_parser_base_specifier): Look for and consume a + TEMPLATE keyword. Replace switch with array index. + + PR c++/795 + * semantics.c (finish_non_static_data_member): Remember the + field's type even in a template. + + PR c++/9415 + * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are + already scoped. + + PR c++/8545 + * parser.c (cp_parser_cast_expression): Be more tentative. + +2003-01-25 Kriang Lerdsuwanakij + + * cp-tree.h (flagged_type_tree_s): Remove. + (check_for_new_type): Likewise. + * typeck2.c (check_for_new_type): Likewise. + +2003-01-23 Nathanael Nerode + + * dump.c: ANSIfy function declarations and definitions. + + * cp-tree.h, decl.h: Get rid of PARAMS. Again. + +2003-01-22 Mark Mitchell + + PR c++/9354 + * init.c (build_new): Set the type of the new-expression, even + when processing_templte_decl. + + PR c++/9216 + * parser.c (cp_parser_primary_expression): Improve error message + for templates used in an expression context. + + PR c++/8696 + * parser.c (cp_parser_decl_specifier_seq): Commit to tentative + parse when encountering "typedef". + +2003-01-22 Nathanael Nerode + + * class.c, parser.c: ANSIfy function definitions and declarations. + +2003-01-22 Mark Mitchell + + PR c++/9328 + * error.c (dump_decl): For an OVERLOAD, just print the name of the + function; it doesn't make sense to try to print its type. + * semantics.c (finish_typeof): Issue errors about invalid uses. + + PR c++/9298 + * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New + function. + (cp_parser_expression_statement): Use it. + (cp_parser_explicit_instantiation): Likewise. + * pt.c (do_decl_instantiation): Improve error handling logic. + +2003-01-22 Mark Mitchell + + PR c++/9384 + * parser.c (cp_parser_using_declaration): Issue error messages + about name resolution failures here. + + PR c++/9388 + * class.c (currently_open_derived_class): Use dependent_type_p. + * cp-tree.h (dependent_type_p): New function. + (dependent_template_arg_p): Likewise. + (dependent_template_p): Likewise. + (type_dependent_expression_p): Likewise. + * parser.c (cp_parser_dependent_type_p): Remove. + (cp_parser_value_dependent_type_p): Likewise. + (cp_parser_type_dependent_expression_p): Likewise. + (cp_parser_dependent_template_arg_p): Likewise. + (cp_parser_dependent_template_id_p): Likewise. + (cp_parser_dependent_template_p): Likewise. + (cp_parser_diagnose_invalid_type_name): Replace + cp_parser_dependent_type_p with dependent_type_p, etc. + (cp_parser_primary_expresion): Likewise. + (cp_parser_nested_name_specifier_opt): Likewise. + (cp_parser_postfix_expression): Likewise. + (cp_parser_unary_expression): Likewise. + (cp_parser_template_name): Likewise. + (cp_parser_class_name): Likewise. + (cp_parser_lookup_name): Likewise. + * pt.c (dependent_type_p): New function. + (value_dependent_expression_p): Likewise. + (type_dependent_expression_p): Likewise. + (dependent_template_arg_p): Likewise. + (dependent_template_id_p): Likewise. + (dependent_template_p): Likewise. + + PR c++/9285 + PR c++/9294 + * parser.c (cp_parser_simple_declaration): Return quickly when + encountering errors. + +2003-01-21 Kaveh R. Ghazi + + Make-lang.in (cp/decl.o-warn): Add -Wno-error. + +2003-01-17 Jason Merrill + + PR c++/9167, c++/9358 + * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE. + +2003-01-17 Jason Merrill + + PR c++/9342 + * call.c (build_conditional_expr): Always do lvalue-rvalue + conversion. + +2003-01-17 Mark Mitchell + + PR c++/9294 + * cp-tree.def (BASELINK): Make it class 'x', not class 'e'. + * cp-tree.h (BASELINK_BINFO): Adjust. + (BASELINK_FUNCTIONS): Likewise. + (BASELINK_ACCESS_BINFO): Likewise. + (tree_baselink): New structure. + (cp_tree_node_structure_enum): Add TS_CP_BASELINK. + (lang_tree_node): Add baselink. + * decl.c (cp_tree_node_structure): Add BASELINK case. + * search.c (build_baselink): Adjust. + * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P + test from TREE_LIST case. + + PR c++/9272 + * parser.c (cp_parser_constructor_declarator_p): Do not assume + that a constructor cannot be declared outside of its own class. + + * parser.c (cp_parser_resolve_typename_type): If the scope cannot + be resolved, neither can the qualified name. + + * rtti.c (get_pseudo_ti_desc): Fix thinko. + +2003-01-16 Jason Merrill + + PR c++/8564 + * init.c (build_vec_init): Re-add maxindex parm. + (perform_member_init, build_aggr_init): Pass it. + (build_new_1): Pass it. Use an incomplete array type for full_type. + * typeck.c (build_modify_expr): Pass it. + * cp-tree.h: Adjust. + +2003-01-16 Jeffrey D. Oldham + + * cp-tree.h (tsubst_copy_and_build): New declaration. + * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment. + (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment. + (tsubst_copy_and_build): New function. + +2003-01-16 Mark Mitchell + + * cp-tree.h (lang_type_class): Remove is_partial_instantiation. + (PARTIAL_INSTANTIATION_P): Remove. + (IMPLICIT_TYPENAME_P): Likewise. + (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise. + (build_typename_type): Remove declaration. + (parmlist_is_exprlist): Likewise. + * decl.c (build_typename_type): Make it static, remove third + parameter. + (push_class_binding): Don't do implicit typename stuff. + (make_typename_type): Likewise. + (lookup_name_real): Likewise. + (grokdeclarator): Don't try to convert declarations into + initializations. Don't do implicit typename stuff. + (parmlist_is_exprlist): Remove. + (xref_basetypes): Simplify. + * decl2.c (grokfield): Don't try to convert declarations into + initializations. + (build_anon_union_vars): Do this while processing templates, too. + (finish_anon_union): Likewise. + * error.c (dump_type): Remove implicit typename handling. + * parser.c (cp_parser_diagnose_invalid_type_name): New method. + (cp_parser_primary_expression): Correct handling of names not + found by unqualified name lookup in templates. + (cp_parser_nested_name_specifier_opt): Avoid checking dependency + of types when possible. + (cp_parser_simple_declaration): Complain intelligently about some + invalid declarations. + (cp_parser_member_declaration): Likewise. + (cp_parser_constructor_declarator_p): Don't check when we're in a + function scope. + * pt.c (instantiate_class_template): Remove + PARTIAL_INSTANTIATION_P gunk. + * search.c (lookup_field_r): Don't build implicit typenames. + (marked_pushdecls_p): Don't enter dependent base types. + (unmarked_pushdecls_p): Likewise. + * semantics.c (begin_class_definition): Remove implicit typename + stuff. + +2003-01-16 Nathan Sidwell + + PR c++/9212 + * parser.c (cp_parser_direct_declarator): If accepting either + abstract or named, the name must be an unqualified-id. + +2003-01-16 Kaveh R. Ghazi + + * class.c (layout_virtual_bases): Avoid signed/unsigned warning. + +2003-01-14 Kaveh R. Ghazi + + * decl2.c (check_classfn): Fix uninitialized warning. + (build_anon_union_vars): Likewise. + * pt.c (tsubst_copy): Likewise. + +2003-01-14 Jeffrey D. Oldham + + Further conform g++'s __vmi_class_type_info to the C++ ABI + specification. + * rtti.c (dfs_class_hint_mark): Do not set hints not specified by + the specification. + (class_hint_flags): Likewise. + +2003-01-14 Kriang Lerdsuwanakij + + * config-lang.in: Add semantics.c to gtfiles. + * cp-tree.h (flagged_type_tree_s): Remove lookups field. + (saved_scope): Likewise. + (type_lookups): Remove. + (deferred_access): New structure. + (type_access_control): Remove. + (save_type_access_control): Likewise. + (reset_type_access_control): Likewise. + (decl_type_access_control): Likewise. + (push_deferring_access_checks): Declare. + (resume_deferring_access_checks): Likewise. + (stop_deferring_access_checks): Likewise. + (pop_deferring_access_checks): Likewise. + (get_deferred_access_checks): Likewise. + (pop_to_parent_deferring_access_checks): Likewise. + (perform_deferred_access_checks): Likewise. + (perform_or_defer_access_check): Likewise. + * decl.c (make_typename_type): Use perform_or_defer_access_check. + (make_unbound_class_template): Likewise. + (grokdeclarator): Don't call decl_type_access_control. + * parser.c (cp_parser_context): Remove deferred_access_checks + and deferring_access_checks_p fields. + (cp_parser_context_new): Adjust. + (cp_parser): Remove access_checks_lists. + (cp_parser_defer_access_check): Remove. + (cp_parser_start_deferring_access_checks): Remove. + (cp_parser_stop_deferring_access_checks): Remove. + (cp_parser_perform_deferred_access_checks): Remove. + (cp_parser_nested_name_specifier_opt): Use new deferred access + functions. + (cp_parser_simple_declaration): Likewise. + (cp_parser_template_id): Likewise. + (cp_parser_function_definition): Likewise. + (cp_parser_class_specifier): Likewise. + (cp_parser_lookup_name): Likewise. + (cp_parser_single_declaration): Likewise. + (cp_parser_pre_parsed_nested_name_specifier): Likewise. + (cp_parser_parse_tentatively): Likewise. + (cp_parser_parse_definitely): Likewise. + (yyparse): Likewise. + (cp_parser_init_declarator): Remove access_checks parameter. + Use new deferred access functions. + (cp_parser_function_definition_from_specifiers_and_declarator): + Likewise. + (cp_parser_class_head): Remove deferring_access_checks_p and + saved_access_checks parameters. Use new deferred access functions. + (cp_parser_member_specification_opt): Don't call + reset_type_access_control. + * search.c (type_access_control): Remove. + * semantics.c: Include "gt-cp-semantics.h". + (deferred_type_access_control): Remove. + (deferred_access_stack): New variable. + (deferred_access_free_list): Likewise. + (push_deferring_access_checks): New function. + (resume_deferring_access_checks): Likewise. + (stop_deferring_access_checks): Likewise. + (pop_deferring_access_checks): Likewise. + (get_deferred_access_checks): Likewise. + (pop_to_parent_deferring_access_checks): Likewise. + (perform_deferred_access_checks): New function, adapted from + cp_parser_perform_deferred_access_checks. + (perform_or_defer_access_check): New function, adapted from + cp_parser_defer_access_check. + (current_type_lookups): Remove. + (deferred_type_access_control): Likewise. + (decl_type_access_control): Likewise. + (save_type_access_control): Likewise. + (reset_type_access_control): Likewise. + (begin_function_definition): Adjust. + (begin_class_definiton): Likewise. + +2003-01-13 Jason Merrill + + PR c++/8748 + * class.c (build_base_path): Take the address before calling save_expr. + + * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if + all the ambiguous conversions are bad. + + * class.c (maybe_warn_about_overly_private_class): Don't stop + searching when we find a nonprivate method. + + * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue. + +2003-01-12 Mark Mitchell + + * cp-tree.h (get_arglist_len_in_bytes): Remove. + + PR c++/9264 + * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous + typeame types more robustly. + +2003-01-11 Phil Edwards + + * parser.c: Fix comment typos. + +2003-01-10 Mark Mitchell + + PR c++/9099 + * parser.c (cp_parser_scope_through_which_access_occurs): Handle + an object_type which is not a class type. + +2003-01-10 Geoffrey Keating + + * parser.c (cp_parser_late_parsing_for_member): Don't cast to void. + (cp_parser_late_parsing_default_args): Likewise. + +2003-01-10 Nathanael Nerode + + * cfns.gperf: ANSIfy function declarations. + * cfns.h: Regenerate. + * cp-tree.h: ANSIfy function declarations. + +2003-01-10 Mark Mitchell + + * cp-tree.h (reparse_absdcl_as_expr): Remove. + (reparse_absdcl_as_casts): Likewise. + (reparse_decl_as_expr): Likewise. + (finish_decl_parsing): Likewise. + * decl2.c (reparse_absdcl_as_expr): Remove. + (reparse_absdcl_as_casts): Likewise. + (repase_decl_as_expr): Likewise. + (finish_decl_parsing): Likewise. + + PR c++/9128 + PR c++/9153 + PR c++/9171 + * parser.c (cp_parser_pre_parsed_nested_name_specifier): New + function. + (cp_parser_nested_name_specifier_opt): Correct the + check_dependency_p false. + (cp_parser_postfix_expression): Fix formatting. + (cp_parser_decl_specifier_seq): Avoid looking for constructor + declarators when possible. + (cp_parser_template_id): Avoid performing name-lookup when + possible. + (cp_parser_class_head): Do not count specializations when counting + levels of templates. + (cp_parser_constructor_declarator_p): Return immediately if + there's no chance that the tokens form a constructor declarator. + * rtti.c (throw_bad_typeid): Add comment. Do not return an + expression with reference type. + (get_tinfo_decl_dynamic): Do not return an expression with + reference type. + (build_typeid): Add comment. Do not return an expression with + reference type. + * typeck.c (build_class_member_access_expr): Improve handling of + conditionals and comma-expressions as objects. + +2003-01-09 Nathanael Nerode + + * cfns.gperf: ANSIfy function declarations. + * cfns.h: Regenerate. + * cp-tree.h: ANSIfy function declarations. + * parser.c: ANSIfy function declarations & definitions. + + * decl.c (bad_specifiers): Fix parameter order error I introduced. + +2003-01-09 Geoffrey Keating + + Merge from pch-branch: + + 2003-01-09 Geoffrey Keating + + Merge to tag pch-merge-20030102: + + * semantics.c (finish_translation_unit): Don't call finish_file. + * parser.c: Don't include ggc.h. + (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer, + read first token here. Don't allow PCH files after the first + token is read. + (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new. + (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL. + (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory. + (cp_parser_late_parsing_for_member): Don't duplicate call to + cp_lexer_set_source_position_from_token. + (cp_parser_late_parsing_default_args): Likewise. + (yyparse): Call finish_file after clearing the_parser. + + 2002-12-11 Geoffrey Keating + + * Make-lang.in: Remove $(GGC_H) from all dependencies. + (CXX_TREE_H): Add $(GGC_H). + * class.c: Don't include ggc.h. + (field_decl_cmp): Make parameters be 'const void *' to match qsort. + (method_name_cmp): Likewise. + (resort_data): New variable. + (resort_field_decl_cmp): New. + (resort_method_name_cmp): New. + (resort_sorted_fields): New. + (resort_type_method_vec): New. + (finish_struct_methods): Delete cast. + (finish_struct_1): Delete cast. + * cp-tree.h: Include ggc.h. + (struct lang_type_class): Add reorder attribute to field `methods'. + (union lang_decl_u3): Add reorder attribute to field `sorted_fields'. + (resort_sorted_fields): New prototype. + (resort_type_method_vec): New prototype. + * call.c: Don't include ggc.h. + * decl.c: Likewise. + * decl2.c: Likewise. + * init.c: Likewise. + * lex.c: Likewise. + * method.c: Likewise. + * optimize.c: Likewise. + * parse.y: Likewise. + * pt.c: Likewise. + * repo.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * spew.c: Likewise. + * tree.c: Likewise. + + * lang-specs.h: Remove comment. + + 2002-12-03 Geoffrey Keating + + * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery. + (operator_name_info): Mark to be saved for PCH, specify size. + (assignment_operator_name_info): Likewise. + + 2002-11-19 Geoffrey Keating + + * decl.c (anon_cnt): Mark to be saved for PCH. + + 2002-10-25 Geoffrey Keating + + * lex.c (init_reswords): Delete now-untrue comment. + Allocate ridpointers using GGC. + + 2002-10-04 Geoffrey Keating + + * cp-tree.h (union lang_decl_u2): Add tags to all fields. + + * g++spec.c (lang_specific_driver): Don't include standard + libraries in `added'. + + 2002-08-27 Geoffrey Keating + + * decl2.c (finish_file): Call c_common_write_pch. + * Make-lang.in (CXX_C_OBJS): Add c-pch.o. + + 2002-08-17 Geoffrey Keating + + * g++spec.c (lang_specific_driver): Treat .h files as C++ header + files when using g++. + * lang-specs.h: Handle compiling C++ header files. + +2003-01-09 Jakub Jelinek + + * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs. + +2003-01-09 Kriang Lerdsuwanakij + + * pt.c (push_access_scope_real): Call push_to_top_level for + function in namespace scope. + (pop_access_scope): Call pop_from_top_level for function in + namespace scope. + +2003-01-09 Jakub Jelinek + + * decl.c (start_decl): Don't set DECL_COMMON for __thread variables. + +2003-01-09 Christian Cornelssen + + * Make-lang.in (c++.install-common, c++.install-man, + c++.uninstall): Prepend $(DESTDIR) to destination paths in + all (un)installation commands. + (c++.install-common): Rewrite $(LN) commands to support + DESTDIR with "ln" as well as with "ln -s". + +2003-01-08 Jason Merrill + + * parser.c (cp_parser_primary_expression): See through explicitly + scoped ALIAS_DECLs, too. + +2003-01-08 Nathanael Nerode + + * decl.c: Remove some #if 0 code. + + * decl.c: ANSIfy function declarations. + +2003-01-07 Mark Mitchell + + * parser.c (cp_parser_asm_definition): Correct handling of omitted + operands. + +2003-01-08 Kriang Lerdsuwanakij + + PR c++/9030 + * decl.c (make_typename_type): Check access only when tf_error. + (make_unbound_class_template): Likewise. + * pt.c (saved_access_scope): New variable. + (push_access_scope_real): New function. + (push_access_scope): Likewise. + (pop_access_scope): Likewise. + (tsubst_default_argument): Use them. + (instantiate_template): Likewise. + (regenerate_decl_from_template): Likewise. + (instantiate_decl): Likewise. + (get_mostly_instantiated_function_type): Likewise. + +2003-01-07 Nathanael Nerode + + * tree.c: Delete bogus #if 0 code. + +2003-01-07 Andreas Schwab + + * class.c (layout_class_type): Don't use + PCC_BITFIELD_TYPE_MATTERS if not defined. + +2003-01-06 Mark Mitchell + + PR c++/9165 + * decl2.c (build_cleanup): Mark the object as used. + + * pt.c (retrieve_local_specialization): Revert 2003-01-05 change. + (hash_local_specialization): New function. + (register_local_specialization): Revert 2003-01-05 change. + (instantiate_decl): Use hash_local_specialization when creating + the local_specializations table. + + * decl2.c (mark_used): Do not synthesize thunks. + + * class.c (layout_class_type): Correct handling of unnamed + bitfields wider than their types. + + PR c++/9189 + * parser.c (cp_parser): Remove default_arg_types. Update + documentation for unparsed_functions_queues. + (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the + parameter. + (cp_parser_new): Don't set parser->default_arg_types. + (cp_parser_function_definition): Adjust usage of + unparsed_funtions_queues. + (cp_parser_class_specifier): Don't mess with + parser->default_arg_types. Handle default argument processing in + a separate phase from function body processing. + (cp_parser_template_declaration_after_export): Adjust usage of + unparsed_functions_queues. + (cp_parser_late_parsing_for_member): Do not handle default + arguments. + +2003-01-06 Nathan Sidwell + + PR c++/9109 + * parser.c (cp_parser_declarator_kind): New enum. + (cp_parser_declarator): Adjust. + (cp_parser_direct_declarator): Adjust. Allow for either named or + abstract declarator. Prefer abstract, if possible. Allow + parenthesized function name. + (cp_parser_condition): Adjust cp_parser_declarator call. + (cp_parser_explicit_instantiation): Likewise. + (cp_parser_init_declarator): Likewise. + (cp_parser_type_id): Likewise. + (cp_parser_function_definition): Likewise. + (cp_parser_member_declaration): Likewise. + (cp_parser_parameter_declaration): Use cp_parser_declarator to do + the tentative parsing. + (cp_parser_exception_declaration): Likewise. + +2003-01-05 Mark Mitchell + + * parser.c (cp_parser_template_parameter): Adjust call to + cp_parser_parameter_declaration. + (cp_parser_parameter_declaration_list): Likewise. + (cp_parser_parameter_declaration): Replace + greater_than_is_operator_p with template_parm_p parameter. Do not + cache tokens for template default arguments. + + * pt.c (retrieve_local_specialization): Use htab_find, not + htab_find_with_hash. + (register_local_specialization): Use htab_find_slot, not + htab_find_slot_with_hash. + (instantiate_decl): Pass a hash function to htab_create. + +2003-01-04 Kaveh R. Ghazi + + * parser.c (cp_parser_binary_expression, + cp_parser_multiplicative_expression, + cp_parser_additive_expression, cp_parser_shift_expression, + cp_parser_relational_expression, cp_parser_equality_expression, + cp_parser_and_expression, cp_parser_exclusive_or_expression, + cp_parser_inclusive_or_expression, + cp_parser_logical_and_expression, cp_parser_logical_or_expression, + cp_parser_binary_expression): Const-ify. + +2003-01-04 Mark Mitchell + + * method.c (use_thunk): Disable access control while building the + body of the thunk. + +2003-01-03 Nathanael Nerode + + * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C + front end. + +2003-01-03 Matt Austern + + * cp-tree.h (struct lang_type_class): add field for key method + (cp_global_trees): rename dynamic_classes to keyed_classes + (key_method): add definition + * class.c (finish_struct_1): compute class's key method, and add + the class to keyed_classes list if there is no key method. + * decl.c (finish_function): add class to keyed_classes list if we + see a definition of the class's key method. + * pt.c (instantiate_class_template): add template specialization + of a dynamic class to keyed_classes list. + * decl2.c (key_method): remove + (finish_file): iterate only through keyed_classes list when + deciding whether to emit vtables, remove class from its list after + we do the emission. + +2003-01-02 Jason Merrill + + * call.c (build_conditional_expr): Stabilize lvalues properly. + * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type. + * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues. + Don't allow CALL_EXPR or VA_ARG_EXPR, either. + + * call.c (convert_like_real): Call decl_constant_value for an + IDENTITY_CONV even if there are no more conversions. + + * cvt.c (build_up_reference): Don't push unnamed temps. + + * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL. + + * dump.c (cp_dump_tree): Don't try to dump class-specific fields + for a backend struct. + + * except.c (wrap_cleanups_r, build_throw): Make + MUST_NOT_THROW_EXPRs void. + * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR. + + * init.c (build_vec_delete_1): Pre-evaluate the base address. + + * init.c (get_temp_regvar): Simplify logic. + + * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if + our replacement is a decl. + + * decl.c (cp_make_fname_decl): Push the decls inside the + outermost scope. + +2003-01-03 Nathan Sidwell + + PR c++/45, c++/3784 + * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be + the same too. + +2003-01-03 Graham Stott + + * parser.c (struct cp_parser): Add access_checks_lists field + (cp_parser_simple_declaration): Use. + (cp_parser_init_declarator): Likewise. + +2003-01-02 Mark Mitchell + + * parser.c (cp_parser_declaration): Accept the __extension__ + keyword before the declaration. + + PR c++/2843 + * parser.c (cp_parser_parameter_declaration): Allow attributes to + appear after the declarator. + + * call.c (build_new_method_call): Fix typo in message format + string. + +2003-01-02 Mark Mitchell + + * parser.c (cp_lexer_next_token_is): Declare it inline. + (cp_lexer_set_source_position_from_token): Likewise. + (cp_lexer_debugging_p): Likewise. + (cp_parser_parsing_tentatively): Likewise. + (cp_parser_nested_name_specifier_opt): Reduce the number of calls + to the cp_lexer_peek_token. + + * parser.c (cp_parser_sizeof_operand): Do not evaluate the + expression. + +2003-01-02 Steven Bosscher + + * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c, + cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c, + cp/repo.c: Fix copyright years. + +2003-01-01 Neil Booth + + * lex.c: Remove superfluous include of cpplib.h. + (CONSTRAINT): Define without conditions. + (init_cp_pragma): Use c_register_pragma. + diff --git a/gcc/cp/ChangeLog-2004 b/gcc/cp/ChangeLog-2004 new file mode 100644 index 0000000..7dd4e26 --- /dev/null +++ b/gcc/cp/ChangeLog-2004 @@ -0,0 +1,6877 @@ +2004-12-31 Richard Henderson + + PR middle-end/17799 + * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P. + * class.c (build_vtable): Don't conditionallize setting it + based on DWARF2_DEBUG. + (layout_class_type): Set DECL_IGNORED_P. + * decl2.c (get_guard): Likewise. + * rtti.c (get_tinfo_decl, build_lang_decl): Likewise. + * tree.c (build_local_temp): Likewise. + +2004-12-30 Mark Mitchell + + * cp-tree.h (cp_declarator): Split "name" field into + qualifying_scope and unqualified_name. + * decl.c (get_scope_of_declarator): Adjust accordingly. + (grokdeclarator): Likewise. + * decl2.c (grokfield): Likewise, and adjust call to + do_class_using_decl. + * name-lookup.c (do_class_using_decl): Split "decl" into + "scope" and "name". Remove unnecessary code. + * name-lookup.h (do_class_using_decl): Adjust declaration. + * parser.c (make_id_declarator): Split "id" into qualifying_scope + and unqualified_name. + (cp_parser_using_declaration): Adjust call to do_class_using_decl. + (cp_parser_direct_declarator): Adjust to handle the fact that + cp_parser_declarator_id no longer returns a SCOPE_REF. + (cp_parser_direct_declarator): Likewise. + (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified + names. + (cp_parser_member_declaration): Adjust call to make_id_declarator. + (cp_parser_check_declarator_template_parameters): Do not expect a + SCOPE_REF. + + * decl.c (duplicate_decls): Call ggc_free on declarations we will + not be needing any longer. + + PR c++/19190 + * cvt.c (convert_to_void): Do not use STRIP_NOPs. + +2004-12-28 Richard Henderson + + PR inline-asm/15740 + * semantics.c (finish_asm_stmt): Resolve asm names. Validate input + constraints. Mark memory inputs addressable. + +2004-12-27 Jason Merrill + + * decl.c (expand_static_init): Don't use shortcut if + targetm.relaxed_ordering. + +2004-12-27 Mark Mitchell + + PR c++/19149 + * decl.c (check_tag_decl): Robustify. + +2004-12-23 Mark Mitchell + + PR c++/17595 + * parser.c (cp_parser_error): Issue better messages about + #pragma in locations where it is not permitted. + + PR c++/17413 + * pt.c (check_instantiated_args): Remove bogus SFINAE code. + + * cvt.c (convert_to_void): Fix typo in comment. + +2004-12-23 Alexandre Oliva + + PR c++/18962 + * pt.c (check_explicit_specialization): Use the argument list from + the definition in a template function specialization definition. + +2004-12-23 Giovanni Bajo + + PR c++/18733 + * pt.c (check_explicit_specialization): Use special logic to validate + befriended specializations. + +2004-12-22 Mark Mitchell + + * rtti.c (emit_support_tinfos): Avoid using C99 semantics. + + PR c++/18464 + * call.c (build_this): In templates, do not bother with + build_unary_op. + * typeck.c (unary_complex_lvalue): In a template, always refuse + simplifications. + + PR c++/18492 + * cp-gimplify.c (cp_genericize): Relax assertion. + + PR c++/11224 + * cvt.c (convert_to_void): Warn about unused values. + + PR c++/18257 + * rtti.c (emit_support_tinfos): On systems without weak symbols, + emit the runtime library type-info objects as non-COMDAT. + +2004-12-21 Mark Mitchell + + PR c++/18378 + * call.c (convert_like_real): Do not permit the use of a copy + constructor to copy a packed field. + + PR c++/19063 + * decl.c (grokdeclarator): Return error_mark_node, not + void_type_node, to indicate errors. + * parser.c (cp_parser_template_parameter_list): Robustify. + (cp_parser_template_parameter): Likewise. + + PR c++/19034 + * tree.c (cp_tree_equal): Handle OVERLOAD. + +2004-12-22 Volker Reichelt + + * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN. + * name-lookup.c (pushdecl_class_level): Likewise. + +2004-12-21 Volker Reichelt + + * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN. + +2004-12-21 Andrew Pinski + + PR c++/18984 + * cp-gimplify.c (cp_genericize_r): Don't insert first but instead + check to see if contains the pointer. Insert the statement before + returning. + +2004-12-21 Nathan Sidwell + + PR c++/14075 + * decl.c (check_initializer): Check string initializer of array is + not parenthesized. + * cp-tree.h (PAREN_STRING_LITERAL_P): New. + * semantics.c (finish_parenthesized_expr): Mark a STRING_CST. + * error.c (dump_expr): Add parens, if needed. + + * cp-tree.def (TEMPLATE_TYPE_PARM, + BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder + for better code efficiency. + * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check. + (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization. + (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P, + INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P, + CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P, + TYPE_PTROBV_P): Likewise. + + PR c++/18975 + * method.c (do_build_copy_constructor): Refactor. Don't const + qualify a mutable field. + (do_build_assign_ref): Likewise. + +2004-12-20 Matt Austern + + PR c++/19044 + * decl.c (make_rtl_for_nonlocal_decl): Use + set_builtin_user_assembler_name. + +2004-12-19 Mark Mitchell + + * cp-tree.h (note_decl_for_pch): New function. + * class.c (build_clone): Call note_decl_for_pch. + * semantics.c (finish_member_declaration): Likewise. + (note_decl_for_pch): New function. + +2004-12-17 Steven Bosscher + + * init.c (build_zero_init): max_index is the number of + elements, minus 1. + +2004-12-17 Nathan Sidwell + + PR c++/18721 + * class.c (add_method): Do not push conversion operators into a + binding level. + + * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat. + * error.c (dump_decl): Remove extraneous braces. + +2004-12-16 Nathan Sidwell + + PR c++/18905 + * cp-tree.h (integral_constant_value): Declare. + * call.c (null_ptr_cst_p): Use integral_constant_value, not + decl_constant_value. + (convert_like_real): Likewise. + * class.c (check_bitfield_decl): Likewise. + * cvt.c (ocp_convert): Likewise. + (convert): Remove unnecessary decl_constant_value call. + * decl.c (compute_array_index_type): Use integral_constant_value, + not decl_constant_value. + (build_enumerator): Likewise. + * decl2.c (grokfield): Likewise. + * init.c (decl_constant_value): Simplify. + (integral_constant_value): New. + * pt.c (fold_decl_constant_value): Use integral_constant_value, + remove subsequent check. + (tsubst): Use integral_constant_value, not decl_constant_value. + (tsubst_copy, unify): Likewise. + * typeck.c (decay_conversion): Likewise. + (build_compound_expr): Remove unnecessary decl_constant_value + calls. + (build_static_cast_1, build_reinterpret_cast_1): + (convert_for_assignment): Remove comment about not calling + decl_constant_value. + +2004-12-15 Kriang Lerdsuwanakij + + PR c++/18825 + * pt.c (instantiate_class_template): Set input_location for + friend function. + (tsubst_friend_function): Don't set input_location here. + Make sure the context is complete if necessary. + +2004-12-15 Nathan Sidwell + + PR c++/18981 + * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE + flag setting. + +2004-12-14 Mark Mitchell + + PR c++/18738 + * decl.c (make_typename_type): Do not handle namespace-scoped + names here. + (tag_name): Handle typename_type. + (check_elaborated_type_specifier): Handle typenames. + * parser.c (cp_parser_diagnose_invalid_type_name): Improve + comment. + (cp_parser_elaborated_type_specifier): Use + cp_parser_diagnose_invalid_type_name. + +2004-12-14 Andrew Pinski + + PR c++/18965 + * init.c (build_zero_init): If the max_index is 0, there is no + need to create a RANGE_EXPR. + +2004-12-14 Mark Mitchell + + PR c++/18793 + * cp-objcp-common.c (cp_expr_size): Loosen assertion. + +2004-12-14 Nathan Sidwell + + PR c++/18949 + * pt.c (tsubst_copy_and_build): Check that a + REFERENCE_REF_P is dereferencing a reference type. + * typeck.c (build_static_cast): Convert from reference even in a + template. + (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise. + +2004-12-14 Volker Reichelt + + * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function. + (cp_parser_name_lookup_error): Use it. + (cp_parser_check_for_invalid_template_id): Likewise. + (cp_parser_skip_to_closing_parenthesis): Likewise. + (cp_parser_nested_name_specifier_opt): Likewise. + (cp_parser_simple_declaration, cp_parser_template_id): Likewise. + (cp_parser_parameter_declaration_list): Likewise. + (cp_parser_parameter_declaration): Likewise. + (cp_parser_template_name): Let cp_parser_simulate_error perform + the checking. + (cp_parser_committed_to_tentative_parse): Remove. + +2004-12-13 Andrew Pinski + + PR c++/18968 + * class.c (build_base_path): Convert the zero constant to the correct + type when comparing. + +2004-12-13 Mark Mitchell + + PR c++/18925 + * class.c (layout_class_type): Determine the visibility of static + data members. + +2004-12-12 Roger Sayle + + PR middle-end/12454 + * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the + condition is a constant and the unexecuted clause is empty. + +2004-12-10 Volker Reichelt + + PR c++/18731 + * parser.c (cp_parser_class_head): Reject typedef-name in class head. + +2004-12-09 Matt Austern + + PR c++/18514 + * name-lookup.c (do_nonmember_using_decl): A real function + declaration takes precedence over an anticipated declaration. + +2004-12-09 Volker Reichelt + + * parser.c (cp_parser_member_declaration): Fix comment typo. + +2004-12-09 Alexandre Oliva + + PR c++/18757 + * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID + if parsing failed. + +2004-12-09 Volker Reichelt + + PR c++/18073 + * typeck.c (build_reinterpret_cast_1): Allow cast from vector type. + +2004-12-09 Nathan Sidwell + + PR c++/16681 + * init.c (build_zero_init): Build a RANGE_EXPR for an array + initializer. + +2004-12-08 Kelley Cook + + * typeck.c: Remove DOS line endings. + +2004-12-08 Kriang Lerdsuwanakij + + PR c++/18100 + * decl.c (lookup_and_check_tag): Diagnose nested class with + the same name as enclosing class. + +2004-12-08 Nathan Sidwell + + PR c++/18803 + * cp-tree.h (REFERENCE_REF_P): New. + (CPTI_TYPE_INFO_TYPE): Rename to ... + (CPTI_CONST_TYPE_INFO_TYPE): ... here. + (CPTI_TYPE_INFO_REF_TYPE): Remove. + (type_info_type_node): Rename to ... + (const_type_info_type_node): ... here. + (type_info_ref_type): Remove. + * call.c (build_user_type_conversion): Reformat. + (resolve_args): Do not convert_from_reference. + (build_object_call): Call convert_from_reference. + (prep_operand): Do not convert_from_reference. + (build_new_method_call): Likewise. + * class.c (build_vfield_ref): Likewise. + * cvt.c (convert_to_reference): Likewise. + (convert_from_reference): Build INDIRECT_REF here, not with + build_indirect_ref. + (convert_force): Do not convert_from_reference. + (build_expr_type_conversion): Likewise. + * decl.c (grok_reference_init): Likewise. + * decl2.c (delete_sanity): Likewise. + * except.c (initialize_handler_parm): Use POINTER_TYPE_P. + * init.c (build_dtor_call): Do not convert_from_reference. + * parser.c (cp_parser_template_argument): Unwrap indirected + reference. Allow TEMPLATE_PARM_INDEX as an object parm. + * pt.c (tsubst_copy_and_build) : Use + convert_from_reference, if indicated. + : Do not convert_from_reference. + : Convert_from_reference if needed. + (tsubst_initializer_list): Do not convert_from_reference. + * rtti.c (init_rtti_processing): Adjust node creation. + (throw_bad_typeid): Use const_type_info_type_node. + Do not convert_from_reference. + (typeid_ok_p): Use const_type_info_type_node. + (build_typeid, get_typeid): Always return type_info typed node. + (build_dynamic_cast_1): Dont convert_from_reference. Refactor. + * semantics.c (finish_stmt_expr_expr): Do not + convert_from_reference. + (finish_id_expression): Convert_from_reference as appropriate. + * typeck.c (decay_conversion): Do not convert_from_reference. + (finish_class_member_access_expr): Likewise. + (build_indirect_ref): Use POINTER_TYPE_P. + (convert_arguments): Do not convert_from_reference. + (build_modify_expr): Likewise. + (convert_for_initialization): Likewise. + * typeck2.c (build_x_arrow): Likewise. + +2004-12-07 Ziemowit Laski + + * cp-tree.h (struct lang_type_class): Rename 'objc_protocols' + field to 'objc_info'. + +2004-12-07 Kazu Hirata + + * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH. + +2004-12-07 Roger Sayle + + * name-lookup.c (leave_scope): We only need to update + class_binding_level when leaving a class scope. + +2004-12-06 Ziemowit Laski + + * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field. + +2004-12-04 Kriang Lerdsuwanakij + + PR c++/17011, c++/17971 + * pt.c (tsubst_copy) : Check and diagnose + invalid field. + (tsubst_copy_and_build) : Check + error_mark_node after member substitution. + * semantics.c (finish_id_expression): Call + finish_non_static_data_member for non-dependent FIELD_DECL. + +2004-12-03 Nathan Sidwell + + PR c++/18782 + * decl.c (grokdeclarator): Make sure class in pointer to member is + not a namespace. + +2004-12-02 Nathan Sidwell + + PR c++/18318 + * parser.c (cp_parser_new_type_id): Move array size expression + checks from here ... + * init.c (build_new): ... to here. + +2004-12-02 Nathan Sidwell + + PR c++/18758 + * parser.c (cp_parser_class_head): Return NULL_TREE when + push_template_decl fails. Update comment. + +2004-12-02 Kriang Lerdsuwanakij + + PR c++/15664, c++/18276 + * pt.c (tsubst_decl) : Reorganize. Correctly + tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM. + +2004-12-02 Kriang Lerdsuwanakij + + PR c++/18123 + * parser.c (cp_parser_type_specifier): Catch template declaration + of enum. + +2004-12-01 Matt Austern + + * name-lookup.c (namespace_binding): Omit alias check for global + namespace. + +2004-12-01 Nathan Sidwell + + PR c++/18729 + * parser.c (cp_parser_class_name): Check decl's type is not + error_mark_node. + + PR c++/17431 + * call.c (standard_conversion): Add FLAGS parameter. Do not allow + derived to base conversion when checking constructor + accessibility. + (implicit_conversion): Pass FLAGS to standard_conversion. + (check_constructir_callable): Disallow conversion functions. + +2004-11-30 Kazu Hirata + + * parser.c: Fix comment typos. + +2004-11-27 Mark Mitchell + + PR c++/18368 + * parser.c (cp_parser_check_for_definition_in_return_type): Take + the defined type as a parameter, and inform the user about the + possibility of a missing semicolon. + (cp_parser_explicit_instantiation): Adjust call to + cp_parser_check_for_definition_in_return_type. + (cp_parser_init_declarator): Likewise. + (cp_parser_member_declaration): Likewise. + + PR c++/18674 + * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit + typename from comments. + * cp-tree.h (TYPENAME_IS_ENUM_P): New macro. + (TYPENAME_IS_CLASS_P): Likewise. + (make_typename_type): Change prototype. + * decl.c (struct_typename_info): New type. + (typename_compare): Expect the second argument to be a + typename_info, not a tree. + (build_typename_type): Add tag_type parameter. Do not create a + new type until necessary. + (make_typename_type): Add tag_type parameter. + * error.c (TYPENAME_TYPE): Print tags other than "typename" if + appropriate. + * friend.c (make_friend_class): Adjust call to make_typename_type. + * parser.c (cp_parser_make_typename_type): Likewise. + (cp_parser_primary_expression): Adjust call to + cp_parser_lookup_name. + (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name. + (cp_parser_class_or_namespace_name): Likewise. + (cp_parser_postfix_expression): Adjust calls to + make_typename_type. + (cp_parser_mem_initializer_id): Adjust calls to + cp_parser_class_name. + (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name. + (cp_parser_template_name): Likewise. + (cp_parser_template_argument): Likewise. + (cp_parser_type_name): Adjust call to cp_parser_class_name. + (cp_parser_elaborated_type_specifier): Adjust calls to + make_typename_type and cp_parser_lookup_name. + (cp_parser_namespace_name): Likewise. + (cp_parser_class_name): Replace type_p parameter with tag_type. + Adjust calls to make_typename_type and cp_parser_lookup_name. + (cp_parser_class_head): Adjust calls to cp_parser_class_name. + (cp_parser_base_specifier): Likewise. + (cp_parser_lookup_name): Replace is_type parameter with tag_type. + Adjust calls to make_typename_type and lookup_qualified_name. + (cp_parser_lookup_name_simple): Adjust call to + cp_parser_lookup_name. + (cp_parser_constructor_declarator_p): Adjust call to + cp_parser_class_name. + * pt.c (convert_template_argument): Adjust all to + make_typename_type. + (tsubst_decl): Do not pre-substitute the type of the declaration. + (tsubst): Hand off declarations more quickly. Adjust call to + make_typename_type. + + PR c++/18512 + * parser.c (cp_parser_postfix_dot_deref_expression): Robustify. + +2004-11-29 Daniel Jacobowitz + + PR c/7544 + * Make-lang.in (cp/decl2.o): Update dependencies. + * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks. + +2004-11-29 Kriang Lerdsuwanakij + + PR c++/18652 + * name-lookup.c (pushtag): Change return type to tree. + * cp-tree.h (pushtag): Adjust declaration. + * decl.c (xref_tag, start_enum): Use return value of pushtag. + * pt.c (push_template_decl_real): Return immediately if + pushdecl_namespace_level returns error_mark_node. + +2004-11-27 Kazu Hirata + + * pt.c: Fix a comment typo. + +2004-11-27 Kriang Lerdsuwanakij + + Friend class name lookup 4/n + * class.c (pushclass): Don't call cxx_remember_type_decls. + * cp-tree.h (clear_anon_tags): Remove declaration. + * decl.c (grokdeclarator): Don't call lookup_tag_reverse. + * name-lookup.c (binding_entry_free, binding_table_free): Comment + out functions. + (binding_table_find_anon_type, binding_table_reverse_maybe_remap, + binding_table_remove_anonymous_types, cxx_remember_type_decls, + bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag, + lookup_tag_reverse): Remove + (begin_scope, leave_scope, kept_level_p, print_binding_level): + Don't use type_decls field in cp_binding_level. + (maybe_process_template_type_declaration, pushtag): Set + CLASSTYPE_NESTED_UTDS directly. + * name-lookup.h (binding_table_remove_anonymous_types, + cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove + declaration. + (cp_binding_level): Remove type_decls field. + +2004-11-26 Kazu Hirata + + * typeck.c: Fix a comment typo. + +2004-11-25 Mark Mitchell + + PR c++/18445 + * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with + unknown_type as non matching. Tidy up. + * pt.c (build_non_dependent_expr): Do not build a + NON_DEPENDENT_EXPR for a VAR_DECL. + + PR c++/18001 + * cp-tree.h (lvalue_or_else): Remove declaration. + * tree.c (lvalue_or_else): Remove. + * typeck.c (build_unary_op): Adjust call to lvalue_or_else. + (build_modify_expr): Likewise. + + PR c++/18625 + * decl.c (duplicate_decls): Return error_mark_node on error, as + specified. + + PR c++/18466 + * decl.c (grokvardecl): Keep track of whether or not a there was + explicit qualification. + * name-lookup.c (set_decl_namespace): Complain about explicit + qualification of a name within its own namespace. + + PR c++/18545 + * typeck.c (check_return_expr): Robustify. + +2004-11-25 Kriang Lerdsuwanakij + + Friend class name lookup 3/n, PR c++/3332 + * name-lookup.c (push_inner_scope, pop_inner_scope): New functions. + (lookup_type_scope): Don't deal with name from user declaration + specially. + * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations. + * parser.c (cp_parser_class_specifier): Use push_inner_scope and + pop_inner_scope. + +2004-11-25 Kriang Lerdsuwanakij + + Friend class name lookup 2/n, PR c++/14513, c++/15410 + * name-lookup.c (lookup_name_real): Simplify. + (lookup_type_scope): Add SCOPE parameter. Handle friend class + lookup. + * name-lookup.h (tag_scope): New enum type. + (lookup_type_scope): Adjust declaration. + * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type): + Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE. + (start_enum): Likewise. Add assertion test that NAME is + IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in + case of error. + * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations. + * parser.c (cp_parser_elaborated_type_specifier, + cp_parser_class_head): Adjust call to xref_tag. + * pt.c (lookup_template_class, instantiate_class_template): + Likewise. + * rtti.c (init_rtti_processing, build_dynamic_cast_1, + tinfo_base_init, emit_support_tinfos): Likewise. + +2004-11-25 Joseph S. Myers + + * g++spec.c, lex.c: Avoid ` as left quote in diagnostics. + +2004-11-24 Mark Mitchell + + PR c++/17473 + * name-lookup.c (supplement_binding): Do not allow typedefs to be + redefined in class scope. + + PR c++/18285 + * parser.c (cp_parser_set_decl_type_spec): Do not try to allow + redefinitions of builtin types other that "bool" or "wchar_t". + +2004-11-24 Steven Bosscher + + * decl.c (cxx_init_decl_processing): Don't clear + flag_inline_functions. + +2004-11-24 Mark Mitchell + + * pt.c (tsubst_function_type): Do not permit function types which + return arrays or functions. + + PR c++/18586 + * parser.c (cp_parser_init_declarator): Do not pop scope twice. + + PR c++/18530 + * cp-tree.h (CTOR_NAME): Remove. + (DTOR_NAME): Remove. + * decl.c (initialize_predefined_identifiers): Add spaces to the + end of constructor and destructor names. + +2004-11-24 Giovanni Bajo + + PR c++/8929 + * decl.c (start_decl): Check for invalid specialization headers. + +2004-11-24 Paolo Bonzini + + PR c++/16882 + + * call.c (standard_conversion): Move check for conversions between + vector pointers... + * typeck.c (ptr_reasonably_similar): ... here. + +2004-11-23 Ben Elliston + + * cp-tree.h (context_as_string): Remove extern. + * error.c (context_as_string): Remove. + + * cp-tree.h (cp_type_qual_from_rid): Remove extern. + * lex.c (cp_type_qual_from_rid): Remove. + + * cp-tree.h (do_poplevel): Remove extern. + (check_multiple_declarators): Likewise. + * semantics.c (do_poplevel): Make static. + (check_multiple_declarators): Remove. + + * cp-tree.h (check_final_overrider): Remove extern. + * search.c (check_final_overrider): Make static. + + * cp-tree.h (build_artificial_parm): Remove extern. + * decl2.c (build_artificial_parm): Make static. + +2004-11-22 Giovanni Bajo + + PR c++/18354 + * typeck.c (build_unary_op) : Unify code. + Make sure the result is always a rvalue. + +2004-11-16 Giovanni Bajo + + * decl.c (start_preparsed_function): Call check_function_type even + in templates. + (require_complete_types_for_parms): Skip dependent types. + (check_function_type): Likewise. + +2004-11-16 Steven Bosscher + + * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h. + * search.c: Don't include it. + +2004-11-15 Andrew Pinski + + * cp-gimplify.c: Include pointer-set.h + (cp_genericize_r): Use pointer_sets instead of a hashtable. + Also instert the new statement for CLEANUP_STMT. + (cp_genericize): Use pointer_sets instead of a hashtable. + * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h. + +2004-11-15 Kriang Lerdsuwanakij + + Friend class name lookup 1/n, PR c++/18471 + * decl.c (lookup_and_check_tag): New function. + (xref_tag, start_enum): Use it. + (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check + before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared + location. + * name-lookup.c (lookup_name_current_level): Rename to ... + (lookup_name_innermost_nonclass_level): ... this. + (lookup_type_scope): New function. + * name-lookup.h (lookup_name_current_level): Rename to ... + (lookup_name_innermost_nonclass_level): ... this. + (lookup_type_scope): Add declaration. + +2004-11-14 Kriang Lerdsuwanakij + + PR c++/17344 + * pt.c (coerce_template_parms): Only emit error message about + invalid template argument when TF_ERROR. + +2004-11-12 Mark Mitchell + + PR c++/18389 + * decl.c (start_decl): Make sure to set *pop_scope_p. Return + error_mark_node to indicate errors. + + PR c++/18429 + * parser.c (cp_parser_direct_declarator): Disallow non-constant + array bounds when not inside a function. + + PR c++/18436 + * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an + unqualified name resolves to a member function. + + PR c++/18407 + * pt.c (tsubst_copy_and_build): Handle qualified names used from a + derived class correctly. + + * decl2.c (import_export_decl): Fix typo in comment. + * tree.c (pod_type_p): Likewise. + +2004-11-10 Andrew Pinski + + * typeck.c (cxx_mark_addressable): Add braces around the first if. + +2004-11-10 Adam Nemet + + PR middle-end/18160 + * typeck.c (cxx_mark_addressable): Issue an error if address of an + explicit register variable is requested. + +2004-11-10 Nathan Sidwell + + PR c++/18143 + * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New. + (struct lang_decl_flags): Add thunk_p flag. + (struct lang_decl): Remove separate fixed_offset. Place + cloned_function and fixed_offset into union. + (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust. + (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust. + (THUNK_FIXED_OFFSET): Adjust. + * method.c (make_thunk): Adjust. + +2004-11-09 Mark Mitchell + + PR c++/18369 + * init.c (build_new_1): Handle parenthesized type-ids that name an + array type. Tidy. + +2004-11-09 Joseph S. Myers + + * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c, + pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for + quoting in diagnostics. + * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for + quoting in printf format. + * decl.c (duplicate_decls, start_decl): Use %qD instead of + unquoted %D. + +2004-11-08 Kazu Hirata + + * 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 + + PR tree-optimization/18184 + * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers + of different modes or alias-all flags as equivalent. + * typeck.c (comptypes): Likewise. + +2004-11-04 Giovanni Bajo + + DR 49, 100 + * cp-tree.h (TYPE_REF_OBJ_P): New macro. + (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P, + TYPE_REFFN_P): Document. + (fold_decl_constant_value): New prototype. + * pt.c (convert_nontype_argument_function): Rewrite and extract + parts into... + (fold_decl_constant_value, convert_nontype_argument_function): New. + (lookup_template_class): Add comment about useless double call. + * mangle.c (write_expression): Strip conversions before lowering + pointer to members. + * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow + enum to enum conversion. + +2004-11-02 Mark Mitchell + + PR c++/18124 + * parser.c (cp_parser_type_parameter): Robustify. + + PR c++/18155 + * parser.c (cp_parser_single_declaration): Disallow template + typedefs. + + PR c++/18177 + * typeck.c (build_const_cast): Use error_operand_p. + +2004-11-02 Ziemowit Laski + + * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition. + (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h. + * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here + from cp-lang.c. + * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here + from cp-lang.c. + (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c. + +2004-11-01 Nathan Sidwell + + PR c++/18064 + * search.c (check_final_overrider): Deprecate gnu covariant extension. + +2004-10-31 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 9/n + * typeck.c (build_x_unary_op, convert_member_func_to_ptr, + get_delta_difference): Use new quotation style. + * repo.c (reopen_repo_file_for_write): Likewise. + * pt.c (do_type_instantiation): Likewise. + * parser.c (cp_parser_diagnose_invalid_type_name): + * name-lookup.c (push_overloaded_decl, set_decl_namespace): + * error.c (cp_print_error_function, + print_instantiation_full_context): Likewise. + * decl.c (define_label, grok_reference_init, + maybe_deduce_size_from_array_init, revert_static_member_fn): + * decl2.c (check_classfn): Likewise. + * class.c (add_method, check_field_decls, layout_class_type, + resolve_address_of_overloaded_function): Likewise. + * call.c (build_x_va_arg, build_over_call): Likewise. + +2004-10-31 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 8/n + * cvt.c (cp_convert_to_pointer, warn_ref_binding, + convert_to_reference, ocp_convert, convert_to_void + cp_convert_to_pointer): Use new quotation style. + +2004-10-31 Mark Mitchell + + PR c++/15172 + * typeck2.c (store_init_value): Use split_nonconstant_init even + for types that require construction. + +1004-10-28 Matt Austern + + PR c++/17542 + * cp-tree.h (class_key_or_enum_as_string): Declare. + * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string + and remove static qualifier. + * decl.c (shadow_tag): Warn about ignored attributes in class/struct/ + union/enum declaration. + +2004-10-29 Kazu Hirata + + * pt.c: Fix a comment typo. + +2004-10-28 Nathan Sidwell + + * typeck.c (composite_pointer_type): Remove comment about DR 195. + (build_reinterpret_cast_1): Revert DR195 patch. Only emit a + warning when being pedantic. + (build_reinterpet_cast, build_c_cast): Adjust. + +2004-10-29 Mark Mitchell + + PR c++/17695 + * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they + appear in a constructor/destructor that will be cloned. + +1004-10-28 Matt Austern + + PR c++/14124 + * decl.c (finish_enum): Handle packed attribute. + * parser.c (cp_parser_enum_specifier): Process trailing attributes. + +2004-10-28 Mark Mitchell + + PR c++/17132 + * pt.c (instantiate_class_template): Increment + processing_template_decl when substituting into a member class + template. + +2004-10-27 Mark Mitchell + + PR c++/17435 + * call.c (convert_like_real): Fix formatting. + (initialize_reference): When binding a temporary to a base class, + ensure that the nominal copy made is to the derived class, not the + base class. + + PR c++/18140 + * parser.c (cp_parser_next_token_ends_template_argument_p): Do not + include ">>". + +2004-10-27 Andrew Pinski + + * decl.c (bad_specifiers): Move the q after the %. + +2004-10-27 Andrew Pinski + + * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after + the %. + +2004-10-26 Mark Mitchell + + * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT. + * search.c (current_scope): Fix prototype. + + PR c++/18093 + * search.c (current_scope): Return the innermost non-block scope, + not the innermost non-block, non-namespace scope. + (at_namespace_scope_p): Adjust accordingly. + (dfs_accessible_post): Do not pass namespaces to is_friend. + (dfs_walk_once_accessible_r): Likewise. + * decl.c (grokvardecl): Adjust call to current_scope. + (build_enumerator): Likewise. + * parser.c (cp_parser_using_declaration): Likewise. + (cp_parser_direct_declarator): Use at_namespace_scope_p instead of + current_scope. + (cp_parser_class_head): Adjust call to current_scope. + * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the + alias. + + PR c++/18020 + * pt.c (tusbst_copy_and_build): Resolve enumeration constants to + their underlying values. + + PR c++/18161 + * typeck.c (build_binary_op): Honor build_type, even when in a + template. + +2004-10-26 Nathan Sidwell + + * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded + padding token checking. + +2004-10-25 Andrew Pinski + + PR c++/18121 + * decl.c (grokdeclarator) : Remove the call + layout_type as it is already done by create_array_type_for_decl. + +2004-10-22 Nathan Sidwell + + PR c++/18095 + * parser.c (eof_token): Make const, correctly initialize rid and + location fields. + (struct cp_lexer): Replace buffer_end pointer with buffer_length + count. Adjust. + (cp_lexer_new_main): Directly grow lexer's buffer here. Don't + zero it out. + (cp_lexer_new_from_tokens): Adjust. + (cp_lexer_grow_buffer): Remove. + (cp_lexer_peek_nth_token, cp_lexer_consume_token, + cp_lexer_purge_token): Add const casts. + +2004-10-21 Mark Mitchell + + PR c++/18073 + PR c++/10841 + * cp-tree.h (convert_to_base): Change prototype. + (build_ptrmemfunc): Likewise. + (convert_ptrmem): New function. + * call.c (struct conversion): Adjust documentation for base_p. + (standard_conversion): Set base_p for ck_pmem conversions as + appropriate. + (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr + conversions. + * class.c (convert_to_base): Handle both pointers and objects. + Add nonnull parameter. + (build_vfield_ref): Adjust call to convert_to_base. + * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc. + (convert_force): Likewise. + * typeck.c (build_unary_op): Likewise. + (convert_ptrmem): New function. + (build_static_cast_1): Use it. + (build_reinterpret_cast): Allow conversions to vector types. + (get_delta_difference): Add c_cast_p parameter. + (build_ptrmemfunc): Likewise. Adjust calls to + get_delta_difference. + +2004-10-21 Andrew Pinski + + PR c++/13560 + * error.c (cp_error_at): Output the context as it might be + different file as the other location. + +2004-10-21 Kazu Hirata + + * typeck.c: Fix a comment typo. + +2004-10-20 Kriang Lerdsuwanakij + + PR c++/13495 + * decl.c (make_unbound_class_template): Add PARM_LIST parameter. + * cp-tree.h (make_unbound_class_template): Adjust prototype. + * parser.c (cp_parser_lookup_name): Adjust call to + make_unbound_class_template. + (cp_parser_single_declaration): Handle member class of class + template as template friend parsing correctly. + * friend.c (is_friend): Call is_specialization_of_friend for + template friend class. + (make_friend_class): Handle member class of class template as + template friend. + * pt.c (is_specialization_of_friend): Likewise. + (instantiate_class_template): Likewise. + (tsubst): Adjust call to make_unbound_class_template. + +2004-10-20 Nathan Sidwell + + * typeck.c (composite_pointer_type): Add comment about DR 195 + (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter. + Allow function pointer conversions that DR195 suggests. + (build_reinterpret_cast, build_c_cast): Update + build_reinterpret_cast_1 calls. + +2004-10-20 Kazu Hirata + + * call.c, typeck.c: Fix comment typos. + +2004-10-20 Nathan Sidwell + + * parser.c (cp_token_position): New typedef. Define VEC thereof. + (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make + next_token and last_token cp_token_position. Make saved_tokens a + VEC(cp_token_position). + (eof_token): New static variable. + (CP_SAVED_TOKENS_SIZE): Rename to ... + (CP_SAVED_TOKEN_STACK): ... here. + (cp_lexer_new_main): Adjust main lexer creation and buffer + filling. + (cp_lexer_new_from_tokens): Do not copy the tokens, merely point + to the parent buffer. Do not append eof token. + (cp_lexer_destroy): Only free buffer if non-NULL. Free token + stack. + (cp_lexer_next_token, cp_lexer_prev_token): Remove. + (cp_lexer_token_position, cp_lexer_token_at): New. + (cp_lexer_saving_tokens): Adjust. Make inline. + (cp_lexer_advance_token, cp_lexer_token_difference): Remove. + (cp_lexer_peek_token_emit_debug_info): Fold into ... + (cp_lexer_peek_token): ... here. + (cp_lexer_peek_nth_token): Don't peek past EOF. + (cp_lexer_consume_token): Set next_token to eof_token, if reaching + EOF. + (cp_lexer_purge_token): Adjust eof setting. + (cp_lexer_purge_tokens_after): Likewise. + (cp_lexer_save_tokens): Push next_token directly. + (cp_lexer_commit_tokens): Adjust. + (cp_lexer_rollback_tokens): Pop next_token directly. + (cp_parser_check_for_invalid_template_id): Adjust token purging. + (cp_parser_translation_unit): Do not consume the EOF. + (cp_parser_nested_name_specifier_opt): Adjust token purging. + (cp_parser_template_id, cp_parser_template_name): Likewise. + +2004-10-19 Mark Mitchell + + PR c++/14035 + * call.c (struct conversion): Add base_p. + (convert_like): Add c_cast_p argument. + (convert_like_with_conversion): Likewise. + (build_conv): Clear base_p. + (standard_conversion): Set it, for derived-to-base conversions. + (convert_like_real): Add c_cast_p parameter. Handle pointer + conversions directly rather than relying on ocp_convert. + (perform_direct_initialization_if_possible): Add c_cast_p + parameter. + * cp-tree.h (perform_direct_initialization_if_possible): Change + prototype. + (convert_member_func_to_ptr): New function. + * typeck.c (check_for_casting_away_constness): Add diag_fn + parameter. + (build_static_cast_1): New function, split out from ... + (build_static_cast): ... here. Use build_static_cast_1. + (build_reinterpret_cast_1): New function, split out from ... + (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1. + (build_const_cast_1): New function, split out from ... + (build_const_cast): ... here. Use build_const_cast_1. + (build_c_cast): Rewrite to use build_const_cast_1, + build_static_cast_1, and build_reinterpret_cast_1. + (convert_member_func_to_ptr): New function. + +2004-10-19 Paolo Bonzini + + PR c++/18047 + * parser.c (enum cp_parser_prec): Give relational expressions + a higher precedence than equality expressions. + +2004-10-15 Nathan Sidwell + + * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call. + (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove. + (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call. + (enum base_access): Reorganize. + (accessible_base_p, accessible_p): Add consider_local_p parameter. + * call.c (standard_conversion): Update comment about + DERIVED_FROM_P. + (enforce_access): Adjust accessible_p call. + (build_over_call): Adjust accessible_base_p call. + * class.c (convert_to_base): Adjust lookup_base call. + (build_vtbl_ref_1): Likewise. + (warn_about_ambiguous_bases): Likewise. Add early exit. + * cvt.c (convert_to_pointer_force) Adjust lookup_base call. + * search.c (accessible_base_p): Add consider_local_p parameter. + (lookup_base): Pass consider_local_p to accessible_base_p call. + (friend_accessible_p): Check whether scope is a class member. + Remove unnecessary class template check. + (accessible_p): Add consider_local_p parameter. Use it. + (adjust_result_of_qualified_name_lookup): Adjust lookup_base call. + * tree.c (maybe_dummy_object): Likewise. + * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P. + (build_class_member_access_expr): Adjust lookup_base call. + * typeck2.c (binfo_or_else): Likewise. + * rtti.c (build_dynamic_cast_1): Access can consider friendship + and current scope. + +2004-10-17 Giovanni Bajo + + PR c++/17743 + * decl2.c (grokfield): Apply attributes also to TYPE_DECLs. + +2004-10-16 Giovanni Bajo + + PR c++/10479 + * parser.c (cp_parser_parenthesized_expression_list): Fold + non-dependent expressions in attribute lists. + +2004-10-15 Mark Mitchell + + PR c++/17042 + * decl.c (declare_global_var): Use the return value from pushdecl. + + PR c++/14667 + * parser.c (cp_parser_simple_declaration): Do not diagnose invalid + type names if we have already found a valid type. + (cp_parser_member_declaration): Likewise. + + PR c++/17916 + * parser.c (cp_parser_member_specification_opt): Handle + CPP_PRAGMA. + +2004-10-15 Kazu Hirata + + * dump.c, g++spec.c, repo.c: Update copyright. + +2004-10-15 Kazu Hirata + + * decl.c: Fix a comment typo. + +2004-10-13 Andrew Pinski + + PR c++/16301 + * name-lookup.c (parse_using_directive): If we have a + error_mark_node, do not set the decl namespace associations + on it. + +2004-10-14 Mark Mitchell + + PR c++/17976 + * decl.c (cp_finish_decl): Do not call expand_static_init more + than once for a single variable. + +2004-10-14 Matt Austern + + * Make-lang.in (pt.o): depends on pointer-set.h + * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now. + * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t + (for_each_template_parm): Convert from htab_t to pointer_set_t. + * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now. + +2004-10-13 Andrew Pinski + + PR c++/17661 + * semantics.c (finish_for_expr): Convert expression to void + so that we don't create temporaries for a?b:c. + +2004-10-13 Kazu Hirata + + * search.c: Fix a comment typo. + +2004-10-12 Nathan Sidwell + + * class.c (dfs_modify_vtables): Simplify condition. Return + dfs_skip_bases as appropriate. + (modify_all_vtables): Walk in pre-order. + * search.c (dfs_walk_all, dfs_walk_once_r, + dfs_walk_once_accessible_r): Assert post order function never + returns dfs_skip_bases. + + * search.c (struct lookup_base_data_s): New. + (lookup_base_r): Replace with ... + (dfs_lookup_base): ... this. + (lookup_base): Use dfs_walk_all. + +2004-10-12 Kazu Hirata + + * search.c: Fix comment typos. + +2004-10-11 Mark Mitchell + + PR c++/15786 + * parser.c (cp_parser_declarator): Add member_p parameter. + (cp_parser_condition): Adjust calls to cp_parser_declarator. + (cp_parser_explicit_instantiation): Likewise. + (cp_parser_init_declarator): Likewise. + (cp_parser_direct_declarator): Add member_p parameter. Do not + parse tentatively when parsing the parameters to a member. + (cp_parser_type_id): Adjust calls to cp_parser_declarator. + (cp_parser_parameter_declaration): Likewise. + (cp_parser_member_declaration): Likewise. + (cp_parser_exception_declaration): Likewise. + + PR c++/17936 + * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment. + * pt.c (optimize_specialization_lookup_p): Do not optimize lookups + for members of partial or explicit specializations. + + PR c++/17929 + * decl2.c (finish_anon_union): Robustify. + +2004-10-11 Nathan Sidwell + + * cp-tree.h (get_dynamic_cast_base_type): Rename to ... + (dcast_base_hint): ... here. + * rtti.c (build_dynamic_cast_1): Use dcast_base_hint. + * search.c (struct dcast_data_s): New. + (dynamic_cast_base_recurse): Remove. Replace with ... + (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New. + (get_dynamic_cast_base_type): Rename to ... + (dcast_base_hint): ... here. Use dfs_walk_once_accessible. + (accessible_r): Remove. + (dfs_accessible_post): New, broken out of accessible_r. + (accessible_p): Use dfs_walk_once_accessible. + (dfs_walk_once_accessible_r): New. From accessible_r. + (dfs_walk_once_accessible): New. From acessible_p. + + * cp-tree.h (SAME_BINFO_TYPE_P): New. + * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare + binfo types. + (convert_to_base_statically, determine_primary_bases, + update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits, + dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group, + accumulate_vtbl_inits, dfs_accumulate_vtbl_inits, + build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise. + * init.c (expand_member_init): Likewise. + * search.c (lookup_base_r, dynamic_cast_base_recurse, + binfo_via_virtual, copied_binfo, binfo_for_vbase, + original_binfo): Likewise. + * tree.c (copy_binfo): Likewise. + +2004-10-11 Kazu Hirata + + * semantics.c: Fix comment typos. + +2004-10-10 Andrew Pinski + + PR c++/17554 + part of c++/17657 + middle-end/17703 + * semantics.c (maybe_cleanup_point_expr): Call + fold_build_cleanup_point_expr. + (maybe_cleanup_point_expr_void): New function. + (add_decl_expr): Call maybe_cleanup_point_expr_void. + (finish_expr_stmt): Likewise. + (finish_return_stmt): Likewise. + (finish_for_expr): Likewise. + (finish_asm_stmt): Likewise. + * typeck.c (condition_conversion): Call + fold_build_cleanup_point_expr. + +2004-10-10 Andrew Pinski + + PR c++/17907 + * semantics.c (add_decl_expr): If the decl has a size which + has side effects then the decl expression needs a cleanup point. + +2004-10-10 Mark Mitchell + + PR c++/17393 + * decl.c (grokdeclarator): Robustify error-recovery on invalid + declarations. + +2004-10-10 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 7/n + * typeck.c (composite_pointer_type_r, composite_pointer_type, + cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr, + string_conv_p, build_class_member_access_expr, + build_class_member_access_expr, lookup_destructor, + finish_class_member_access_expr, build_indirect_ref, + get_member_function_from_ptrfunc, build_function_call, + convert_arguments, build_binary_op, pointer_diff, build_unary_op, + check_for_casting_away_constness, build_static_cast, + build_reinterpret_cast, build_const_cast, build_c_cast, + build_modify_expr, get_delta_difference, build_ptrmemfunc, + dubious_conversion_warnings, convert_for_assignment, + convert_for_initialization, + maybe_warn_about_returning_address_of_local, check_return_expr): + Use quoting marks. + + * typeck2.c (error_not_base_type, readonly_error, + abstract_virtuals_error, cxx_incomplete_type_diagnostic, + store_init_value, digest_init, build_x_arrow, + build_m_component_ref, require_complete_eh_spec_types): Likewise. + + * tree.c (cp_build_qualified_type_real, + handle_java_interface_attribute, handle_init_priority_attribute): + Likewise. + + * semantics.c (finish_asm_stmt, finish_non_static_data_member, + finish_pseudo_destructor_expr, + check_template_template_default_arg, begin_class_definition, + finish_base_specifier, qualified_name_lookup_error, + finish_id_expression, finish_typeof): Likewise. + + * search.c (lookup_base, check_final_overrider, + look_for_overrides_r): Likewise. + + * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise. + +2004-10-09 Mark Mitchell + + PR c++/17867 + * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a + constructor. + + PR c++/17670 + * init.c (build_new): Correct comments. + * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in + the non-array case. + + PR c++/17821 + * parser.c (cp_parser_postfix_dot_deref_expression): If the + pseduo-destructor-name production does not work, fall back to the + ordinary production. + + PR c++/17826 + * tree.c (cp_tree_equal): Handle a BASELINK. + + PR c++/17524 + * cp-tree.h (check_var_type): New function. + * decl.c (check_var_type): New function, split out from ... + (grokdeclarator): ... here. + * pt.c (tsubst_decl): Use check_var_type. + + PR c++/17685 + * decl.c (grokdeclarator): Disallow declarations of operators as + non-functions. + +2004-10-08 Volker Reichelt + + PR c++/17868 + * error.c (dump_expr): Add missing case for RDIV_EXPR. + +2004-10-08 Kazu Hirata + + * pt.c, search.c: Fix comment typos. + +2004-10-08 Nathan Sidwell + + * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp, + unmarkedp): Remove. + (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New. + * class.c (struct find_final_overrider_data): Remove most_derived, + vpath_list and vpath fields. Add path field. + (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust. + (dfs_find_final_overrider): Rename to ... + (dfs_find_final_overrider_pre): ... here. Adjust. + (dfs_find_final_overrider_post): Adjust. + (dfs_find_final_overrider_q): Fold into + dfs_find_final_overrider_pre. + (find_final_overrider): Adjust dfs searching. + (dfs_modify_vtables): Don't mark binfo here. + (modify_all_vtables): Use dfs_walk_once. + (build_vtt_inits): Likwise. Use dfs_walk_all. + (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here. + Return dfs_skip_bases as appropriate. + (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate. + * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as + appropriate. Don't mark binfo here. + (initialize_vtbl_ptrs): Use dfs_walk_once. + * search.c (struct vbase_info): Remove unused struct. + (access_in_type): Use dfs_walk_once. + (dfs_access_in_type): Don't mark binfo here. + (dfs_accessible_queue_p, dfs_accessible_p) Remove. + Fold into ... + (accessible_r): ... here. New. Specialize dfs_walk_once. + (accessible_p): Use accessible_r. + (lookup_field_queue_p): Remove. Fold into ... + (lookup_field_r): ... here. Adjust. + (lookup_member): Use dfs_walk_all. + (dfs_walk_real, dfs_walk): Replace with ... + (dfs_walk_all, dfs_walk_once): ... these. + (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once. + (dfs_unmark, unmarkedp, markedp): Remove. + (dfs_get_pure_virtuals): Don't mark binfo here. + (get_pure_virtuals): Use dfs_walk_once. + (dfs_debug_unmarked_p): Remove. Fold into ... + (dfs_debug_mark): ... here. + (note_debug_info_needed): Use dfs_walk_all. + +2004-10-07 Andrew Pinski + + * pt.c (tsubst_expr) : Look passed the + CLEANUP_POINT_EXPR to get the asm expression. + +2004-10-07 Mark Mitchell + + * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag. + (DECL_MEMBER_TEMPLATE_P): New macro. + (is_member_template): Remove. + (class_method_index_for_fn): New function. + * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P. + * class.c (finish_struct_methods): Remove out-of-date comment. + * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P. + * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and + class_method_index_for_fn. + * pt.c (is_member_template): Remove. + (is_member_template_class): Likewise. + (optimize_specialization_lookup_p): New function. + (retrieve_specialization): Optimize lookups for members that are + not member templates. + (register_specialization): Adjust accordingly. + (build_template_decl): Add member_template_p parameter. Set + DECL_MEMBER_TEMPLATE_P. + (process_partial_specialization): Adjust call to + retrieve_specialization. + (push_template_decl_real): Determine whether the template is a + member template. + (lookup_template_class): Use retrieve_specialization. + (tsubst_decl): Adjust call to retrieve_specialization. + (tsubst_exception_specification): New function. + (tsubst): Use it. + (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P. + (instantiate_template): Adjust call to retrieve_specialization. + (regenerate_decl_from_template): Do not actually generate a new + DECL. + (instantiate_decl): Adjust call to retrieve_specialization. + (class_method_index_for_fn): New method. + +2004-10-07 Andrew Pinski + + * parser.c (cp_parser_asm_definition): Look passed the + CLEANUP_POINT_EXPR to get the asm expression. + +2004-10-06 Andrew Pinski + + PR c++/17368 + * semantics.c (finish_asm_stmt): Asm expressions need cleanup + also. + +2004-10-05 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 6/n + * pt.c (finish_member_template_decl, check_specialization_scope, + maybe_process_partial_specialization, determine_specialization, + check_explicit_specialization, maybe_check_template_type, + process_partial_specialization, check_default_tmpl_args, + push_template_decl_real, redeclare_class_template, + convert_nontype_argument, coerce_template_parms, + lookup_template_class, push_tinst_level, + instantiate_class_template, tsubst_arg_types, + tsubst_function_type, tsubst, tsubst_qualified_id, + tsubst_copy_and_build, check_instantiated_args, + do_decl_instantiation, do_type_instantiation, + invalid_nontype_parm_type_p, check_specialization_namespace, + convert_template_argument, determine_specialization, + check_template_shadow, tsubst_decl + instantiate_pending_templates): Use quoting marks. + +2004-10-05 Nathan Sidwell + + PR c++/17829 + * parser.c (cp_parser_postfix_expression): Inhibit Koenig when + unqualified lookup finds a member function. + +2004-10-04 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 5/n + * parser.c (cp_parser_name_lookup_error, + cp_parser_diagnose_invalid_type_name, + cp_parser_primary_expression, cp_parser_unqualified_id, + cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, + cp_parser_jump_statement, cp_parser_simple_declaration, + cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, + cp_parser_type_parameter, cp_parser_template_id, + cp_parser_template_name, cp_parser_direct_declarator, + cp_parser_parameter_declaration_list, cp_parser_class_head, + cp_parser_base_specifier, cp_parser_lookup_name, + cp_parser_late_parsing_default_args, + cp_parser_optional_template_keyword + cp_parser_elaborated_type_specifier, cp_parser_check_class_key, + cp_parser_check_access_in_redeclaration): Use quoting marks. + + * name-lookup.c (supplement_binding, pushdecl, + check_for_out_of_scope_variable, validate_nonmember_using_decl, + do_nonmember_using_decl, lookup_tag, set_decl_namespace, + push_namespace, do_namespace_alias, do_using_directive, + ambiguous_decl, lookup_namespace_name, add_function): Likewise. + + * method.c (use_thunk): Likewise. + + * lex.c (unqualified_name_lookup_error, + unqualified_fn_lookup_error): Likewise. + +2004-10-04 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 4/n + * except.c (decl_is_java_type, build_throw, + is_admissible_throw_operand, check_handlers_1, check_handlers): + Use quoting formats. + * friend.c (add_friend, make_friend_class, do_friend): Likewise. + * init.c (sort_mem_initializers, emit_mem_initializers, + member_init_ok_or_else, expand_member_init, is_aggr_type, + build_offset_ref, build_java_class_ref): Likewise. + +2004-10-03 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 3/n + * decl.c (pop_label, duplicate_decls, redeclaration_error_message, + redeclaration_error_message, lookup_label, check_goto, + make_typename_type, make_unbound_class_template, + fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, + grok_reference_init, layout_var_decl, maybe_commonize_var, + check_for_uninitialized_const_var, reshape_init_array, + reshape_init, check_initializer, cp_finish_decl, + member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, + check_static_variable_definition, compute_array_index_type, + create_array_type_for_decl, check_special_function_return_type, + grokdeclarator, check_default_argument, grokparms, + grok_ctor_properties, grok_op_properties, + check_elaborated_type_specifier, xref_tag, finish_enum, + build_enumerator, check_function_type, start_preparsed_function, + store_parm_decls): Use quoting formats. + * decl2.c (grok_array_decl, delete_sanity, check_member_template, + check_java_method, check_classfn, finish_static_data_member_decl, + grokfield, grokbitfield, grok_function_init, + build_anon_union_vars, coerce_new_type, coerce_delete_type, + check_default_args): Likewise. + * parser.c (cp_parser_decl_specifier_seq): Likewise. + +2004-10-03 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 2/n + * class.c (build_base_path, add_method, alter_access, + handle_using_decl, check_bases, + maybe_warn_about_overly_private_class, find_final_overrider, + warn_hidden, finish_struct_anon, add_implicitly_declared_members, + check_bitfield_decl, check_field_decls, layout_empty_base, + build_base_field, check_methods, layout_virtual_bases, + warn_about_ambiguous_bases, layout_class_type, finish_struct_1, + resolve_address_of_overloaded_function, instantiate_type, + note_name_declared_in_class): Use format flag "q" for quoting. + +2004-10-03 Gabriel Dos Reis + + Convert diagnostics to use quoting flag q 1/n + * error.c (locate_error): Ignore quoting flag q. + * call.c (build_user_type_conversion_1, build_operator_new_call, + build_object_call, op_error, build_conditional_expr, + build_new_op, build_op_delete_call, enforce_access, + convert_like_real, convert_arg_to_ellipsis, build_x_va_arg, + convert_default_arg, build_over_call, build_new_method_call, + joust, perform_implicit_conversion, initialize_reference): Use the + quoting flag q. + +2004-10-03 Andrew Pinski + + PR c++/17797 + * typeck.c (build_reinterpret_cast): Return if the inner type + is error_mark_node. + +2004-10-01 Jan Hubicka + + * semantics.c (expand_body): Update call of tree_rest_of_compilation. + +2004-09-30 Nathan Sidwell + + * cp-tree.h (struct lang_decl): Shrink by reordering fields and + turning operator_code and fixed_offset into bitfields. + +2004-09-29 Joseph S. Myers + + * decl.c (duplicate_decls): Merge TREE_DEPRECATED. + +2004-09-29 Jason Merrill + + PR tree-optimization/17697 + * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl. + +2004-09-28 Jason Merrill + + PR middle-end/17525 + * class.c (build_base_field): Set TYPE_MODE. + +2004-09-28 Roger Sayle + + PR driver/17537 + * g++spec.c (lang_specific_driver): Unrecognized libraries, other + than -lc and -lm, may require linking against libstc++. + +2004-09-28 Kazu Hirata + + * tree.c: Fix a comment typo. + +2004-09-28 Nathan Sidwell + + * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove. + (struct secondary_vptr_vtt_init_data_s): New. + (build_vtt_inits): Adjust dfs_walkers. + (dfs_build_secondary_vptr_vtt_inits): Caller data is a + secondary_vptr_vtt_init_data_s structure. Adjust. + (dfs_ctor_vtable_bases_queue_p): Remove. + (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify. + + * pt.c (struct get_template_base_data_s): Remove. + (get_template_base_r): Fold into get_template_base. + (get_template_base): Walk base binfos directly in inheritance + graph order. + +2004-09-27 Mark Mitchell + + PR c++/17642 + * cp-tree.h (fold_if_not_in_template): New function. + * call.c (build_conditional_expr): Use fold_if_not_in_template. + (build_cxx_call): Likewise. + * cvt.c (convert_to_complex): Likewise. + (ocp_convert): Likewise. + (convert): Likewise. + (convert_force): Likewise. + * decl.c (compute_array_index_type): Clear + processing_template_decl while folding array bounds. + * pt.c (convert_nontype_argument): Clear + processing_template_decl while processing non-type argument + initialization. + * tree.c (fold_if_not_in_template): New function. + * typeck.c (build_class_member_access_expr): Use + fold_if_not_in_template. + (build_array_ref): Likewise. + (build_binary_op): Likewise. Do not try to optimize computations + when processing templates. + (cp_pointer_int_sum): Use fold_if_not_in_template. + (pointer_diff): Likewise. + (build_unary_op): Likewise. + (build_reinterpret_cast): Likewise. + (get_delta_difference): Likewise. + (expand_ptrmemfunc_cst): Likewise. + (dubious_conversion_warnings): Likewise. + +2004-09-27 Matt Austern + + * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c + (cp_lexer_get_preprocessor_token): Set implicit_extern_c for + tokens that come from headers that are implicitly extern "C". + (struct cp_parser): new one-bit field, implicit_extern_c. + (cp_parser_new): Set parser's implicit_extern_c to false. + (cp_parser_translation_unit): Pop lang context if we were in a + header that was implicitly extern "C". + (cp_parser_declaration_seq_opt): Push/pop lang context as + required by the token's and parser's implicit_extern_c. + +2004-09-27 Mark Mitchell + + PR c++/17585 + * cp-tree.h (shared_member_p): Declare. + * search.c (shared_member_p): Give it external linkage. + * semantics.c (finish_qualified_id_expr): Use it. + (finish_id_expression): Likewise. + + PR c++/17585 + * semantics.c (finish_id_expression): Do not add "this->" to + static member functions. + +2004-09-27 Nathan Sidwell + + PR c++/17681 + * error.c (dump_type): Change TREE_VEC case into TREE_BINFO. + + * class.c (struct count_depth_data): Remove. + (dfs_depth_post, dfs_depth_q): Remove. + (find_final_overrider): Use number of vbase classes as depth + bound. + + * cp-tree.h (types_overlap_p): Remove. + * search.c (struct overlap_info): Remove. + (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove. + + * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove. + (get_template_base_recursive): Remove. Replace with ... + (get_template_base_r): ... this. + (struct get_template_base_data_s): New. + (get_template_base): Use get_template_base_r via dfs_walk. Always + return NULL on failure. + (unify): Remove error_mark_node check from get_template_base result. + +2004-09-24 Paolo Bonzini + + * parser.c (cp_parser_expression_stack): Clarify why it is + an array of NUM_PREC_VALUES elements. + (cp_parser_binary_expression): Clarify why we do not need to + handle stack overflow. + +2004-09-24 Nathan Sidwell + + PR c++/16889 + * search.c (lookup_field_queue_p): Correct check for hidden base. + + * search.c (bfs_walk): Remove. + (lookup_member): Use dfs_walk_real. + (dfs_walk_real): Move and adjust documentation from bfs_walk. + +2004-09-23 Zack Weinberg + + * decl.c (grokfndecl): If ::main is found not to return int, + correct it after issuing a diagnostic. + (grokdeclarator): If the incoming type was error_mark_node, do + not complain about declaring something with no type. + (start_function): Change check for ::main not returning int to + an assertion, as grokfndecl now catches this when the user did it. + * init.c (perform_member_init, sort_mem_initializers) + (emit_mem_initializers): Make most diagnostics be issued on + the line of current_function_decl, not whatever the current + input line is. + * parser.c (cp_lexer_peek_token_emit_debug_info): Surround + definition and declaration with #ifdef ENABLE_CHECKING. + Avoid unnecessary use of fprintf. + (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub + definitions to avoid warnings. + (cp_lexer_new_main): Add assertion that first token is not a + padding token. + (cp_lexer_new_from_token_array): Fold into ... + (cp_lexer_new_from_tokens): ... here. Add assertion that + first token is not a padding token. + (cp_lexer_set_source_position_from_token): Move nearer to callers. + Remove unused lexer argument. + (cp_lexer_peek_token): Just print debugging report (if enabled) + and return lexer->next_token. + (cp_lexer_skip_purged_tokens): Delete. + (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make + inline, simplify bodies. + (cp_lexer_peek_nth_token): Add debugging report a la + cp_lexer_peek_token. + (cp_lexer_consume_token): Correct commentary. Advance over + purged tokens here. Set current source position here, from + token to be returned. Avoid unnecessary use of fprintf. + (cp_lexer_purge_token): Advance next_token pointer over this and + subsequent purged tokens. + (cp_parser_error): Adjust source position to that of the + peeked token. + (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions. + (cp_parser_string_literal): Remove some excessive cleverness. + (cp_parser_enum_specifier): Call start_enum before consuming + the opening brace. + (cp_parser_member_declaration): Make the "extra semicolon" + diagnostic consistently-worded with the other place this is + diagnosed. Explicitly set the diagnostic location to the + location of the offending semicolon. + (cp_parser_enclosed_template_argument_list): Use % quoting + in diagnostics. Do not use cp_parser_require. Set location + of diagnostics about improper use of '>>' to location of + offending token. + (cp_parser_late_parsing_for_member): + Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer. + (cp_parser_late_parsing_default_args): Likewise. Manually + move some logic outside the loop. + +2004-09-23 Andrew Pinski + + PR c++/17618 + * cvt.c (cp_convert_to_pointer): Return early when the type is + an error_mark_node. + +2004-09-21 Fariborz Jahanian + + PR c++/13989 + PR c++/9844 + * decl.c (grokfndecl): Add new argument "attrlist", use it + to call cplus_decl_attributes. + (start_function): Remove call to cplus_decl_attributes. + * cvt.c (ocp_convert): Add support to use type conversion + function to vector type. + * parser.c (cp_parser_conversion_type_id): Add attributes, if any, + to the parsed type. + +2004-09-23 Paolo Bonzini + + PR c++/17596 + + * parser.c (cp_parser_token_tree_map_node, + cp_parser_pm_expression, cp_parser_additive_expression, + cp_parser_multiplicative_expression, cp_parser_shift_expression, + cp_parser_relational_expression, cp_parser_equality_expression, + cp_parser_and_expression, cp_parser_exclusive_or_expression, + cp_parser_inclusive_or_expression, + cp_parser_logical_and_expression, + cp_parser_logical_or_expression): Removed. + (enum cp_parser_prec, struct cp_parser_token_tree_map_node, + binops, binops_by_token): New. + (cp_parser_assignment_expression): Use cp_parser_binary_expression. + (cp_parser_new): Initialize binops_by_token. + (cp_parser_binary_expression): Rewritten. + (N_CP_TTYPES): New. + +2004-09-23 Kazu Hirata + + * parser.c: Fix a comment typo. + +2004-09-23 Nathan Sidwell + + PR c++/17620 + * decl.c (xref_basetypes): Look through typedefs before checking + for duplicate base. + +2004-09-22 Nathan Sidwell + + * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree). + * decl2.c (cp_finish_file): Adjust tinfo decl emission loop. + * rtti.c (unemitted_tinfo_decls): Make a VEC(tree). + (init_rtti_processing): Initialize it to something realistic. + (get_tinfo_decl): Adjust pushing the new decl. + + * cp-tree.h (struct lang_type_class): Remove marked flags, add + diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks. + (TYPE_MARKED_P): New. + (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New. + (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, + CLEAR_CLASSTYPE_MARKED_N): Remove. + (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*, + CLEAR_CLASSTYPE_MARKED_*): Remove. + * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond + shaped and repeated base properties. + * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET. + * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark, + class_hint_flags): Remove. + (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and + CLASSTYPE_DIAMOND_SHAPED_P. + +2004-09-21 Ziemowit Laski + + * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from + cp-objcp-common.h. + (objcp_tsubst_copy_and_build): Reformat function signature. + * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise. + (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c. + +2004-09-21 Zack Weinberg + + * parser.c (cp_lexer_peek_token, cp_lexer_consume_token): + Don't handle CPP_PRAGMA tokens specially. + (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't + purge the token; do clear token->value after processing. Add + assertion at beginning that token->value is nonzero. + (cp_parser_statement, cp_parser_declaration_seq_opt): Handle + CPP_PRAGMA as a full statement or declaration in its own right. + +2004-09-21 Matt Austern + + PR c++/15049 + * decl.c (grokvardecl): Accept declarations of global variables + using anonymous types. + +2004-09-21 Roger Sayle + + PR c++/7503 + * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues + if either operand has side-effects. + * typeck.c (rationalize_conditional_expr): Assert that neither + operand of MIN_EXPR or MAX_EXPR has side-effects. + (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR. + Check that the "lhs" is a valid lvalue, i.e. that neither operand + of a MIN_EXPR or MAX_EXPR has a side-effect. + +2004-09-21 Nathan Sidwell + + * cp-tree.h (struct lang_type_header): Remove + uses_multiple_inheritance field. + (TYPE_USES_MULTIPLE_INHERITANCE): Remove. + (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove. + (TYPE_USES_VIRTUAL_BASECLASSES): Remove. + (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES. + (TYPE_CONTAINS_VPTR_P): Likewise. + * call.c (add_template_candidate_real): Use + CLASSTYPE_VBASECLASSES. + (build_special_member_call): Likewise. + * class.c (finish_struct_bits): Remove + TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES + bookkeeping. + (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. + (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P + bookkeeping. + (build_vtt_inits): Use CLASSTYPE_VBASECLASSES. + (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries): + Likewise. + * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE, + TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES + bookkeeping. + (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES. + * decl2.c (maybe_retrofit_in_chrg): Likewise. + * init.c (expand_member, push_base_cleanups): Likewise. + * pt.c (instantiate_class_template): Remove + TYPE_USES_MULTIPLE_INHERITANCE, + TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES + bookkeeping. + * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE + check. + * typeck2.c (process_init_constructor): Replace some sorrys with + asserts. + +2004-09-21 Andreas Tobler + + * decl.c (reshape_init_array): Initialize max_index_cst to fix + bootstrap failure. + +2004-09-20 Mark Mitchell + + PR c++/17530 + * pt.c (tsubst): Fix parentheses to accomodate emacs. + (tsubst_baselink): If we get a single function, mark it as used. + +2004-09-20 Matt Austern + Zack Weinberg + + * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function): + Apply lbasename to input_filename before passing to get_fileinfo. + * semantics.c (begin_class_definition): Likewise. + * lex.c (handle_pragma_interface): Apply get_fileinfo to the + correct filename. Rename variables to be less confusing. + (handle_pragma_implementation): Likewise. Disable "appears + after file is included" diagnostic. + + * parser.c (struct cp_token): Add in_system_header fiag. + (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block) + (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token) + (CPP_NONE, cp_lexer_read_token): Delete. + (struct cp_lexer): Remove first_token, string_tokens, + main_lexer_p fields. Clarify comments. + (struct cp_token_cache): Now just a pair of pointers. + (CP_LEXER_BUFFER_SIZE): New #define. + (CPP_PURGED): New fake token type. + (cp_lexer_new_from_token_array, cp_lexer_destroy) + (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens) + (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal): + New functions. + (cp_lexer_new_from_tokens): Now a simple wrapper around + cp_lexer_new_from_token_array. + (cp_lexer_set_source_position_from_token): Also update + in_system_header. + (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token): + Don't wrap round. + (cp_lexer_token_difference): Dont handle wrapping round. + (cp_lexer_new_main): Enable pragma deferral and raw strings, + read the entire translation unit through c_lex_with_flags into + this lexer's buffer, then turn raw strings back off again. + (cp_lexer_grow_buffer): Adjust for buffer no longer being circular. + (cp_lexer_get_preprocessor_token): No need to handle not being + the main lexer. Set token->in_system_header too. + (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens + to cp_lexer_handle_pragma. No need to call cp_lexer_read_token. + (cp_lexer_peek_nth_token): Likewise. + (cp_lexer_purge_token): Mark the token PURGED, don't shift all + the other tokens down. + (cp_lexer_purge_tokens_after): Likewise. + (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry + about there being no tokens. + (cp_lexer_print_token): Revise to give useful information on + all tokens. + (struct cp_parser): Add field translate_strings_p. + (cp_parser_new): Initialize it. + (cp_parser_translation_unit): Destroy the lexer when done. + (cp_parser_parameter_declaration): Restructure saving of + default arguments. + (cp_parser_save_member_function_body): Likewise. + (cp_parser_check_for_invalid_template_id) + (cp_parser_nested_name_specifier_opt, cp_parser_template_id): + Adjust calls to cp_lexer_advance_token. + (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration): + No need to fiddle c_lex_string_translate. + (cp_parser_primary_expression, cp_parser_linkage_specification) + (cp_parser_asm_definition, cp_parser_asm_specification_opt) + (cp_parser_asm_operand_list, cp_parser_asm_clobber_list) + Use cp_parser_string_literal. + (cp_parser_attribute_list): Save and restore + parser->translate_strings_p, not c_lex_string_translate. + (cp_parser_cache_group): Delete. + (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do + not take a cache argument. + +2004-09-20 Giovanni Bajo + + PR c++/14179 + * decl.c (reshape_init): Extract array handling into... + (reshape_init_array): New function. Use integers instead of trees + for indices. Handle out-of-range designated initializers. + +2004-09-20 Steven Bosscher + + * lex.c (cxx_init): Don't set the ridpointer for RID_NULL + to null_node. + +2004-09-19 Mark Mitchell + + * decl2.c (determine_visibility): Allow class visibility + directives to override targetm.cxx.export_class_data. + +2004-09-18 Kazu Hirata + + * call.c, semantics.c: Follow spelling conventions. + * class.c: Fix a comment typo. + +2004-09-16 Geoffrey Keating + + PR pch/13361 + * cp/lex.c (handle_pragma_interface): Duplicate string from tree. + (handle_pragma_implementation): Likewise. + +2004-09-17 Jeffrey D. Oldham + Zack Weinberg + + * cp-tree.def: Use tree_code_class enumeration constants + instead of code letters. + * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c + * mangle.c, pt.c, semantics.c, tree.c, typeck.c: + Update for new tree-class enumeration constants. + +2004-09-16 Mark Mitchell + + PR c++/16002 + * parser.c (cp_parser_simple_declaration): Commit to tentative + parses after seeing a decl-specifier. + (cp_parser_simple_declaration): Eliminate spurious message. + (cp_parser_init_declarator): Adjust error message. + + PR c++/16029 + * lex.c (unqualified_name_lookup_error): Mark the dummy + declaration as used. + + PR c++/17501 + * parser.c (cp_parser_nested_name_specifier): Do not resolve + typename types if the user explicitly said "typename". + +2004-09-16 Andrew MacLeod + + * error.c (dump_decl): Make sure there is lang_specific info before + checking for DTOR and CTOR decls. + +2004-09-16 Nathan Sidwell + + * class.c (copy_virtuals): Remove. + (build_primary_vtable): Use copy_list directly. + (build_secondary_vtable): Likewise. + (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here. + (create_vtable_ptr): Likewise. + +2004-09-16 Kazu Hirata + + * search.c: Follow spelling conventions. + +2004-09-16 Nathan Sidwell + + * cp-tree.h (struct lang_type_class): Make pure_virtuals a + VEC(tree). + (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update + comments. + * call.c (build_new_method_call): Don't confirm a pure virtual is + in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning. + * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree). + (fixup_inline_methods, finish_struct): Likewise. + * decl.c (finish_method): Likewise. + * search.c (dfs_get_pure_virtuals, get_pure_virtuals): + CLASSTYPE_PURE_VIRTUALS is a VEC(tree). + * typeck2.c (abstract_virtuals_error): Likewise. Truncate the + vector to avoid repeating the list in error messages. + +2004-09-15 Mark Mitchell + + * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define. + * cp-tree.h (cxx_comdat_group): Declare. + * decl.c (cxx_comdat_group): New function. + +2004-09-15 Nathan Sidwell + + * search.c (get_pure_virtuals): Remove unused variables. + + * cp-tree.h (struct lang_decl_flags): Remove + needs_final_overrider. + (DECL_NEEDS_FINAL_OVERRIDER_P): Remove. + * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P. + * class.c (finish_struct_bits): Correct comment about + CLASSTYPE_PURE_VIRTUALS. + * search.c (get_pure_virtuals): Remove useless loop. + +2004-09-14 Mark Mitchell + + PR c++/17324 + * mangle.c (partially_mangled_name): New variable. + (partially_mangled_name_len): Likewise. + (save_partially_mangled_name): New function. + (restore_partially_mangled_name): Likewise. + (write_encoding): Save and restore partially mangled names around + calls to get_mostly_instantiated_function_type. + (write_unqualified_name): Likewise. + +2004-09-14 Nathan Sidwell + + * pt.c (unify): Replace gcc_unreachable with gcc_assert. + +2004-09-13 Mark Mitchell + + PR c++/16162 + * parser.c (cp_parser_id_expression): Correct value for + is_declarator. + (cp_parser_nested_name_specifier_opt): Look through typenames as + necessary. + (cp_parser_template_name): Honor check_dependency_p. + + PR c++/16716 + * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): + Robustify. + + PR c++/17327 + * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with + gcc_unreacable. + +2004-09-12 Richard Henderson + + PR c++/16254 + * semantics.c (maybe_cleanup_point_expr): Don't call fold. + * typeck.c (condition_conversion): Likewise. + +2004-09-11 Richard Henderson + + PR c++/17404 + * pt.c (cur_stmt_expr): Move from tsubst_expr. + (tsubst_expr) : Move ... + (tsubst_copy_and_build): ... here. + +2004-09-10 Zack Weinberg + + * cp-tree.h (interface_only, interface_unknown): Delete declarations; + comment explaining them moved to c-common.h. + * lex.c (interface_only, interface_unknown, extract_interface_info): + Delete definitions. + (cxx_finish): Don't reset interface_unknown. + (handle_pragma_interface): Don't set interface_only and + interface_unknown; just the like-named fields in finfo. + (handle_pragma_implementation): Adjust comment. + * decl2.c (cp_finish_file): Don't reset interface_only and + interface_unknown. + * method.c (synthesize_method): Don't reset interface_unknown or + call extract_interface_info. + * pt.c (pop_tinst_level): Don't call extract_interface_info. + * decl.c (start_cleanup_fn): Don't save or restore interface_only + and interface_unknown. + (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename + and use the result instead of the interface_only/interface_unknown + globals. + (start_preparsed_function): Likewise. + * lex.c (cxx_make_type): Likewise. + * semantics.c (begin_class_definition): Likewise. + (expand_body): Don't call extract_interface_info. + +2004-09-10 Ziemowit Laski + + * decl.c (objc_mark_locals_volatile): Make description of + routine more descriptive; only mark VAR_DECLs at each + binding level. + +2004-09-10 Richard Henderson + + PR c++/17386 + * call.c (build_vfield_ref): Move... + * class.c (build_vfield_ref): ... here. Convert datum to the + primary base containing the vptr. + (make_new_vtable): Simplify build_primary_vtable arguments. + (finish_struct_1): Do not duplicate TYPE_VFIELD. + * typeck.c (build_class_member_access_expr): Don't warn for + null object access to base fields. + +2004-09-10 Ziemowit Laski + + * decl.c (objc_get_current_scope, objc_mark_locals_volatile): + New functions, to be called from ObjC++. + +2004-09-10 Kazu Hirata + + * 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 + + * typeck.c (build_c_cast): Preserve the cast if casting + to and from an Objective-C type. + +2004-09-09 Ziemowit Laski + + * Make-lang.in (cp/typeck.o): Depend on c-common.h. + * typeck.c: Include c-common.h. + (comptypes): For RECORD_TYPEs, call objc_comptypes() and + return the result if nonnegative. + +2004-09-09 Zack Weinberg + + * decl2.c (import_export_class) + * lex.c (handle_pragma_interface): + Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef. + +2004-09-08 Ziemowit Laski + + * Make-lang.in (cp/semantics.o): Depend on c-common.h. + * semantics.c: Include c-common.h. + (finish_compound_stmt): Call objc_clear_super_receiver(). + +2004-09-08 Ziemowit Laski + + * cp-tree.h (do_poplevel): New prototype. + * semantics.c (do_poplevel): Make externally visible. + +2004-09-08 Nathan Sidwell + + * cp-tree.h (tree_pair_s): Define a GC'd vector. + * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise. + * semantics.c (deferred_access): Likewise. + +2004-09-06 Daniel Jacobowitz + + * semantics.c (expand_body): Assert that we are not nested. + +2004-09-06 Zack Weinberg + + * decl.c (build_enumerator): Use add_double and int_fits_type_p + instead of cp_build_binary_op, to avoid creating short-lived trees. + * parser.c (cp_parse_type_specifier ): Use two-token + lookahead instead of backtracking. Move some code to avoid a + conditional branch. + (cp_parser_enum_specifier): Avoid duplication of effort with caller. + Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. + (cp_parser_enumerator_list, cp_parser_enumerator_definition): + Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. + +2004-09-04 Kriang Lerdsuwanakij + + * decl.c (grok_declarator): Remove a redundant semicolon. + + * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier): + Correct comments describing function parameters. + +2004-09-03 Matt Austern + Compile speed improvement. + * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set. + Otherwise define a stub macro that expands to nothing. + (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise + define a stub macro that expands to 0. + (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set. + (cp_lexer_stop_debugging): Likewise. + (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise + define a stub macro that expands to NULL. + (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set. + (cp_lexer_new_from_tokens): Likewise. + +2004-09-03 Jan Hubicka + + * decl.c (finish_function): Clean out pointers we no longer need. + +2004-09-03 Jan Beulich + + * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather + than "-lm". + +2004-09-02 Paul Brook + + * decl2.c (determine_visibility): Only check data visibility + for VAR_DECLS. + +2004-08-31 Mark Mitchell + + * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro. + * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P. + * decl2.c (determine_visibility): Honor + TARGET_CXX_EXPORT_CLASS_DATA. + + * class.c (key_method): Rename to ... + (determine_key_method): ... this. + (finish_struct_1): Adjust accordingly. + * cp-tree.h (key_method): Declare. + * decl2.c (maybe_emit_vtables): Determine the key method here if + it has not already been done. + +2004-08-31 Ziemowit Laski + + * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o. + (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h. + (cp/cp-decl.c): Do not depend on gtype-cp.h. + (cp/cp-objcp-common.o): New target. + * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h. + (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size, + cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move + prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c, + respectively. + (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH, + LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS, + LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION, + LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT, + LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET, + LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR, + LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE, + LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION, + LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE, + LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, + LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, + LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION, + LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS, + LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL, + LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P, + LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, + LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, + LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, + LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, + LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, + LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, + LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P, + LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, + LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE, + LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR, + LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE, + LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE, + LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, + LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR, + LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE, + LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move + hooks to cp-objcp-common.h. + (finish_file): New function. + * cp-objcp-common.c: New file. + * cp-objcp-common.h: New file. + * cp-tree.h (cp_finish_file): New prototype. + * decl.c: Do not include gtype-cp.h. + * decl2.c (finish_file): Rename to cp_finish_file. + +2004-08-31 Richard Henderson + + PR c++/17221 + * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ... + (tsubst_copy_and_build): ... here. + +2004-08-30 Mark Mitchell + + * cp-tree.h (initialize_artificial_var): Declare. + * decl.c (initialize_artifical_var): New function. + * class.c (initialize_array): Remove. + (initialize_vtable): Use initialize_artificial_var. + (build_vtt): Likewise. + (build_ctor_vtbl_group): Likewise. + +2004-08-30 Richard Henderson + + * class.c (build_base_path): Use build_address directly. + * typeck.c (build_unary_op): Don't lower &a.b to pointer + arithmetic directly. + * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT + means !initializer_constant_valid_p. + +2004-08-30 Richard Henderson + + * class.c (fixed_type_or_null): Use get_base_address before + assuming an ADDR_EXPR is non-null. + +2004-08-30 Nathan Sidwell + + * name-lookup.c (pop_binding, pushdecl, + set_identifier_type_value_with_scope, push_overloaded_decl, + arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable. + * parser.c (cp_parser_diagnose_invalid_type_name, + cp_parser_postfix_expression, cp_parser_unary_expression, + cp_parser_check_declarator_template_para): Likewise. + * pt.c (push_inline_template_parms_recursive, + check_explicit_specialization, convert_nontype_argument, + coerce_template_template_parms, uses_template_parms, + instantiate_class_template, tsubst_decl, tsubst, tsubst_copy, + tsubst_expr, instantiate_template, + maybe_adjust_types_for_deduction, type_unification_real, + resolve_overloaded_unification, template_decl_level, + type_dependent_expression_p): Likewise. + * search.c (lookup_base_r): Likewise. + * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise. + * tree.c (lvalue_p_1, count_functions, cxx_printable_name, + verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise. + * typeck.c (common_type, get_member_function_from_ptrfunc, + build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise. + * typeck2.c (cxx_incomplete_type_diagnostic, + split_nonconstant_init_1, store_init_value, + process_init_constructor): Likewise. + +2004-08-30 Nathan Sidwell + + * call.c (check_dtor_name): Replace abort with gcc_assert or + gcc_unreachable. + (build_call, add_builtin_candidate, build_new_op, + convert_like_real, build_over_call, in_charge_arg_for_name, + source_type, joust): Likewise. + * class.c (build_simple_base_path, get_vcall_index, + finish_struct_1, instantiate_type, get_enclosing_class, + add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise. + * cp-gimplify.c (cp_genericize): Likewise. + * cp-lang.c (cp_expr_size, cp_tree_size): Likewise. + * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise. + * decl.c (poplevel, make_unbound_class_template, reshape_init, + check_special_function_return_type, grokdeclarator, + grok_op_properties, tag_name, xref_tag, start_preparsed_function, + finish_function): Likewise. + * decl2.c (grokfield, maybe_emit_vtables):Likewise. + * error.c (dump_global_iord, dump_decl, dump_template_decl, + language_to_string): Likewise. + * except.c (choose_personality_routine): Likewise. + * friend.c (do_friend): Likewise. + * g++spec.c (lang_specific_driver): Likewise. + * init.c (build_zero_init, expand_default_init, build_new_1, + build_vec_delete_1, build_vec_init, build_dtor_call): Likewise. + * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise. + * mangle.c (add_substitution, write_unscoped_name, + write_template_prefix, write_identifier, + write_special_name_destructor, write_type, write_builtin_type, + write_expression, write_template_param, + write_java_integer_type_codes): Likewise. + * method.c (implicitly_declare_fn): Likewise. + +2004-08-30 Nathan Sidwell + + * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag. + (BINFO_INDIRECT_PRIMARY_P): Remove. + * class.c (determine_primary_base): Rename to ... + (determine_primary_bases): ... here. Set all primary bases. + (set_primary_base): Remove. + (mark_primary_bases): Remove. + (build_simple_base_path, walk_subobject_offsets, + propagate_binfo_offsets, end_of_class): Adjust. + (layout_class_type): Rename determine_primary_base call. + (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo + to type_as_string. + (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits, + build_rtti_vtbl_entries): Adjust. + * init.c (build_vtbl_address): Adjust. + + * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert. + +2004-08-28 Ziemowit Laski + + * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and + CXX_AND_OBJCXX_OBJS. + (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing + separately on the link line. + +2004-08-28 Jason Merrill + + * decl.c (expand_static_init): Avoid bogus warnings. + +2004-08-27 Jason Merrill + + PR c++/16851 + * tree.c (stabilize_init): See through a COMPOUND_EXPR. + + PR c++/13684 + * decl.c (expand_static_init): Use thread-safety API. + (register_dtor_fn): Return the call, don't expand it. + * tree.c (add_stmt_to_compound): New fn. + (stabilize_call): Use it. + +2004-08-27 Richard Henderson + + * cp-tree.def (OFFSETOF_EXPR): New. + * parser.c (cp_parser_builtin_offsetof): Either built an + OFFSETOF_EXPR, or call fold_offsetof immediately. + * pt.c (tsubst_expr): Handle OFFSETOF_EXPR. + +2004-08-27 Nathan Sidwell + + * call.c (validate_conversion_obstack): Replace + my_friendly_assert with gcc_assert or gcc_unreachable. + (direct_reference_binding, merge_conversion_sequences, + build_user_type_conversion_1, perform_overload_resolution, + build_op_delete_call, enforce_access, call_builtin_trap, + build_over_call, build_special_member_call, build_new_method_call, + initialize_reference): Likewise. + * class.c (build_base_path, build_primary_vtable, alter_access, + check_bases, update_vtable_entry_for_fn, layout_empty_base, + clone_function_decl, adjust_clone_args, + type_requires_array_cookie, include_empty_classes, + finish_struct_1, resolve_address_of_overloaded_function, + instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits, + dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group, + accumulate_vtbl_inits, build_vtbl_initializer, + build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise. + * cvt.c (build_up_reference, convert_to_reference): Likewise. + * decl.c (poplevel, duplicate_decls, make_typename_type, + cxx_init_decl_processing, reshape_init, check_initializer, + make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl, + expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type, + grokdeclarator, copy_fn_p, grok_op_properties, xref_tag, + xref_basetypes, start_preparsed_function, save_function_data, + finish_function, finish_method, maybe_register_incomplete_var, + complete_vars): Likewise. + * decl2.c (grok_array_decl, check_member_template, + check_classfn, finish_static_data_member_decl, coerce_new_type, + coerce_delete_type, import_export_class, decl_needed_p, + determine_visibility, import_export_decl, build_cleanup, + start_static_initialization_or_destructi, do_static_destruction, + prune_vars_needing_no_initialization, + build_offset_ref_call_from_tree): Likewise. + * error.c (dump_decl, dump_expr): Likewise. + * init.c (finish_init_stmts, build_zero_init, + expand_virtual_init, expand_default_init, expand_aggr_init_1, + build_offset_ref, build_new_1, build_delete, build_vbase_delete): + Likewise. + * mangle.c (write_method_parms, write_template_args, + write_expression, write_template_arg): Likewise. + * method.c (make_thunk, finish_thunk, use_thunk): Likewise. + * name-lookup.c (pop_binding, begin_scope, leave_scope, + resume_scope, push_using_decl, validate_nonmember_using_decl, + is_ancestor, poplevel_class, set_inherited_value_binding_p, + push_class_level_binding, do_class_using_decl, push_namespace, + pop_namespace, add_using_namespace, ambiguous_decl, + lookup_namespace_name, lookup_type_current_level, + maybe_process_template_type_declaration): Likewise. + * parser.c (cp_lexer_peek_nth_token, + cp_parser_parse_and_diagnose_invalid_typ, + cp_parser_translation_unit, cp_parser_template_id, + cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise. + * pt.c (push_access_scope, finish_member_template_decl, + push_inline_template_parms_recursive, add_outermost_template_args, + get_innermost_template_args, begin_explicit_instantiation, + end_explicit_instantiation, retrieve_specialization, + is_specialization_of, is_specialization_of_friend, + register_specialization, check_explicit_specialization, + comp_template_parms, process_template_parm, + process_partial_specialization, convert_nontype_argument, + coerce_template_template_parms, coerce_template_parms, + mangle_class_name_for_template, lookup_template_function, + lookup_template_class, instantiate_class_template, tsubst_decl, + tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy, + instantiate_template, fn_type_unification, type_unification_real, + get_template_base, regenerate_decl_from_template, + template_for_substitution, instantiate_decl, + get_mostly_instantiated_function_type, dependent_scope_ref_p, + value_dependent_expression_p, resolve_typename_type): Likewise. + * repo.c (repo_emit_p): Likewise. + * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init, + create_tinfo_types, emit_tinfo_decl): Likewise. + * search.c (lookup_base_r, lookup_base, lookup_field_1, + dfs_access_in_type, build_baselink, lookup_member, + adjust_result_of_qualified_name_lookup, copied_binfo): Likewise. + * semantics.c (perform_or_defer_access_check, + finish_non_static_data_member, finish_stmt_expr_expr, + finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr, + finish_template_template_parm, finish_member_declaration, + emit_associated_thunks): Likewise. + * tree.c (build_target_expr_with_type, force_target_expr, + copy_binfo, get_first_fn, cp_tree_equal): Likewise. + * typeck.c (type_after_usual_arithmetic_conversions, comptypes, + cxx_sizeof_or_alignof_type, perform_integral_promotions, + build_class_member_access_expr, finish_class_member_access_expr, + build_ptrmemfunc_access_expr, build_unary_op, + unary_complex_lvalue, cxx_mark_addressable, build_modify_expr, + build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr + * typeck2.c (complete_type_check_abstract, + abstract_virtuals_error, process_init_constructor, + add_exception_specifier): Likewise. + +2004-08-27 Nathan Sidwell + + * class.c (build_vtbl_initializer): Use ssize_int. + * decl.c (complete_array_type): Likewise. + * method.c (finish_thunk): Likewise. + * search.c (get_dynamic_base_type): Likewise. + +2004-08-26 Richard Henderson + + * cp-tree.h (DECL_FIELD_IS_BASE): New. + * class.c (build_base_field): Set it. + (build_simple_base_path): Use it. + (fixed_type_or_null): Don't consider base fields definitive. + +2004-08-25 Roger Sayle + + PR middle-end/16693 + PR tree-optimization/16372 + * decl.c (finish_enum): Make the precision of the enumerated type + the same width as the underlying integer type. + +2004-08-25 Mark Mitchell + + PR c++/17155 + * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++ + functions. + + * mangle.c (get_identifier_nocopy): Add cast. + + * cp-tree.h (mangle_type): Remove. + * mangle.c (globals): GTY it. + (mangle_obstack): New variable. + (name_obstack): Likewise. + (name_base): Likewise. + (write_char): Adjust accordingly. + (write_chars): Likewise. + (write_string): Likewise. + (start_mangling): Initialize G.substitutions only one. Add + ident_p parameter. + (finish_mangling): Use VARRAY_CLEAR to reclaim + storage in G.substitutions. Use obstack_finish. + (init_mangle): Adjust for changes to variable names above. + Initialize G.substitutions. + (mangle_decl_string): Adjust call to start_mangling. + (get_identifier_nocopy): New function. + (mangle_decl): Use it. + (mangle_type_string): Adjust call to start_mangling. + (mangle_special_for_type): Likewise. + (mangle_vtt_for_type): Likewise. + (mangle_ctor_vtbl_for_type): Likewise. + (mangle_thunk): Likewise. + (mangle_guard_variable): Likewise. + (mangle_ref_init_variable): Likewise. + +2004-08-25 Kriang Lerdsuwanakij + + PR c++/14428 + * pt.c (redeclare_class_template): Check the type of non-type and + template template parameter. + +2004-08-25 Nathan Sidwell + + * call.c (convert_class_to_reference): Adjust build_int_cst calls. + (build_user_type_conversion_1, convert_like_real, + build_java_interface_fn_ref, build_special_member_call): Likewise. + * class.c (finish_struct_1, build_vtbl_initializer): Likewise. + * cp-gimplify.c (cp_gimplify_expr): Likewise. + * cvt.c (cp_convert_to_pointer): Likewise. + * decl.c (cxx_init_decl_processing, complete_array_type): Likewise. + * decl2.c (start_static_initialization_or_destruction, + generate_ctor_or_dtor_function): Likewise. + * except.c (build_throw): Likewise. + * mangle.c (write_integer_cst): Likewise. + * method.c (finish_thunk): Likewise. + * rtti.c (build_headof, get_tinfo_decl_dynamic, + build_dynamic_cast_1, ptr_initializer, ptm_initializer, + get_pseudo_ti_init): Likewise. + * search.c (get_dynamic_cast_base_type): Likewise. + +2004-08-25 Zack Weinberg + + * class.c, search.c: Remove references to DWARF_DEBUG. + +2004-08-25 Adam Nemet + + * repo.c (extract_string): Reset backquote after one character. + (get_base_filename): Fix indentation. + +2004-08-24 Nathan Sidwell + + * decl.c (cxx_init_decl_processing): Adjust + build_common_tree_nodes call. + +2004-08-24 Nathan Sidwell + + PR c++/16889 + * (is_subobject_of_p): Resurrect & optimize. + (lookup_field_r): Use it. + +2004-08-24 Kriang Lerdsuwanakij + + PR c++/16706 + * search.c (friend_accessible_p): Increment processing_template_decl + when deal with TEMPLATE_DECL of SCOPE. + +2004-08-24 Nathan Sidwell + + PR c++/17149 + * semantics.c (check_accessibility_of_qualified_id): Defer check + if qualifying_type is a template parameter. + +2004-08-23 Mark Mitchell + + PR c++/17163 + * pt.c (instantiate_decl): Do not try to apply + DECL_DECLARED_INLINED_P to a VAR_DECL. + + * search.c (build_baselink): Fix typo in comment. + +2004-08-22 Andrew Pinski + + Revert: + 2004-08-22 Andrew Pinski + PR c++/14029 + * typeck.c (build_unary_op): Use &a.b if the folded lowered + expression is not constant. + +2004-08-23 Nathan Sidwell + + * name-lookup.c (pushdecl): Rename build_type_copy call. + * tree.c (cp_build_qualified_type_real, + build_exception_variant, handle_java_interface_attribute): Likewise. + +2004-08-22 Andrew Pinski + + PR c++/14029 + * typeck.c (build_unary_op): Use &a.b if the folded lowered + expression is not constant. + +2004-08-20 Mark Mitchell + + PR c++/17121 + * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P. + +2004-08-21 Joseph S. Myers + + PR c++/17120 + * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for + MODOP_EXPR. + +2004-08-20 Kriang Lerdsuwanakij + + * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION + before calling comp_template_args. + +2004-08-20 Nathan Sidwell + + * class.c (build_vtbl_initializer): Use build_int_cst for + negative size types. + * decl.c (complete_array_type): Likewise. + * method.c (finish_thunk): Likewise. + +2004-08-20 Andreas Tobler + + * tree.c: Remove unused mark_local_for_remap_r. + +2004-08-19 Eric Christopher + + * cp-tree.h (cxx_unsave_expr_now): Delete prototype. + * tree.c (cxx_unsave_expr_now): Delete. + (cp_unsave_r): Ditto. + +2004-08-19 Mark Mitchell + + PR c++/15890 + * pt.c (push_template_decl_real): Disallow template allocation + functions with fewer than two parameters. + +2004-08-19 Nathan Sidwell + + * cp-tree.h (build_shared_int_cst): Remove. + * tree.c (shared_int_cache): Remove. + (build_shared_int_cst): Remove. + * class.c (finish_struct_1): Use build_int_cst. + +2004-08-19 Nathan Sidwell + + * decl.c (finish_enum): Do not copy value node early, copy + later. + * lex.c (cxx_init): Force null_node to be unique. + +2004-08-19 Joseph S. Myers + + PR c++/17041 + * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING + from input for MODOP_EXPR. + +2004-08-18 Mark Mitchell + + * pt.c (dependent_template_p): Fix typo in commment. + + PR c++/17068 + * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as + dependent. + +2004-08-17 Mark Mitchell + + PR c++/16246 + * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type + arguments have the same type as the corresponding parameter. + + PR c++/16215 + * parser.c (cp_parser_name_lookup_error): If parser->object_scope + is set use it for diagnostic purposes. + (cp_parser_pseudo_destructor_name): Remove special-case error + message. + + PR c++/15871 + * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions. + + PR c++/16965 + * cp-tree.h (qualified_name_lookup_error): Add parameter. + * name-lookup.c (do_class_using_decl): Restrict set of entities + passed to cp_emit_debug_info_for_using more carefully. + (lookup_qualified_name): Allow lookup_member to return sets of + ambiguous entries. + * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter. + (cp_parser_primary_expression): Handle ambiguous lookups. + (cp_parser_template_name): Adjust use of cp_parser_lookup_name. + (cp_parser_template_argument): Likewise. + (cp_parser_elaborate_type_specifier): Likewise. + (cp_parser_namespace_name): Likewise. + (cp_parser_class_name): Likewise. + (cp_parser_lookup_name_simple): Likewise. + * pt.c (tsubst_qualified_id): Handle ambiguous results. + (tsubst_expr): Likewise. + * semantics.c (qualified_name_lookup_error): Add decl paramter. + For ambiguous lookups, print candidates. + +2004-08-16 Kriang Lerdsuwanakij + + PR c++/6749 + * pt.c (instantiate_pending_templates): Add int parameter. Don't + return anything. + * cp-tree.h (instantiate_pending_templates): Adjust prototype. + * decl2.c (finish_file): Adjust call to + instantiate_pending_templates. + +2004-08-15 Roger Sayle + + * call.c (build_vfield_ref, build_call, build_conditional_expr, + convert_arg_to_ellipsis, build_x_va_arg, build_over_call, + build_java_interface_fn_ref, build_special_member_call, + build_new_method_call, initialize_reference): Replace calls to + build with calls to buildN. + * class.c (build_base_path, convert_to_base_statically, + build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits, + build_vtbl_initializer): Likewise. + * cp-gimplify.c (genericize_try_block, genericize_catch_block, + gimplify_if_stmt, cp_genericize_r): Likewise. + * cvt.c (convert_to_void): Likewise. + * decl.c (check_initializer, finish_constructor_body, + finish_destructor_body): Likewise. + * error.c (dump_expr): Likewise. + * except.c (build_exc_ptr, expand_start_catch_block, build_throw): + Likewise. + * init.c (perform_member_init, expand_virtual_init, + expand_cleanup_for_base, build_init, expand_default_init, + build_offset_ref, decl_constant_value, build_new, build_new_1, + build_vec_delete_1, build_vec_init, build_delete, + push_base_cleanups, build_vec_delete): Likewise. + * mangle.c (write_integer_cst): Likewise. + * method.c (thunk_adjust, do_build_copy_constructor, + do_build_assign_ref): Likewise. + * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build, + unify, build_non_dependent_expr): Likewise. + * rtti.c (build_headof, build_typeid, ifnonnull, + build_dyanmic_cast_1, tinfo_base_init): Likewise. + * semantics.c (begin_compound_stmt, finish_call_expr, + finish_pseudo_destructor_expr, finish_id_expression, + simplify_aggr_init_expr, finalize_nrv_r): Likewise. + * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top, + array_type_nelts_total, stabilize_call): Likewise. + * typeck.c (decay_conversion, build_class_member_access_expr, + lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref, + get_member_function_from_ptrfunc, build_binary_op, pointer_diff, + build_x_unary_op, build_unary_op, unary_complex_lvalue, + build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst, + check_return_expr): Likewise. + * typeck2.c (split_nonconstant_1, split_nonconstant_init_1, + split_nonconstant_init, store_init_value, build_m_component_ref): + Likewise. + +2004-08-15 Nathan Sidwell + + * call.c (convert_class_to_reference, + build_user_type_conversion_1, convert_like_real, + build_java_interface_fn_ref, build_special_member_call): Use + build_int_cst. + * class.c (build_vtbl_initializer): Likewise. + * cp-gimplify.c (cp_gimplify_expr): Likewise. + * cvt.c (cp_convert_to_pointer): Likewise. + * decl.c (cxx_init_decl_processing, complete_array_type): Likewise. + * decl2.c (start_static_initialization_or_destruction, + generate_ctor_or_dtor_function): Likewise. + * except.c (build_throw): Likewise. + * lex.c (cxx_init): Likewise. + * mangle.c (write_integer_cst): Likewise. + * rtti.c (build_headof, get_tinfo_decl_dynamic, + build_dynamic_cast_1, ptr_initializer, ptm_initializer, + get_pseudo_ti_init): Likewise. + * search.c (get_dynamic_cast_base_type): Likewise. + * tree.c (build_shared_int_cst): Likewise. + +2004-08-12 Mark Mitchell + + PR c++/16273 + * class.c (count_depth_data): New type. + (dfs_depth_post): New function. + (dfs_depth_q): Likewise. + (find_final_overrider_data_s): Change type of vpath. + Add vpath_list. + (dfs_find_final_overrider_1): New function. + (dfs_find_final_overrider): Use it. + (dfs_find_final_overrider_q): Adjust use of vpath. + (dfs_find_final_overrider_post): Likewise. + (find_final_overrider): Use dfs_depth. Allocate and deallocate + vpath_list. + +2004-08-12 Jan Beulich + + * parser.c (cp_parser_asm_definition): Properly consume scope operator + tokens preceding the clobbers. Don't check for scope operator + following inputs. Simplify inputs handling to match that now used for + clobbers. + +2004-08-11 Mark Mitchell + + PR c++/16698 + * except.c (build_throw): Allocate cleanup_type and the function + for __cxa_throw separately. + + PR c++/16853 + * call.c (standard_conversion): Do not accept conversions between + pointers to members if the class types are unrelated. + + PR c++/16618 + * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile + char &" instead of just "char &". + + PR c++/16870 + * pt.c (tsubst): Just return the unknown_type_node. + +2004-08-11 Mark Mitchell + + PR c++/16964 + * parser.c (cp_parser_class_specifier): Robustify. + + PR c++/16904 + * pt.c (tsubst_copy_and_build): Complain about invalid + qualification. + + PR c++/16929 + * pt.c (tsubst_default_argument): Clear out current_class_ptr and + current_class_ref while tsubsting. + +2004-08-10 Mark Mitchell + + PR c++/16971 + * parser.c (cp_parser_init_declarator): Robustify. + +2004-08-06 Richard Sandiford + + * typeck2.c (process_init_constructor): Guard the missing field warning + with warn_missing_field_initializers rather than extra_warnings. + +2004-08-06 Paolo Bonzini + + * class.c (instantiate_type) : Do not handle. + +2004-08-05 Mark Mitchell + + * decl.c (start_preparsed_function): Move determine_visibility + call. + * decl2.c (determine_visibility): Incorporate dllexport testing. + +2004-08-05 Geoffrey Keating + + * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option + means that libstdc++ is needed. + +2004-08-05 Nathan Sidwell + + * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call. + +2004-08-04 Geoffrey Keating + + * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather + than passing it as a parameter to rest_of_decl_compilation. + * decl2.c (grokfield): Use set_user_assembler_name. + +2004-08-04 Nathan Sidwell + + * decl.c (complete_array_type): Don't gratuitously copy + maxindex. Its type is always set. + +2004-08-04 Paul Brook + + * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H. + * cp-tree.h (struct language_function): Rename x_dtor_label to + x_cdtor_label. + (dtor_label): Rename ... + (cdtor_label): ... to this. + * decl.c (begin_constructor_body): Remove. + (check_special_function_return_type): Maybe change the return type. + (grokdeclarator): Pass the class type. + (start_preparsed_function): Constructors may need a return label. + (finish_constructor_body, finish_destructor_body): Set the return + value. + (begin_function_body): Don't call begin_constructor_body. + (finish_function): Don't warn for constructors or destructors. + (implicitly_declare_fn): Maybe change the return type. + * optimize.c: Include target.h. + (maybe_clone_body): Remap the function result. + * semantics.c: Include target.h. + (finish_return_stmt): Maybe jump to return label for constructors. + +2004-08-03 Mark Mitchell + + * class.c (build_vtable): Do not set DECL_VISIBILITY here. + (check_field_decls): Or here. + (check_methods): Or here. + (initialize_array): Don't mess with DECL_CONTEXT. + * cp-tree.h (start_decl): Adjust prototype. + (determine_visibility): New function. + * decl.c (duplicate_decls): Remove checks for hidden "operator + new". + (build_library_fn_1): Give all library functions default + visibility. + (start_decl): Add pop_scope_p parameter. Tidy. + (cp_finish_decl): Do not pop scopes here. Call + determine_visibility for variable definitions. + (start_preparsed_function): Call determine_visibility. + * decl2.c (determine_visibility): New function. + * method.c (use_thunk): Fix formatting. + * parser.c (cp_parser_condition): Adjust calls to start_decl. + (cp_parser_init_declarator): Likewise. + * pt.c (instantiate_decl): Always call pop_nested_class. + * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY. + (tinfo_base_init): Likewise. + +2004-08-02 Mark Mitchell + + PR c++/16707 + * name-lookup.c (validate_nonmember_using_decl): Robustify. + +2004-08-01 Mark Mitchell + + PR c++/16224 + * name-lookup.c (decl_namespace): Remove. + (current_decl_namespace): Use decl_namespace_context instead of + decl_namespace. + (push_decl_namespace): Likewise. + (arg_assoc_class): Likewise. + (arg_assoc_type): Likewise. + * pt.c (check_specialization_namespace): New function. + (maybe_process_partial_specialization): Use it. + (register_specialization): Likewise. + + PR c++/16489 + * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro. + * call.c (null_ptr_cst_p): Handle variables with constant + initializers. + * pt.c (convert_nontype_argument): Use + DECL_INTEGRAL_CONSTANT_VAR_P. + * semantics.c (finish_id_expression): Likewise. + + PR c++/16529 + * decl.c (duplicate_decls): Reject duplicate namespace + declarations. + + PR c++/16810 + * typeck.c (build_ptrmemfunc): Loosen assertion. + +2004-08-01 Gabriel Dos Reis + + * call.c (z_candidate::template_decl): Rename from template. + (add_template_candidate_real): Adjust member reference. + (joust): Likewise. + +2004-07-29 Mark Mitchell + + * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define. + (lang_decl_flags): Narrow the width of "languages". Add + repo_available_p. + (DECL_NEEDED_P): Remove. + (FOR_EACH_CLONE): New macro. + (DECL_REPO_AVAILABLE_P): Likewise. + (DECL_TINFO_P): Likewise. + (set_linkage_according_to_type): Declare. + (import_export_vtable): Remove. + (import_export_tinfo): Likewise. + (mark_needed): New function. + (decl_needed_p): Likewise. + (note_vauge_linkage_fn): Likewise. + (init_repo): Change prototype. + (repo_template_used): Remove. + (repo_template_instantiated): Likewise. + (repo_emit_p): New function. + (repo_export_class_p): Likewise. + (no_linkage_check): Change prototype. + * class.c (set_linkage_according_to_type): New function. + (build_vtable): Use it. Do not call import_export_vtable. Set + DECL_IGNORED_P if appropriate. + * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P. + (make_rtL_for_nonlocal_decls): Check for template instantiations + explicitly. + (grokfndecl): Adjust call to no_linkage_check. + (set_linkage_for_static_data_member): New function. + (grokvardecl): Use it. Adjust call to no_linkage_check. + (grokdeclarator): Use set_linkage_for_static_data_member. + * decl2.c (note_vague_linkage_fn): New function. + (note_vague_linkage_var): Likewise. + (finish_static_data_member_decl): Use it. + (import_export_vtable): Remove. + (import_export_class): Use repo_export_class_p. + (var_finalized_p): Simplify. + (maybe_emit_vtables): Simplify. + (mark_needed): New function. + (decl_needed_p): Likewise. + (import_export_decl): Add documentation and consistency checks. + Use repo_emit_p. Handle virtual tables and RTTI information + here. + (import_export_tinfo): Remove. + (write_out_vars): Call import_export_decl. + (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted + whenever one is. + (finish_file): Use decl_needed_p. Do not call import_export_decl + for undefined static data members. Do not warn about undefined + inlines when using a repository. + (mark_used): Use note_vague_linkage_fn. Always defer template + instantiations. + * lex.c (cxx_init): Adjust call to init_repo. Always set + flag_unit_at_a-time. + * method.c (synthesize_method): Remove unncessary + import_export_decl call. + (implicitly_declare_fn): Use set_linkage_according_to_type. + * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE. + * pt.c (instantiate_class_template): Don't redundantly add classes + to keyed_classes. Don't call repo_template_used. + (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of + templates with internal linkage. + (check_instantiated_args): Adjust call to no_linkage_check. + (instantiate_template): Use FOR_EACH_CLONE. + (mark_definable): New function. + (mark_decl_instantiated): Use it. + (do_decl_instantiation): Adjust tests for explicit instantiation + after "extern template". + (instantiate_class_member): Do not use repo_template_instantiated. + (do_type_instantiation): Simplify. + (instantiate_decl): Use mark_definable. Check repo_emit_p. + Simplify. + * repo.c (repo_get_id): Remove. + (original_repo): Remove. + (IDENTIFIER_REPO_USED): Remove. + (IDENTIFIER_REPO_CHOSEN): Remove. + Remove all #if 0'd code. + (repo_template_used): Remove. + (repo_template_instantiated): Remove. + (temporary_obstack_initialized_p): New variable. + (init_repo): Register with lang_post_pch_load. Avoid creating + identifiers unnecessarily. Don't use original_repo. Close the + file here. + (reopen_repo_file_for_write): Not here. + (finish_repo): Always write out a new repository file. + (repo_emit_p): New function. + (repo_export_class_p): Likewise. + * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type. + (involves_incomplete_p): New function. + (tinfo_base_init): Use it. + (ptr_initializer): Remove non_public_ptr parameter. + (ptm_initializer): Likewise. + (get_pseudo_ti_init): Likewise. + (unemitted_tinfo_decl_p): Remove. + (emit_tinfo_decl): Use import_export_decl. + * semantics.c (expand_body): Move updates of static_ctors and + static_dtors to ... + (expand_or_defer_fn): ... here. + * tree.c (no_linkage_check): Add relaxed_p parameter. + +2004-07-28 Eric Christopher + + * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. + +2004-07-28 Nathan Sidwell + + * cp-tree.h (struct tree_pair_s): New. + (typedef tree_pair_p): New. + (DEF_VEC_O(tree_pair_s)): New. + (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s). + (CLASSTYPE_VCALL_INDICES): Update documentation. + * class.c (get_vcall_index): Adjust. + (add_vcall_offset): Adjust. + +2004-07-27 Kelley Cook + + * pt.c, typeck.c: Remove spurious carriage returns. + +2004-07-27 Kriang Lerdsuwanakij + + PR c++/14429 + * pt.c (coerce_template_template_parms) : Only check + when the type of ARG is not dependent. + +2004-07-26 Geoffrey Keating + + * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX. + (lang_specific_driver): If the C++ or math library options don't + start with '-l', don't count them as added libraries. + +2004-07-26 Nathan Sidwell + + * decl.c (xref_basetypes): Adjust base access vector creation. + * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base + access accesses. + * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise. + +2004-07-26 Niall Douglas + Brian Ryner + + PR c++/15000 + PR c++/9283 + * class.c (check_field_decls): Apply hidden visibility if + -fvisibility-inlines-hidden and inlined unless otherwise specified + (build_vtable): Set vtable visibility to class visibility. + (check_field_decls): Default static member visibility to class + visibility. + (check_methods): Default method visibility to class visibility. + * cp-tree.h: Added CLASSTYPE_VISIBILITY and + CLASSTYPE_VISIBILITY_SPECIFIED macro. + * decl.c (duplicate_decls): New logic for merging definition decls + with declaration decls. Added ignore & warning when non default + applied to global operator new or delete. + * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED + wherever VISIBILITY was changed + * rtti.c (get_tinfo_decl): Set typeinfo visibility to class + visibility. + (tinfo_base_init): Set typeinfo name visibility to class visibility. + +2004-07-25 Bernardo Innocenti + + * decl.c: Rename all identifiers named `class' to `cl'. + * cp-tree.h: Likewise. + +2004-07-25 Gabriel Dos Reis + + * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW. + * typeck2.c (abstract_virtuals_error): Use GGC_NEW. + * name-lookup.c (binding_entry_make): Use GGC_NEW. + (binding_table_construct): Use GGC_CNEWVEC. + (binding_table_new): Use GGC_NEW. + (cxx_binding_make): Likewise. + (begin_scope): Likewise. + (push_to_top_level): Use GCC_CNEW. + * parser.c (cp_token_cache_new): Likewise. + (cp_token_cache_push_token): Likewise. + (cp_lexer_new_main): Likewise. + (cp_lexer_new_from_tokens): Likewise. + (cp_parser_context_new): Likewise. + (cp_parser_new): Likewise. + (cp_lexer_new_from_tokens): Use GGC_NEWVEC. + * lex.c (cxx_make_type): Use GGC_CNEW. + (retrofit_lang_decl): Use GGC_NEWVAR. + (cxx_dup_lang_specific_decl): Likewise. + (copy_lang_type): Likewise. + * decl.c (use_label): Use GGC_NEW instead of ggc_alloc. + (save_function_data): Likewise. + (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared. + (cxx_push_function_context): Likewise. + +2004-07-25 Richard Henderson + + * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and + DECL_IGNORED_P on RESULT_DECL. + * semantics.c (finalize_nrv): Copy them too. + +2004-07-23 Nathan Sidwell + + * search.c (lookup_conversion_operator): Avoid two loops. + (add_conversions): Remove. + (check_hidden_convs, split_conversions, + lookup_conversions_r): New. + (lookup_conversions): Use lookup_conversions_r. + +2004-07-22 Nathan Sidwell + + * pt.c (get_template_base): Check type is completable. + +2004-07-21 Eric Christopher + + * decl.c (poplevel): Inline unused variable checking. + Change formatting. + +2004-07-21 Paolo Bonzini + + * typeck.c (build_binary_op): Do not use RDIV_EXPR for + integer vectors. + +2004-07-21 Giovanni Bajo + + PR c++/14497 + * pt.c (check_explicit_specialization): Remove extension to accept + specializations without template headers. Fall-through to normal + processing. + +2004-07-21 Giovanni Bajo + + PR c++/509 + * pt.c (determine_specialization): New parameter template_count. + Disambiguate between member templates and member functions counting + the template headers. + (check_explicit_specialization): Update caller. + (tsubst_friend_function): Likewise. + +2004-07-20 Steven Bosscher + + * cp-tree.def (TINST_LEVEL): Make it an 'x' node. + * cp-tree.h (tinst_level_t): New tree type. + (union lang_tree_node): Handle it. + (TINST_LOCATION): New accessor macro. + (make_tinst_level): New prototype. + * cp-lang.c (cp_tree_size): Handle TINST_LEVEL. + * decl.c (cp_tree_node_structure): Likewise. + * error.c (print_instantiation_full_context): Use TINST_LOCATION. + (print_instantiation_partial_context): Likewise. + * pt.c (pop_tinst_level): Likewise. + (push_tinst_level): Use make_tinst_level. + * tree.c (make_tinst_level): New function. + (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node. + +2004-07-20 Mark Mitchell + + * parser.c (cp_parser_simple_type_specifier): Fix typo. + + PR c++/16637 + * parser.c (cp_parser_simple_type_specifier): Do not record usage + of globally-qualified names. + +2004-07-20 Kriang Lerdsuwanakij + + PR c++/16175 + * error.c (dump_type) : Output + cv qualifier. + +2004-07-19 Mark Mitchell + + PR c++/16623 + * cp-tree.h (lang_type_class): Add lazy_assignment_op. + (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro. + * class.c (add_implicitly_declared_members): Use + CLASSTYPE_LAZY_ASSIGNMENT_OP. + * method.c (lazily_declare_fn): Clear + CLASSTYPE_LAZY_ASSIGNMENT_OP. + * search.c (lookup_fnfields_1): Check it. + +2004-07-20 Nathan Sidwell + + * cp-tree.h (vec_binfo_member): Remove. + * tree.c (vec_binfo_member): Remove. + + * cp-tree.h (struct lang_type_class): Remove vfields field. + (CLASSTYPE_VFIELDS): Remove. + (SET_BINFO_NEW_VTABLE_MARKED): Adjust. + * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS + handling. + (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P. + (finish_struct_1): Remove CLASSTYPE_VFIELDS handling. + * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P. + +2004-07-20 Nathan Sidwell + + * cp-tree.h (DEF_VEC_P(tree)): Remove here. + (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): + Moved to common. + (BINFO_LANG_SLOTS): Remove. + * tree.c (copy_binfo): Adjust BINFO creation and accessors. + * decl.c (xref_basetypes): Adjust BINFO creation and accessors. + * class.c (check_bases): Adjust BINFO accessors. + (determine_primary_base, finish_struct_bits, + maybe_warn_about_overly_private_class, warn_hidden, + walk_subobject_offsets, propagate_binfo_offsets, end_of_class, + warn_about_ambiguous_bases, get_vfield_name, + dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits, + add_vcall_offset_vtbl_entries_r): Likewise. + * dump.c (cp_dump_tree): Likewise. + * init.c (sort_mem_initializers, expand_member_init, build_delete, + push_base_cleanups): Likewise. + * method.c (do_build_copy_constructor, do_build_assign_ref, + synthesize_exception_spec): Likewise. + name-lookup.c (arg_assoc_class): Likewise. + * pt.c (instantiate_class_template, + get_template_base_recursive): Likewise. + * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise. + * typeck2.c (process_init_constructor): Likewise. + * search.c (lookup_base_r, dynamic_cast_base_recurse, + dfs_access_in_type, dfs_walk_real, look_for_overrides, + types_overlap_p, copied_binfo, original_binfo): Likewise. + (binfo_for_vtable): Remove + +2004-07-20 Steven Bosscher + + * cp-tree.h (struct lang_decl_flags): Unify the template_info and + thunk_alias, and the access and virtual_offset fields. + (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust. + * decl.c (finish_case_label): Update c_add_case_node call. + +2004-07-19 Mark Mitchell + + Revert patch for PR c++/16623. + +2004-07-19 Kelley Cook + + * except.c: Remove two spurious carriage returns. + +2004-07-19 Mark Mitchell + + PR c++/16623 + * cp-tree.h (lang_type_class): Add lazy_assignment_op. + (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro. + * class.c (add_implicitly_declared_members): Use + CLASSTYPE_LAZY_ASSIGNMENT_OP. + * method.c (lazily_declare_fn): Clear + CLASSTYPE_LAZY_ASSIGNMENT_OP. + * search.c (lookup_fnfields_1): Check it. + +2004-07-19 Nathan Sidwell + + * class.c (add_method): Delay adding the slot until the end. + (determine_primary_base): Adjust VEC_iterate invokation. + (resort_type_method_vec, finish_struct_methods, warn_hidden, + walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases, + build_vtbl_initializer): Likewise. + * init.c (sort_mem_initializers, build_delete, push_base_cleanups, + build_vbase_delete): Likewise. + * method.c (do_build_copy_constructor): Likewise. + * name-lookup.c (new_class_binding, print_binding_level, + poplevel_class, store_class_bindings, push_to_top_level, + pop_from_top_level): Likewise. + * pt.c (check_explicit_specialization): Likewise. + * search.c (lookup_conversion_operator, lookup_fnfields_1, + get_pure_virtuals, add_conversions, dfs_check_overlap, + binfo_for_vbase): Likewise. + +2004-07-19 Kriang Lerdsuwanakij + + PR c++/12170 + * pt.c (unify) : Use only + innermost set of template arguments during deduction. Simplify. + +2004-07-19 Joseph S. Myers + + * typeck.c (build_modify_expr, build_x_modify_expr): Set + TREE_NO_WARNING on assignments with an operator other than '='. + +2004-07-10 Steven Bosscher + Joseph S. Myers + + * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove. + * decl2.c (grokfield): Don't check current_class_depth via + unused TREE_COMPLEXITY. + * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING + to avoid the missing parentheses warning. + Don't set C_SET_EXP_ORIGINAL_CODE. + +2004-07-18 Mark Mitchell + + * tree.c (no_linkage_helper): Remove. + (no_linkage_check): Don't use walk_tree_without_duplicates. + + * mangle.c (write_expression): Issue a sorry for zero-operand + functional casts. + +2004-07-18 Kriang Lerdsuwanakij + + PR c++/13092 + * init.c (build_offset_ref): Build SCOPE_REF with non-null + TREE_TYPE for non-dependent names. + * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF. + * pt.c (type_dependent_expression_p): Handle SCOPE_REF with + unknown_type_node as its TREE_TYPE. + * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. + * error.c (dump_decl) : Use pp_expression. + (dump_expr) : Likewise. + +2004-07-17 Jason Merrill + + PR c++/16115 + * call.c (type_passed_as): Make the invisible reference type + __restrict. + * cp-gimplify.c (gimplify_cleanup_stmt): Rename to + cp_genericize_r. Handle invisible reference lowering. + (is_invisiref_parm): New fn. + (cp_genericize): Adjust the types of invisible reference parms. + Don't repeat the walk for clones. + * decl.c (store_parm_decls): Don't generate any code for clones. + +2004-07-17 Joseph S. Myers + + * cp-tree.h (builtin_function): Declare. + +2004-07-16 Mark Mitchell + + * class.c (finish_struct_methods): Remove unncessary code. + (add_implicitly_declared_members): Create declarations for default + constructors and copy constructors lazily. + * cp-tree.h (lang_type_class): Remove lazy_default_ctor and + lazy_copy_ctor. + (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro. + (CLASSTYPE_LAZY_COPY_CTOR): Likewise. + * decl2.c (check_classfn): Robustify. + (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC. + (locate_ctor): Handle lazy default constructors. + (locate_copy): Handle lazy copy constructors. + (implicitly_declare_fn): Make sure we're looking at the + TYPE_MAIN_VARIANT for a class before creating functions. Don't + set TYPE_HAS_CONSTRUCTOR. + (lazily_declare_fn): New function. + * name-lookup.c (constructor_name_full): Simplify. + * search.c (lookup_fnfields_1): Lazily create methods, as + necessary. + (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC. + +2004-07-16 Steven Bosscher + + * cp-tree.h (struct lang_type): Don't have three GTY options on a + single bit GTY desc. + +2004-07-16 Richard Henderson + + * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die. + * cp-tree.h (cp_copy_res_decl_for_inlining): Remove. + * tree.c (cp_copy_res_decl_for_inlining): Remove. + +2004-07-16 Nathan Sidwell + + * class.c (finish_struct_bits): Use for loop. + (propagate_binfo_offsets): Do primary binfo outside of loop. + + PR c++/16583 + * dump.c (cp_dump_tree): Don't dump the bases if there's no + binfo. + + * pt.c (tsubst) : We should never get here. + +2004-07-15 Mark Mitchell + + * cp-tree.h (lang_type_class): Remove has_real_assign_ref and + has_abstract_assign_ref. Make methods a VEC(tree) *. + (TYPE_HAS_CONST_ASSIGN_REF): Add documentation. + (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC. + (CLASSTYPE_DESTRUCTORS): Likewise. + (TYPE_HAS_REAL_ASSIGN_REF): Remove. + (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. + (add_method): Change prototoype. + * class.c (add_method): Remove error_p parameter. Adjust for + changes to CLASSTYPE_METHOD_VEC. + (handle_using_decl): Adjust call to add_method. + (maybe_warn_about_overly_private_class): Adjust for + changes to CLASSTYPE_METHOD_VEC. + (resort_type_method_vec): Likewise. + (finish_struct_methods): Likewise. + (check_for_override): Likewise. + (warn_hidden): Likewise. + (add_implicitly_declared_members): Defer creation of assignment + operators. Adjust call to add_method. + (clone_function_decl): Adjust call to add_method. + (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF. + (finish_struct_1): Use CLASSTYPE_DESTRUCTORS. + * decl.c (grok_special_member_properties): Don't set + TYPE_HAS_ABSTRACT_ASSIGN_REF. + * decl2.c (check_classfn): Adjust for + changes to CLASSTYPE_METHOD_VEC. + * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS. + (locate_ctor): Use CLASSTYPE_CONSTRUCTORS. + (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC. + (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call + cp_finish_decl. + * pt.c (check_explicit_specialization): Adjust for + changes to CLASSTYPE_METHOD_VEC. + (instantiate_class_template): Do not set + TYPE_HAS_ABSTRACT_ASSIGN_REF. + * ptree.c (cxx_print_type): Don't try to print + CLASSTYPE_METHOD_VEC. + * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS. + * search.c (lookup_field_r): Adjust for + changes to CLASSTYPE_METHOD_VEC. + (lookup_fnfields): Likewise. + (lookup_conversion_operator): Likewise. + (lookup_fnfields_1): Likewise. Create assignment operators + lazily. + (look_for_overrides_here): Adjust for + changes to CLASSTYPE_METHOD_VEC. + (add_conversions): Likewise. + * semantics.c (finish_member_declaration): Adjust call to add_method. + +2004-07-15 Jason Merrill + + * cp-lang.c (cxx_types_compatible_p): To the middle-end, + references and pointers are compatible. + +2004-07-15 Nathan Sidwell + + * decl.c (xref_basetypes): Refactor. + * tree.c (copy_base_binfos): Replace with ... + (copy_binfo): ... this. Deep copy the given binfo, (not the just + bases of the given base). + * cp-tree.h (copy_base_binfo): Remove. + (copy_binfo): Declare. + +2004-07-15 Mark Mitchell + + * name-lookup.c (set_inherited_value_binding_p): Add class_type + parameter. + (get_class_binding): Adjust. + (push_class_level_binding): Don't use set_inherited_value_binding_p. + +2004-07-15 Nathan Sidwell + + * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here. + * decl.c (xref_basetypes): Set it here. + + * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here. + Don't check for incomplete base. + (get_vfield_name): Simplify while loop. + * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here. + +2004-07-14 Mark Mitchell + + * lex.c (cxx_make_type): Remove call to get_pointer_type. + + * cp-tree.h (IDENTIFIER_VALUE): Remove. + (BINFO_PUSHDECLS_MARKED): Likewise. + (maybe_inject_for_scope_var): Likewise. + (push_class_decls): Likewise. + * name-lookup.h (push_class_binding): Remove. + (innermost_non_namespace_value): New function. + (outer_binding): Likewise. + * class.c (add_method): Push bindings before adding to + TYPE_METHODS. + (restore_class_cache): Do not restore class_shadowed. + (pushclass): Do not add USING_DECLs. Do not call + push_class_decls. + * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c. + * decl.c (pushdecl): Use outer_binding. + (poplevel): Set the scope for an out-of-scope for-loop declaration + appropriately. + (cp_finish_decl): Don't call maybe_inject_for_scope_var. + * name-lookup.c (new_class_binding): New function. + (push_binding): Use it. + (pushdecl): Use innermost_non_namespace_value. + (maybe_inject_for_scope_var): Remove. + (push_class_binding): Remove. + (set_inherited_value_binding_p): New function. + (get_class_binding): New function. + (push_class_level_binding): Assert that the current_class_type is + being defined. + (outer_binding): New function. + (innermost_non_namespace_value): Likewise. + (lookup_name_real): Use outer_binding. + (lookup_name_current_level): Ignore out-of-scope variables. + * pt.c (check_template_shadow): Use innermost_non_namespace_value. + (lookup_template_class): Likewise. + * search.c (dfs_push_type_decls): Remove. + (dfs_push_decls): Likewise. + (setup_class_bindings): Likewise. + (lookup_field_1): Handle USING_DECLs from dependent scopes. + (marked_pushdecls_p): Remove. + (unmarked_pushdecls_p): Remove. + (marked_identifiers): Remove. + (setup_class_bindings): Remove. + (dfs_push_type_decls): Remove. + (dfs_push_decls): Remove. + (push_class_decls): Remove. + +2004-07-13 Mark Mitchell + + PR c++/16518 + PR c++/16337 + * decl.c (grokvardecl): Make declspecs parameter const. + (grokdeclarator): Likewise. Adjust accordingly. + * decl.h (grokdeclarator): Adjust declaration. + * parser.c (cp_parser_init_declarator): Do not clear + decl_specifiers->attributes. + + * cp-tree.h (lang_identifier): Remove class_value. + (IDENTIFIER_CLASS_VALUE): Remove. + (pop_class_decls): Likewise. + (init_search_processing): Likewise. + * class.c (handle_using_decl): Use lookup_member, not + IDENTIFIER_CLASS_VALUE. + (restore_class_cache): New function, split out from ... + (pushclass): ... here. Do not call clear_identifier_class_values. + (invalidate_class_lookup_cache): Do not clear + IDENTIFIER_CLASS_VALUE. + (popclass): Do not call pop_class_decls. + (maybe_note_name_used_in_class): Do not save names looked up after + the class is complete. Use lookup_member, not + IDENTIFIER_CLASS_VALUE. + * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c. + * decl.c (cxx_init_decl_processing): Do not call + init_search_processing. + * method.c (do_build_copy_constructor): Remove unnecessary code. + (do_build_assign_ref): Likewise. + * name-lookup.c (pushdecl): Use lookup_member, not + IDENTIFIER_CLASS_VALUE. + (set_identifier_type_value_with_scope): Set TREE_TYPE on the + type_shadowed list. + (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE. + (push_class_binding): Do not set it. + (clear_identifier_class_values): Remove. + (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE. + (store_binding): Do not save it. + (pop_from_top_level): Do not restore it. + * name-lookup.h (cxx_saved_binding): Remove class_value. + (clear_identifier_class_values): Remove. + * ptree.c (cxx_print_identifier): Do not print + IDENTIFIER_CLASS_VALUE. + * search.c (search_obstack): Remove. + (push_stack_level): Remove. + (pop_stack_level): Remove. + (search_level): Remove. + (search_stack): Remove. + (lookup_member): Don't check IDENTIFIER_CLASS_VALUE. + (setup_class_bindings): Use IDENTIFIER_MARKED, not + IDENTIFIER_CLASS_VALUE. + (marked_identifiers): New variable. + (push_class_decls): Clear IDENTIFIER_MARKED. + (pop_class_decls): Don't call pop_search_level. + (init_search_processing): Remove. + +2004-07-12 Mark Mitchell + + * cp-tree.h (get_aggr_typedef): Remove. + * init.c (get_aggr_typedef): Likewise. + + * name-lookup.c (push_class_level_binding): Simplify. + +2004-07-12 Andrew Pinski + + PR c++/16475 + Revert: + 2004-07-07 H.J. Lu + PR c++/16276 + * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo + is not public. + +2004-07-12 Eric Christopher + + * parser.c (cp_parser_class_head): Remove unused variable. + +2004-07-12 Giovanni Bajo + + * decl.c (grok_op_properties): Reject [de-]allocation functions + declared in a namespace, or declared as static. + +2004-07-12 Nathan Sidwell + + * cp-tree.h (make_binfo): Remove. + * decl.c (xref_basetypes): Use make_tree_binfo directly. + * tree.h (copy_base_binfos): Likewise. + (make_binfo): Remove. + + * call.c (build_user_type_conversion_1, build_new_op, + check_constructor_callable, build_temp, + perform_direct_initialization_of_possible): Pass type directly to + lookup_fnfields & build_special_member_call. + (build_special_member_call): Accept a type, and complete it. + * class.c (finish_stuct_bits): Copy the BINFOs here. + * cvt.c (ocp_convert): Pass type directly to + build_special_member_call. + * decl.c (build_ptrmemfunc_type): Call xref_bastypes here. + (xref_basetypes): Allocate the binfo here. Adjust. + * init.c (build_init, build_new_1): Pass type directly to + build_special_member_call. + * lex.c (cxx_make_type): Do not allocate binfo here. + * name-lookup.c (arg_assoc_class): Incomplete types have no binfo. + * parser.c (cp_parser_class_head): Always call xref_basetypes. + * pt.c (instantiate_class_template): Likewise. Inhibit access + checking for template friends. + * ptree.c (cxx_print_type): Adjust record printing. + * search.c (lookup_base): When taking a type, complete it before + looking for a binfo. + (lookup_member): Delay completing a type. + (push_class_decls): Don't walk an incomplete type. + (lookup_conversions): Likewise. + * semantics.c (finish_stmt_expr_expr): Pass type directly to + build_special_member_call. + * tree.c (copy_base_binfos): Adjust. + (make_binfo): Likewise. + * typeck.c (build_modify_expr): Pass type directly to + build_special_member_call. + * typeck2.c (process_init_constructor): Check a binfo exists. + (build_m_component_ref): Allow accessing an incomplete type. + (build_functional_cast): Pass type directly to + build_special_member_call. + +2004-07-12 Giovanni Bajo + + PR c++/2204 + * config-lang.in (gtfiles): Add typeck2.c. + * Make-lang.in: Tweak typeck2.c dependencies, and add rule for + gt-cp-typeck2.h. + * cp-tree.h: Declare complete_type_check_abstract. + * typeck2.c (pat_calc_hash, pat_compare, + complete_type_check_abstract): New functions. + (abstract_virtuals_error): If the type is abstract, register the + declaration within abstract_pending_vars for further checks. + Inspect also dependent types. Handle IDENTIFIER_NODEs as decl. + * decl.c (cp_finish_decl): Do not strip array types. + (create_array_type_for_decl): Check for abstractness of the element + type. + (complete_vars): Call complete_type_check_abstract. + * class.c (finish_struct): Prepare a list of virtual functions for + template types, and call complete_vars on it to check for abstractness. + +2004-07-12 Paolo Bonzini + + PR tree-optimization/14107 + * decl.c (finish_function): Remove temporary band-aid. + +2004-07-11 Mark Mitchell + + * call.c (build_operator_new_call): Avoid using push_to_top_level. + (build_new_op): Adjust call to lookup_function_nonclass. + * name-lookup.c (identifier_type_value): Adjust call to + lookup_name_real. + (lookup_name_real): Add block_p parameter. + (lookup_name_nonclass): Adjust call to lookup_name_real. + (lookup_function_nonclass): Likewise. + (lookup_name): Likewise. + * name-lookup.h (lookup_name_real): Change prototype. + (lookup_name_nonclass): Likewise. + * parser.c (cp_parser_lookup_name): Likewise. + + * cp-tree.h (saved_scope): Make old_bindings a vector. + (unuse_fields): Remove. + * name-lookup.h (cxx_saved_binding): Define it. + * class.c (pushclass): Don't use unuse_fields. + * name-lookup.c (cxx_saved_binding_make): Remove. + (store_binding): Add new bindings to a vector, using an + accumulator style, rather than adding them to a list. + (store_bindings): Adjust accordingly. + (store_class_bindings): Likewise. + (push_to_top_level): Likewise. + (pop_from_top_level): Likewise. + * optimize.c (maybe_clone_body): Must push_to_top_level and + pop_from_top_level calls outside of loop. + * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope + calls here from cp_parser_late_parsing_default_args. + (cp_parser_save_default_args): Record the class type in which the + function is declared. + (cp_parser_late_parsing_default_args): Do not call + push_nested_class/pop_nested_class. + * search.c (dfs_unuse_fields): Remove. + (unuse_fields): Remove. + +2004-07-11 Joseph S. Myers + + * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL, + LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove. + * cp-tree.h (poplevel): Declare. + (set_block): Remove. + * decl.c (set_block): Remove. + +2004-07-10 Mike Stump + + * decl2.c (import_export_class): Never export/import vtables + with inline key functions. + +2004-07-09 Steven Bosscher + + * typeck.c (c_expand_asm_operands): Remove. + +2004-07-09 Mike Stump + + * typeck.c (build_class_member_access_expr): Skip null deref + warning when we don't dereference it. + +2004-07-09 Giovanni Bajo + + PR c++/8211 + PR c++/16165 + * class.c (check_field_decls): Improve -Weffc++ warning: do not + warn for pointers to functions/members, or for classes without + destructors. + +2004-07-08 Mark Mitchell + + * name-lookup.h (struct cp_binding_level): Update documentation + for class_shadowed. + +2004-07-08 Giovanni Bajo + + PR c++/16169 + * typeck.c (check_return_expr): Improve -Weffc++ warning: handle + returning CALL_EXPR, and non-reference return type. + +2004-07-08 Nathan Sidwell + + * name-lookup.c (push_binding): Use VEC_reserve. + +2004-07-08 Richard Henderson + + * cp-tree.h (expand_eh_spec_block): Remove. + +2004-07-07 Mark Mitchell + + * cp-tree.h (saved_scope): Remove x_previous_class_type and + x_previous_class_values; add x_previous_class_level. + (previous_class_type): Remove. + (previous_class_values): Remove. + (previous_class_level): New macro. + * class.c (pushclass): Restore the identifier cache more + expeditiously. + (invalidate_class_lookup_cache): Use vector for class_shadowed and + previous_class_values. + * decl.c (poplevel): Likewise. + * name-lookup.c (cxx_binding_init): New function. + (cxx_binding_make): Use it. + (push_binding): For a binding in a class level, use a vector of + cp_class_binding nodes. + (push_binding_level): New function. + (begin_scope): Use it. + (leave_scope): Do not put class binding levels on the free list. + (print_binding_level): Adjust for the fact that class_shadowed is + a vector. + (poplevel_class): Likewise. + (clear_identifier_class_values): Likewise. + (push_class_level_binding): Likewise. + (set_class_shadows): Remove. + (store_binding): New function. + (store_class_bindings): New function. + (push_to_top_level): Use store_class_bindings as appropriate. + (pop_from_top_level): Use previous_class_level, not + previous_class_type. + * name-lookup.h (cp_class_binding): New type. + (cp_binding_level): Use a vector object for class_shadowed. + (push_binding_level): Declare. + (set_class_shadows): Remove. + +2004-07-07 Andrew Pinski + + * class.c (instantiate_type): BUFFER_REF is dead. + * lex.c (init_operators): IN_EXPR is dead. + +2004-07-07 Jason Merrill + + PR c++/16334 + * call.c (build_new_op): Give overload warnings for built-in + candidates. + +2004-07-07 H.J. Lu + + PR c++/16276 + * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo + is not public. + +2004-07-07 Nathan Sidwell + + * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove. + * class.c (build_primary_vtable, check_bases, + determine_primary_base, finish_struct_bits, + maybe_warn_about_overly_private_class, dfs_find_final_overrider_q, + get_basefndecls, warn_hidden, walk_subobject_offsets, + build_base_fields, create_vtable_ptr, propagate_binfo_offsets, + layout_virtual_bases, end_of_class, warn_about_ambiguous_bases, + finish_struct_1, get_vfield_name, contains_empty_class_p, + dump_class_hierarchy_r, finish_vtbls, build_vtt_inits, + dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits, + add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust + BINFO macros. + * decl.c (xref_basetypes): Likewise. + * dump.c (cp_dump_tree): Likewise. + * error.c (dump_expr): Likewise. + * init.c (sort_mem_initializers, expand_member_init, + push_base_cleanups): Likewise. + * method.c (do_build_copy_constructor, do_build_assign_reg, + synthesize_exception_spec): Likewise. + * name-lookup.c (arg_assoc_class): Likewise. + * pt.c (instantiate_class_template, tsubst, + get_template_base_recursive): Likewise. + * ptree.c (cxx_print_type): Likewise. + * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise. + * search.c (lookup_base_r, dynamic_cast_base_recurse, + dfs_access_in_type, access_in_type, lookup_field_queue_p, + bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp, + marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp, + dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet, + binfo_for_vtable, copied_binfo, original_binfo): Likewise + * tree.c (copy_base_binfos, make_binfo): Likewise. + * typeck.c (commmon_base_type): Likewise + * typeck2.c (process_init_constructor): Likewise + +2004-07-06 Joseph S. Myers + + * decl.c (check_tag_decl): Name redeclared type in diagnostic. + +2004-07-06 Giovanni Bajo + + PR c++/3671 + * pt.c (convert_nontype_argument): Disallow conversions between + different enumeration types. + +2004-07-06 Nathan Sidwell + + * cp-tree.h (BINFO_MARKED): Remove. + (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED, + BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P, + BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n. + (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P. + * class.c (build_base_path): Use BINFO_VIRTUAL_P. + (mark_primary_bases, determine_primary_base, base_derived_from, + dfs_find_final_overrider, dfs_find_final_overrider_q, + dfs_find_inal_overrider_post, update_vtable_entry_for_fn, + dfs_modify_vtables, walk_subobject_offsets, + layout_nonempty_base_or_field, build_base_field, + build_base_fields, propagate_binfo_offsets, layout_virtual_bases, + end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable, + finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits, + build_ctor_vtbl_group, accumulate_vtble_inits, + dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries, + build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r, + add_vcall_offset_vtbl_entries_1): Likewise. + * decl.c (xref_basetypes): Incomming virtual base indicated by + TREE_TYPE. Adjust. + * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P. + * init.c (finish_init_stmts, sort_mem_initializers, + emit_mem_initializers, build_vtble_address, expand_member_init, + push_base_cleanups): Likewise. + * method.c (do_build_copy_constructor): Likewise. + * pt.c (instantiate_class_template, + get_template_base_recursive): Likewise. + * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init, + get_pseudo_ti_desc): Likewise. + * search.c (lookup_base_r, dynamic_cast_base_recurse, + binfo_from_vbase, binfo_via_virtual, copied_binfo, + original_binfo): Likewise. + * semantics.c (finish_base_specifier): Virtualness is indicated + by TREE_TYPE. + * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P. + +2004-07-06 Mark Mitchell + + Revert: + 2004-06-24 Jason Merrill + PR c++/16115 + * decl.c (grokparms): Give the PARM_DECL reference type if the + parameter is passed by invisible reference. + +2004-07-05 Richard Kenner + + * cp-lang.c (cp_var_mod_type_p): Add extra arg. + * decl.c (grokdeclarator): Extra arg to variably_modified_type_p. + * pt.c (check_instantiated_args, unify): Likewise. + +2004-07-05 Phil Edwards + + * Make-lang.in (check-c++, lang_checks): Add some comments. + +2004-07-05 Zack Weinberg + + * cp-mudflap.c: Delete file. + * Makefile.in: Remove all references to cp-mudflap.o. + +2004-07-05 Zack Weinberg + + * decl.c (cxx_init_decl_processing): Call + build_common_tree_nodes before creating the global NAMESPACE_DECL. + +2004-07-05 Giovanni Bajo + + PR c++/2518 + * call.c (build_operator_new_call): Look only at global scope. + +2004-07-05 Nathan Sidwell + + * call.c (enforce_access): Expect TREE_BINFO. + * class.c (binfo_ctor_vtable): Check TREE_BINFO. + * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove. + (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): + Adjust. + (BINFO_LANG_ELTS): Remove. + (BINFO_LANG_SLOTS): New. + (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1. + (CLASSTYPE_TEMPLATE_INFO): Adjust. + * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case. + * search.c (lookup_member): Check TREE_BINFO. + * semantics.c (perform_or_defer_access_check): Likewise. + (check_accessibility_of_qualified_id): Check + deferred_access_no_check. + * tree.c (make_binfo): Use make_tree_binfo. + +2004-07-04 Mark Mitchell + + * method.c (implicitly_declare_fn): Set linkage of generated + functions. + +2004-07-04 Richard Henderson + + * typeck.c (cxx_mark_addressable): Don't put_var_into_stack. + +2004-07-03 Scott Brumbaugh + + PR c++/3761 + * name-lookup.c (push_class_level_binding): Don't pass a + TREE_LIST of ambiguous names to check_template_shadow as it + only handles declarations. Instead, pull the declaration + out and pass that. + +2004-07-03 Giovanni Bajo + + PR c++/14971 + * pt.c (check_explicit_specialization): Clarify error message. + +2004-07-02 Richard Henderson + + * tree.c (cp_unsave_r): Update remap_save_expr call. + +2004-07-02 Mark Mitchell + + PR c++/16240 + * mangle.c (write_template_arg): Correct mangling. + + PR c++/16297 + * decl.c (grokdeclarator): Robustify. + +2004-07-01 Richard Henderson + + * class.c (fixed_type_or_null): Don't handle RTL_EXPR. + * method.c (synthesize_method): Don't clear_last_expr. + * name-lookup.c (maybe_push_cleanup_level): Likewise. + +2004-07-01 Nick Clifton + + * decl2.c (import_export_class): Invoke the + import_export_class field in the gcc_target structure if it is not + empty. + +2004-06-30 Richard Henderson (rth@redhat.com> + + * decl.c (start_preparsed_function): Don't set immediate_size_expand. + * method.c (use_thunk): Likewise. + +2004-06-30 Joseph S. Myers + + * call.c (build_over_call), typeck.c (build_function_call): Call + check_function_arguments instead of check_function_format. + +2004-06-30 Joseph S. Myers + + * call.c (build_over_call), typeck.c (build_function_call): Update + calls to check_function_format. + +2004-06-30 Richard Henderson + + * call.c (build_over_call): Use __builtin_memcpy for copying + CLASS_AS_BASE rather than funny casting. + +2004-06-30 Richard Henderson + + * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and + TYPE_SIZE_UNIT of full_type. + +2004-06-30 Per Bothner + + Conditionally compile support for --enable-mapped_location. + * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case. + * decl2.c: If USE_MAPPED_LOCATION, don't do some line number + adjustments - which I don't understand. + * error.c (dump_decl): Rename "" to "". + * error.c: Use LOCATION_FILE and EXPR_LOCATION macros. + (print_instantiation_partial_context): Use expand_location. + * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro. + * name-lookup.c: Likewise. + * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION. + * name-lookup.c: Use input_line macro. + * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION. + (cp_parser_statement): Rename locaal variable statement_locus to + statement_location and use SET_EXPR_LOCATION macro. + * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros. + * tree.c (cp_walk_subtrees): Likewise. + +2004-06-29 Per Bothner + + * tree.c (build_min_nt, build_min, build_min_non_dep): + Don't set TREE_COMPLEXITY from input_line. + +2004-06-29 Paul Brook + + * init.c: Include target.h. + (get_cookie_size): Remove and replace with target hook. + Update callers. + (build_new_1): Store the element size in the cookie. + +2004-06-29 Nathan Sidwell + + PR c++/16260 + * parser.c (cp_parser_template_declaration_after_export): Disable + access checks here ... + (cp_parser_class_specifier): ... not here. + +2004-06-28 Nathan Sidwell + + * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK, + VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK, + BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate + TREE_CHECK macro. + +2004-06-28 Nathan Sidwell + + * cp-tree.h (struct deferred_access): Move to ... + * semantics.c (struct deferred_access): ... here. Adjust. + (deferred_access_stack): Make a VEC(deferred_access), + (deferred_access_free_list): Remove. + (deferred_access_no_check): New. + (push_deferring_access_checks, resume_deferring_access_checks, + stop_deferring_access_checks, pop_deferring_access_checks, + get_deferred_access_checks, pop_to_parent_deferring_access_checks, + perform_deferred_access_checks, perform_or_defer_access_check): Adjust. + +2004-06-28 Nathan Sidwell + + PR c++/16174 + * call.c (build_temp): Declare. + (check_constructor_callable): New. + (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for + CONSTRUCTOR_CALLABLE. + (convert_like_real, initialize_reference): Use + check_constructor_callable. + * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New. + (LOOKUP_*): Renumber. + +2004-06-28 Nathan Sidwell + + * friend.c (add_friend): Only perform access checks when context + is a class. + * lex.c (cxx_make_type): Only create a binfo for aggregate types. + * parser.c (cp_parser_class_specifier): Disable access checks here + when parsing the body of a templated class. + * semantics.c (perform_or_defer_access_checks): Reorder to allow + NULL binfos when not checking access. + +2004-06-28 Nathan Sidwell + + Use vector API for vbase list. + * cp-tree.h: Include vec.h + (DEF_VEC_P (tree)): New type. + (struct lang_type_class): Change vbase's member type. + (binfo_for_vbase): Declare. + * class.c (determine_primary_base, base_derived_from, + update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class, + warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits, + build_vtbl_initializer): Adjust. + * decl.c (xref_basetypes): Adjust, accumulate upper bound of + vbases. + * init.c (sort_mem_initializers, expand_member_init, + push_base_cleanups): Adjust. + * method.c (do_build_copy_constructor): Adjust. + * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust. + (binfo_for_vbase): New. + * tree.c (copy_base_binfos): Adjust. + +2004-06-28 Mark Mitchell + + * parser.c (cp_parser_set_decl_spec_type): Fix thinko. + +2004-06-27 Gabriel Dos Reis + + PR c++/14123 + * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put + paranthesis in case of pointers to array members. + * error.c (dump_type_prefix): Likewise. + (dump_type_suffix): Maybe issue a whitespace when printing + ARRAY_TYPE. + +2004-06-27 Mark Mitchell + + PR c++/16193 + * parser.c (cp_parser_set_decl_spec_type): Refine test for + redefinition of built-in types. + +2004-06-27 Gabriel Dos Reis + + * error.c (pp_template_argument_list_start): Remove. + (pp_template_argument_list_end): Likewise. + (pp_separate_with_comma): Use pp_cxx_separate_with. + (reinit_global_formatting_buffer): Remove. + (pp_non_consecutive_character): Likewise. + (dump_scope): Use pp_cxx_colon_colon. + (dump_template_parameter): Use pp_cxx_identifier, + pp_cxx_tree_identifier and pp_cxx_whitespace. + (dump_templat_bindings): Replace use of pp_string with sequence + of pp_cxx_whitespace and pp_equal. + (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, + pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set + padding here. + (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. + (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, + pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. + (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, + pp_cxx_right_bracket, pp_cxx_identifier throughout, + (dump_decl): Likewise. + (dump_template_decl): Likewise. + (dump_function_decl): Likewise. Set padding as appropriate. + (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and + pp_cxx_right_paren. + (dump_exception_spec): Likewise. + (dump_function_name): Use pp_cxx_tree_identifier and + pp_cxx_identifier. + (dump_template_parms): Use pp_cxx_begin_template_argument_list and + pp_cxx_end_template_argument_list. + (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, + pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and + pp_cxx_whitespace throughout. + (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and + pp_cxx_right_paren. + (dump_unary_op): Likewise. + (reinit_cxx_pp): New function. + (type_as_string); Use it. + (expr_as_string): Likewise. + (decl_as_string); Likewise. + (context_as_string): Likewise. + (lang_decl_name): Likewise. + (decl_to_string): Likewise. + (expr_to_string): Likewise. + (parm_to_string): Likewise. + (type_to_string): Likewise. + (args_to_string): Likewise. + (cv_to_string): Likewise. + +2004-06-26 Mark Mitchell + + * cp-tree.h (cp_cv_quals): New type. + (cp_declarator): Use it instead of "tree" as appropriate. + (grok_method_quals): Adjust prototype. + (grokclassfn): Likewise. + (do_friend): Likewise. + * decl.c (grokfndecl): Use cp_cv_quals, not tree. + (grokdeclarator): Likewise. + * decl2.c (grok_method_quals): Likewise. + (grokclassfn): Likewise. + * friend.c (do_friend): Likewise. + * method.c (implicitly_declare_fn): Adjust call to grokclassfn. + * parser.c (make_call_declarator): Use cp_cv_quals, not tree. + (make_pointer_declarator): Likewise. + (make_reference_declarator): Likewise. + (make_ptrmem_declarator): Likewise. + (cp_parser_ptr_operator): Likewise. + (cp_parser_cv_qualifier_seq_opt): Likewise. + (cp_parser_cv_qualifier_opt): Remove. + (cp_parser_new_declarator_opt): Adjust call to + cp_parser_ptr_operator. + (cp_parser_conversion_declaration_opt): Likewise. + (cp_parser_declarator): Use cp_cv_quals, not tree. + (cp_parser_direct_declarator): Likewise. + +2004-06-26 Richard Kenner + + * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c: + Rename DECL_STMT to DECL_EXPR. + * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise. + * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted. + * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees. + +2004-06-26 Jan Hubicka + + PR C++/14865 + * decl2.c (maybe_emit_vtables): Always import_export_vtable for the + reachability analysis. + +2004-06-25 Mark Mitchell + + * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from + 2004-06-23 change. + +2004-06-25 Paul Brook + + * decl2.c (get_guard): Call targetm.cxx.guard_type. + (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit. + +2004-06-24 Mark Mitchell + + * decl.c (grokdeclarator): Restore error messages about __thread. + * parser.c (cp_parser_decl_specifier_seq): Likewise. + +2004-06-24 Jason Merrill + + PR c++/16115 + * decl.c (grokparms): Give the PARM_DECL reference type if the + parameter is passed by invisible reference. + +2004-06-24 Andreas Schwab + + * cp-tree.h (enum cp_storage_class): Remove trailing comma. + +2004-06-23 Mark Mitchell + + * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h. + (cp/decl.o): Likewise. + (cp/decl2.o): Likewise. + (cp/pt.o): Likewise. + (cp/semantics.o): Likewise. + * config-lang.in (gtfiles): Do not reference cp/lex.h. + * class.c: Do not include lex.h. + (add_implicitly_declared_members): Do not use + adding_implicit_members. + (check_bases_and_members): Do not talk about grok_x_components. + * cp/cp-tree.h (adding_implicit_members): Remove. + (cp_storage_class): New type. + (cp_decl_spec): Likewise. + (cp_decl_specifier_seq): Likewise. + (cp_parameter_declarator): Use it for the decl_specifiers field. + (check_tag_decl): Adjust prototype. + (shadow_tag): Likewise. + (groktypename): Likewise. + (start_decl): Likewise. + (start_function): Likewise. + (start_method): Likewise. + (grok_x_components): Remove. + (grokfield): Adjust prototype. + (grokbitfield): Likewise. + (finish_member_class_template): Remove. + * decl.c: Do not include lex.h. + (adding_implicit_members): Do not define. + (check_tag_decl): Do not use trees to represent decl-specifiers. + (shadow_tag): Likewise. + (groktypename): Likewise. + (start_decl): Likewise. + (grokvardecl): Likewise. + (grokdeclarator): Likewise. + (grokparms): Likewise. + (start_function): Likewise. + (start_method): Likewise. + * decl.h (grokdeclarator): Adjust prototype. + * decl2.c: Do not include lex.h. + (grok_x_components): Remove. + (grokfield): Do not use trees to represent decl-specifiers. + (grokbitfield): Likewise. + * lex.c: Do not include lex.h. + * lex.h: Remove. + * parser.c: Include target.h. + (clear_decl_specs): New function. + (cp_parser_translation_unit): Do not use trees to represent + decl-specifiers. + (cp_parser_postfix_expression): Likewise. + (cp_parser_new_type_id): Likewise. + (cp_parser_condition): Likewise. + (cp_parser_simple_declaration): Likewise. + (cp_parser_decl_specifier_seq): Likewise. + (cp_parser_function_specifier_opt): Likewise. + (cp_parser_conversion_type_id): Likewise. + (cp_parser_template_parameter): Likewise. + (cp_parser_explicit_instantiation): Likewise. + (cp_parser_type_specifier): Likewise. + (cp_parser_simple_type_specifier): Likewise. + (cp_parser_init_declarator): Likewise. + (cp_parser_type_id): Likewise. + (cp_parser_type_specifier_seq): Likewise. + (cp_parser_parameter_declaration): Likewise. + (cp_parser_member_declaration): Likewise. + (cp_parser_exception_declaration): Likewise. + (cp_parser_function_definition_from_specifiers_and_declarator): + Likewise. + (cp_parser_single_declaration): Likewise. + (cp_parser_save_member_function_body): Likewise. + (cp_parser_friend_p): Likewise. + (cp_parser_set_storage_class): New function. + (cp_parser_set_decl_spec_type): Likewise. + * pt.c: Do not include lex.h. + * semantics.c: Likewise. + (finish_member_class_template): Remove. + +2004-06-23 Roger Sayle + + * call.c (build_cxx_call): Don't call expand_tree_builtin. No + longer take both "args" and "convert_args" as arguments. + (build_op_delete_call): Update call to build_cxx_call. + (build_over_call): Likewise, update call to build_cxx_call. + * cp-tree.h (build_cxx_call): Update funtion prototype. + * typeck.c (build_function_call): Don't call expand_tree_builtin. + * rtti.c (throw_bad_cast): Update call to build_cxx_call. + (throw_bad_typeid): Likewise. + (build_dynamic_cast_1): Likewise. + +2004-06-22 Richard Henderson + + * class.c (build_vfn_ref): Take a pointer not object. Build + an OBJ_TYPE_REF. + (cp_fold_obj_type_ref): New. + * call.c (build_over_call): Update build_vfn_ref call. + * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New. + * cp-tree.h (cp_fold_obj_type_ref): Declare. + +2004-06-21 Jason Merrill + + PR c++/16112 + * cp-gimplify.c (cp_gimplify_init_expr): Look through + CLEANUP_POINT_EXPR. + +2004-06-21 Mark Mitchell + + * cp-tree.def (NEW_EXPR): Add a fourth slot. + * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove. + (TREE_PARMLIST): Likewise. + (CALL_DECLARATOR_PARMS): Likewise. + (CALL_DECLARATOR_QUALS): Likewise. + (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. + (cp_declarator_kind): New type. + (cp_parameter_declarator): Likewise. + (cp_declarator): Likewise. + (cp_error_declarator): Likewise. + (no_parameters): Likewise. + (groktypename): Change prototype. + (start_decl): Likewise. + (start_handler_parms): Likewise. + (get_scope_of_declarator): Likewise. + (start_function): Likewise. + (start_preparsed_function): New function. + (start_function): Change prototype. + (start_method): Likewise. + (grokfield): Likewise. + (grokbitfield): Likewise. + (build_new): Likewise. + (make_pointer_declarator): Remove. + (make_reference_declarator): Likewise. + (make_call_declarator): Likewise. + (set_quals_and_spec): Likewise. + (process_template_parm): Change prototype. + (begin_function_definition): Remove. + (finish_parmlist): Remove. + * decl.c (groktypename): Do not use trees to represent + declarators. + (start_decl): Likewise. + (start_handler_parms): Remove. + (get_scope_of_declarator): Reimplement. + (grokdeclarator): Do not use trees to represent declarators. + (grokparms): Likewise. + (start_function): Likewise. + (start_method): Likewise. + (build_void_list_mode): Do not use TREE_PARMLIST. + * decl.h (grokdeclarator): Change prototype. + * decl2.c (grok_method_quals): Robustify. + (grok_x_components): Do not use trees to represent declarators. + (grokfield): Likewise. + (grokbitfield): Likewise. + (start_objects): Build FUNCTION_DECLs, not declarators. + (start_static_storage_duration_function): Likewise. + * init.c (build_new): Simplify. + * lex.c (make_pointer_declarator): Remove. + (make_reference_declarator): Likewise. + (make_call_declarator): Likewise. + (set_quals_and_spec): Likewise. + * method.c (use_thunk): Use start_preparsed_function. + (synthesize_method): Likewise. + (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators. + * optimize.c (maybe_clone_body): Use start_preparsed_function. + * parser.c (cp_error_declarator): New variable. + (declarator_obstack): Likewise. + (alloc_declarator): New function. + (make_declarator): Likewise. + (make_id_declarator): Likewise. + (make_pointer_declarator): Likewise. + (make_reference_declarator): Likewise. + (make_ptrmem_declarator): Likewise. + (make_call_declarator): Likewise. + (make_array_declarator): Likewise. + (no_parameters): New variable. + (make_parameter_declarator): Likewise. + (cp_parser_check_for_definition_in_return_type): Do not use trees + to represent declarators. + (cp_parser_translation_unit): Likewise. + (cp_parser_new_expression): Likewise. + (cp_parser_new_type_id): Likewise. + (cp_parser_new_declarator_opt): Likewise. + (cp_parser_direct_new_declarator): Likewise. + (cp_parser_condition): Likewise. + (cp_parser_declaration_statement): Likewise. + (cp_parser_declaration): Likewise. + (cp_parser_conversion_type_id): Likewise. + (cp_parser_conversion_declarator_opt): Likewise. + (cp_parser_template_parameter_list): Likewise. + (cp_parser_template_parameter): Likewise. + (cp_parser_explicit_instantiation): Likewise. + (cp_parser_init_declarator): Likewise. + (cp_parser_declarator): Likewise. + (cp_parser_direct_declarator): Likewise. + (cp_parser_type_id): Likewise. + (cp_parser_parameter_declaration_clause): Likewise. + (cp_parser_parameter_declaration_list): Likewise. + (cp_parser_parameter_declaration): Likewise. + (cp_parser_member_declaration): Likewise. + (cp_parser_exception_declaration): Likewise. + (cp_parser_check_declarator_template_parameters): Likewise. + (cp_parser_function_definition_from_specifiers_and_declarator): + Likewise. + (cp_parser_save_member_function_body): Likewise. + * pt.c (process_template_parm): Add is_non_type parameter. + (convert_template_argument): Adjust call to groktypename. + (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST. + (tsubst): Do not expect declarators. + (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional + argument. + (instantiate_decl): Use start_preparsed_function. + * semantics.c (begin_function_definition): Remove. + (finish_parmlist): Remove. + * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not + declarators. + +2004-06-21 Richard Kenner + + * call.c (build_vfield_ref): Add new operand for COMPONENT_REF. + (build_new_method_call): Likewise. + * decl.c (local_variable_p_walkfn): Don't walk into types. + * decl2.c (grok_array_decl): Add new operands for ARRAY_REF. + (build_anon_union_vars): Add new operand for COMPONENT_REF. + * init.c (buld_new): Add new operand for ARRAY_REF. + * method.c (do_build_copy_constructor): New op for COMPONENT_REF. + (do_build_assign_ref): Likewise. + * parser.c (cp_parser_direct_new_declarator): Add new operands + for ARRAY_REF. + (cp_parser_direct_declarator): Likewise. + * pt.c (tsubst): Likewise. + (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand + for COMPONENT_REF. + * semantics.c (finish_non_static_data_member): Add new operand + for COMPONENT_REF. + * typeck.c (build_class_member_access_expr): Likewise. + (build_class_member_access_expr, finish_class_member_access_expr): + Likewise. + (build_ptrmemfunc_access_expr): Likewise. + (build_array_ref): Add new operands for ARRAY_REF. + * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too. + * tree.c (count_trees_r, no_linkage_helper): Don't walk in types. + +2004-06-21 Richard Henderson + + * dump.c (cp_dump_tree): Don't use dump_next_stmt. + * parser.c (cp_parser_jump_statement): Update commentary. + * pt.c (tsubst_expr): Use RETURN_EXPR. + * semantics.c (finish_return_stmt): Likewise. + (finalize_nrv_r): Likewise. + * typeck.c, typeck2.c: Update file start commentary. + +2004-06-21 Richard Henderson + + * semantics.c (finish_expr_stmt): Call verify_sequence_points. + +2004-06-20 Richard Henderson + + * cp-tree.h (add_decl_stmt): Declare. + * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR. + * semantics.c (maybe_cleanup_point_expr): New. + (add_decl_stmt, finish_expr_stmt, finish_return_stmt, + finish_for_expr, finish_switch_cond): Use it. + (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN. + +2004-06-20 Richard Henderson + + * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def. + * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c. + (cp_gimplify_expr): Call it. + (gimplify_cleanup_stmt): Move from c-gimplify.c. + (cp_genericize): New. + * decl.c (finish_function): Call it. + * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT. + (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h. + (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise. + (cp_genericize): Declare. + * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT. + * dump.c (cp_dump_tree): Likewise. + * semantics.c (push_cleanup): Move from c-semantics.c. + +2004-06-20 Zack Weinberg + + * cp-lang.c (has_c_linkage): Implement. + + * cp-tree.h (set_mangled_name_for_decl): Don't prototype. + * decl.c (duplicate_decls): Use COPY_DECL_RTL. + (builtin_function_1): Don't call make_decl_rtl. + (build_cp_library_fn): Don't call set_mangled_name_for_decl. + (grokvardecl): Don't call mangle_decl. + * except.c (nothrow_libfn_p): Look at DECL_NAME, not + DECL_ASSEMBLER_NAME. + * method.c (set_mangled_name_for_decl): Delete. + * name-lookup.c (pushdecl): When a local extern shadows a + file-scope declaration of the same object, give both DECLs the + same DECL_UID. + * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE + on DECL_ASSEMBLER_NAME. + +2004-06-19 Richard Henderson + + * cp-gimplify.c: Remove unnecessary prototypes. + (cp_gimplify_stmt): Merge into ... + (cp_gimplify_expr): ... here. Move to end of file. Handle + stmts_are_full_exprs_p frobbing. + * cp-tree.h (cp_gimplify_stmt): Remove. + * pt.c (tsubst_expr): Merge prep_stmt and unify. + * tree.c (init_tree): Don't set lang_gimplify_stmt. + +2004-06-18 Richard Henderson + + PR c++/16034 + * semantics.c (begin_cond): New. + (finish_cond): Rewrite to handle template DECL_STMTs specially. + Assume that non-template decls go land before the conditional. + (simplify_loop_decl_cond): Likewise. + (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt, + finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond, + begin_switch_stmt, finish_switch_cond): Update to match. + +2004-06-17 Jason Merrill + + PR c++/16015 + * semantics.c (simplify_aggr_init_expr): Don't return the slot. + (finish_stmt_expr_expr): Update type after conversions. + (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR. + Handle void initializer. + * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void. + +2004-06-17 Geoffrey Keating + + * class.c (build_clone): Don't call defer_fn, let mark_used do it. + * cp-tree.h (defer_fn): Delete. + * decl2.c (defer_fn): Delete. + (finish_file): Simplify deferred_fns loops; check that + only used inline functions get into deferred_fns. + (mark_used): Inline previous contents of defer_fn. + +2004-06-16 Richard Henderson + + * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill. + (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New. + * cxx-pretty-print.c (pp_cxx_function_definition): Move handling + of CTOR_INITIALIZER ... + (pp_cxx_statement): ... here. + * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK. + (finish_function): Use alloc_stmt_list to zap entire function. + * parser.c (cp_parser_compound_statement): Update commentary. + * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT. + * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise. + (finish_stmt_expr): Don't look through COMPOUND_STMT. + +2004-06-16 Geoffrey Keating + + * pt.c (mark_decl_instantiated): Don't call defer_fn. + +2004-06-16 Richard Henderson + + * parser.c (cp_parser_labeled_statement): Update commentary. + * pt.c (tsubst_expr): Use CASE_LABEL_EXPR. + * tree.c (mark_local_for_remap_r): Likewise. + +2004-06-16 Richard Henderson + + * parser.c (cp_parser_asm_definition): Update commentary. + * pt.c (tsubst_expr): Use ASM_EXPR. + * semantics.c (finish_asm_stmt): Likewise. + +2004-06-16 Richard Henderson + + * decl.c (finish_destructor_body): Use LABEL_EXPR. + * parser.c (cp_parser_statement): Update commentary. + * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR. + * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise. + * tree.c (mark_local_for_remap_r): Likewise. + +2004-06-16 Richard Henderson + + PR c++/16012 + * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init + statement in FOR_INIT_STMT for templates. + +2004-06-15 Richard Henderson + + * call.c (initialize_reference): Don't build CLEANUP_STMT here. + * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument. + (genericize_try_block): Use gimplify_stmt. + (genericize_catch_block, genericize_eh_spec_block): Likewise. + (cp_gimplify_init_expr): Remove STMT_EXPR special case. + (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call. + * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. + (cp_tree_chain_matters_p): Remove. + * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New. + (COMPOUND_STMT_BODY_BLOCK): New. + (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New. + (EXPR_STMT_STMT_EXPR_RESULT): New. + (building_stmt_tree): Check cur_stmt_list. + (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove. + (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New. + * decl.c (poplevel): Use pop_stmt_list for minding cleanups. + (cp_finish_decl): Use push_cleanup. + (start_function, finish_function): Use statement lists. + (finish_stmt): Do nothing. + * except.c (begin_eh_spec_block): Use statement lists. + (check_handlers_1, check_handlers): Likewise. + * init.c (construct_virtual_base): Don't add extra compound stmts. + (build_vec_init): Likewise. + * name-lookup.c (maybe_push_cleanup_level): Use statement lists. + * name-lookup.h (struct cp_binding_level): Add statement_list. + * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool. + (cp_parser_labeled_statement, cp_parser_expression_statement, + cp_parser_statement_seq_opt): Likewise. + (cp_parser_compound_statement): Likewise. Take bool for try block. + (cp_parser_selection_statement): Tidy if processing. + (cp_parser_already_scoped_statement): Rewrite to do what it says. + * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr. + (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST. + Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT. + * semantics.c (do_poplevel, do_pushlevel): Use statement lists. + (finish_cond): New, rewritten from FINISH_COND. + (simplify_loop_decl_cond): New. + (finish_expr_stmt): Avoid nested EXPR_STMTs. + (begin_if_stmt, finish_if_stmt_cond, finish_then_clause, + begin_else_clause, finish_else_clause, finish_if_stmt, + begin_while_stmt, finish_while_stmt_cond, finish_while_stmt, + begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt, + finish_for_cond, finish_for_stmt, begin_switch_stmt, + finish_switch_cond, finish_switch_stmt, begin_try_block, + finish_try_block, finish_cleanup_try_block, finish_function_try_block, + finish_handler_sequence, finish_function_handler_sequence, + begin_handler, finish_handler_parms, finish_handler, + begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite + using statement lists. + (begin_compound_stmt): Replace has_no_scope argument with flags. + Update all callers. Use statement lists. + (finish_compound_stmt): Likewise. + (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup. + (current_scope_stmt_stack): Remove. + (simplify_aggr_init_expr): Don't muck with TREE_CHAIN. + * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): + Rewrite with statement lists. + +2004-06-15 Alexandre Oliva + + * parser.c: Change all assignments of c_lex_string_translate + to true and false to 1 and 0. + (cp_lexer_read_token): Convert type of the translated string. + (cp_parser_skip_to_closing_parentheses): Preserve original + value of c_lex_string_translate, and set it to -1 while + running. + (cp_parser_cache_group): Likewise. + (cp_parser_cache_group_1): Renamed. + (cp_parser_asm_operand_list): Remove redundant setting of + c_lex_string_translate. + (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]: + Handle chained strings. + +2004-06-12 Andrew Pinski + + PR c++/14639 + Revert: + 2004-06-02 Andrew Pinski + + * cp-tree.h: Fix typo. + + * cp-tree.h: Include cgraph.h + (DECL_NEEDED_P): Use cgraph_*node on the decl instead of + TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl. + +2004-06-12 Jason Merrill + + PR tree-optimization/14107 + * decl.c (finish_function): Warn about no return in all functions. + +2004-06-15 Paolo Bonzini + + * cp-tree.h (struct language_function): Remove cannot_inline. + * decl.c (save_function_data): cannot_inline is no more. + (cxx_push_function_context): Likewise. + * decl2.c (start_objects, start_static_storage_duration_function): + Reset DECL_INLINE, set DECL_UNINLINABLE. + +2004-06-14 Giovanni Bajo + + PR c++/15967 + * search.c (lookup_field): Propagate the ambiguity list. + (lookup_fnfields): Likewise. + +2004-06-14 Giovanni Bajo + + PR c++/15947 + * parser.c (cp_parser_template_name): Ctors/dtors never need a + template keyword to disambiguate. + +2004-06-14 Mark Mitchell + + PR c++/15096 + * decl.c (grokdeclarator): Ignore pointer-to-members when + computing template depth. + + PR c++/14930 + * name-lookup.c (pushtag): Do not try to put class declarations in + explicit specialization scopes. + +2004-06-11 Andrew Pinski + + * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior. + +2004-06-11 Mark Mitchell + + PR c++/15862 + * name-lookup.c (unqualified_namespace_lookup): Do not ignore type + bindings for undeclared built-ins. + +2004-06-11 Giovanni Bajo + + * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them + appear at the correct location. + +2004-06-10 Jason Merrill + + PR c++/15875 + Revert: + 2004-06-01 Kriang Lerdsuwanakij + * init.c (build_offset_ref): Build SCOPE_REF with non-null + TREE_TYPE for non-dependent names. + * pt.c (type_dependent_expression_p): Handle SCOPE_REF with + unknown_type_node as its TREE_TYPE. + * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. + * error.c (dump_decl) : Use pp_expression. + (dump_expr) : Likewise. + +2004-06-10 Mark Mitchell + + PR c++/15227 + * parser.c (cp_parser_direct_declarator): Robustify. + + PR c++/15877 + * pt.c (tsubst_copy): Use decl_constant_value on enumeration + constants in non-dependent contexts. + + PR c++/14211 + PR c++/15076 + * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when + necessary. + +2004-06-10 Jakub Jelinek + + PR c++/14791 + * decl.c (duplicate_decls): Handle fileptr_type_node arguments + specially. + +2004-06-09 Mark Mitchell + + Revert: + PR c++/15815 + 2004-06-07 Mark Mitchell + * lex.c (handle_pragma_interface): Deprecate. + (handle_pragma_implementation): Likewise. + +2004-06-09 Andrew Pinski + + * g++spec.c (lang_specific_driver): Remove check for -lm + and -lmath when check it see if it was the math library. + +2004-06-08 Giovanni Bajo + + PR c++/7841 + * parser.c (cp_parser_direct_declarator): Reject constructor named + as qualified template-id. + +2004-06-07 Mark Mitchell + + PR c++/15815 + * lex.c (handle_pragma_interface): Deprecate. + (handle_pragma_implementation): Likewise. + +2004-06-07 Mark Mitchell + + PR c++/15766 + * parser.c (cp_parser_iteration_statement): Fix typo in error + message. + + PR c++/14777 + * pt.c (tsubst_default_argument): Do not defer access checks + while substituting into the default argument. + + PR c++/15554 + * pt.c (tsubst_copy): Do not try to substitute for an enumeration + constant in a non-dependent context. + + PR c++/15057 + * except.c (build_throw): Ensure that temp_expr has been + initialized. + +2004-06-06 Roger Sayle + + * cp/cp-tree.h (lvalue_or_else): Add function prototype. + +2004-06-06 Giovanni Bajo + + PR c++/15503 + * parser.c (cp_parser_mem_initializer_id): Gracefully reject + 'typename', and accept 'template'. + +2004-06-03 Andrew Pinski + Jan Hubicka + + PR c++/14639 + * method.c (use_think): Do not mark thunk as referenced. + +2004-06-03 Matt Austern + + PR c++/15428 + * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC + is nonzero, and if we see a noninline definition of a key method, + make the vtables nonweak. + +2004-06-02 Matt Austern + + * cp-tree.h (instantiate_decl): new boolean parameter, + undefined_ok. Current behavior is equivalent to its being 0. + * decl2.c (mark_used): Add new argument when calling instantiate_decl + * pt.c (mark_decl_instantiated): Unconditionally make + instantiations explicit unconditionally + (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION, + since mark_decl_instantiated now does it. + (instantiate_class_member): New. Instantiate a member of an + explicitly instantiated class template. + (do_type_instantiation): Explicitly instantiate members of an + explicitly instantiated class template. + (instantiate_decl): if undefined_ok is nonzero, and if we're + trying to explicitly instantiated a template with no definition, + change it to an implicit instantiation. + (instantiate_pending_templates): Add new argument to instantiate_decl. + * tree.c (cp_cannot_inline_tree_fn): Likewise. + +2004-06-02 Andrew Pinski + + * cp-tree.h: Fix typo. + + * cp-tree.h: Include cgraph.h + (DECL_NEEDED_P): Use cgraph_*node on the decl instead of + TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl. + +2004-06-01 Jason Merrill + + PR c++/15142 + * call.c (call_builtin_trap): Remove type parm. + (convert_arg_to_ellipsis): Change a non-POD argument to integer type. + (build_x_va_arg): Dereference a null pointer for a non-POD argument. + +2004-06-01 Kriang Lerdsuwanakij + + PR c++/13092 + * init.c (build_offset_ref): Build SCOPE_REF with non-null + TREE_TYPE for non-dependent names. + * pt.c (type_dependent_expression_p): Handle SCOPE_REF with + unknown_type_node as its TREE_TYPE. + * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. + * error.c (dump_decl) : Use pp_expression. + (dump_expr) : Likewise. + +2004-06-01 Richard Henderson + Andrew Pinski + + * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof". + * parser.c (struct cp_parser): Remove in_offsetof. + (cp_parser_new): Don't set it. + (cp_parser_unary_expression): Don't check it. + (cp_parser_postfix_open_square_expression): Split out from ... + (cp_parser_postfix_expression): ... here. + (cp_parser_postfix_dot_deref_expression): Likewise. + (cp_parser_builtin_offsetof): New. + (cp_parser_primary_expression): Use it. + +2004-06-01 Giovanni Bajo + + PR c++/14932 + * parser.c (cp_parser_postfix_expression): Allow subscript + operator in offsetof. + +2004-05-31 Mark Mitchell + + PR c++/15701 + * friend.c (add_friend): Do not try to perform access checks for + functions from dependent classes. + +2004-05-31 Gabriel Dos Reis + + * cxx-pretty-print.c (pp_cxx_colon_colon): Expor. + (pp_cxx_begin_template_argument_list): Turn into a function. + (pp_cxx_end_template_argument_list): Likewise. + (pp_cxx_separate_with): Define. + (pp_cxx_unqualified_id): Tidy. + (pp_cxx_primary_expression): Likewise. + (pp_cxx_postfix_expression): Likewise. + (pp_cxx_expression): Likewise. + (pp_cxx_simple_type_specifier): Likewise. + (pp_cxx_type_specifier_seq): Likewise. + (pp_cxx_parameter_declaration_clause): Likewise. + (pp_cxx_exception_specification): Likewise. + (pp_cxx_direct_declarator): Likewise. + (pp_cxx_type_id): Likewise. + * cxx-pretty-print.h (pp_cxx_whitespace): Export from + cxx-pretty-print.c. + (pp_cxx_left_paren): Likewise. + (pp_cxx_right_paren): Likewise. + (pp_cxx_left_brace): Likewise. + (pp_cxx_right_brace): Likewise. + (pp_cxx_left_bracket): Likewise. + (pp_cxx_right_bracket): Likewise. + (pp_cxx_dot): Likewise. + (pp_cxx_identifier): Likewise. + (pp_cxx_tree_identifier): Likewise. + (pp_cxx_ampersand): New macro. + (pp_cxx_star): Likewise. + (pp_cxx_arrow): Likewise. + (pp_cxx_semicolon): Likewise. + (pp_cxx_complement): Likewise. + (pp_cxx_begin_template_argument_list): Declaree. + (pp_cxx_end_template_argument_list): Likewise. + (pp_cxx_colon_colon): likewise. + +2004-05-31 Eric Botcazou + + * parser.c (cp_parser_simple_type_specifier): Explicitly test + against NULL_TREE. + +2004-05-31 Kazu Hirata + + * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c, + typeck.c: Fix comment formatting. + +2004-05-30 Andrew Pinski + + * cp-lang.c (cp_expand_decl): Remove. + (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl. + +2004-05-30 Andreas Jaeger + + * lang-specs.h: Add missing initializers for .ii. + +2004-05-28 Aldy Hernandez + + * decl.c (cp_make_fname_decl): Free return value from + fname_as_string. + +2004-05-28 Mark Mitchell + + PR c++/15083 + * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR, + even in a templat.e + * init.c (build_new): Likewise. + + PR c++/15640 + * name-lookup.c (arg_assoc): Robustify. + + PR c++/15471 + * typeck.c (unary_complex_lvalue): Use context_for_name_lookup + when determining the scope to use for a pointer to member. + (lookup_anon_field): Give it external linkage. + * cp-tree.h (lookup_anon_field): Declare it. + * expr.c (cplus_expand_constant): Use it. + +2004-05-28 Mark Mitchell + + PR c++/14668 + * parser.c (cp_parser_simple_type_specifier): Call + maybe_note_name_used_in_class. + +2004-05-28 Tom Marshall + + PR c++/15214 + * class.c (finish_struct_1): Warn only if the dtor is non-private or + the class has friends. + +2004-05-27 Adam Nemet + + PR c++/12883 + * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and + TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type. + +2004-05-24 Geoffrey Keating + + * method.c (implicitly_declare_fn): Don't call defer_fn; abort + if it might be needed. + * pt.c (mark_decl_instantiated): Only call defer_fn if + the function actually needs processing in finish_file. + * decl2.c (finish_file): Add check that elements in + deferred_fns_used are really needed there. Remove unnecessary + test of DECL_SAVED_TREE. + +2004-05-23 Paolo Bonzini + + * Make-lang.in: No need to specify $(LIBCPP). + +2004-05-23 Mark Mitchell + + PR c++/15044 + * parser.c (cp_parser_class_head): Robustify. + + PR c++/15317 + * parser.c (cp_parser_decl_specifier_seq): Correct error in + comment. + (cp_parser_constructor_declarator_p): Treat attributes + as decl-specifiers. + + PR c++/15329 + * typeck.c (build_unary_op): Do not attempt to resolve casts to + base classes in templates. + +2004-05-23 Mark Mitchell + + PR c++/15165 + * pt.c (instantiate_template): Robustify. + +2004-05-23 Mark Mitchell + + PR c++/15025 + * decl.c (xref_tag): Issue errors about redeclaring template + classes as non-template classes. + +2004-05-23 Mark Mitchell + + PR c++/14821 + * name-lookup.c (supplement_binding): Allow redefinitions of + namespace aliases. + + PR c++/14883 + * parser.c (cp_parser_template_argument): Robustify. + +2004-05-23 Gabriel Dos Reis + + * class.c (alter_access): Use %E format specifier to print an + identifier node. Avoid looking at the IDENTIFIER_POINTER. + (push_lang_context): Likewise. + * decl.c (lookup_label): Likewise. + (grokdeclarator): Likewise. + * parser.c (cp_parser_check_for_invalid_template_id): Likewise. + * pt.c (do_type_instantiation): Likewise. + * tree.c (handle_java_interface_attribute): Likewise. + (handle_com_interface_attribute): Likewise. + (handle_init_priority_attribute): Likewise. + +2004-05-22 Mark Mitchell + + PR c++/15285 + PR c++/15299 + * pt.c (build_non_dependent_expr): Expand the set of tree nodes + recognized as overloaded functions. + +2004-05-22 Mark Mitchell + + PR c++/15507 + * class.c (layout_nonempty_base_or_field): Do not try to avoid + layout conflicts for unions. + + PR c++/15542 + * typeck.c (build_x_unary_op): Instantiate template class + specializations before looking for "operator &". + + PR c++/15427 + * typeck.c (complete_type): Layout non-dependent array types, even + in templates. + + PR c++/15287 + * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a + template. + +2004-05-22 Roger Sayle + + * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by + returning when TREE_TYPE is error_mark_node. + * typeck.c (require_complete_type): Return error_mark_node if + value's type is an error_mark_node. + +2004-05-20 Andrew Pinski + + * optimize.c (calls_setjmp_r): Remove. + (calls_setjmp_p): Remove. + * cp-tree.c (calls_setjmp_p): Remove. + * decl.c (finish_function): Do not call calls_setjmp_p. + +2004-05-18 Zack Weinberg + + * decl.c (cp_finish_decl): Use mark_decl_referenced. + * decl2.c (maybe_make_one_only): Likewise. + * method.c (use_thunk): Likewise. + +2004-05-18 Jason Merrill + + * class.c (build_base_path): Tidy a bit. + +2004-05-14 Geoffrey Keating + + * name-lookup.c (struct scope_binding): New. + (EMPTY_SCOPE_BINDING): New. + (lookup_using_namespace): Take a scope_binding instead of a + cxx_binding. + (qualified_lookup_using_namespace): Likewise. + (cxx_binding_clear): Delete. + (do_nonmember_using_decl): Use a scope_binding instead of a + cxx_binding. + (lookup_tag): Don't call select_decl. + (ambiguous_decl): Don't return anything (and change callers to match). + Take a scope_binding as the second parameter. + (lookup_namespace_name): Use a scope_binding instead of a + cxx_binding. + (unqualified_namespace_lookup): Likewise. + (lookup_qualified_name): Likewise. + (select_decl): Take a scope_binding instead of a cxx_binding. + Use macros rather than hand-coding tests for type-ness. + +2004-05-13 Diego Novillo + + * cp-gimplify.c: Rename from cp-simplify.c. + * Make-lang.in, optimize.c: Update. + +2004-05-13 Diego Novillo + + Merge from tree-ssa-20020619-branch. See + ChangeLog.tree-ssa for details. + + * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def, + cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c, + expr.c, init.c, name-lookup.h, optimize.c, parser.c, + pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: + Merged. + * cp-mudflap.c: New file. + * cp-simplify.c:: New file. + +2004-05-03 Giovanni Bajo + + PR c++/14389 + * decl2.c (check_classfn): For member templates, compare also the + template parameters to match the declaration. + * cp-tree.h: Adjust declaration of check_classfn. + * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn. + * friend.c (do_friend): Likewise. + * pt.c (tsubst_friend_function): Likewise. + +2004-05-01 Zack Weinberg + + * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE. + Instead, dig into the representation type to find the array bound. + +2004-04-30 Jason Merrill + + Refer to base members using COMPONENT_REFs where possible. + * class.c (build_simple_base_path): New fn. + (build_base_path): Use it for non-virtual base references. + (layout_class_type): Change base fields to their real type + after layout is done. + * cp-tree.h (IS_FAKE_BASE_TYPE): New macro. + * cp-lang.c (cxx_get_alias_set): Use it. + +2004-04-30 Kazu Hirata + + * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix + comment typos. + +2004-04-23 Giovanni Bajo + + PR c++/15064 + * parser.c (cp_parser_postfix_expression): typeid operator cannot be + used in integral constant expressions. + +2004-04-22 Mark Mitchell + + * init.c (build_aggr_init): Fix accidental use of C99 construct in + previous change. + + * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on + braced initializer. + * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro. + * decl.c (reshape_init): Use it. + * init.c (perform_member_init): Remove redundant condition. + (build_aggr_init): Adjust to handle brace-enclosed initializers + correctly. + (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P. + + * parser.c (cp_parser_initializer_clause): Do not set + TREE_HAS_CONSTRUCTOR on the initializer. + * rtti.c (tinfo_base_init): Likewise. + (generic_initializer): Likewise. + (ptr_initializer): Likewise. + (ptm_initializer): Likewise. + (class_initializer): Likewise. + (get_pseudo_ti_init): Likewise. + * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P. + +2004-04-22 Alan Modra + + * name-lookup.c (anonymous_namespace_name): Make static. + +2004-04-19 Roger Sayle + + PR middle-end/14531 + * class.c (build_base_path): Call fold whilst building the NULL + pointer check expression trees. + +2004-04-15 Bryce McKinlay + + * init.c (build_new_1): Don't use type size argument for Java + _Jv_AllocObject call. + +2004-04-09 Danny Smith + + * method.c (make_alias_for_thunk): Remove preprocessor guard on + declaration and definition. + +2004-04-08 Danny Smith + + PR c++/14808 + * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather + than ASM_OUTPUT_DEF. + +2004-04-08 Jakub Jelinek + + * decl2.c (mark_used): Don't segfault if cfun != NULL but + current_function_decl == NULL. + +2004-04-05 Nathan Sidwell + + PR c++/3518 + * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer + level. + +2004-04-05 Richard Kenner + + * init.c (decl_constant_value): Don't look at DECL_INITIAL + of PARM_DECL. + * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT + or TREE_SIDE_EFFECTS of a type. + +2004-04-02 Nathan Sidwell + + PR c++/14007 + * pt.c (check_cv_quals_for_unify): Correct logic for disallowed + cv-qualifier unification. + * tree.c (cp_build_qualified_type_real): Renable DR295 logic. + +2004-04-02 Jan Hubicka + + * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define. + * cp-tree.h (cp_update_decl_after_saving): Declare. + * tree.c (cp_update_decl_after_saving): Define. + +2004-04-01 Mark Mitchell + + PR c++/14803 + * typeck.c (get_delta_difference): Call fold before returning the + value. + +2004-04-01 Richard Henderson + + PR c++/14804 + * decl.c (cp_finish_decl): Preserve TREE_READONLY more often. + * typeck2.c (split_nonconstant_init): Clear TREE_READONLY. + +2004-04-01 Mark Mitchell + + PR c++/14810 + * name-lookup.c (maybe_push_cleanup_level): Robustify. + +2004-04-01 Richard Kenner + + * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly. + +2004-03-31 Richard Kenner + + * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED. + * class.c (check_bitfield_decl): Likewise. + * cvt.c (type_promotes_to): Likewise. + * decl.c (finish_enum): Likewise. + * mangle.c (write_builtin_type): Likewise. + * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise. + * typeck.c (type_after_usual_arithmetic_conversions): Likewise. + (build_binary_op): Likewise. + +2004-03-31 Jan Hubicka + + * tree.h (optimize_function): Kill prototype. + * optimize.c (dump_function, optimize_function, dump_finction): Kill. + * semantics.c (expand_body): Kill. + +2004-03-30 Mark Mitchell + + PR c++/14724 + * decl.c (start_decl_1): Do not decide whether or not to create a + new cleanup level until after the type has been completed. + + PR c++/14763 + * pt.c (tsubst_default_argument): Clear current_function_decl. + +2004-03-30 Zack Weinberg + + * name-lookup.c, parser.c: Use new shorter form of GTY markers. + +2004-03-29 Zack Weinberg + + * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC + is null, just print the literal name and return. + +2004-03-25 Kazu Hirata + + * cxx-pretty-print.c: Fix comment typos. + +2004-03-24 Kazu Hirata + + * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c: + Update copyright. + +2004-03-23 Ziemowit Laski + + * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H). + * mangle.c (write_type): Add call to 'mangle_fundamental_type' + target hook. + +2004-03-23 Zack Weinberg + + PR 12267, 12391, 12560, 13129, 14114, 14133 + * cp-lang.c (c_reset_state): Delete. + (push_file_scope, pop_file_scope): New stubs. + * parser.c (c_parse_file): Call sorry() here if called more than once. + +2004-03-23 Richard Kenner + + * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW + for INTEGER_CST. + +2004-03-22 Gabriel Dos Reis + + * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare. + +2004-03-21 Gabriel Dos Reis + + * error.c (enum pad): Remove. + (dump_qualifiers): Likewise. + (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq. + (dump_aggr_type): Likewise. + (dump_type_suffix): Likewise. + (dump_simple_decl): Likewise. + (dump_function_decl): Likewise. + (cv_to_string): Likewise. + (dump_type_prefix): Likewise. Adjust return void. + * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to + cxx_pretty_print.h. + (pp_cxx_template_keyword_if_needed): Document. + (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy. + (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and + MUST_NOT_THROW_EXPR. + +2004-03-21 Mark Mitchell + + PR c++/14616 + * decl.c (cp_finish_decl): Compute the size of arrays declared in + templates, if their type is non-dependent. + +2004-03-19 Mark Mitchell + + * call.c (build_op_delete_call): Do not forget the placement + arguments when iterating through mutiple delete operators. + + * cp-tree.h (svaed_scope): Remove last_parms. + (NEW_DELETE_OPNAME_P): New macro. + (last_function_parms): Remove. + (do_friend): Adjust prototype. + * decl.c (grokparms): Return the PARM_DECLs directly, rather than + using last_function_parms. + (grokfndecl): Take the PARM_DECLs as an argument, rather than + using last_function_parms. + (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs + for class-specific operator new and operator delete. + (grok_op_properties): Do not look for allocation functions with + METHOD_TYPEs. + (start_function): Use DECL_ARGUMENTS instead of + last_function_parms. + * decl.h (last_function_parms): Do not declare. + * decl2.c (grokclassfn): Do not use last_function_parms. + * friend.c (do_friend): Remove parmdecls parameter. + * name-lookup.c (push_to_top_level): Do not save last_function_parms. + (pop_from_top_level): Do not restore it. + * pt.c (check_explicit_specialization): Do not adjust + last_function_parms. + + * name-lookup.c (do_local_using_decl): Create a local binding for + types brought in via using declarations. + + * name-lookup.c (lookup_arg_dependent): Handle block-scope + function declarations correctly. + + * semantics.c (finish_id_expression): Correct handling of + conversion operators to dependent types. + + * typeck.c (lookup_destructor): Allow the use of destructors from + base classes. + +2004-03-19 Richard Kenner + + * cxx-pretty-print.c (pp_cxx_unqualified_id): Use + TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS. + * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean + the field is named TEMPLATE_TYPE_PARM_INDEX. + +2004-03-19 Giovanni Bajo + + PR c++/14545 + * parser.c (cp_parser_functional_cast): A cast to anything + but integral or enumaration type is not an integral constant + expression. + * pt.c (value_dependent_expression_p): Handle cast expressions + without operands (such as "int()"). + +2004-03-18 Mark Mitchell + + * semantics.c (finish_pseudo_destructor_expr): Allow differing + cv-qualification between the type named by the + pseudo-destructor-name and the object-type. + + * search.c (accessible_base_p): Handle non-proper bases. + + * name-lookup.c (do_nonmember_using_decl): If a using declaration + refers to a single overloaded function, set the type of the + function. + * tree.c (lvalue_type): Simplify. + * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an + unknown type. + (build_unary_op): Handle OVERLOADs with known types. + + * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for + function templates. + + * parser.c (cp_parser_postfix_expression): Handle the use of + "typename" in non-dependent contexts. Convert appropriately when + when using a qualified name after "->" or ".". + + * call.c (conditional_conversion): Honor the requirement that some + conversions refer to the original object. + +2004-03-18 Mark Mitchell + + * call.c (build_conditional_expr): Do not call force_rvalue for + operands of void_type when the conditional expression itself has + void type. + * name-lookup.c (pushdecl): Don't consider a declaration of a + function named "main" to be an overload of a type named "main". + * parser.c (cp_parser_template_name): Perform name lookup when the + template name is proceeded by "template" if the qualifying scope + is non-dependent. + * typeck.c (composite_pointer_type_r): Correctly handle + pointer-to-member types. + (build_const_cast): Likewise. + +2004-03-18 Richard Kenner + + * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments. + * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check. + (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise. + (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise. + (TYPENAME_TYPE_FULLNAME): Add check and use type.values. + (TYPEOF_TYPE_EXPR): New macro. + * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS. + * error.c (dump_type): Use TYPEOF_TYPE_EXPR. + * pt.c (tsubst): Likewise. + * semantics.c (finish_typeof): Likewise. + * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE, + and TEMPLATE_TYPE_PARM. + * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN. + (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES. + +2004-03-16 Mark Mitchell + + PR c++/14586 + * cp-tree.h (build_new_op): Change prototype. + (build_x_binary_op): Likewise. + * call.c (build_new_op): Add overloaded_p parameter. + * decl2.c (grok_array_decl): Adjust call to build_new_op. + * parser.c (cp_parser_binary_expression): Note that uses of + overloaded operators prevents an expression from being considered + an integral constant. + * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or + build_x_binary_op. + * semantics.c (finish_call_expr): Likewise. + * typeck.c (rationalize_conditional_expr): Likewise. + (build_x_indirect_ref): Likewise. + (build_x_binary_op): Likewise. + (build_x_unary_op): Likewise. + (build_x_compound_expr): Likewise. + (build_modify_expr): Likewise. + * typeck2.c (build_x_arrow): Likewise. + +2004-03-15 Kazu Hirata + + * cp-lang.c, ptree.c: Update copyright. + +2004-03-13 Mark Mitchell + + PR c++/14550 + * parser.c (cp_parser_non_integral_constant_expression): Encode + more of the idiom that surrounded calls to this function within + the function itself + (cp_parser_primary_expression): Adjust accordingly. + (cp_parser_postfix_expression): Likewise. + (cp_parser_unary_expression): Likewise. + (cp_parser_cast_expression): Likewise. + (cp_parser_assignment_expression): Likewise. + (cp_parser_expression): Likewise. + (cp_parser_new_expression): Note that new-expressions are not + allowed in integral constant expressions. + (cp_parser_delete_expression): Likewise. + +2004-03-12 Matt Austern + + * decl2.c (maybe_make_one_only): Look at + TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether + to make an explicit instantiation weak. + * method.c (use_thunk): Make sure we call comdat_linkage + when appropriate. + * pt.c (do_type_instantiation): On systems where weak symbols + don't go in a static archive's TOC, explicit instantiation of a + class must imply *explicit* instantiation of its memeber. + +2004-03-11 Kazu Hirata + + * call.c, cp-tree.h, pt.c: Fix comment typos. + +2004-03-10 Mark Mitchell + + PR c++/14510 + * decl.c (xref_tag): Disregard non-type declarations when + looking up a tagged type. + +2004-03-09 Nathan Sidwell + + PR c++/14397 + * call.c (convert_like_real): Build a const qualified temporary, + when testing ctor access. + +2004-03-09 Mark Mitchell + + * call.c (initialize_reference): Fix typo. + +2004-03-09 Giovanni Bajo + + PR c++/14409 + * pt.c (determine_specialization): For member templates, match also + constness. + + PR c++/14448 + * parser.c (cp_parser_initializer_clause): Fold initializer if it is + non-dependent. + * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs. + +2004-03-09 Mark Mitchell + + PR c++/14230 + * call.c (initialize_reference): Handle initializers that are + class-member access expressions applies to rvalues. + +2004-03-09 Mark Mitchell + + PR c++/14432 + * name-lookup.c (supplement_binding): Ignore functions that are + marked DECL_ANTICIPATED. + +2004-03-08 Mark Mitchell + + PR c++/14401 + * class.c (check_field_decls): Complain about non-static data + members of reference type in unions. Propagate + CLASSTYPE_REF_FIELDS_NEED_INIT and + CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static + data members. + * init.c (perform_member_init): Complain about mbmers with const + type that are not explicitly initialized. + +2004-03-08 Mark Mitchell + + * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS. + * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro. + (lang_identifier): Remove implicit_decl and error_locus. + (IDENTIFIER_IMPLICIT_DECL): Remove. + (SET_IDENTIFIER_IMPLICTI_DECL): Likewise. + (IDENTIFIER_ERROR_LOCUS): Likewise. + (SET_IDENTIFIER_ERROR_LOCUS): Likewise. + (TYPE_ASSEMBLER_NAME_STRING): Likewise. + (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. + (implicitly_declare): Remove. + * decl.c (warn_extern_redeclared_static): Remove check of + IDENTIFIER_IMPLICIT_DECL. + (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS. + (implicitly_declare): Remove. + (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS. + (start_function): Don't check IDENTIFIER_IMPLICIT_DECL. + (start_method): Don't check IDENTIFIER_ERROR_LOCUS. + * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL + in the innermost scope, rather than at namespace scope. + * name-lookup.c (push_local_binding): Give it external linkage. + (pushdecl): Remove dead code. + * name-lookup.h (push_local_binding): Declare it. + * ptree.c (cxx_print_identifier): Don't print + IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS. + * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P, + not IDENTIFIER_ERROR_LOCUS. + * typeck.c (build_function_call): Remove dead code. + +2004-03-08 Jason Merrill + + PR c++/13170 + * decl.c (xref_tag): Remove attribute handling. + * cp-tree.h: Adjust prototype. + * decl.c, parser.c, rtti.c: Adjust callers. + * parser.c (cp_parser_class_head): Pass back attributes in the + class head. + (cp_parser_class_specifier): Adjust. + +2004-03-08 Matt Austern + + PR debug/14079 + * name-lookup.c (add_decl_to_level): Add extern variables, as well + as static, to static_decls array. + +2004-03-05 Jason Merrill + + * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/. + +2004-03-04 Geoffrey Keating + + * decl.c (grokfndecl): Update old incorrect comment. + (grokvardecl): Diagnose C++ variables of type with no linkage. + +2004-03-01 Mark Mitchell + + PR c++/14369 + * pt.c (build_non_dependent_expr): Do not create a + NON_DEPENDENT_EXPR for a THROW_EXPR. + +2004-03-01 Gabriel Dos Reis + + PR c++/14369 + * error.c (dump_expr): Handle THROW_EXPR. + +2004-03-01 Mark Mitchell + + PR c++/14360 + * parser.c (cp_parser_postfix_expression): Do not perform Koenig + lookup if ordinary name-lookup finds a non-function. + * pt.c (tsubst_copy_and_build): Likewise. + + PR c++/14361 + * parser.c (cp_parser_late_parsing_default_args): Check that there + are no extra tokens after the end of the default-argument + expression. + +2004-03-01 Mark Mitchell + + PR c++/14324 + * lex.c (retrofit_lang_decl): Treat entities with no linkage as + having C++ linkage for name-mangling purposes. + + PR c++/14260 + * parser.c (cp_parser_direct_declarator): Recognize constructor + declarators that use a template-id to name the class being + constructed. + + PR c++/14337 + * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes. + (tsubst_expr): Do not call tsubst_copy, even when + processing_template_decl. + +2004-03-01 Jeff Law + + * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to + the proper type. + +2004-02-29 Mark Mitchell + + PR c++/14138 + * name-lookup.h (push_scope): Change prototype. + * name-lookup.c (push_scope): Do not reenter the current class + scope. + * decl.c (grokfndecl): Check return code from push_scope before + calling pop_scope. + * decl2.c (check_classfn): Likewise. + * parser.c (cp_parser_conversion_function_id): Likewise. + (cp_parser_init_declarator): Likewise. + (cp_parser_direct_declarator): Likewise. + (cp_parser_class_specifier): Likewise. + (cp_parser_class_head): Likewise. + (cp_parser_lookup_name): Likewise. + (cp_parser_constructor_declarator_p): Likewise. + * pt.c (instantiate_class_template): Likewise. + (resolve_typename_type): Likewise. + +2004-02-29 Mark Mitchell + + PR c++/14267 + * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue + extension. + + PR debug/12103 + * class.c (update_vtable_entry_for_fn): Do not go through + covariance machinery if the type returned by an overrider is the + same as the original. + +2004-02-29 Kazu Hirata + + * call.c: Fix a comment typo. + +2004-02-27 Ziemowit Laski + + * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs. + +2004-02-26 Mark Mitchell + + PR c++/14278 + * parser.c (cp_parser_parameter_declaration_list): Commit + to fewer tentative parses. + +2004-02-26 Giovanni Bajo + + PR c++/14284 + * pt.c (dependent_type_p_r): A template template parameter is a + dependent type. + +2004-02-26 Giovanni Bajo + + PR c++/14246 + * mangle.c (write_template_arg_literal): Don't rely on identity for + boolean constants. + +2004-02-24 Jason Merrill + + * tree.c (build_exception_variant): Use check_qualified_type. + +2004-02-23 Zack Weinberg + Kazu Hirata + + * decl.c (cxx_init_decl_processing): Don't check + flag_writable_strings. + +2004-02-23 Andrew Pinski + + PR c++/14156 + * typeck.c (maybe_warn_about_returning_address_of_location): + Change check for VAR_DECL to use DECL_P instead. + +2004-02-23 Giovanni Bajo + + PR c++/14250 + * cvt.c (build_expr_type_conversion): Type must be complete before + looking up for conversions. + +2004-02-23 Giovanni Bajo + + PR c++/14143 + * name-lookup.c (arg_assoc_class): Don't look into template + arguments if it is not a primary template. + +2004-02-20 John David Anglin + + PR c++/12007 + * method.c (use_thunk): Always clone function argument tree. + +2004-02-20 Mark Mitchell + + PR c++/14199 + * pt.c (tsubst_copy): Call mark_used for a PARM_DECL. + + PR c++/14173 + * semantics.c (begin_class_definition): Set TYPE_PACKED correctly + for all type variants. + +2004-02-19 Mark Mitchell + + PR c++/13927 + * decl.c (duplicate_decls): Return error_mark_node for invalid + redeclarations. + * name-lookup.c (push_namespace): Ignore the return value from + pushdecl. + * pt.c (push_template_decl_real): Robustify. + + PR c++/14186 + * name-lookup.c (push_class_level_binding): Do not complain about + adding a binding for a member whose name is the same as the + enclosing class if the member is located in a base class of the + current class. + +2004-02-19 Giovanni Bajo + + PR c++/14181 + * parser.c (cp_parser_new_expression): Parse an ill-formed + direct-new-declarator after a parenthesized type-id to emit good + diagnostic. + +2004-02-18 Kazu Hirata + + * cp-tree.def, cvt.c: Update copyright. + +2004-02-17 Mark Mitchell + + PR c++/11326 + * cp-tree.h (abi_version_at_least): Remove. + * mangle.c: Include flags.h. + +2004-02-15 Mark Mitchell + + PR c++/13971 + * call.c (build_conditional_expr): Handle conversions between + class types which result in differently cv-qualified type + variants. + + PR c++/14086 + * class.c (delete_duplicate_fields_1): Remove. + (delete_duplicate_fields): Likewise. + (finish_struct_anon): Remove check for members with the same name + as their enclosing class. + (check_field_decls): Do not call duplicate_fields. + * decl.c (grokdeclarator): Remove check for static data members + with the same name as their enclosing class. + * name-lookup.c (push_class_level_binding): Check for members with + the same name as their enclosing class. + +2004-02-15 Gabriel Dos Reis + + PR c++/14085 + * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM. + +2004-02-14 Kriang Lerdsuwanakij + + PR c++/13635 + * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL + has full set of arguments. + +2004-02-13 Giovanni Bajo + + PR c++/13927 + * error.c (dump_decl) : Dump as simple declarations. + +2004-02-13 Mark Mitchell + + PR c++/14122 + * cp-tree.h (delete_sanity): Change prototype. + * decl2.c (delete_sanity): Make doing_vec a bool, not an int. + Remove dead code. Adjust code to warn about deleting an array. + * typekc.c (decay_conversion): Use build_address and build_nop. + + PR c++/14108 + * search.c (accessible_p): Do not check access in thunks. + + PR c++/14083 + * call.c (build_conditional_expr): Call force_rvalue on the + non-void operand in the case that one result is a throw-expression + and the other is not. + +2004-02-13 Ian Lance Taylor + + PR c++/9851 + * parser.c (cp_parser_pseudo_destructor_name): Check for errors on + the type name and look ahead for ::~, and bail out early with a + better error message if the parse is going to fail. + +2004-02-12 Mark Mitchell + + * call.c (conversion_kind): New type. + (conversion_rank): Likewise. + (conversion): Likewise. + (CONVERSION_RANK): New macro. + (conversion_obstack): New variable. + (obstack_initialized): Likewise. + (z_candidate): Change type of convs and second_conv. + (candidate_warning): New type. + (IDENTITY_RANK): Remove. + (EXACT_RANK): Likewise. + (PROMO_RANK): Likewise. + (STD_RANK): Likewise. + (PBOOL_RANK): Likewise. + (USER_RANK): Likewise. + (ELLIPSIS_RANK): Likewise. + (BAD_RANK): Likewise. + (ICS_RANK): Likewise. + (ICS_STD_RANK): Likewise. + (ICS_USER_FLAG): Likewise. + (ICS_ELLIPSIS_FLAG): Likewise. + (ICS_THIS_FLAG): Likewise. + (ICS_BAD_FLAG): Likewise. + (NEED_TEMPORARY_P): Likewise. + (CHECK_COPY_CONSTRUCTOR_P): Likewise. + (USER_CONV_CAND): Likewise. + (USER_CONV_FN): Likewise. + (conversion_obstack_alloc): New function. + (alloc_conversion): Likewise. + (validate_conversion_obstack): Likewise. + (alloc_conversions): Likewise. + (build_conv): Adjust to deal with new conversion data structures. + (build_identity_conv): New function. + (build_ambiguous_conv): Likewise. + (standard_conversion): Adjust to deal with new conversion data + structures. + (convert_class_to_reference): Likewise. + (direct_reference_binding): Likewise. + (reference_binding): Likewise. + (implicit_conversion): Likewise. + (add_candidate): Likewise. + (add_function_candidate): Likewise. + (add_conv_candidate): Likewise. + (build_builtin_candidate): Likewise. + (print_z_candidate): Likewise. + (merge_conversion_sequences): Likewise. + (build_user_type_conversion_1): Likewise. + (build_user_type_conversion): Likewise. + (build_new_function_call): Likewise. + (build_object_call): Likewise. + (conditional_conversion): Likewise. + (build_conditional_expr): Likewise. + (build_new_op): Likewise. + (build_op_delete_call): Likewise. + (convert_like_real): Likewise. + (build_over_call): Likewise. + (build_new_method_call): Likewise. + (is_subseq): Likewise. + (maybe_handle_implicit_object): Likewise. + (maybe_handle_ref_bind): Likewise. + (compare_ics): Likewise. + (source_type): Likewise. + (add_warning): Likewise. + (joust): Likewise. + (can_convert_arg): Likewise. + (can_convert_arg_bad): Likewise. + (perform_implicit_conversion): Likewise. + (perform_direct_initialization_if_possible): Likewise. + (initialize_reference): Likewise. + * cp-lang.c (cp_tree_size): Do not handle WRAPPER. + * cp-tree.def (WRAPPER): Likewise. + (IDENTITY_CONV): Remove. + (LVALUE_CONV): Likewise. + (QUAL_CONV): Likewise. + (STD_CONV): Likewise. + (PTR_CONV): Likewise. + (PMEM_CONV): Likewise. + (BASE_CONV): Likewise. + (REF_BIND): Likewise. + (USER_CONV): Likewise. + (AMBIG_CONV): Likewise. + (RVALUE_CONV): Likewise. + * cp-tree.h (tree_wrapper): Remove. + (WRAPPER_ZC): Remove. + (lang_tree_node): Remove wrapper. + (LOOKUP_SPECULATIVELY): Remove. + (build_op_delete_call): Adjust prototype. + (validate_conversion_obstack): Declare. + (build_zc_wrapper): Remove. + * cvt.c (convert_to_reference): Remove dead code. + (ocp_convert): Likewise. + * decl.c (redeclaration_error_message): Correct handling of + templates. + (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY. + (cp_tree_node_structure): Remove WRAPPER case. + * decl2.c (finish_file): Call validate_conversion_obstack. + * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY. + (build_op_delete_call): Likewise. + (build_x_delete): Likewise. + (build_delete): Adjust call to build_op_delete_call. + * pt.c (tsubst_friend_declaration): Adjust code to determine + whether or not a friend template is a definition. + (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs. + * tree.c (build_zc_wrapper): Remove. + +2004-02-12 Zack Weinberg + + * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS. + * cp-tree.h: Don't declare cxx_builtin_type_decls. + * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete. + (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. + +2004-02-10 Mark Mitchell + + * typeck.c (lookup_destructor): Fix typo in error message. + +2004-02-09 Kazu Hirata + + * call.c, parser.c, tree.c: Fix comment typos. + +2004-02-07 Zack Weinberg + + Bug 13856 + * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS. + * decl.c (duplicate_decls, start_function): Likewise. + +2004-02-07 Zack Weinberg + + * name-lookup.c (pushdecl): Issue shadow warnings directly. + * parser.c (free_parser_stacks): Delete. + +2004-02-07 Kazu Hirata + + * rtti.c: Update copyright. + +2004-02-06 Giovanni Bajo + + PR c++/14033 + * decl.c (require_complete_types_for_parms): Do not insert + error_mark_node in the parameter list. + +2004-02-06 Giovanni Bajo + + PR c++/14028 + * parser.c (cp_parser_enclosed_template_argument_list): Emit straight + error when terminator can not be found. + +2004-02-05 Kelley Cook + + Make-lang.in (po-generated): Delete. + +2004-02-05 Kazu Hirata + + * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with + targetm.calls.promote_prototypes. + +2004-02-05 Rainer Orth + + PR middle-end/13750 + Revert: + 2004-01-15 Geoffrey Keating + PR pch/13361 + * cp/lex.c (handle_pragma_interface): Duplicate string from tree. + (handle_pragma_implementation): Likewise. + +2004-02-05 Mark Mitchell + + PR c++/13714 + * typeck.c (lookup_destructor): Tweak error message. + +2004-02-05 Jan Hubicka + + * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat + functions. + +2004-02-05 Giovanni Bajo + + PR c++/14008 + * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing + code, only emits the diagnostic now. Added lookup of the identifier + and support for qualified ids. + (cp_parser_parse_and_diagnose_invalid_type_name): New function. + Parse an (invalid) type name as id-expression within a declarator. + (cp_parser_simple_declaration): Use it. + (cp_parser_member_declaration): Likewise. + (cp_parser_make_typename_type): New function. Handle errors through + cp_parser_diagnose_invalid_typename. + (cp_parser_elaborated_type_specifier): Use it. + +2004-02-04 Mark Mitchell + + PR c++/13932 + * call.c (convert_like_real): Use "converting" rather than + "argument" as the descriptive keyword to + dubious_conversion_warnings. + * typeck.c (convert_for_assignment): Do not call + dubious_conversion_warnings. + +2004-02-04 Giovanni Bajo + + PR c++/13086 + * init.c (build_delete): Emit a more informative error message in + case of an incomplete type, and on the correct source line. + +2004-02-04 Kazu Hirata + + * error.c, search.c: Update copyright. + +2004-02-04 Mark Mitchell + + PR c++/9941 + * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the + linkage for the typeinfo name string. + +2004-02-04 Mark Mitchell + + PR c++/13969 + * cp-tree.h (fold_non_dependent_expr): New function. + * parser.c (cp_parser_fold_non_dependent_expr): Remove. + (cp_parser_template_argument): Use fold_non_dependent_expr. + (cp_parser_direct_declarator): Likewise. + * pt.c (fold_non_dependent_expr): New function. + (convert_nontype_argument): Use it. + (tsubst_qualified_id): Simplify. + (tsubst_copy_and_build): Likewise. + +2004-02-04 Mark Mitchell + + * decl.c (cxx_push_function_context): Do not set + current_function_is_thunk. + * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the + actual function. + +2004-02-04 Giovanni Bajo + + PR c++/13997 + * pt.c (more_specialized_class): Increase processing_template_decl + while partial ordering. + +2004-02-03 Mark Mitchell + + PR c++/13925 + * decl.c (start_function): Do not call pushdecl for any + instantiation or specialization of a primary template. + +2004-02-03 Mark Mitchell + + PR c++/13950 + * parser.c (cp_parser_class_name): Robustify. + + PR c++/13970 + * parser.c (cp_parser_cache_group): Do not consume the EOF token. + + PR c++/14002 + * semantics.c (finish_id_expression): Do not return an + IDENTIFIER_NODE when lookup finds a PARM_DECL. + +2004-02-03 Mark Mitchell + + PR c++/13978 + * pt.c (build_non_dependent_expr): Do not build + NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs. + + PR c++/13968 + * semantics.c (finish_id_expression): Do not return an + IDENTIFIER_NODE when lookup finds a VAR_DECL. + + PR c++/13975 + * parser.c (cp_parser_simple_declaration): When skipping to the + end of the statement swallow the terminating semicolon. + +2004-02-02 Mark Mitchell + + PR c++/13113 + * init.c (build_offset_ref): Improve error recovery for invalid + uses of non-static member functions. + + PR c++/13854 + * cp-tree.h (cp_build_type_attribute_variant): New function. + * class.c (build_clone): Use cp_build_type_attribute_variant. + * decl.c (duplicate_decls): Likewise. + * pt.c (copy_default_args_to_explicit_spec): Likewise. + (tsubst_function_type): Likewise. + * tree.c (build_exception_variant): Check attributes before + concluding that two types are the same. + (cp_build_type-attribute_variant): New method. + * typeck.c (merge_types): Use cp_build_type_attribute_variant. + + PR c++/13907 + * call.c (convert_class_to_reference): Keep better track of + pedantically invalid user-defined conversions. + +2004-02-01 Giovanni Bajo + + PR c++/13957 + * pt.c (tsubst_qualified_id): Improved error message when a type + is expected but not found. + +2004-01-31 Kazu Hirata + + * class.c: Fix comment typos. + * decl.c: Likewise. + * error.c: Likewise. + * parser.c: Likewise. + * pt.c: Likewise. + * search.c: Likewise. + * typeck.c: Likewise. + +2004-01-30 Richard Henderson + + PR c++/13693 + * method.c (use_thunk): Don't force_target_expr for void thunks. + * tree.c (build_target_expr_with_type): Assert non-void type. + (force_target_expr): Likewise. + +2004-01-30 Michael Matz + + * parser.c (cp_parser_labeled_statement): Accept case ranges. + +2004-01-30 Giovanni Bajo + + DR206 + PR c++/13813 + * decl.c (grokdeclarator): Check immediatly type completeness for + non-dependent types. + +2004-01-30 Giovanni Bajo + + PR c++/13683 + * call.c (convert_arg_to_ellipsis): Don't emit a warning if within + a sizeof expression.block + +2004-01-29 Mark Mitchell + + PR c++/13883 + * mangle.c (write_encoding): Correct encoding of member template + constructors. + +2004-01-28 Giovanni Bajo + + * parser.c (cp_parser_template_id): Parse tentatively `[:' after a + template name as it was `<::' (digraph typo). + (cp_parser_nth_token_starts_template_argument_list_p): New function. + (cp_parser_id_expression): Use it. + (cp_parser_nested_name_specifier_opt): Likewise. + (cp_parser_template_name): Likewise. + (cp_parser_class_name): Likewise. + (cp_lexer_get_preprocessor_token): Use c_lex_with_flags. + +2004-01-28 Mark Mitchell + + PR c++/13791 + * typeck.c (merge_types): Do not merge attributes into + TYPENAME_TYPEs. + + PR c++/13736 + * parser.c (cp_parser_direct_declarator): Do not prevent + backtracking inside a parenthesized declarator. + (cp_parser_parameter_declaration): Fix typo in comment. + +2004-01-28 Jan Hubicka + + * semantics.c (expand_body) Do emit_associated_thunks before + expansion. + +2004-01-27 Devang Patel + + * name-lookup.c: Include "debug.h" + (do_namespace_alias): Invoke debug_hooks to emit debug info + for namespace alias. + (do_local_using_decl): Invoke debug_hooks to emit debug info + for using decl. + (do_class_using_decl): Same. + (do_toplevel_using_decl): Same. + (do_using_directive): Same. + (cp_emit_debug_info_for_using): New function. + * Make-lang.in (cp/parser.o): Depend on debug.h + (cp/name-lookup.o): Same. + +2004-01-26 Kaveh R. Ghazi + + * cp-tree.h (language_function, lang_type_header): Use + BOOL_BITFIELD. + * name-lookup.h (cp_binding_level): Likewise. + +2004-01-26 Mark Mitchell + + PR c++/13663 + * semantics.c (finish_for_expr): Check for unresolved overloaded + functions. + + * class.c (add_method): Just check processing_template_decl to + determine whether or not we are within a template. + * decl2.c (maybe_retrofit_in_chrg): Likewise. + * init.c (decl_constant_value): Check the type of the declaration, + not TREE_READONLY. + * name-lookup.c (maybe_push_to_top_level): Rename to ... + (push_to_top_level): ... this. + * name-lookup.h (maybe_push_to_top_level): Do not declare it. + * pt.c (push_template_decl_real): Reorder condition for speed. + (convert_template_argument): Use dependency-checking functions in + place of uses_template_parms. + (lookup_template_class): Avoid calling uses_template_parms more + than once. + (uses_template_parms): Reimplement, using dependency-checking + functions. + (instantiate_class_template): Use push_to_top_level, not + maybe_push_to_top_level. + (type_unification_real): Simplify. + (type_dependent_expression_p): Handle OFFSET_REFs and + TEMPLATE_DECLs. + (any_dependent_template_arguments_p): Handle multiple levels of + template argument. + * semantics.c (expand_or_defer_fn): Do not check + uses_template_parms for template instantiations. + * typeck.c (comptypes): Avoid calling cp_type_quals. + +2004-01-25 Mark Mitchell + + PR c++/13833 + * call.c (build_over_call): Do not convert arguments when + processing a template. + * pt.c (build_non_dependent_expr): Do not build a + NON_DEPENDENT_EXPR for arithmetic constants. + +2004-01-25 Giovanni Bajo + + PR c++/13810 + * parser.c (cp_parser_type_parameter): When cp_parser_id_expression + returns a TYPE_DECL. no further lookup is required. + * semantics.c (check_template_template_default_arg): A TYPE_DECL + is invalid. Rework to give better diagnostics. + +2004-01-25 Kriang Lerdsuwanakij + + PR c++/13797 + * pt.c (instantiate_class_template): Add an error_mark_node + check. + (tsubst_decl) : Likewise. + +2004-01-23 Andrew Pinski + + PR c++/13701 + * decl.c (finish_function): Move the call to + finish_fname_decls below the call to + finish_eh_spec_block. + +2004-01-21 Kazu Hirata + + * optimize.c, typeck2.c: Update copyright. + +2004-01-21 Kazu Hirata + + * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c, + init.c, mangle.c, typeck.c: Update copyright. + +2004-01-21 Zdenek Dvorak + + * parser.c (cp_parser_class_specifier): Prevent garbage collection. + +2004-01-20 Kelley Cook + + * Make-lang.in: Replace $(docdir) with doc. + (c++.info, c++.srcinfo): Dummy entry. + (c++.man, c++.srcman): New rules. + (c++.install-man): Revamp rule. + +2004-01-20 Kelley Cook + + * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME, + CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a + immediate $(shell) instead of deferred backquote. + +2004-01-19 Mark Mitchell + + PR c++/13651 + * parser.c (cp_parser_postfix_expression): When encountering + incomplete type on left-hand side of "->" or ".", treat the entire + expression as erroneous. + + PR c++/13592 + * call.c (build_field_call): Remove. + (n_build_method_call): Likewise. + (build_method_call): Likewise. + (build_new_method_call): Do not call build_field_call. + * class.c (n_build_method_call): Remove. + (print_class_statistics): Do not print it. + * cp-tree.h (build_method_call): Remove declaration. + (finish_object_call_expr): Likewise. + (build_new_1): Do not use build_method_call. + * parser.c (cp_parser_postfix_expression): Use finish_call_expr + when the function appearing on the right-hand-side of "." or "->" + is not actually a function. + * pt.c (tsubst_copy_and_build): Likewise. + * semantics.c (finish_object_call_expr): Remove. + +2004-01-18 Mark Mitchell + + PR c++/13710 + * pt.c (tsubst): Use finish_typeof. + +2004-01-18 Jason Merrill + + PR c++/11725 + * except.c (build_throw): In a template, set + current_function_returns_abnormally. + +2004-01-17 Fred Fish + + PR c++/11895 + * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE, + except don't call array_type_nelts() with a VECTOR_TYPE. + +2004-01-16 Jan Hubicka + + * mangle.c (write_mangled_name): Remove inline modifier. + +2004-01-16 Mark Mitchell + + PR c++/13574 + * decl.c (compute_array_index_type): Fix grammar in comment. + * init.c (build_zero_init): Handle zero-sized arrays correctly. + + PR c++/13178 + * call.c (name_as_c_string): Print conversion operator names + correctly. + + PR c++/13478 + * call.c (initialize_reference): Pass -1 for inner parameter to + convert_like_real. + +2004-01-15 Giovanni Bajo + + PR c++/13407 + * parser.c (cp_parser_base_specifier): Check for an invalid + keyword `typename' and emit an user-friendly error message. + +2004-01-15 Geoffrey Keating + + PR pch/13361 + * cp/lex.c (handle_pragma_interface): Duplicate string from tree. + (handle_pragma_implementation): Likewise. + +2004-01-15 Giovanni Bajo + + PR c++/9259 + * typeck.c (build_class_member_access_expr): Allow to access members + of the currently open class. + (finish_class_member_access_expr): Likewise. + +2004-01-15 Alexandre Oliva + + PR c++/13659 + * name-lookup.c (validate_nonmember_using_decl): Take scope and + name by value, instead of computing them. + (do_local_using_decl, do_toplevel_using_decl): Add scope and name + arguments. Pass them to validate_nonmember_using_decl. + * name-lookup.h (do_local_using_decl): Adjust. + (do_toplevel_using_decl): Likewise. + * parser.c (cp_parser_using_declaration): Likewise. + * pt.c (tsubst_expr): Likewise. + +2004-01-15 Alexandre Oliva + + PR c++/13594 + PR c++/13658 + * name-lookup.c (qualified_lookup_using_namespace): Search + strongly-associated namespaces first, and only then try other + namespaces. + +2004-01-15 Kelley Cook + + * Make-lang.in (c++.srcextra): Dummy entry. + +2004-01-15 Giovanni Bajo + + PR c++/8856 + * parser.c (cp_parser_template_name): Don't try to parse a + conversion-function-id, as it cannot be a template-name. + (cp_parser_simple_type_specifier): Check for invalid template-ids + even after a built-in type. + +2004-01-14 Jan Hubicka + + PR c++/12850 + * pt.c (instantiate_decl): Do not increase function_depth. + +2004-01-14 Danny Smith + + PR c++/9021 + PR c++/11005 + * parser.c (cp_parser_elaborated_type_specifier): Warn about + attributes and discard. + * decl.c (xref_tag): Don't overwite existing attributes with + NULL_TREE. + +2004-01-14 Giovanni Bajo + + PR c++/12335 + * parser.c (cp_parser_lookup_name): Return error_mark_node if there + is no destructor while looking up a BIT_NOT_EXPR. + +2004-01-13 Ian Lance Taylor + + * cxxfilt.c: Remove unused file. + +2004-01-14 Jan Hubicka + + Partial fix to PR c++/12850 + * decl2.c (mark_used): Do not proactively instantiate templates + when compiling in unit-at-a-time or not optimizing. + * optimize.c (maybe_clone_body): Do not increase function depth. + +2004-01-13 Giovanni Bajo + + PR c++/13474 + * pt.c (tsubst) : Remove obsolete array index tweaking. + +2004-01-12 Steven Bosscher + + PR c++/13558 + * parser.c (cp_parser_member_declaration): Any non-type is also + not a class or a function. + +2004-01-12 Jason Merrill + + PR c++/12815 + * class.c (build_base_path): Do not mark vtable references as + TREE_CONSTANT. + (build_vtbl_ref_1): Likewise. + +2004-01-12 Richard Henderson + + PR opt/10776 + * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New. + (store_init_value): Use it. + * decl.c (check_initializer): Expect full initialization code + from store_init_value. + * init.c (expand_aggr_init_1): Likewise. + * decl2.c (maybe_emit_vtables): Abort if runtime init needed. + +2004-01-12 Mark Mitchell + + * class.c (layout_class_type): For non-POD class types, also copy + the DECL_SIZE and DECL_MODE of fields to the base class type. + +2004-01-12 Kriang Lerdsuwanakij + + PR c++/13289 + * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before + calling regenerate_decl_from_template. + +2004-01-12 Scott Brumbaugh + + PR c++/4100 + * parser.c (cp_parser_decl_specifier_seq): Add check for a friend + decl-specifier occurring along with a class definition. + +2004-01-12 Ian Lance Taylor + + * parser.c (cp_parser_decl_specifier_seq): Add parenthetical + clauses to comments describing declares_class_or_enum. + (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not + false. + +2004-01-12 Jan Hubicka + + * pt.c (for_each_template_parm): Do not check for duplicates. + (for_each_template_parm): Use walk_tree duplicate checking code. + +2004-01-11 Ian Lance Taylor + + PR c++/3478 + * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec + is error_mark_node, don't add any more decl_specs. + (cp_parser_init_declarator): After committing to a declaration, if + the decl_specifiers start with error_mark_node, issue an error and + change the type to "int". + +2004-01-09 Nathanael Nerode + + PR bootstrap/7817 + * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so. + +2004-01-10 Giovanni Bajo + + DR 337 + PR c++/9256 + * pt.c (tsubst): Substitution must fail if we are attempting to + create an array with element type that is an abstract class type. + * decl.c (cp_finish_decl): Strip pointers and array types recursively + before calling abstract_virtuals_error. + +2004-01-09 Alexandre Oliva + + * name-lookup.c (qualified_lookup_using_namespace): Consider + strong using directives even if we've already found a binding. + +2004-01-09 Mark Mitchell + + * cp-tree.h (cxx_expand_expr): Change prototype. + * expr.c (cxx_expand_expr): Add alt_rtl parameter. + +2004-01-08 Giovanni Bajo + + PR c++/12573 + * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by + looking into them recursively. They can be there because of the + new __offsetof__ extension. + +2004-01-07 Zack Weinberg + + * parser.c (cp_parser_save_member_function_body): Mark the + definition static. + +2004-01-05 Mark Mitchell + + PR c++/13057 + * class.c (build_clone): Copy type attributes from the original + function to the clone. + + PR c++/12815 + * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable + references as constant. + + PR c++/12132 + * parser.c (cp_parser_explicit_instantiation): Improve error + recovery. + (cp_parser_require): Improve indication of the error location. + + PR c++/13451 + * parser.c (cp_parser_class_head): Reorder logic to check for + invalid qualification. + +2004-01-04 Mark Mitchell + + PR c++/13157 + * name-lookup.c (lookup_using_namespace): Remove spacesp + parameter. + (unqualified_namespace_lookup): Likewise. + (lookup_qualified_name): Adjust accordingly. + (lookup_name_real): Likewise. + (lookup_arg_dependent): Do not eliminate the namespace of the + functions found by unqualified name lookup unless that is the + current namespace. + +2004-01-04 Andrew Pinski + + * semantics.c (push_deferring_access_checks): Fix format. + (resume_deferring_access_checks): Likewise. + (stop_deferring_access_checks): Likewise. + (pop_deferring_access_checks): Likewise. + (get_deferred_access_checks): Likewise. + (pop_to_parent_deferring_access_checks): Likewise. + (perform_deferred_access_checks): Likewise. + (perform_or_defer_access_check): Likewise. + +2004-01-04 Richard Henderson + + * call.c (build_over_call): Don't create a save_expr of an + aggregate, but rather its address. + +2004-01-04 Mark Mitchell + + PR c++/13529 + * parser.c (cp_parser_postfix_expression): Allow "." to appear in + an offsetof expression. + + * parser.c (cp_parser_parameter_declaration): Fix comment. + + PR c++/12226 + * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro. + (reference_binding): Set it when appropriate. + (build_temp): New function, split out from ... + (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P. + (initialize_reference): Likewise. + + PR c++/13536 + * parser.c (cp_parser): Add in_type_id_in_expr_p. + (cp_parser_new): Initialize it. + (cp_parser_postfix_expression): Set it. + (cp_parser_sizeof_operand): Likewise. + (cp_parser_parameteR_declaration): Do not commit early to tenative + parsers when in_type_id_in_expr_p is set. + +2004-01-03 Kriang Lerdsuwanakij + + PR c++/13094 + * parser.c (cp_parser_template_argument): Don't call + make_unbound_class_template directly. + (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from + UNBOUND_CLASS_TEMPLATE tree node. + +2004-01-02 Richard Sandiford + + PR target/12729 + * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr. + +2004-01-02 Kriang Lerdsuwanakij + + PR c++/13520 + * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro. + (DECL_FUNCTION_TEMPLATE_P): Use it. + (DECL_CLASS_TEMPLATE_P): Likewise. + * parser.c (cp_parser_lookup_name): Add is_template parameter. + (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name. + (cp_parser_template_name): Likewise. + (cp_parser_elaborated_type_specifier): Likewise. + (cp_parser_namespace_name): Likewise. + (cp_parser_class_name): Likewise. + (cp_parser_lookup_name_simple): Likewise. diff --git a/gcc/cp/ChangeLog.2 b/gcc/cp/ChangeLog.2 deleted file mode 100644 index c4d6880..0000000 --- a/gcc/cp/ChangeLog.2 +++ /dev/null @@ -1,20677 +0,0 @@ -1999-12-31 Mark Mitchell - - * cp-tree.h (VF_NORMAL_VALUE): Remove. - * class.c (struct base_info): Remove vfield, vfields, and rtti. - (set_primary_base): New function, split out from ... - (finish_base_struct): ... here. Rename to ... - (determine_primary_base): ... this. Simplify. - (create_vtable_ptr): Tweak accordingly. - (finish_struct_1): Simplify. - - * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation. - (CLASSTYPE_N_BASECLASSES): Likewise. - (BINFO_FOR_VBASE): New macro. - (get_vbase_types): Change prototype. - * class.c (build_vbase_path): Use BINFO_FOR_VBASE. - (prepare_fresh_vtable): Likewise. - (finish_vtbls): Likewise. - (get_class_offset_1): Likewise. - (modify_all_indirect_vtables): Likewise. - (build_vbase_pointer_fields): Likewise. - * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here. - * init.c (sort_base_init): Use BINFO_FOR_VBASE. - (expand_member_init): Likewise. - * search.c (get_base_distance): Likewise. - (lookup_field_queue_p): Likewise. - (virtual_context): Likewise. - (get_vbase_types): Don't return a value. Set - CLASSTYPE_VBASECLASSES here. - * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE. - -1999-12-30 Mark Mitchell - - * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS. - -1999-12-29 Mark Mitchell - - * class.c (create_vtable_ptr): Put the vtable at the beginning of - the class, not the end, in the new ABI. - * tree.c (propagate_binfo_offsets): Do the right thing for the new - ABI. - -1999-12-29 Mark Mitchell - - * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy. - (CLASSTYPE_NEARLY_EMPTY_P): New macro. - * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P. - (check_field_decls): Likewise. - (check_bases_and_members): Likewise. - -1999-12-28 Mark Mitchell - - * cp-tree.h (do_inline_function_hair): Remove. - * class.c (layout_class_type): New function, split out from - finish_struct_1. - (fixup_pending_inline): Likewise. - (fixup_inline_methods): New function. - * method.c (fixup_pending_inline): Remove. - (do_inline_function_hair): Likewise. - - * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the - new ABI. - - * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals. - (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ... - (CLASSTYPE_PURE_VIRTUALS): ... this. - (lang_decl_flags): Replace abstract_virtual with pure_virtual. - (DECL_ABSTRACT_VIRTUAL_P): Rename to ... - (DECL_PURE_VIRTUAL_P): ... this. - (get_abstract_virtuals): Rename to ... - (get_pure_virtuals): ... this. - * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with - DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with - CLASSTYPE_PURE_VIRTUALS. - * class.c (build_vtable_entry): Likewise. - (finish_struct_bits): Likewise. Call get_pure_virtuals, not - get_abstract_virtuals. - (build_vtbl_initializer): Likewise. - (override_one_vtable): Likewise. - (check_methods): Likewise. - * decl.c (duplicate_decls): Likewise. - (redeclaration_error_message): Likewise. - (lang_mark_tree): Likewise. - * decl2.c (grok_function_init): Likewise. - (import_export_vtable): Likewise. - (import_expor_class): Likewise. - * typeck2.c (abstract_virtuals_error): Likewise. - * xref.c (GNU_xref_member): Likewise. - * search.c (get_abstract_virtuals): Rename to get_pure_virtuals. - -1999-12-26 Zack Weinberg - - * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING - throughout. - -1999-12-26 Mark Mitchell - - * decl.c (store_return_init): Use mode of old RTL generated for - DECL_RESULT, not the mode of DECL_RESULT itself. - * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE - for functions that used named return values. - -1999-12-24 Mark Mitchell - - * semantics.c (expand_body): Use - note_deferral_of_defined_inline_function. - -1999-12-22 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle CTOR_STMTs. - -1999-12-22 Alexandre Oliva - - * error.c (dump_decl): Support named return values. - -1999-12-20 Mark Mitchell - - * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments. - (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro. - (CLASSTYPE_PRIMARY_BINFO): Likewise. - * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF, - TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here. - (check_bases_and_members): Set them here instead. - (create_vtable_ptr): New function, split out from ... - (finish_struct_1): ... here. Use it. Tidy. Use - CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO. - * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as - the first field in the class. - * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle - seeing TYPE_VFIELD as the first field in the class. - - * cp-tree.h (TYPE_VIRTUAL_P): Rename to ... - (TYPE_POLYMORPHIC_P): ... this. - (TYPE_USES_COMPLEX_INHERITANCE): Rename to ... - (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this. - (TREE_CALLS_NEW): Remove. - (TREE_MANGLED): Likewise. - * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, - and TYPE_POLYMORPHIC_P. - * class.c (check_bases): Likewise. - (finish_base_struct): Likewise. - (finish_struct_bits): Likewise. - (check_for_override): Likewise. - (finish_struct_1): Likewise. - (get_vfield_name): Likewise. - * decl.c (xref_basetypes): Likewise. - * decl2.c (import_export_class): Likewise. - (import_export_decl): Likewise. - * error.c (dump_function_decl): Likewise. - * pt.c (instantiate_class_template): Likewise. - * repo.c (repo_inline_used): Likewise. - * rtti.c (build_headof): Likewise. - (get_tinfo_fn_dynamic): Likewise. - (build_x_typeid): Likewise. - (get_tinfo_var): Likewise. - (build_dynamic_cast_1): Likewise. - (synthesize_tinfo_fn): Likewise. - * search.c (lookup_field_1): Likewise. - (dfs_debug_mark): Likewise. - (maybe_suppress_debug_info): Likewise. - * typeck.c (build_component_ref): Likewise. - (build_component_addr): Likewise. - * typeck2.c (process_init_constructor): Likewise. - -1999-12-20 Nathan Sidwell - - * typeck.c (strip_all_pointer_quals): New static function. - (build_static_cast): Use it. Don't use at_least_as_qualified_p. - -1999-12-16 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE. - (dso_handle_node): New macro. - (flag_use_cxa_atexit): New variable. - (declare_global_var): New function. - (start_anon_func): Remove declaration. - (end_anon_func): Likewise. - * decl.c (get_atexit_node): New function, split out from - destroy_local_static. Handle flag_use_cxa_atexit. - (get_dso_handle_node): Likewise. - (start_cleanup_fn): Renamed from start_anon_func. Moved here from - except.c. Handle flag_use_cxa_atexit. - (end_cleanup_fn): Renamed from end_anon_func. Moved here from - except.c. - (declare_global_var): New variable. - (destroy_local_static): Handle flag_use_cxa_atexit. - * decl2.c (flag_use_cxa_atexit): New variable. - (lang_f_options): Likewise. - * except.c (start_anon_func): Remove. - (end_anon_func): Liekwise. - * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit. - * rtti.c (get_tinfo_var): Use declare_global_var. - -1999-12-16 Mark Mitchell - - * class.c (check_field_decls): Don't return a value. - (avoid_overlap): Moved here from tree.c. - (build_base_fields): Likewise. - (check_bases): New function, split out from finish_base_struct. - (check_bases_and_members): New function, split out from - finish_struct_1. - (struct base_info): Remove cant_have_default_ctor, - cant_have_const_ctor, cant_have_asn_ref. - (finish_base_struct): Split semantic analysis into check_bases. - (finish_struct_methods): Fix bogus assertion. - (check_field_decls): Call finish_struct_anon here. - (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES. - (finish_struct_1): Use check_bases_and_members. Reorganize. - * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. - (build_base_fields): Don't declare. - * tree.c (avoid_overlap): Remove. - (build_base_fields): Likewise. - - * optimize.c (struct inline_data): Remove scope_stmt. - (remap_block): Don't use insert_block_after_note. Don't update - scope_stmt. - (expand_call_inline): Don't update scope_stmt. - (optimize_function): Don't initialize scope_stmt. - * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted - NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes. - -1999-12-15 Mark Mitchell - - * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS - out of the class, rather than taking them as parameters. - (build_vbase_pointer_fields): Move here from tree.c. - (build_vtbl_or_vbase_field): New function. - (check_methods): Likewise. - (remove_zero_width_bitfields): Likewise. - (add_virtual_function): Use tree_cons instead of temp_tree_cons. - (delete_duplicate_fields_1): Tidy. Don't delete duplicate - USING_DECLs here. - (finish_struct_methods): Handle the case where there are no - methods here. - (get_basefndecls): Use tree_cons instead of temp_tree_cons. - (check_field_decls): Call delete_duplicate_fields here. - (finish_struct_1): Tidy. Use check_methods and - remove_zero_width_bitfields. - * cp-tree.h (build_vbase_pointer_fields): Remove. - * decl.c (grokdeclarator): Use tree_cons instead of - temp_tree_cons. - * decl2.c (qualified_lookup_using_namespace): Use tree_cons - instead of temp_tree_cons. - * lex.c (cons_up_default_function): Remove dead code. - * method.c (fixup_pending_inline): New function, split out from ... - (do_inline_function_hair): ... here. - * tree.c (build_vbase_pointer_fields): Remove. - -1999-12-15 Jason Merrill - - * tree.c (walk_tree): Walk operand subtrees in forward order. - * optimize.c (expand_call_inline): Likewise. - (optimize_function): Initialize id->scope_stmt to something useful. - (remap_block): Assume id->scope_stmt has a useful value. - -1999-12-15 Nathan Sidwell - - * typeck.c (build_c_cast): Expand warning message. Move pointer - alignment warning to after the cast. Don't warn about pointer - alignment when given a pointer to incomplete. - -1999-12-15 Richard Henderson - - * cp-tree.h (make_aggr_type): Declare. - * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE. - (make_aggr_type): New. - - * decl.c (build_typename_type, init_decl_processing): Use it. - (build_ptrmemfunc_type, xref_tag): Likewise. - * except.c (call_eh_info): Likewise. - * init.c (init_init_processing): Likewise. - * pt.c (process_template_parm, lookup_template_class): Likewise. - * rtti.c (expand_class_desc): Likewise. - * semantics.c (begin_class_definition, finish_typeof): Likewise. - * tree.c (copy_template_template_parm): Likewise. - -1999-12-15 Jason Merrill - - * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using - sizeof (struct tree_common). - -1999-12-14 Jason Merrill - - * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the - outermost block to point to the inlined function decl. - - * error.c (dump_decl): operator==, not operator ==. - (op_to_string): Likewise. - - * decl.c (compute_array_index_type): Handle null name. - - * decl2.c (ambiguous_decl): Fix to match comment. - (lookup_using_namespace): Adjust. - - * decl2.c (import_export_class): Don't ignore dllimport. - -1999-12-14 Mark Mitchell - - * class.c (check_field_decls): Split out from ... - (finish_struct_1): ... here. Use it. Tidy. - - * cp-tree.h (remap_save_expr): Add walk_subtrees parameter. - * optimize.c (copy_body_r): Pass it. - * tree.c (remap_save_expr): Clear walk_subtrees for an - already-handled SAVE_EXPR. - (cp_unsave_r): Pass walk_subtrees to remap_save_expr. - - * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS. - * ir.texi (DECL_NAMESPACE_ALIAS): Document it. - - * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION. - -1999-12-14 Mumit Khan - - * class.c (finish_base_struct): Allow multiple COM base classes - as well as non-COM bases as long as it's not the leftmost. - -1999-12-13 Mumit Khan - - * lex.c (saving_parse_to_obstack): New global. - (reinit_parse_for_block): Use. - (reinit_parse_for_expr): Use. - (check_newline): Use. - -1999-12-13 Mark Mitchell - - * optimize.c (initialize_inlined_parameters): Take FN to which the - parameters belong as an argument. - (expand_call_inline): Expand calls into the parameter - initializations before pushing the function onto the list of - functions we are presently expanding. - -1999-12-11 Kaveh R. Ghazi - - * class.c (get_vtable_name): Use a literal format string and - VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT. - (prepare_fresh_vtable): Likewise. - - * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of - VTABLE_NAME_FORMAT. - - * decl.c (make_rtl_for_local_static): Remove unused variable `type'. - - * init.c (build_vec_init): Initialize variable `try_body'. - - * lex.c (yyerror): Don't call a variadic function with a - non-literal format string. - - * optimize.c (optimize_function): Call memset, not bzero. - - * pt.c (for_each_template_parm_r): Add static prototype. - -1999-12-09 Andreas Jaeger - - * except.c (expand_throw): Add static attribute to match - prototype. - - * Makefile.in (semantics.o): Add dependency on output.h. - * semantics.c: Include output.h for declaration of - make_function_rtl. - -1999-12-09 Mark Mitchell - - * decl.c (init_decl_processing): Reenable inlining on trees. - (finish_function): Likewise. - * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here. - * semantics.c (simplify_aggr_init_exprs): New function. - (expand_body): Use it. - * tree.c (walk_tree): Special-case TARGET_EXPRs since they - sometimes present the same sub-tree twice. - - * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not - `csl'. - - * semantics.c (finish_switch_cond): Do conversions here, not ... - * typeck.c (c_expand_start_case): Here. - - * semantics.c (do_poplevel): Remove unused variable. - -1999-12-06 Mark Mitchell - - * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE - unless we're declaring the variable in question. - -1999-12-06 Mark Mitchell - - * decl.c (init_decl_processing): #if 0 last patch. - (finish_function): Likewise. - -1999-12-05 Mark Mitchell - - * decl.c (init_decl_processing): Set flag_inline_trees if - !flag_no_inline. - - * cp-tree.h (calls_setjmp_p): Declare. - * decl.c (finish_function): Mark functions that call setjmp as - uninlinable. - * optimize.c (calls_setjmp_r): New function. - (calls_setjmp_p): Likewise. - -1999-12-04 Mark Mitchell - - * optimize.c (expand_call_inline): Wrap the expanded call in an - EXPR_WITH_FILE_LOCATION node to get correct line numbers for - inlined functions. - - * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add - in_target_cleanup_p. - (remap_decl): New function. - (remap_block): Likewise. - (copy_scope_stmt): Likewise. - (copy_body_r): Use remap_decl and copy_scope_stmt. - (copy_body): Use VARRAY_TOP_TREE. - (initialize_inlined_parameters): Likewise. - (declare_return_variable): Likewise. - (inlinable_function_p): Check flag_inline_trees. - (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs - specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the - parameters of the inlined function. - (optimize_function): Prevent recursion into partially complete - functions. - - * cp-tree.def (SCOPE_STMT): Take one operand. - * cp-tree.h (SCOPE_STMT_BLOCK): New macro. - (SCOPE_NULLIFIED_P): Redefine. - (SCOPE_NO_CLEANUPS_P): New macro. - (add_scope_stmt): Change prototype. - * decl.c (poplevel): Tidy. Warn about unused variables here. - Record SCOPE_STMT_BLOCKs. - (finish_function): Keep DECL_INITIAL for functions that might be - inlined. - * ir.texi: Document SCOPE_NO_CLEANUPS_P. - * semantics.c: Include rtl.h. - (add_scope_stmt): Return the new scope statement and, for an - end-of-scope statement, its matching begin statement. Don't set - SCOPE_NULLIFIED_P. - (do_pushlevel): Simplify, now that we are always - function-at-a-time. - (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs. - (expand_stmt): Don't call expand_start_bindings or - expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set. - * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting - SCOPE_NULLIFIED_P. - * Makefile.in (semantics.o): Depend on RTL_H. - - * decl2.c (pending_statics_used): Make it a macro. - (saved_inlines_used): Likewise. - (finish_static_data_member_decl): Use VARRAY_PUSH_TREE. - (mark_inline_for_output): Likewise. - (ssdf_decls_used): Remove. - (start_static_storage_duration_function): Use VARRAY_PUSH_TREE. - (generate_ctor_or_dtor_function): Adjust accordingly. - -1999-11-24 Geoffrey Keating - Greg McGary - - * decl.c (duplicate_decls): Merge - DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, - DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK. - -1999-12-02 Mike Stump - - * init.c (perform_member_init): Handle parse errors better. - -1999-12-01 Mark Mitchell - - * cp-tree.h (min_tree_cons): Remove. - (scratch_ovl_cons): Likewise. - * decl.c (saveable_obstack): Don't declare. - (duplicate_decls): Tweak error-message. - (initialize_local_var): Explicitly mark the definition as static. - (finish_function): Call permanent_allocation, just so - that the middle-end sees the obstacks it expects. - (mark_cp_function_context): Likewise. - * init.c (build_new): Don't use min_tree_cons. - * lex.c (permanent_obstack): Don't declare. - (current_obstack, saveable_obstack): Likewise. - * spew.c (current_obstack, saveable_obstack): Likewise. - * tree.c (current_obstack, saveable_obstack): Likewise. - (scratch_ovl_cons): Remove. - (build_min_nt): Don't mess with obstacks. - (build_min): Likewise. - (min_tree_cons): Remove - * typeck.c (build_component_ref): Don't use scratch_ovl_cons. - (build_x_function_call): Likewise. - (build_c_cast): Don't use min_tree_cons. - -1999-11-29 Mark Mitchell - - * pt.c (tsubst_decl): Robustify. - -1999-11-27 Mark Mitchell - - * decl2.c (finish_file): Call expand_body for inline functions - that will be written out but that do not yet have RTL. - * semantics.c (expand_body): Do not generate RTL For inline - functions that do not yet need to be written out. - -1999-11-25 Mark Mitchell - - * Make-lang.in (CXX_SRCS): Add optimize.c. - * Makefile.in (CXX_OBJS): Add optimize.o. - (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H). - (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust. - (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise. - (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise. - (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise. - (dump.o): Likewise. - (optimize.o): New target. - * class.c: Don't include splay-tree.h. - * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT. - * cp-tree.h: Include splay-tree.h. - (DECL_UNINLINABLE): New macro. - (CTOR_BEGIN_P, CTOR_END_P): New macros. - (flag_inline_trees): New variable. - (local_variable_p): New function. - (nonstatic_local_decl_p): Likewise. - (optimize_function): Likewise. - (cplus_unsave_expr_now): Remove. - (copy_tree_r): Declare. - (remap_save_expr): Likewise. - * decl.c (local_variable_p): Don't - make it static. - (local_variable_p_walkfn): New function. - (make_rtl_for_local_static): Remove code to try to avoid writing - out static constants. - (emit_local_var): Fix indentation. - (nonstatic_local_decl_p): New function. - (check_default_argument): Use local_variable_p_walkfn, not - local_variable_p, when walking the tree. - (start_function): Set the DECL_CONTEXT for automatically generated - labels. - (finish_constructor_body): Use CTOR_STMT to mark the end of a - constructor. - * decl2.c: Don't include splay-tree.h. - (flag_inline_trees): Define. - * dump.c: Don't include - splay-tree.h. - * except.c (expand_end_catch_block): Fix comment formatting. - (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables. - (expand_throw): Tidy comment. - * init.c (build_vec_delete_1): Use create_temporary_var. - * lex.c (cplus_tree_code_type): Make it static. - (cplus_tree_code_length): Likewise. - (cplus_tree_code_name): Likewise. - * optimize.c: New file. - * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions - with computed gotos. - (setup_vtbl_ptr): Mark the beginnings of constructors with - CTOR_STMT. - (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE. - (expand_body): Call optimize_function. Save bodies if we're doing - inlining on trees. - * tree.c: Don't include splay-tree.h. Include insn-config.h and - integrate.h. - (copy_tree_r): Make it public. - (statement_code_p): New function. - (mark_local_for_remap_r): Likewise. - (cp_usave_r): Likewise. - (cp_unsave): Likewise. - (build_cplus_new): Set DECL_CONTEXT for temporary variables. - (walk_tree): Walk into `s' class nodes. Walk statement chains. - (copy_tree_r): Handle 's' class nodes. Restore chains for - statements. Nullify scopes. Don't copy types. - (init_tree): Set lang_unsave to cp_unsave. - (remap_save_expr): Define. - * ir.texi: Document CTOR_STMT. - -1999-11-24 Jason Merrill - - * search.c (note_debug_info_needed): Do perform this optimization - for dwarf2. - (maybe_suppress_debug_info): Likewise. Start by clearing - TYPE_DECL_SUPPRESS_DEBUG. - -1999-11-24 Mark Mitchell - - * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs. - - * decl2.c (finish_vtable_vardecl): Don't prune vtables here. - -1999-11-23 Kaveh R. Ghazi - - * decl.c (pushdecl, grokdeclarator): Don't call a variadic - function with a non-literal format string. - - * lex.c (do_identifier): Likewise. - - * typeck.c (build_unary_op): Likewise. - -1999-11-23 Mark Mitchell - - * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation. - -1999-11-22 Mark Mitchell - - * cp-tree.def (CTOR_COMPLETE): New tree node. - * decl.c (finish_constructor_body): Add it, to mark the end of the - constructor. - (finish_function): Don't call end_protect_partials here. - * ir.texi (CTOR_COMPLETE): Document it. - * semantics.c (expand_stmt): Handle it. - - * cp-tree.def (FUNCTION_NAME): New tree node. - * cp-tree.h (current_function_name_declared): Tweak documentation. - (lang_decl_flags): Add pretty_function_p, adjust dummy. - (DECL_PRETTY_FUNCTION_P): New macro. - * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__, - etc., in a template function. Use at_function_scope_p instead of - expanding it inline. - * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations - specially. - (tsubst): Handle FUNCTION_NAME. - (tsubst_copy): Likewise. - (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__, - etc. in instantiation. - * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc., - even in template functions. - (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the - conditional scope at the top of a destructor. - - * error.c (dump_function_decl): Use `[ with ... ]' syntax for - specializations too. - -1999-11-22 Nathan Sidwell - - * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT - when actually negative. - - * typeck.c (convert_for_assignment): Expand comment about - strange NULL check, moved from ... - (convert_for_initialization): ... here. Remove unneeded - code. - -1999-11-21 Alexandre Oliva - - * cp-tree.h (build_vec_delete): Remove `auto_delete' argument. - * init.c (build_vec_delete, build_vec_delete_1): Likewise. - Always destruct virtual bases of array components, but never - delete them. - (build_vec_init): Adjust invocations. - (build_delete): Likewise. - * decl2.c (delete_sanity): Likewise. - -1999-11-19 Nathan Sidwell - - * cp-tree.h (grok_method_quals): Return this pointer qualifiers. - * decl.c (grokdeclarator): Adjust calls to grok_method_quals. - * decl2.c (grok_method_quals): Accept `restrict' as applying to - the object pointer. Return such qualifiers. - (grokclassfn): Apply this pointer qualifiers. Cleanup unused - variables. - -1999-11-18 Mark Mitchell - - * except.c (expand_end_catch_block): Fix typo. - (expand_exception_blocks): Simplify. Don't call - expand_leftover_cleanups. - -1999-11-15 Jason Merrill - - * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic. - * pt.c (tsubst, case INTEGER_TYPE): Call it. - Check uses_template_parms. - - * class.c (finish_struct): If we're a local class in a template - function, add a TAG_DEFN. - * pt.c (lookup_template_class): If this is a local class in a - template function, call pushtag. - (tsubst_expr, case TAG_DEFN): Handle classes, too. - - Emit debug info with the vtable. - * search.c (maybe_suppress_debug_info): New function... - * class.c (finish_struct_1): ...split out from here. - * cp-tree.h: Declare it. - * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG - if we're writing out the vtable. - * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, - note_debug_info_needed): #if 0 out. - -1999-11-14 Mark Mitchell - - * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. - * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not - TREE_PERMANENT. - * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P. - * decl2.c (lookup_arg_dependent): Use it. - - * cp-tree.h (cp_finish_decl): Change prototype. - (finish_static_data_member_decl): Likewise. - (push_permanent_obstack): Remove declaration. - (push_expression_obstack): Likewise. - (push_scratch_obstack): Likewise. - (DECL_TEMPLATE_PARM_P): Robustify. - (SET_DECL_TEMPLATE_PARM_P): New macro. - * class.c (add_method): Don't manipulate obstacks. - (finish_vtbls): Likewise. - * cvt.c (build_up_reference): Adjust calls to cp_finish_decl. - * decl.c (binding_for_name): Don't manipulate obstacks. - (maybe_push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (duplicate_decls): Likewise. - (pushdecl): Likewise. - (implicitly_declare): Likewise. - (build_typename_type): Likewise. - (start_decl): Likewise. - (cp_finish_decl): Likewise. - (finish_decl): Likewise. - (destroy_local_static): Likewise. - (expand_static_init): Likewise. - (complete_array_type): Likewise. - (grokvardecl): Likewise. - (build_ptrmemfnc_type): Likewise. - (grokdeclarator): Likewise. - (xref_tag): Likewise. - (xref_basetypes): Likewise. - (start_enum): Likewise. - (finish_enum): Likewise. - (start_function): Likewise. - (finish_function): Likewise. - (start_method): Adjust call to cp_finish_decl. - * decl2.c (finish_static_data_member_decl): Don't manipulate - obstacks. - (grokfield): Likewise. - (grokbitfield): Likewise. - (get_temp_name): Likewise. - (get_sentry): Likewise. - (fnish_file): Likewise. - (lookup_arg_dependent): Likewise. - * except.c (call_eh_info): Likewise. - (push_eh_info): Likewise. - (do_pop_exception): Likewise. - (initialize_handler_parm): Likewise. - (expand_end_eh_spec): Likewise. - (alloc_eh_object): Likewise. - (expand_throw): Likewise. - * expr.c (extract_scalar_init): Likewise. - * init.c (build_java_class_ref): Likewise. - * lex.c (get_time_identifier): Likewise. - (snarf_defarg): Likewise. - (add_defarg_fn): Likewise. - (is_global): Simplify. - (do_identifier): Don't check TREE_PERMANENT. - * method.c (emit_thunk): Don't manipulate obstacks. - * parse.y (condition): Adjust call to cp_finish_decl. - (primary): Likewise. - (initdcl): Likewise. - (initdcl0_innards): Likewise. - (nomods_initdcl0): Likewise. - * pt.c (push_inline_template_parms_recursive): Use - SET_DECL_TEMPLATE_PARM_P. - (process_template_parm): Likewise. - (lookup_template_class): Don't manipulate obstacks. - (instantiate_class_template): Adjust call to - finish_static_data_member_decl. - (tsubst_decl): Don't manipulate obstacks. - (tsubst_expr): Likewise. - (instantiate_template): Likewise. - (instantiate_decl): Adjust calls to cp_finish_decl. - * rtti.c (call_void_fn): Don't manipulate obstacks. - (get_tinfo_var): Likewise. - (get_tinfo_fn_unused): Likewise. - (build_dynamic_cast_1): Likewise. - (expand_si_desc): Likewise. - (expand_class_desc): Likewise. - (expand_ptr_desc): Likewise. - (expand_attr_desc): Likewise. - (expand_generic_desc): Likewise. - (synthesize_tinfo_fn): Likewise. - * search.c (expand_upcast_fixups): Likewise. - * semantics.c (finish_asm_stmt): Likewise. - (finish_named_return_value): Likewise. - (begin_class_definition): Likewise. - (finish_class_definition): Likewise. - (finish_typeof): Likewise. - * tree.c (build_cplus_method_type): Likewise. - (reverse_path): Likewise. - (copy_template_template_parm): Likewise. - (build_expr_ptr_wrapper): Likewise. - (push_expression_obstack): Remove. - (push_permanent_obstack): Likewise. - * typeck.c (mark_addressable): Likewise. - -1999-11-13 Mark Mitchell - - * call.c (build_conditional_expr): Use build_target_expr_with_type. - (convert_like): Likewise. - (build_over_call): Likewise. - * cp-tree.h (build_target_expr): Remove. - (build_target_expr_with_type): New function. - * cvt.c (build_up_reference): Use get_target_expr. - * decl.c (build_target_expr): Move to ... - * tree.c (build_target_expr): Here. Make it static. - (build_target_expr_with_type): New function. Set DECL_CONTEXT on - the temporary VAR_DECLs. - (get_target_expr): Use it. - -1999-11-13 Jason Merrill - - * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT. - * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT. - * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn. - * class.c (set_rtti_entry): Use it. - -1999-11-12 Mark Mitchell - - * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups - here. - * semantics.c (finish_expr_stmt): Call it here instead. Move - default_conversion logic to semantic-analysis time. - -1999-11-12 Jason Merrill - - * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT. - -Fri Nov 12 12:56:32 MST 1999 Diego Novillo - - * init.c (init_init_processing): Re-instated Nov 11 patch after - approval. - -Fri Nov 12 10:42:02 MST 1999 Diego Novillo - - * init.c (init_init_processing): Undo patch from Nov 11, 1999. - Patch had not been approved yet. - -1999-11-12 Mark Mitchell - - * decl.c (compute_array_index_type): New function, split out from - grokdeclarator. - (create_array_type_for_decl): Likewise. - (grokdeclarator): Use them. - - * semantics.c (expand_stmt): Don't suspend_momentary or - resume_momentary. - -Thu Nov 11 12:42:11 MST 1999 Diego Novillo - - * init.c (init_init_processing): Header information for - arrays allocated via `new' should have the same alignment used by - malloc. - -1999-11-10 Mark Mitchell - - * error.c (dump_function_name): Don't crash if given a friend - pseudo-instantiation. - - * cp-tree.h (build_enumerator): Change prototype. - * decl.c (enum_next_value): Remove. - (enum_overflow): Likewise. - (init_decl_processing): Don't register enum_next_value as a root. - (start_enum): Clear TYPE_VALUES for a redefined enum. - (finish_enum): Reset the type of enumeration constants. - (build_enumerator): Fix indentation. Don't copy CONST_DECLs when - we don't need to. Maintain the TYPE_VALUES list and look there - for the previously defined enumeration constant. Let enumeration - constants have the type of their values until the enumeration type - is complete. - * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value. - (structsp): Adjust. - * parse.c: Regenerated. - * pt.c (tsubst_enum): Adjust according to build_enumerator changes. - -Wed Nov 10 12:43:21 1999 Philippe De Muyter - Kaveh R. Ghazi - - * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. - -1999-11-09 Mark Mitchell - - * cp-tree.h (language_function): Remove x_last_dtor_insn and - x_last_parm_cleanup_insn. - * decl.c (last_dtor_insn): Remove. - (last_parm_cleanup_insn): Likewise. - (expand_start_early_try_stmts): Don't set them. - (store_parm_decls): Likewise. - (save_function_data): Or save them. - (mark_lang_function): Or mark them. - -1999-11-08 Mark Mitchell - - * decl.c (store_parm_decls): Generate cleanup code at - semantic-analysis time. Destroy objects in the correct order. - -1999-11-07 Mark Mitchell - - * cp-tree.h (begin_new_placement): Remove. - (finish_new_placement): Likewise. - * class.c (finish_struct_1): Don't suspend_momentary or - resume_momentary. - * decl.c (grokdeclarator): Likewise. - (maybe_build_cleanup_1): Likewise. - * except.c (push_eh_cleanup): Likewise. - (build_terminate_handler): Likewise. - * init.c (build_new_1): Likewise. - * parse.y (parse_decl): Change prototype. - (initdecls, notype_initdecls, initdcl): Don't return int. - (initdcl0, notype_initdcl0, initdcl0_innards): Likewise. - (.begin_new_placement): Remove. - (.finish_new_placement): Likewise. - (nonmomentary_expr): Likewise. - (suspend_mom): Likewise. - (condition): Don't suspend_momentary, resume_momentary, or keep - track of need to resume. - (unary_expr): Likewise. - (new_placement): Likewise. - (decl): Likewise. - (structsp): Likewise. - (new_type_id): Likewise. - (maybe_parmlist): Likewise. - (direct_after_type_declaration): Likewise. - (direct_new_declarator): Likewise. - (direct_abstract_declaration): Likewise. - * parse.c: Regenerated. - * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary. - * semantics.c (begin_new_placement): Remove. - (finish_new_placement): Likewise. - -1999-11-05 Martin v. Löwis - - * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro. - (DECL_TEMPLATE_INFO): Use it. - * decl.c (warn_extern_redeclared_static): Do nothing for - TEMPLATE_DECLs. - * decl2.c (mark_used): Explicitly check for function or variable. - * semantics.c (finish_unary_op_expr): Check whether result is also - an INTEGER_CST. - -1999-11-05 Mark Mitchell - - * Makefile.in (typeck2.o): Depend on output.h. - * typeck2.c: Include output.h. - - * decl.c (flag_ansi): Remove declaration. - - * pt.c (tinst_level_tick): Make it static. - (last_template_error_tick): Likewise. - - * cp-tree.h (mapcar): Remove declaration. - (search_tree): Likewise. - (walk_tree_fn): New typedef. - (walk_tree): New function. - * tree.c (bot_manip): Change prototype. Adjust to be called via - walk_tree. - (bot_replace): Likewise. - (no_linkage_helper): Likewise. - (copy_tree_r): New function. - (search_tree): Rename, and adjust, to become ... - (walk_tree): New function. - (mapcar): Remove. - (target_remap): Remove. - (target_remap_count): Likewise. - (break_out_target_exprs): Use walk_tree. - * decl.c (local_variable_p): Change prototype. - (check_default_argument): Use walk_tree. - * pt.c (for_each_template_parm_r): New function, split out from ... - (for_each_template_parm): Here. Use it, via walk_tree. - -1999-11-03 Mark Mitchell - - * class.c (check_bitfield_decl): New function, split out from - finish_stuct_1. - (check_field_decl): Likewise. Recursively examine members of - anonymous structs. - (finish_struct_1): Use them. - * cp-tree.h (ANON_UNION_TYPE_P): New macro. - -1999-11-02 Mark Mitchell - - * decl.c (grokfndecl): Remove dead code. - - * dump.c (dequeue_and_dump): Fix thinko for catch-clauses. - -1999-11-02 Scott Snyder - - * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and - IMAGPART_EXPR. - * pt.c (tsubst_copy): Likewise. - -1999-11-01 Jason Merrill - - * decl2.c (maybe_make_one_only): Always make things comdat on - ELF targets, too. - -1999-10-31 Mark Mitchell - - * decl.c (finish_function): Call free_after_parsing for functions - we are not immediately turning into RTL. - -1999-10-31 Brendan Kehoe - - * cp-tree.h (flag_dump_translation_unit): Add decl. - -Sat Oct 30 22:42:50 1999 Stephen L Moshier - - * lex.c (yylex): Accept 'f' in mantissa of hex float constant. - -1999-10-30 Mark Mitchell - - * decl.c (pop_cp_function_context): Don't call free on a NULL - pointer. - * semantics.c: Include ggc.h. - (expand_body): Do garbage-collection after processing a template - function. Clear DECL_SAVED_TREE after generating RTL for a - function. - * Makefile.in (semantics.o): Depend on ggc.h. - -1999-10-29 Mark Mitchell - - * cp-tree.h (make_typename_type): Change prototype. - * decl.c (make_typename_type): Only complain if so requested. - * parse.y (nested_name_specifier): Adjust calls. - (typename_sub0): Likewise. - (typename_sub1): Likewise. - * parse.c: Regenerated. - * pt.c (convert_template_argument): Pass complain to - make_typename_type. - (tsubst): Likewise. - -1999-10-28 Mark Mitchell - - * semantics.c (finish_handler): End the scope of the handler - before attaching it to the statement-tree. - -1999-10-28 Ian Lance Taylor - - * rtti.c (build_dynamic_cast_1): Give a better error message for - an attempt to dynamic_cast from a non-polymorphic type. - -1999-10-27 Mark Mitchell - - * cp-tree.h (make_temp_vec): Remove. - (make_scratch_vec): Likewise. - * call.c (add_function_candidate): Use make_tree_vec. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - (add_template_candidate_real): Likewise. - * class.c (resolve_address_of_overloaded_function): Likewise. - * decl.c (start_function): Don't fool with the momentary obstack. - (finish_function): Likewise. - * init.c (expand_direct_vtbls_init): Likewise. - (begin_init_stmts): Likewise. - (finish_init_stmts): Likewise. - * pt.c (add_to_template_args): Use make_tree_vec. - (check_explicit_specialization): Likewise. - (coerce_template_parms): Likewise. - (lookup_template_class): Don't fool with the momentary obstack. - (instantiate_class_template): Likewise. - (tsubst_template_arg_vector): Use make_tree_vec. - (tsubst_aggr_type): Don't fool with the momentary obstack. - (tsubst_decl): Likewise. Use make_tree_vec. - (try_one_overload): Likewise. - (try_class_unification): Don't fool with the momentary obstack. - (get_bindings_real): Use make_tree_vec. - (set_mangled_name_for_template_decl): Likewise. - * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack. - * semantics.c (finish_expr_stmt): Likewise. - (finish_do_stmt): Likewise. - (finish_for_expr): Likewise. - (finish_switch_cond): Likewise. - (do_pushlevel): Likewise. - (do_poplevel): Likewise. - * tree.c (make_temp_vec): Remove. - - * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump - CLEANUP_P for a TRY_BLOCK. - * ir.texi: Document SAVE_EXPR. - -Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com) - - * call.c (build_over_call): Check that the built-in function is - of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS. - * typeck.c (build_function_call_real): Similarly. - -1999-10-26 Mark Mitchell - - * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call - remember_end_note. - -1999-10-24 Mark Mitchell - - * decl.c (push_overloaded_decl_1): Use pushdecl. - - * decl.c (auto_function): Replace #ifdef'd __inline with just - plain inline. - * lex.c (my_get_run_time): Likeise. - (yyprint): Likewise. - (identifier_type): Likewise. - * method.c (start_squangling): Likewise. - (end_squangling): Likewise. - (icat): Likewise. - (old_backref_index): Likewise. - (flush_repeats): Likewise. - (issue_ktype): Likewise. - * parse.y (empty_parms): Likewise. - * parse.c: Regenerated. - -1999-10-21 Mark Mitchell - - * dump.c (dequeue_and_dump): Replace several uses of - queue_and_dump_index with dump_child. - -1999-10-21 Kaveh R. Ghazi - - * expr.c: Include tm_p.h. - -1999-10-21 Mark Mitchell - - * cp-tree.h (SCOPE_PARTIAL_P): New macro. - (pushlevel_temporary): Remove. - (add_scope_stmt): New function. - * decl.c (pushlevel_temporary): Remove. - (poplevel): Use add_scope_stmt. - (start_decl_1): Likewise. - * semantics.c (add_scope_stmt): New function. - (do_pushlevel): Use it. - (do_poplevel): Use it. - (expand_stmt): Check SCOPE_PARTIAL_P. - - * cp-tree.def (EMPTY_CLASS_EXPR): New tree node. - * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR. - * expr.c (cplus_expand_expr): Expand it. - * ir.texi: Document EMPTY_CLASS_EXPR. - -1999-10-20 Mark Mitchell - - * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template - parameters as having namespace scope. - -1999-10-19 Mark Mitchell - - * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove. - (mangling_flags): New type. - (build_overload_int): Change prototype. - (build_overload_value): Likewise. - (numeric_output_need_bar): Improve comment. - (mangle_expression): New function, broken out from ... - (build_overload_int): Here. - (build_overload_value): Adjust for use of mangling flags. Don't - warn about real-valued template parameters here. Do handle - complex expressions involving real-valued template parameters. - (build_template_parm_names): Encase non-type template parameters - in underscores, if necessary. - (process_overload_item): Remove conditional on - PARM_CAN_BE_ARRAY_TYPE. - -1999-10-17 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR. - - * ir.texi: Clean up documentation of RETURN_INIT. - -1999-10-15 Greg McGary - - * lex.c (lang_init_options): Set flag_bounds_check as "unspecified". - (lang_init): Set default for flag_bounds_check if still "unspecified". - -1999-10-13 Andrew Haley - - * class.c (finish_struct_1): Force alignment of non-bitfields to - BITS_PER_UNIT. - -Wed Oct 13 22:01:35 1999 J"orn Rennecke - - * typeck2.c (process_init_constructor): Handle empty constructors. - -1999-10-13 Jason Merrill - - * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL. - - * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size - array error. - -1999-10-13 Mark Mitchell - - * decl.c (make_rtl_for_local_static): Don't create register RTL - for addressable constants. - -1999-10-13 Nathan Sidwell - - * cp-tree.h (build_x_va_arg): Prototype new function. - * call.c (build_x_va_arg): Define it. - * parse.y (unary_expr): Call build_x_va_arg. - - * cp-tree.h (convert_type_from_ellipsis): Prototype new function. - * call.c (convert_type_from_ellipsis): Define it. - * decl.c (init_decl_processing): Set lang_type_promotes_to. - - * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates. - -1999-10-11 Jason Merrill - - * class.c (fixed_type_or_null): Always set *nonnull. - -1999-10-10 Kaveh R. Ghazi - - * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing - __GNUC__ and __GNUC_MINOR__. - -1999-10-09 Mark Mitchell - - * cp-tree.h (make_rtl_for_local_static): New function. - * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for - local statics ... - (make_rtl_for_local_static): Here. - * semantics.c (expand_stmt): Use make_rtl_for_local_static. - -1999-10-08 Kaveh R. Ghazi - - * method.c: Include tm_p.h. - -1999-10-7 Franz Sirl - - * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type. - * lex.c (cp_make_lake_type): Likewise. - * tree.c (init_tree): Init make_lang_type_fn. - -1999-10-07 Mark Mitchell - - * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch - parameter. - - * semantics.c (expand_stmt): Don't pretend to have asmspecs for - local statics if we don't really have them. - - * ir.texi: Improve documentation for STMT_EXPR. Describe - CLEANUP_POINT_EXPR. - -1999-10-07 Jason Merrill - - * class.c (build_vtable_entry_ref): Use finish_asm_stmt. - -1999-10-07 Greg McGary - - * class.c (finish_struct_1): Use simpler method of - removing elements of a singly-linked list which doesn't - lose for classes without data members. - -1999-10-07 Mark Mitchell - - * friend.c (make_friend_class): Robustify. - - * semantics.c (finish_object_call_expr): Reject calls to template - types. - -1999-10-06 Mark Mitchell - - * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR. - - * cp-tree.h (CLASSTYPE_VFIELD): Remove. - * call.c (build_vfield_ref): Use TYPE_VFIELD, not - CLASSTYPE_VFIELD. - * class.c (get_vfield_offset): Likewise. - (finish_base_struct): Likewise. - (modify_one_vtable): Likewise. - (fixup_vtable_deltas): Likewise. - (finish_struct_1): Likewise. - * init.c (expand_virtual_init): Likewise. - * search.c (lookup_field_1): Likewise. - (expand_upcast_fixups): Likewise. - * typeck.c (build_component_ref): Likewise. - (build_binary_op_nodefault): Likewise. - - * dump.c (dqueue_and_dump): Dump TYPE_VFIELD. - * ir.texi: Document TYPE_VFIELD. - -1999-10-06 Brendan Kehoe - - * decl.c (grokdeclarator): Only warn about nonzero arrays if - !in_system_header (linux socketbits.h can give this for - __cmsg_data, which is using a GNU extension). - -1999-10-05 Mark Mitchell - - * decl2.c (start_static_storage_duration_function): Push the - function declaration so it ends up in namespace scope. - - * dump.c (DUMP_CHILDREN): Remove. - (DUMP_BINFO): Adjust. - (struct dump_node_info): Remove dump_children_p. - (queue_and_dump_type): Remove dump_children_p parameter. - (queue): Don't set dump_children_p. - (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to - queue_and_dump_index. - (dequeue_and_dump): Unconditionally print children. Adjust calls - to functions mentioned above. - (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue. - - * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR. - * dump.c (dequeue_and_dump): Dump them. - - * method.c (synthesize_method): Call setup_vtbl_ptr for destructors. - - * decl.c (start_function): Set current_in_charge_parm for - constructors, too, where appropriate. - * search.c (fixup_all_virtual_upcast_offsets): New function. - (expand_indirect_vtbls_init): Use it. - -1999-10-04 Nathan Sidwell - - * decl2.c (grok_alignof): Don't decay lvalues. - - * init.c (build_new): Remove unused variable. - -1999-10-04 Mark Mitchell - - * cp-tree.h (struct language_function): Remove static_labelno. - (static_labelno): Remove macro. - * method.c (build_overload_nested_name): Make static_labelno - static here. - - * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL, - to decide whether or not a function is defined. - - * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for - situations where make_node will do it automatically. - * decl.c (grok_reference_init): Likewise. - (expand_static_init): Likewise. - (do_static_initialization): Likewise. - * init.c (perform_member_init): Likewise. - (expand_aggr_init_1): Likewise. - (build_new_1): Likewise. - * method.c (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - * search.c (expand_upcast_fixups): Likewise. - * semantics.c (finish_stmt_expr): Likewise. - * typeck.c (build_unary_op): Likewise. - (check_return_expr): Likewise. - -1999-10-04 Jason Merrill - - * init.c (build_vec_delete_1): Fold COND_EXPRs. - -1999-10-03 Mark Mitchell - - * cp-tree.def (VEC_INIT_EXPR): Remove. - * cp-tree.h (struct stmt_tree): New type. - (struct saved_scope): Remove firstobj. Add x_saved_tree, - x_stmt_tree. - (class_cache_firstobj): Remove. - (struct language_function): Remove stmts_are_full_exprs_p, - x_last_tree, and x_last_expr_type. Add x_stmt_tree. - (current_stmt_tree): New macro. - (last_tree): Adjust. - (last_expr_type): Likewise. - (doing_semantic_analysis_p): Simplify. - (stmts_are_full_exprs_p): Adjust. - (begin_tree): Remove prototype. - (end_tree): Likewise. - (begin_stmt_tree): Change prototype. - (finish_stmt_tree): Likewise. - (building_stmt_tree): Simplify. - * decl.c (mark_stmt_tree): New function. - (mark_saved_scope): Use it. - (start_function): Rearrange slightly to call begin_stmt_tree - earlier. - (save_function_data): Tweak. - (finish_function): Adjust call to finish_stmt_tree. - (mark_lang_function): Use mark_stmt_tree. - * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR. - * init.c (build_new_1): Remove creation of VEC_INIT_EXPR. - (build_vec_init): Remove creation of stand-in initializer. - * pt.c (begin_tree): Remove. - (end_tree): Likewise. - * semantics.c (SET_LAST_STMT): New macro. Use it throughout. - (begin_compound_stmt): Handle a compound-statement outside of a - function. - (begin_stmt_expr): Handle a statement-expression outsidef of a - function. - (finish_stmt_expr): Likewise. - (begin_class_definition): Don't call begin_tree. - (finish_inline_definitions): Don't call end_tree. - (begin_stmt_tree): Take a pointer to tree, not a function as input. - (finish_stmt_tree): Likewise. - * tree.c (search_tree): Don't handle VEC_INIT_EXPR. - (mapcar): Likewise. - - * parse.y (simple_stmt): Don't call finish_stmt unnecessarily. - * parse.c: Regenerated. - - * dump.c (dqueue_and_dump): Dump bitfieldness. - - * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for - bitfields, rather than DECL_BIT_FIELD. - * ir.texi: Document how to tell whether or not a field is a - bitfield. - - * lex.c (make_lang_type): Fix typo in comment. - -1999-10-01 Jason Merrill - - * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues. - -1999-10-01 Mark Mitchell - - * pt.c (tsubst_decl): If the type of a template instantiation is - bogus, so is the whole instantiation. - -1999-09-30 Mark Mitchell - - * decl.c (initialize_local_var): Handle static variables here. - (cp_finish_decl): Tweak handling of function-scope static - variables. - * semantics.c (expand_stmt): Handle DECL_STMTs for static - variables. - - * method.c (emit_thunk): Don't crash when -fsyntax-only. - - * cp-tree.h (lang_decl_flags): Add global_ctor_p and - global_dtor_p. Add init_priority. - (DECL_ACCESS): Adjust accordingly. - (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros. - (GLOBAL_INIT_PRIORITY): Likewise. - * decl.c (lang_mark_tree): Adjust accordingly. - (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, - and GLOBAL_INIT_PRIORITY. - * dump.c (dequeue_and_dump): Print them. - * ir.texi: Document them. - - * decl2.c (struct priority_info_s): Remove initialization_sequence - and destruction_sequence. - (start_static_storage_duration_function): Return the body of the - function. Convert for function-at-a-time mode. - (generate_inits_for_priority): Remove. - (finish_static_storage_duration_function): Change prototype. - Adjust for function-at-a-time mode. - (do_static_initialization): Likewise. - (do_static_destruction): Likewise. - (do_static_initialization_and_destruction): Remove. - (start_static_initialization_or_destruction): New function. - (finish_static_initialization_or_destruction): Likewise. - (get_priority_info): Don't manipulation initialization_sequence or - destruction_sequence. - (prune_vars_needing_no_initialization): New function. - (write_out_vars): Likewise. - (finish_file): Use the various new functions instead of the old. - -Thu Sep 30 00:13:27 1999 Dirk Zoller - - * cp-tree.h (warn_float_equal): Declare. - * decl2.c (warn_float_equal): Define. - (lang_decode_option): Recognize -W[no-]float-equal. - * typeck.c (build_binary_op_nodefault): Conditionally warn - about equality tests of floating point types. - -1999-09-29 Jason Merrill - - Support normal type_info-based EH mechanisms with -fno-rtti. - * except.c (build_eh_type_type): Remove special -fno-rtti handling. - (build_eh_type_type_ref): Likewise. - (build_eh_type): Remove. - (expand_throw): Call build_eh_type_type, not build_eh_type. - * decl2.c (import_export_decl): Don't associate the tinfo fn with - the vtable if -fno-rtti. - * decl.c (init_decl_processing): Always init_rtti_processing. - - * rtti.c (get_typeid): Don't complain about -fno-rtti. - - * class.c (class_cache_obstack, class_obstack): Remove. - (init_class_processing): Don't initialize class_obstack. - (push_cache_obstack): Remove. - (pushclass): Don't call it. - * cp-tree.h: Remove prototype for push_cache_obstack. - * decl.c (decl_obstack, decl_stack, push_decl_level): Remove. - (pushlevel_class): Don't push_decl_level. - (poplevel_class): Don't pop_stack_level. - (push_class_level_binding): Don't push_cache_obstack. - (init_decl_processing): Don't initialize decl_obstack. - * search.c (push_class_decls): Don't push_cache_obstack. - * tree.c (list_hash_add): Put hash node on permanent_obstack. - (hash_tree_cons): Don't mess with obstacks. - (print_lang_statistics): Don't print stats for class_obstack and - decl_obstack. - -1999-09-29 Mark Mitchell - - * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL. - * ir.texi: Document DECL_EXTERNAL. - - * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs. - * ir.texi: Document THUNK_DECLs. - - * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c. - (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. - (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. - * error.c (dump_template_bindings): Remove unused parameter. - Handle multiple levels of template parameters. - (dump_template_decl): Use `parms', not `args', for template - parameters. Fix thinko. - (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass - flags to dump_template_bindings. - * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h. - (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. - (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. - (tsubst_copy): Clarify variable name. - (most_general_template): Robustify. - -1999-09-29 Nathan Sidwell - - * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME - to change primary template rendering. - -1999-09-29 Mark Mitchell - - * cp-tree.h (UPT_TEMPLATE): Remove. - (UPT_PARMS): Likewise. - (DECL_NEEDED_P): New macro. - * decl2.c (finish_vtable_vardecl): Use it. - (finish_objects): Don't crash with -fsyntax-only. - (finish_file): Use DECL_NEEDED_P. Don't prune vtables when - -fsyntax-only. - * pt.c (tsubst_friend_function): Remove FIXME that talks about - obstacks. - (tsubst_expr): Correct handling of function try-blocks. - * semantics.c: Include flags.h. - (expand_body): Don't do RTL generation if -fsyntax-only. - * Makefile.in (semantics.o): Depends on flags.h. - -1999-09-28 Gabriel Dos Reis - - * pt.c (most_general_template): Adjust declaration. - - * cp-tree.h: (most_general_template): Declare. - - * error.c (dump_template_value): Rename to ... - (dump_template_argument): This. - (dump_template_argument_list): New function. - (dump_type): Use it. - (dump_template_parameter): New function. - (dump_template_decl): Use it. - (dump_template_bindings): New function. - (dump_function_decl): Use it. Pretty print function template - instantiations. - -1999-09-28 Nathan Sidwell - - * decl.c (grokdeclarator): Distinguish parameter context for - diagnostics. Tidy up missing type diagnostic. - Diagnose `explicit' in one place. Diagnose `mutable' in one place. - -1999-09-28 Mark Mitchell - - * ir.texi: Improve documentation for TARGET_EXPR. - -1999-09-27 Nathan Sidwell - - Augment stringification of trees. - * cp-tree.h (tree_string_flags): New error stringifying enumeration. - (fndecl_as_string, type_as_string_real, args_as_string, - code_as_string, language_as_string, parm_as_string, - op_as_string, assop_as_string, cv_as_string): Remove. - (type_as_string, decl_as_string, expr_as_string): Adjust prototype. - (context_as_string): Declare new function. - * error.c (cp_printers): Move definition. - (OB_UNPUT): Remove. - (OB_END_TEMPLATE_ID): Adjust. - (interesting_scope_p): Remove. - (dump_scope): New static function. - (dump_qualifiers): Adjust prototype, reimplement. - (dump_template_value): Use tree_string_flags. - (dump_type_real): Move back to dump_type. - (dump_type): Adjust prototype. Use tree_string_flags. - (dump_aggr_type): Likewise. Use dump_template_parms. - (dump_type_prefix): Adjust prototype. Use tree_string_flags. - Return pad flag. - (dump_type_suffix): Adjust prototype. Use tree_string_flags. - (dump_simple_decl): Likewise. - (dump_decl): Likewise. Use dump_template_decl. - (dump_template_decl): New static function broken out of dump_decl. - (dump_function_decl): Adjust prototype. Use tree_string_flags. - (dump_parameters): Likewise. Prefix space. - (dump_exception_spec): Adjust prototype. Use tree_string_flags. - (dump_function_name): Likewise. Use dump_template_parms. - (dump_template_parms): New static function broken out of - dump_function_name. - (dump_expr_list): Adjust prototype. Use tree_string_flags. - (dump_expr): Likewise. - (fndecl_as_string): Removed - (type_as_string_real): Removed - (dump_binary_op): Adjust prototype. Use tree_string_flags. - (dump_unary_op): Likewise. - (type_as_string): Likewise. - (expr_as_string): Likewise. - (decl_as_string): Likewise. - (context_as_string): New function. - (lang_decl_name): Adjust. - (decl_to_string): New static print callback. - (expr_to_string): Likewise. - (fndecl_to_string): Likewise. - (code_as_string): Renamed to ... - (code_to_string): ... here. Adjust. - (language_as_string): Renamed to ... - (language_to_string): ... here. Adjust. - (parm_as_string): Renamed to ... - (parm_to_string): ... here. - (op_as_string): Renamed to ... - (op_to_string): ... here. - (assop_as_string): Renamed to ... - (assop_to_string): ... here. - (type_to_string): New static print callback. - (args_as_string): Renamed to ... - (args_to_string): ... here. Adjust. - (cv_as_string): Renamed to ... - (cv_to_string): ... here. Adjust. - * pt.c (mangle_class_name_for_template): Use tree_string_flags. - (print_template_context): Likewise. - -1999-09-26 Mark Mitchell - - * cp-tree.h (expand_throw): Remove prototype. - * except.c (expand_throw): Make it static. Use tree-generation - functions, rather than RTL-generation functions. - (build_throw): Use it. - * expr.c: Include except.h. - (cplus_expand_expr): Don't call expand_throw here. - * Makefile.in (expr.o): Depend on except.h. - * ir.texi: Update documentation for THROW_EXPR. - - * decl.c (start_function): Set x_dont_save_pending_sizes rather - than calling get_pending_sizes. - * init.c (build_new): Don't save and restore - immediate_size_expand; instead, assert that it has the expected - value already. - -1999-09-26 Kaveh R. Ghazi - - * lex.c (compiler_error): Add missing call to va_end(). - -1999-09-25 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle RESULT_DECL. - * ir.texi: Document RESULT_DECL and DECL_RESULT. - - * cp-tree.h (check_return_expr): New function. - * decl.c (finish_constructor_body): New function. - (pushdecl): Put global friend functions in namespace binding - level, not the class binding level. - (finish_destructor_body): Make sure the dtor_label is always - defined. Fix typo in comment. - (finish_function): Move generation of constructor-termination code - to semantic-analysis time. Move generation of implicit `main' - return value to semantic-analysis time. - * semantics.c (finish_return_stmt): Generate goto's to - ctor_label/dtor_label here. Use check_return_expr to do semantic - analysis on the returned expression. - * typeck.c (maybe_warn_about_returning_address_of_local): New - function split out from c_expand_return. - (check_return_expr): Likewise. - (c_expand_return): Just generate the RTL for the return. - -1999-09-24 Mark Mitchell - - * cp-tree.h (CPTI_CLEANUP_TYPE): New macro. - (cleanup_type): Likewise. - (search_tree): Change prototype. - * decl.c (local_variable_p): Adjust for new interface to - search_tree. - (check_default_argument): Likewise. - * error.c (dump_expr): Handle INIT_EXPR. - * except.c (expand_throw): Don't make cleanup_type a local static. - * expr.c (cplus_expand_expr): Don't handle NEW_EXPR. - * init.c (build_new): Call build_new_1 directly, rather than - building a NEW_EXPR. - (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when - processing file-scope initializers. - * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR. - * tree.c: Include splay-tree.h - (no_linkage_helper): Adjust for new interface to search_tree. - (search_tree): Pass around pointers to tree nodes, rather than the - nodes themselves. Handle VEC_INIT_EXPR. - (no_linkage_check): Adjust for new interface to search_tree. - (mapcar): Handle VEC_INIT_EXPR. - (target_remap): New variable. - (bot_manip): Use it. - (bot_replace): New function. - (break_out_target_exprs): Use it to remap all variables used in a - default argument expression. - * typeck.c (build_modify_expr): Don't crash when outside a - function and presented with an INIT_EXPR assignment - * Makefile.in (tree.o): Depend on splay-tree.h. - -Fri Sep 24 10:48:10 1999 Bernd Schmidt - - * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than - DECL_BUILT_IN. - (builtin_function): New arg CLASS. Arg CODE now of type int. All - callers changed. - Set the builtin's DECL_BUILT_IN_CLASS. - -1999-09-24 Mark Mitchell - - * decl.c (pushdecl): Don't make local declarations of extern - variables give the variable a DECL_CONTEXT for the function. - (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify. - Don't accidentally make RTL for local declarations. - (emit_local_var): Handle declarations with asm-specifiers here. - -1999-09-23 Mark Mitchell - - * ir.texi: Improve documentation for TARGET_EXPRs. Discuss - STMT_IS_FULL_EXPR_P. - - * cp-tree.h (language_function): Add cannot_inline. - * decl.c (start_function): Restore current_function_cannot_inline - from the saved value. - (save_function_data): Save current_function_cannot_inline. - * decl2.c (start_objects): Change prototype. Build the function - in function-at-a-time mode. - (finish_objects): Likewise. - (generate_ctor_or_dtor_function): Adjust accordingly. - - * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro. - * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS. - Don't call expand_anon_union_decl here - * semantics.c (exapnd_stmt): Call it here, instead. - * typeck.c (mark_addressable): Addressed variables are implicitly - used. - -1999-09-23 Martin v. Löwis - - * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro. - (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise. - (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK. - * cp-tree.h: Add tree checking macros to various tree access - macros. - * ptree.c (print_lang_decl): Test for function or variable - before accessing template info. - -1999-09-23 Jason Merrill - - * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node. - * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__. - * decl2.c (lang_f_options): Add -fshort-wchar. - * cp-tree.h: Declare flag_short_wchar. - * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned - int' for wchar_t. - -1999-09-23 Martin v. Löwis - - * ir.texi: Fix formatting errors and typos. - -1999-09-22 Mark Mitchell - - * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT. - - * decl.c (pushdecl): Do create a binding for extern "C" functions, - but not for their DECL_ASSEMBLER_NAMEs. - (lookup_name_current_level): Fix formatting. - (xref_tag): Likewise. - * decl2.c (start_objects): Mark static constructors and - destructors as used. - -1999-09-22 Jason Merrill - - * decl.c (define_case_label): Don't crash if we're not in a switch. - - * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags. - * lang-options.h: Restore -fthis-is-variable. Remove help strings - for unsupported flags. - -1999-09-21 Jason Merrill - - * decl2.c (lang_decode_option): Accept and ignore -finit-priority. - Accept and warn about -fthis-is-variable. - -1999-09-21 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle START_CATCH_STMT, - CLEANUP_STMT, and SCOPE_STMT. - - * decl2.c (lang_decode_option): Adjust, in the wake of recent - changes to option processing. - -1999-09-21 Martin v. Löwis - - * typeck.c (get_member_function_from_ptrfunc): Allow extraction of - function pointer from pmfs with no object given. - (convert_for_assignment): Do not return error when converting - pmfs. - -1999-09-21 Alex Samuel - - * lex.c (internal_filename): New variable. - (INTERNAL_FILENAME): New macro. - (init_parse): Allocate internal_filename and mark as root. Use it - instead of a string constant. - -1999-09-21 Nathan Sidwell - - Reimplement dynamic cast and catch matching. - * cp-tree.h (get_dynamic_cast_base_type): Prototype new function - * search.c (dynamic_cast_base_recurse): New function. - (get_dynamic_cast_base_type): New function for dynamic cast. - * rtti.c (build_dynamic_cast_1): Determine source and target - class relationship. Call __dynamic_cast_2. - * tinfo.h (__user_type_info::upcast): New catch dispatcher. - (__user_type_info::dyncast): New dynamic cast dispatcher. - (__user_type_info::sub_kind): New nested enumeration. - (__user_type_info::contained_p): sub_kind predicate. - (__user_type_info::contained_public_p): Likewise. - (__user_type_info::contained_nonpublic_p): Likewise. - (__user_type_info::contained_nonvirtual_p: Likewise. - (__user_type_info::upcast_result): New nested struct. - (__user_type_info::dyncast_result): New nested struct. - (*::do_upcast): New catch function. - (*::do_dyncast): New dynamic cast function. - (__user_type_info::find_public_subobj): New dynamic cast - helper dispatcher. - (*::do_find_public_subobj): New dynamic cast helper function. - * tinfo.cc (__user_type_info::upcast): Define catch dispatcher. - (__user_type_info::dyncast): Define dynamic cast dispatcher. - (*::do_upcast): Define catch function. - (*::do_dyncast): Define dynamic cast function. - (*::do_find_public_subobj): Define dynamic cast helper function. - * tinfo2.cc (__throw_type_match_rtti_2): Use upcast. - (__dynamic_cast): Backwards compatibility wrapper. Use dyncast. - (__dynamic_cast_2): New dynamic cast runtime. - -1999-09-20 Mark Mitchell - - * cp-tree.h (finish_stmt_expr): Change prototype. - * expr.c (cplus_expand_expr): Adjust call accordingly. - * init.c (finish_init_stmts): Likewise. - * parse.y (primary): Likewise. - * pt.c (tsubst_copy): Likewise. - * semantics.c (finish_stmt_expr): Don't take two parameters. - Don't remove generated BLOCKs from the block-tree. - - Remove support for assigning to `this'. - * NEWS: Note that fact. - * class.c (build_vbase_path): Don't check flag_this_is_variable. - * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove. - (language_function): Remove assigns_this, just_assigned_this, and - x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p. - (base_init_expr): Remove. - (current_vcalls_possible_p): New macro. - (vtbls_set_up_p): Likewise. - (emit_base_init): Change prototype. - * decl.c (finish_destructor_body): New function, split out from - finish_function. - (current_function_assigns_this): Remove. - (current_function_just_assigned_this): Likewise. - (start_function): Don't set them. - (finish_function): Don't check them. Don't emit - base-initialization code here. Generate code for destructors when - doing semantic analysis. - (finish_stmt): Don't check current_function_just_assigned_this. - * decl2.c (lang_f_options): Remove this-is-variable. - (lang_decode_option): Likewise. - (grokclassfn): Don't check flag_this_is_variable. - * init.c (emit_base_init): Return the expression generated. - (construct_virtual_bases): Don't push/pop obstacks. Fix - typo. - (build_new_1): Don't check flag_this_is_variable. - (get_temp_regvar): Don't set DECL_REGISTER. - (build_vec_init): Don't call use_variable. - * lang-options.h: Remove "-fthis-is-variable" and - "-fno-this-is-variable". - * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS. - * search.c (expand_upcast_fixups): Use finish_expr_stmt, not - expand_expr_stmt. - * semantics.c (finish_expr_stmt_real): Rename to ... - (finish_expr_stmt): This. Remove assigned_this parameter. - (begin_if_stmt): Call do_pushlevel before starting the statement. - (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less - blocks. - (setup_vtbl_ptr): Emit initialization code for bases and members - at semantic-analysis time. Emit code to initialize vtables in - destructors here. - (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real. - Don't handle CTOR_INITIALIZER any more. - * typeck.c (build_modify_expr): Don't check for assignments to - this. - (c_expand_return): Don't suggest assigning to `this'. - - * Makefile.in (decl.o): Depend on RTL_H. - (decl2.o): Likewise. - (class.o): Likewise. - (call.o): Likewise. - (method.o): Likewise. - (search.o): Likewise. - (tree.o): Likewise. - (pt.o): Likewise. - - * decl.c (duplicate_decls): When a builtin function is redeclared - as static, make sure it is mangled correctly. - - * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add - detail about the statement-tree. - -1999-09-20 Nathan Sidwell - - * parse.y (primary): Use build_functional_cast for CV_QUALIFIER. - -1999-09-20 Nick Clifton - - * decl2.c (lang_decode_option): Extend comment. - -Mon Sep 20 10:49:05 1999 Bernd Schmidt - - * typeck.c: Include "tm_p.h". - -1999-09-19 Mark Mitchell - - * ir.texi: New file. - -1999-09-19 Paul Burchard - - * semantics.c (expand_stmt): Initialize return value. - -1999-09-18 Paul Burchard - - * gxxint.texi: G++ now implements namespaces. - -1999-09-18 Mark Mitchell - - * decl.c (pop_label): Don't warn about unused labels more than - once. - * semantics.c (finish_goto_stmt): Always marked used labels as - used. - - * decl.c (layout_var_decl): Change prototype. Call layout_decl - even when the declaration is external. - (cp_finish_decl): Adjust call to layout_var_decl. - * pt.c (tsubst_expr): Make sure to initialize stmt before using it. - -1999-09-18 Martin von Loewis - - * typeck.c (get_member_function_from_ptrfunc): Always consider - virtuality inside member pointer. - -1999-09-17 Mark Mitchell - - Turn on function-at-a-time processing. - * cp-tree.h (doing_semantic_analysis_p): New macro. - (SF_DEFAULT): Define to zero, not SF_EXPAND. - (start_handler_parms): Change prototype. - (expand_start_catch_block): Likewise. - (expand_end_catch_block): Likewise. - (expand_start_eh_spec): Likewise. - (expand_end_eh_spec): Declare. - (finish_handler_parms): Change prototype. - (begin_catch_block): Declare. - (finish_handler): Change prototype. - (do_pushlevel): Declare. - (do_poplevel): Likewise. - * decl.c (pushlevel): Don't create - binding levels when not doing semantic analysis. - (poplevel): Don't pop them. - (pushdecl): Assert that we are never called when not doing - semantic analysis. - (pushdecl_top_level): Use push_to_top_level. - (make_label_decl): Don't fiddle with obstacks. Make RTL For the - label when expanding. - (cp_finish_decl): Only inject for-scope variables when doing - semantic analysis. Add comments. - (start_handler_parms): Return the handler parm. - (start_function): Reorganize. Don't clear DECL_INITIAL if it is - already set. Reinitialize from saved function data if available. - Don't pushlevel when not doing semantic analysis. - (store_parm_decls): Only generate RTL when expanding. Only - pushdecl when doing semantic analysis. Set - current_eh_spec_try_block if appropriate. - (finish_function): Simplify. Use do_pushlevel and do_poplevel. - Combine common code. Don't poplevel when not doing semantic - analysis. - (push_cp_function_context): Don't expand functions without an - explicit call to expand_body. - (mark_lang_function): Make eh_spec_try_block and - x_scope_stmt_stack. - * except.c (expand_end_eh_spec): Don't - declare. - (process_start_catch_block): Likewise. - (push_eh_cleanup): Use finish_decl_cleanup. - (initialize_handler_parm): New function. - (expand_start_catch_block): Use it. - (expand_end_catch_block): Use tree-generation functions, not - RTL-generation functions. - (expand_start_eh_spec): Likewise. - (expand_end_eh_spec): Likewise. - (expand_exception_blocks): Simplify. - (start_anon_func): Use do_pushlevel. - (end_anon_func): Use do_poplvel. Call expand_body for the - function. - * expr.c (do_case): Don't call define_case_label. - * init.c (create_temporary_var): Set DECL_CONTEXT for local - variables. - * method.c (emit_thunk): Call expand_body for the - thunk. - (sythesize_method): Likewise. - * parse.y (handler_args): Give it ttype. - (eat_saved_input): Call expand_body. - (base_init): Use do_pushlevel. - (pending_inline): Call expand_body. - (handler): Adjust calls to finish_handler_parms and - finish_handler. - (handler_args): Don't call expand_start_catch_block. Return the - catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling. - * parse.c: Regenerated. - * rtti.c (synthesize_tinfo_fn): Call finish_function. - * semantics.c (do_pushlevel): Give it external linkage. Build - SCOPE_STMTs. - (do_poplevel): Likewise. - (finish_case_label): Call define_case_label when doing semantic - analysis. - (finish_goto_stmt): Create RTL for labels. - (finish_function_try_block): Set in_function_try_handler - unconditionally. - (finish_function_handler_sequence): Unset it. - (finish_handler_parms): Use expand_start_catch_block even when - building a statement-tree. - (begin_catch_block): New function. - (finish_handler): Move a little RTL-generation logic here. - (finish_decl_cleanup): Allow cleanups for empty declarations. - (finish_named_return_value): Don't pushdecl when not doing - semantic analysis. - (expand_stmt): Don't do semantic analysis for variable - declarations. Handle START_CATCH_STMT. Call expand_label - directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust - HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT. - (expand_body): Let expand_stmt handle CTOR_INITIALIZER, - RETURN_INIT and function try blocks. - - * cp-tree.h (language_function): Add x_eh_spec_try_block. Add - x_scope_stmt_stack. Add x_in_charge_parm. - (current_eh_spec_try_block): New macro. - (current_scope_stmt_stack): Likewise. - (current_in_charge_parm): Likewise. - * decl.c (start_function): Initialize current_in_charge_parm. - (finish_function): Use current_in_charge_parm rather than looking - up __in_chrg. - * search.c (expand_indirect_vtbls_init): Likewise. - - * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps. - (TRY_BLOCK): Likewise. - (HANDLER): Likewise. - (START_CATCH_STMT): New tree node. - (SCOPE_STMT): Likewise. - * cp-tree.h (SCOPE_BEGIN_P): New macro. - (SCOPE_NULLIFIED_P): Likewise. - (struct lang_decl_flags): Add pending_inline_p. Adjust dummy. - (struct lang_decl): Add saved_language_function. - (DECL_PENDING_INLINE_INFO): Adjust documentation. - (DECL_PENDING_INLINE_P): New macro. - (TYPE_TI_ARGS): Fix typo in comment. - (DECL_SAVED_TREE): Add to documentation. - (DECL_SAVED_FUNCTION_DATA): New macro. - (START_CATCH_TYPE): Likewise. - (SCOPE_END_P): New macro. - (declare_parm_level): Don't declare. - * decl.c (mark_lang_function): New function, split out from - mark_cp_function_context. - (save_function_data): New function. - (declare_parm_level): Remove. - (finish_function): Use save_function_data to squirrel away - important stuff for later use. - (mark_cp_function_context): Use mark_function_data. - (lang_mark_tree): Likewise. - * lex.c (begin_definition_of_inclass_inline): Set - DECL_PENDING_INLINE_P. - (store_pending_inline): Clear it. - * pt.c (tsubst_decl): Likewise. - -1999-09-17 Nathan Sidwell - - * call.c (perform_implicit_conversion): Deal with error_mark_node. - -1999-09-17 Mark Mitchell - - * decl.c (warn_extern_redeclared_static): Don't get confused by - static member functions. - (duplicate_decls): Merge DECL_THIS_STATIC. - - * decl.c (expand_static_init): Make sure assignments to local - statics actually occur. - -1999-09-17 Mark Mitchell - - * cp-tree.h (poplevel_class): Declare. - * class.c (popclass): Use poplevel_class, not poplevel. - * decl.c (poplevel_class): Don't make it static. Don't return a - value. - (poplevel): Don't call poplevel_class; abort in a class - binding level is seen. - * semantics.c (finish_translation_unit): Use pop_everything. - * parse.y (member_init): Allow errors. - (pending_inline): Call finish_function. - * parse.c: Regenerated. - * Makefile.in (CONFLICTS): Adjust. - -1999-09-17 Gabriel Dos Reis - - * error.c: Reduce code duplication. - (dump_template_value): New function. - (dump_type_real): Use it. - (dump_decl): Likewise. - (dump_function_name): Likewise. - (dump_function_decl): Don't be too talkative about function return - type variety. - -1999-09-16 Kaveh R. Ghazi - - * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero. - - * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy. - -1999-09-16 Jason Merrill - - * decl2.c (finish_file): Also call check_global_declarations for - the pending_statics list. - -1999-09-15 Jason Merrill - - * lex.c (cp_pragma_implementation): Allow #pragma implementation - in header files. - -1999-09-15 Richard Henderson - - * lex.c (mark_impl_file_chain): Follow the next chain. - -1999-09-15 Mark Mitchell - - * decl.c (warn_extern_redeclared_static): Simplify. Catch - problems with extern "C" functions redeclared as static. - (duplicate_decls): When a builtin is redeclared static, make the - new function have internal linkage. - -1999-09-15 Mark Mitchell - - * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR. - * pt.c (tsubst_copy): Likewise. - * tree.c (search_tree): Likewise. - (mapcar): Likewise. - -1999-09-15 Kaveh R. Ghazi - - * typeck2.c (ack): Don't declare progname. - -1999-09-14 Alexandre Oliva - - * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy - filenames with ggc_alloc_string. - -1999-09-14 Mark Mitchell - - * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the - TARGET_EXPR. - * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on - the TARGET_EXPR. - * cvt.c (build_up_reference): Likewise. - * tree.c (build_cplus_new): Likewise. - (get_target_expr): Likewise. - -Tue Sep 14 01:45:10 1999 Marc Espie - - * Makefile.in: Prepend $(SHELL) to move-if-change calls. - -1999-09-13 Mark Mitchell - - * cp-tree.h (build_target_expr): New function. - * call.c (build_conditional_expr): Use build_target_expr. - (convert_like): Likewise. - (build_over_call): Likewise. - * cvt.c (build_up_reference): Likewise. - * decl.c (build_cleanup_on_safe_obstack): Fold into ... - (destroy_local_var): Here. - (build_target_expr): New function. - * tree.c (build_cplus_new): Use it. - (get_target_expr): Likewise. - -1999-09-13 Nathan Sidwell - - * typeck.c (expr_sizeof): Don't decay arrays and functions. - Remove misleading comment. - (build_compound_expr): Don't decay arrays. - -1999-09-13 Jason Merrill - - * call.c (build_conditional_expr): Always use a TARGET_EXPR for - class rvalues again. - -Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi - - * Make-lang.in (g++spec.o): Depend on system.h and gcc.h. - - * g++spec.c: Include gcc.h. - (lang_specific_driver): Constify a char*. Call xcalloc, not - xmalloc/bzero. All calls to the function pointer parameter now - explicitly call `fatal'. - -1999-09-12 Mark Mitchell - - * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs. - * cvt.c (ocp_convert): Complete the from and destination types. - Adjust warning about functions always being `true' in conditionals. - * decl.c (duplicate_decls): Don't play funny games with abort. - * error.c (dump_expr): Handle OVERLOADs. - * spew.c (probe_obstack): Remove. - * typeck.c (condition_conversion): Use perform_implicit_conversion. - -1999-09-12 Bernd Schmidt - - * cp-tree.h (auto_function, define_function): Adjust prototypes. - * decl.c (define_function): Lose FUNCTION_CODE arg. All callers - changed. - (auto_function): Likewise, for CODE arg. - Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to... - (builtin_function): ... here. - -1999-09-11 Mark Mitchell - - * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion. - (init_decl_processing): Don't set TREE_PERMANENT for the - error_mark_node. - (start_decl): Don't rebuild non-permanent ARRAY_TYPEs. - (grokdeclarator): Likewise. - (grokparms): Don't check TREE_PERMANENT when building up lists. - * decl2.c (grokfield): Don't assert TREE_PERMANENT. - (mark_inline_for_output): Likewise. - * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT. - * init.c (build_offset_ref): Don't check TREE_PERMANENT. - * lex.c (check_newline): Don't check ggc_p; it is always one. - * pt.c (process_template_parm): Don't check TREE_PERMANENT. - * spew.c (yylex): Don't copy_node or probe_obstacks for - non-permanent CONSTANTs and STRINGs. - * tree.c (build_cplus_array_type_1): Don't fuss with - TREE_PERMANENT on ARRAY_TYPEs. - - * cp-tree.def (CLEANUP_STMT): New node. - * cp-tree.h (language_function): Add name_declared. - (current_function_name_declared): New macro. - (CLEANUP_DECL): New macro. - (CLEANUP_EXPR): Likewise. - (emit_local_var): Likewise. - (finish_decl_cleanup): New function. - * cvt.c (build_up_reference): Simplify. - (ocp_convert): Remove dead code. - * decl.c (start_decl): Remove call to add_decl_stmt. - (grok_reference_init): Adjust, to handle bindings temporaries to - references. Remove dead code. - (initialize_local_var): Don't generate RTL for - declarations here, or build cleanups here. Don't fuss with - obstacks. Replace expand_start_target_temps calls with explicit - setting of stms_are_full_exprs_p. - (destroy_local_var): New function. - (emit_local_var): Likewise. - (cp_finish_decl): Use them, as appropriate. - (start_function): Announce template functions. - (store_parm_decls): Don't call declare_function_name here. - (finish_stmt): Don't start emit base-initialization code when just - building the statement-tree. - * init.c (create_temporary_var): Move add_decl_stmt call ... - (get_temp_regvar): Here. - * pt.c (tsubst_expr): Make DECL_INITIAL look like what - cp_finish_decl would expect. Don't call add_decl_stmt. - * semantics.c (begin_compound_stmt): Call declare_function_name, - if appropriate. - (finish_decl_cleanup): New function. - (expand_stmt): Use emit_local_var to output variables. - (expand_body): Set current_function_name_declared. - -1999-09-10 Mark Mitchell - - * cp-tree.h (finish_cleanup_try_block): New function. - * semantics.c (finish_cleanup_try_block): Add comment. - -Fri Sep 10 10:32:32 1999 Bernd Schmidt - - * cp-tree.h: Delete declarations for all tree nodes now moved to - global_trees. - * decl.c: Delete their definitions. - (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, - FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't - provide defaults. - (init_decl_processing): Call build_common_tree_nodes and - build_common_tree_nodes_2 instead of building their nodes here. - Don't add gc roots for them. - -1999-09-10 Mark Mitchell - - * cp-tree.h (language_function): Rename expanding_p to - x_expanding_p. Rename named_label_uses to x_named_label_uses. - (expanding_p): Adjust accordingly. - (TREE_VIA_PRIVATE): Fix typo in comment. - (DECL_REFERENCE_SLOT): Remove. - (SET_DECL_REFERENCE_SLOT): Likewise. - * decl.c (named_label_uses): Adjust. Remove chicken comment. - (push_overloaded_decl): Don't truncate the chain of bindings when - adding an overloaded function. - (grok_reference_init): Don't use DECL_REFERENCE_SLOT. - (initialize_local_var): Fix typo in comment. - (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up. - * decl2.c (start_objects): Make the fact that we are expanding - the generated function right away explicit. - (start_static_storage_duration_function): Likewise. - (finish_file): Fix typo in comment. - * init.c (build_vec_init): Correct bugs in handling cleanups. - * semantics.c (maybe_convert_cond): New function. - (FINISH_COND): Always store the condition, even if there's - a declaration. - (finish_if_stmt_cond): Use maybe_convert_cond. - (finish_while_stmt_cond): Likewise. - (finish_do_stmt): Likewise. - (finish_for_cond): Likewise. - (expand_cond): Adjust. - - * cp-tree.h (FN_TRY_BLOCK_P): New macro. - * init.c (perform_member_init): Remove obstack machinations. - (expand_cleanup_for_base): Likewise. - (finish_init_stmts): Mark the statement-expression as used. - * method.c (emit_thunk): Use tree-generating functions, not - RTL. - (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - (synthesize_method): Likewise. Keep track of line numbers. - * pt.c (tsubst_expr): Handle various kinds of try blocks. - * semantics.c (expand_stmts): Remove. - (begin_function_try_block): Set FN_TRY_BLOCK_P. - (finish_function_try_block): Be careful rechaining - function try blocks. - (expand_stmt): Loop through all the statements at a given level. - (exapnd_body): Be careful with line-numbers here too. Prepare for - being called directly from the parser. - - * cp-tree.h (finish_function): Adjust prototype. - * decl.c (finish_function): Return the function compiled. - * pt.c (instantiate_decl): Don't play games with obstacks. - * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF. - (search_tree): Likewise. - * typeck.c: Fix typo in comment. - * typeck2.c (store_init_value): Add comment. - - * cp-tree.h (CPTI_ATEXIT): New macro. - (atexit_node): Likewise. - * decl.c (destroy_local_static): New function, broken out from ... - (expand_static_init): Here. - - * rtti.c (get_tinfo_var): These should always be global - (expand_si_desc): Use tree, not RTL, functions to generate code. - (expand_class_desc): Likewise. - (expand_ptr_desc): Likewise. - (expand_attr_desc): Likewise. - (expand_generic_desc): Likewise. - (synthesize_tinfo_fn): Likewise. - -1999-09-09 Mark Mitchell - - * semantics.c (RECHAIN_STMTS): Remove `last' parameter. - (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with - RECHAIN_STMTS. - (RECHAIN_STMST_FROM_CHAIN): Likewise. - - * parse.y (simple_stmt): Fix typo in last change. - - * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro. - (STMT_IS_FULL_EXPR_P): Likewise. - (STMT_LINENO_FOR_FN_P): Likewise. - (prep_stmt): New function. - (building_stmt_tree): Tweak for safety. - * pt.c (tsubst_expr): Use prep_stmt throughout. - (add_tree): Move it to semantics.c - * semantics.c (add_tree): Move it here. - (finish_expr_stmt_real): New function. - (finish_expr_stmt): Use it. - (finish_if_stmt_cond): Use FINISH_COND. - (finish_while_stmt_cond): Likewise. - (finish_for_cond): Likewise. - (finish_stmt_tree): Tweak line-number handling. - (prep_stmt): New function. - (expand_stmt): Use it. - - * cp-tree.h (begin_switch_stmt): Adjust prototype. - (finish_switch_cond): Likewise. - * parse.y (simple_stmt): Adjust accordingly. - * parse.c: Regenerated. - * pt.c (tsubst_expr): Adjust accordingly. - * semantics.c (expand_cond): New function. - (FINISH_COND): New macro. - (begin_switch_stmt): Build the SWITCH_STMT here. - (finish_switch_stmt_cond): Not here. - (expand_stmt): Adjust calls to begin_switch_stmt and - finish_switch_cond. Use expand_cond throughout. - - * dump.c (dequeue_and_dump): Dump types for constants. - Describe DECL_ARG_TYPE more intuitively. - Handle ARRAY_REF. - - * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC. - (lang_cleanup_tree): Remove. - * lex.c (make_lang_type): Use ggc_alloc to allocate - TYPE_LANG_SPECIFIC. - - Reorganize per-function data. - * cp-tree.h (saved_scope): Add function_decl, bindings. - (language_function): Rename binding_level to bindings. - (cp_function_chain): Use the current_function, not the - outer_function_chain. - (current_class_ptr): Make it work, even when there's no - current function. - (current_class_ref): Likewise. - (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New - macros. - (clear_temp_name): Remove. - * decl.c (check_function_type): New function, broken out from - start_function. - (current_binding_level): Adjust definition. - (pushlevel): Simplify. - (poplevel): Don't use named_label_uses when we're outside - a function scope. - (mark_saved_scope): Mark function_decl and bindings. - (maybe_push_to_top_level): Don't unconditionally push a new - function context. Save bindings and the current_function_decl. - Don't clear named_labels. - (pop_from_top_level): Pop function context if appropriate. - (init_decl_processing): Set init_lang_status and free_lang_status, - rather than save_lang_status and restore_lang_status. - (start_function): Take SF_* flags. Don't clear per-function data. - Reorder and simplify to use new per-function data code. Add - asserts. - (store_parm_decls): Don't call init_function_start here. - (finish_function): Adjust for new handling of per-function data. - (push_cp_function_context): Simplify. - (mark_cp_function_context): Change binding_level to bindings. - * decl2.c (clear_temp_name): Remove. - (start_objects): Use SF flags to start_function. - (start_static_storage_duration_function): Likewise. - * except.c (start_anon_func): Remove redundant calls to - push_function_context_to. Use SF flags to start function. - (end_anon_func): Remove redundant call to pop_function_context - from. - * lex.c (reinit_parse_for_function): Don't initialize per-function - data. - * method.c (emit_thunk): Clear current_function after calling - assemble_end_function. Use SF flags for start_function. - (synthesize_method): Use SF flags for start_function. - * parse.c: Regenerated. - * parse.y (fn.defpen): Likewise. - (pending_inline): Clear current_function, even if something goes - wrong. - * pt.c (instantiate_decl): Use SF flags to start_function. - Don't save and restore expanding_p. - (add_tree): Handle the case where we are outside any function. - (end_tree): Likewise. - * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function. - * semantics.c (begin_function_definition): Likewise. - (expand_body): Likewise. - -1999-09-09 Nathan Sidwell - - * cp-tree.h (convert_to_void): Prototype new function. - (require_complete_type_in_void): Remove prototype. - * cvt.c (convert_to_void): New function. - (ocp_convert): Use convert_to_void. - * decl.c (cplus_expand_expr_stmt): Likewise, for complete - expressions. - * typeck.c (require_complete_type_in_void): Remove function. - (build_compound_expr): Use convert_to_void. - (build_static_cast): Likewise. - (build_c_cast): Likewise. - * semantics.c (finish_expr_stmt): Do not decay full expressions. - - * typeck.c (build_x_compound_expr): Add FIXME. - -1999-09-08 Mark Mitchell - - * cp-tree.h (scratch_tree_cons): Remove. - * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons, - and perm_tree_cons with plain tree_cons. - * class.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * expr.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * method.c: Likewise. - * parse.y: Likewise. - * pt.c: Likewise. - * repo.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * typeck.c: Likewise. - * parse.c: Regenerated. - * tree.c (build_srcloc): Simplify. - -1999-09-08 Bruce Korb autogen@linuxbox.com - - * Makefile.in: Give the gperf user a hint about why "gperf -F" fails. - -1999-09-08 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove permanent_attr. - Remove next. - (LANG_DECL_PERMANENT): Remove. - * decl.c (duplicate_decls): Don't mess about with obstacks trying - to free memory. - (lang_mark_tree): Mark DECL_LANG_SPECIFIC. - * lex.c (free_lang_decl_chain): Remove. - (build_lang_decl): Don't use obstacks. - (retrofit_lang_decl): Likewise. - (copy_lang_decl): Likewise. - - * cp-tree.h (saved_scope): Remove old_binding_level and - function_decl. Tidy up. - * decl.c (mark_saved_scope): Don't set them. - (maybe_push_to_top_level): Clear memory. - - * decl.c (layout_var_decl): Change prototype. Don't complete - types for external objects. - (check_initializer): Likewise. Tidy. - (initialize_local_var): Complete types here. - (cp_finish_decl): Not here. Reorganize a little. - (grokvardecl): Don't complete types here. - - * decl.c (start_function): Clear last_dtor_insn and - last_parm_cleanup_insn. - (push_cp_function_context): Just copy over a little of - the old context, not all of it. - - * cp-tree.h (copy_to_permanent): Remove. - (permanent_p): Likewise. - * decl.c (building_typename_type): Don't use copy_to_permanent. - (start_decl): Likewise. - (grok_reference_init): Likewise. - (cp_finish_decl): Likewise. - * init.c (build_new_1): Don't use mapcar. - (build_vec_delete_1): Don't use copy_to_permanent. - (build_vec_init): Likewise. - * parse.y (primary): Likewise. - * parse.c: Regenerated. - * pt.c (push_template_decl_real): Don't use copy_to_permanent. - (lookup_template_class): Likewise. - (tsubst_friend_function): Likewise. - (instantiate_class_template): Likewise. - (tsubst_decl): Likewise. - (tsubst): Likewise. - (instantiate_template): Likewise. - (unify): Likewise. - * rtti.c (get_tinfo_fn): Likewise. - (build_dynamic_cast): Likewise. - * semantics.c (finish_if_stmt_cond): Likewise. - (finish_while_stmt_cond): Likewise. - (finish_do_stmt): Likewise. - (finish_for_cond): Likewise. - (finish_for_expr): Likewise. - (finish_cleanup): Likewise. - (add_decl_stmt): Likewise. - (finish_named_return_value): Likewise. - (finish_qualified_call_expr): Likewise. - * tree.c (perm_manip): Remove. - (build_exception_variant): Don't use copy_to_permanent. - (permanent_p): Remove. - (copy_to_permament): Remove. - (build_min_nt): Don't use copy_to_permanent. - (build_min): Likewise. - (min_tree_cons): Likewise. - * typeckc.c (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - -1999-09-07 Mark Mitchell - - * decl.c (ggc_p): Set it to 1. - (mark_saved_scope): Add prototype. - -1999-09-07 Richard Henderson - - * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete. - * typeck.c (self_promoting_args_p): Delete. - -1999-09-07 Jason Merrill - - * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT. - (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove. - -1999-09-07 Mark Mitchell - - * Makefile.in (tree.o): Depend on ggc.h. - * class.c (make_method_vec): Remove. - (free_method_vec): Likewise. - (free_method_vecs): Remove. - (add_method): Don't use them. - * cp-tree.def (PTRMEM_CST): Make it longer. - (TEMPLATE_PARM_INDEX): Make it shorter. - * cp-tree.h (BINDING_HAS_LEVEL_P): New macro. - (template_parm_index): Remove RTL field. - (ptrmem_cst): Add RTL field. - (finish_function): Removed parameter. - (process_next_inline): Change prototype. - (init_cplus_unsave): Rename to init_tree. - (binding_init): Remove. - * decl.c (free_binding_nodes): Remove. - (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P. - (pop_binding): Don't use free_binding_nodes. - (free_binding_vecs): Remove. - (store_bindings): Don't use them. - (pop_from_top_level): Likewise. - (lookup_namespace_name): Simplify. - (build_typename_type): Don't use obstack_free. - (unqualified_namespace_lookup): Simplify. - (lookup_name_real): Simplify. - (start_function): Remove comment about leaks. - (finish_function): Removed nested parameter. Call - expand_end_bindings even when building_stmt_tree. - Call ggc_push_context and ggc_pop_context around - rest_of_compilation, if necessary. - (mark_cp_function_context): Handle a NULL language-context. - (lang_mark_false_label_stack): Fix typo. - (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD, - TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on - pointer to method types. - (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC. - * decl2.c (finish_objects): Adjust call to finish_function. - (finish_static_store_duration_function): Likewise. - (do_nonmember_using_decl): Remove call to binding_init. - * except.c (end_anon_func): Adjust call to finish_function. - * lex.c (mark_impl_file_chain): New function. - (init_parse): Call init_tree, not init_cplus_unsave. - Add GC roots. - (cp_pramga_interface): Use xmalloc, not permalloc. - (cp_pragma_implementation): Likewise. - (begin_definition_of_inclass_inline): Simplify. - (process_next_inline): Adjust prototype. - (do_scoped_id): Don't call binding_init. - (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc. - * method.c (emit_thunk): Adjust call to finish_function. - (synthesize_method): Likewise. - * parse.y (%union): Add a new `pi' variant. - (PRE_PARSED_FUNCTION_DECL): Use it. - (fn.defpen): Likewise. - (fndef): Adjust call to finish_function. - * pt.c (instantiate_decl): Likewise. - * rtti.c (syntheisze_tinfo_fn): Likewise. - * semantics.c (expand_body): Likewise. - * tree.c: Include ggc.h. - (mark_list_hash): New function. - (binding_init): Remove. - (init_cplus_unsave): Rename to ... - (init_tree): This. Add GC roots. - -1999-09-05 Mark Mitchell - - Get ready for garbage collection. - * Makefile.in (CXX_TREE_H): Add varray.h - (lex.o): Depend on ggc.h. - (decl.o): Likewise. - (decl2.o): Likewise. - (method.o): Likewise. - (search.o): Likewise. - (pt.o): Likewise. - (repo.o): Likewise. - * class.c: Include ggc.h. - (current_class_name): Remove. - (current_class_type): Likewise. - (current_access_specifier): Likewise. - (previous_class_type): Likewise. - (previous_class_values): Likewise. - (class_cache_firstobj): Likewise. - (current_lang_base): Likewise. - (current_lang_stack): Likewise. - (current_lang_stacksize): Likewise. - (lang_name_c): Likewise. - (lang_name_cplusplus): Likewise. - (lang_name_java): Likewise. - (current_lang_name): Likewise. - (base_layout_decl): Likewise. - (access_default_node): Likewise. - (access_public_node): Likewise. - (access_protected_node): Likewise. - (access_private_node): Likewise. - (access_default_virtual_node): Likewise. - (access_public_virtual_node): Likewise. - (access_protected_virtual_node): Likewise. - (access_private_virtual_node): Likewise. - (signed_zero_node): Likewise. - (init_class_processing): Don't build base_layout_decl. - (push_lang_context): Adjust now that current_lang_base is a varray. - (pop_lang_context): Likewise. - * cp-tree.h: Include varray.h. - (cp_global_trees): Add access_default, access_public, - access_protected, access_private, access_default_virtual, - access_public_virtual, access_protected_virtual, - access_private_virtual, ctor_identifier, delta2_identifier, - delta_identifier, dtor_identifier, in_charge_identifier, - index_identifier, nelts_identifier, this_identifier, - pfn_identifier, pfn_or_delta2_identifier, vptr_identifier, - lang_name_c, lang_name_cplusplus, lang_name_java, - empty_except_spec, null, jclass, minus_one, terminate. - (saved_scope): Move here from decl.c. Define globals in terms of - saved_scope: current_namespace, current_class_name, - current_class_type, current_access_specifier, current_lang_stack, - current_lang_base, current_lang_name, current_function_parms, - current_template_parms, processing_template_decl, - processing_specialization, processing_explicit_instantiation, - previous_class_type, previous_class_values, class_cache_firstobj. - (scope_chain): New variable. - (init_pt): New function. - * decl.c (current_namespace): Remove. - (this_identifier, in_charge_identifier, ctor_identifier): Likewise. - (dtor_identifier, pfn_identifier, index_identifier): Likewise. - (delta_identifier, delta2_identifier): Likewise. - (pfn_or_delta2_identifier, tag_identifier): Likewise - (vt_off_identifier, empty_except_spec, null_node): Likewise. - (current_function_parms, current_lang_base): Remove. - (current_lang_stack, previous_class_values): Remove. - (class_binding_level): Macroize. - (saved_scope): Remove. - (current_saved_scope): Rename to scope_chain. - (mark_saved_scope): Adjust for new scope structure. - (maybe_push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (duplicate_decls): Adjust now that current_lang_base is a varray. - (build_typename_type): Call ggc_add_tree_hash_table_root. - (init_decl_processing): Call init_pt. Call push_to_top_level to - set up globals. Add GC roots. - (xref_basetypes): Adjust now that current_lang_base is a varray. - * decl.h (this_identifier): Remove. - (in_charge_identifier): Likewise. - * decl2.c: Don't include varray.h. - (current_namespace): Remove. - (init_decl2): Add GC roots. - * except.c (Terminate): Remove. - (init_exception_processing): Use terminate_node instead. - (build_terminate_handler): Likewise. - * init.c (nc_nelts_field_id): Remove. - (minus_one): Likewise. - (init_init_processing): Use minus_one_node and nelts_identifier - instead. Add GC roots. - (jclass_node): Remove. - (build_new_1): Use nelts_identifier. - (build_vec_init): Likewise. - (build_vec_delete): Likewise. - * lex.c: Include ggc.h. - (defarg_fn): Move declaration early. - (defarg_parms): Likewise. - (init_parse): Add GC roots. - (handle_cp_pragma): Remove redundant declaration of - pending_vtables. - * method.c: Include ggc.h. - (btypelist): Make it a varray. All uses changed. - (ktypelist): Likewise. - (init_method): Add GC roots. - * pt.c: Don't include varray.h. Include ggc.h. - (current_template_parms): Remove. - (processing_template_decl): Likewise. - (processing_specialization): Likewise. - (processing_explicit_instantiation): Likewise. - (init_pt): New function. - * repo.c: Include ggc.h. - (init_repo): Add GC roots. - * search.c: Don't include varray.h. - (_vptr_name): Remove. - (lookup_field_1): Use vtpr_identifier instead. - (expand_indirect_vtbls_init): Remove redundant declaration of - in_charge_identifier. - (init_search_processing): Use vptr_identifier. - -1999-09-05 Richard Henderson - Bernd Schmidt - Mark Mitchell - - * Makefile.in (parse.o): Depend on ggc.h. - (decl2.o): Depend on ggc.h. - (init.o): Depend on ggc.h. - * cp-tree.h (init_decl2): Declare. - (cp_parse_init): Likewise. - * decl.c (ggc_p): Define to zero. - (mark_saved_scope): New function. - (init_decl_processing): Call cp_parse_init, and cp_decl2. - Register GC roots. - (expand_static_init): Add GC roots. - * decl2.c: Include ggc.h. - (init_decl2): New function. - * init.c: Include ggc.h. - (init_init_processing): Add GC roots. - * parse.y: Include ggc.h. - (cp_parse_init): New function. - -1999-09-04 Mark Mitchell - - * decl.c (init_decl_processing): Set mark_lang_status. - (lang_mark_false_label_stack): Adjust prototype. - * decl2.c (grok_function_init): Remove extraneous declaration of - abort_fndecl. - - * Make-lang.in (cc1plus): Remove dependency on GGC. - * Makefile.in (OBJS): Don't mention ggc-simple.o. - (OBJDEPS): Don't mention ggc-simple.o. - - * Make-lang.in (cc1plus): Depend on $(GGC). - * Makefile.in (OBJS): Add ggc-simple.o. - (OBJDEPS): Likewise. - * cp-tree.h (language_function): Rename members to `x_' versions; - we now have x_named_labels, x_ctor_label, x_dtor_label, - x_base_init_list, x_member_init_list, x_base_init_expr, - x_current_class_ptr, x_current_class_ref, x_last_tree, - x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and - x_result_rtx. - (dtor_label, ctor_label, current_base_init_list, - current_member_init_list, base_init_expr, current_class_ptr, - current_class_ref, last_tree, last_expr_type): Adjust accordingly. - * decl.c: Include ggc.h. - (last_dtor_insn): Adjust to use x_ names. - (last_parm_cleanup_insn): Likewise. - (original_result_rtx): Likewise. - (named_labels): Likewise. - (mark_binding_level): New function. - (mark_cp_function_context): Likewise. - (mark_false_label_stack): Likewise. - (lang_mark_tree): Likewise. - (lang_cleanup_tree): Likewise. - -1999-09-03 Mark Mitchell - - * Makefile.in (CXX_TREE_H): Include function.h. - (decl.o): Don't depend on function.h. - (decl2.o): Likewise. - (typeck.o): Likewise. - (init.o): Likewise. - (method.o): Likewise. - * cp-tree.h: Include function.h. - (cp_function): Rename to language_function. Remove next. - (cp_function_chain): Make it a macro, not a variable. - (push_cp_function_context): Don't declare. - (pop_cp_function_context): Likewise. - * decl.c: Don't include function.h. - (push_cp_function_context): Make it static. Make it suitable for - a save_lang_status callback. - (pop_cp_function_context): Likewise. - (maybe_push_to_top_level): Call push_function_context_to, not - push_cp_function_context. - (pop_from_top_level): Call pop_function_context_from, not - pop_cp_function_context. - (init_decl_processing): Set save_lang_status and - restore_lang_status. Call push_function_context_to, not - push_cp_function_context. - (cp_function_chain): Remove. - * decl2.c: Don't include function.h. - * except.c: Don't include function.h. - (start_anon_func): Call push_function_context_to, not - push_cp_function_context. - (end_anon_func): Call pop_function_context_from, not - pop_cp_function_context. - * init.c: Don't include function.h. - * lex.c (begin_definition_of_inclass_inline): Call - push_function_context_to, not push_cp_function_context. - (process_next_inline): Call pop_function_context_from, not - pop_cp_function_context. - * method.c: Don't include function.h. - (synthesize_method): Call push_function_context_to, not - push_cp_function_context. Call pop_function_context_from, not - pop_cp_function_context. - * typeck.c: Don't include function.h. - - * decl.c (expand_static_init): Tweak handling of static - initializations for objects without constructors. - -1999-09-03 Nathan Sidwell - - * typeck.c (build_indirect_ref): Reject dereference of pointer to - void. - -1999-09-02 Mark Mitchell - - * cp-tree.h (cp_function): Move here, from decl.c. - (cp_function_chain): Declare. - (dtor_label): New macro, instead of variable. - (ctor_label): Likewise. - (current_base_init_list): Likewise. - (current_member_init_list): Likewise. - (base_init_expr): Likewise. - (current_class_ptr): Likewise. - (current_class_ref): Likewise. - (last_tree): Likewise. - (last_expr_type): Likewise. - (current_function_returns_value): Likewise. - (current_function_returns_null): Likewise. - (current_function_just_assigned_this): Likewise. - (current_function_parms_stored): Likewise. - (temp_name_counter): Likewise. - (static_labelno): Likewise. - (expanding_p): Likewise. - (stmts_are_full_exprs_p): Likewise. - (in_function_try_handler): Likewise. - (lang_type): Remove nested type_flags. All uses changed. - * call.c (ctor_label): Remove. - (dtor_label): Likewise. - * class.c (current_class_ptr): Remove. - (current_class_ref): Likewise. - * decl.c (static_labelno): Remove. - (dtor_label): Likewise. - (last_dtor_insn): New macro, instead of variable. - (last_parm_cleanup_insn): Likewise. - (original_result_rtx): Likewise. - (in_function_try_handler): Remove. - (named_label_uses): New macro, instead of variable. - (named_labels): Likewise. - (current_function_returns_value): Remove. - (current_function_returns_null): Likewise. - (current_function_assigns_this): New macro, instead of variable. - (current_function_just_assigned_this): Likewise. - (current_binding_level): Likewise. - (init_decl_processing): Call push_cp_function_context. - (cp_function): Move to cp-tree.h - (cp_function_chain): Make it global. - (temp_name_counter): Remove. - (push_cp_function_context): Simplify. - (pop_cp_function_context): Likewise. - * decl2.c (temp_name_counter): Remove. - * init_c (current_base_init_list): Likewise. - (current_member_init_list): Likewise. - (base_init_expr): Likewise. - * method.c (static_labelno): Likewise. - * pt.c (last_tree): Likewise. - * semantics.c (expanding_p): Likewise. - (stmts_are_full_exprs_p): Likewise. - (last_expr_type): Likewise. - * typeck.c (dtor_label): Likewise. - (ctor_label): Likewise. - -1999-09-01 Alex Samuel - - * decl2.c (arg_assoc_template_arg): New prototype. New function. - (arg_assoc_class): Use arg_assoc_template_arg for template - arguments. - (arg_assoc): Likewise. - * pt.c (mangle_class_name_for_template): Allow member template - template arguments. - -1999-09-02 Nathan Sidwell - - * call.c (build_conditional_expr): Warn on enum mismatches. - (convert_arg_to_ellipsis): Move non-pod check to after - conversion. - -1999-09-01 Kaveh R. Ghazi - - * gxx.gperf (hash, is_reserved_word): Add prototypes. - - * init.c (build_vec_init): Initialize variable `try_block'. - - * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts. - Likewise for bzero/memset. - (token_getch, token_put_back): Add static prototypes. Remove - `inline' from the definitions. - (retrofit_lang_decl): Call memset, not bzero, to avoid casts. - -1999-09-01 Mark Mitchell - - * cp-tree.h (lang_type): Move align into type_flags. - (CLASSTYPE_ALIGN): Adjust accordingly. - * call.c (direct_reference_binding): Remove misleading comment. - -1999-08-30 Kaveh R. Ghazi - - * parse.y (language_string): Constify. - -1999-08-30 Kaveh R. Ghazi - - * repo.c (getpwd): Don't prototype. - * xref.c (getpwd): Likewise - -1999-08-30 Kaveh R. Ghazi - - * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a. - Remove hacks for stuff which now comes from libiberty. - -1999-08-30 Jason Merrill - - * cp-tree.h (IS_AGGR_TYPE_2): Fix typo. - -1999-08-30 Mark Mitchell - - * cp-tree.h (begin_init_stmts): Declare. - (finish_init_stmts): Likewise. - * cvt.c (build_up_reference): Wrap the declaration of a temporary - in a statement-expression so that we will see it when expanding - tree structure later. - * init.c (begin_init_stmts): Don't make it static. - (finish_init_stmts): Likewise. - - * cp-tree.h (start_handler_parms): New function. - (expand_start_catch_block): Take only one parameter. - (start_handler_parms): New function. - * decl.c (start_handler_parms): Define it. - * except.c (process_start_catch_block): Take only one parameter. - Don't call grokdeclarator here. - (expand_start_catch_block): Don't call grokdeclarator here, - either. - * parse.y (handler_args): Adjust call to - expand_start_catch_block. Use start_handler_parms. - * pt.c (push_template_decl_real): Make permanent lists have - permanent elements. - (tsubst_expr): Adjust calls to expand_start_catch_block - appropriately. - * semantics.c (expand_stmt): Likewise. - -1999-08-29 Alex Samuel - - * pt.c (push_template_decl_real): Use template declaration from - class type if it exists. - -1999-08-29 Mark Mitchell - - * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition. - (maybe_inject_for_scope_var): Declare it. - (initialize_local_var): Likewise. - * decl.c (maybe_inject_for_scope_var): Make it global. - (initialize_local_var): Likewise. Move cleanup handling here, - from cp_finish_decl. - (make_rtl_for_nonlocal_decl): Use - push_obstacks_nochange/pop_obstacks, rather than - end_temporary_allocation/resume_temporary_allocation. - (cp_finish_decl): Try to complete the type of a variable when it - is declared. Move cleanup-handling to initialize_local_var. - (expand_static_init): Use tree-building code, rather than - RTL-building code. - * decl2.c (get_temp_name): Assert non-initializedness of - temporaries. - * init.c (create_temporary_var): Move RTL-assigning code to ... - (get_temp_regvar): Here. - * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here. - * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just - call initialize_local_var to generate initialization code. - -1999-08-29 Kaveh R. Ghazi - - * cp-tree.h (fndecl_as_string, type_as_string, - type_as_string_real, args_as_string, decl_as_string, - expr_as_string, code_as_string, language_as_string, - parm_as_string, op_as_string, assop_as_string, cv_as_string, - lang_decl_name, cp_file_of, lang_printable_name): Constify a char*. - - * errfn.c (cp_printer): Likewise. - - * error.c (cp_printer, fndecl_as_string, type_as_string_real, - type_as_string, expr_as_string, decl_as_string, lang_decl_name, - cp_file_of, code_as_string, language_as_string, parm_as_string, - op_as_string, assop_as_string, args_as_string, cv_as_string): - Likewise. - - * tree.c (lang_printable_name): Likewise. - -1999-08-28 Richard Henderson - - * decl2.c (arg_assoc_class): Bail if the class is a builtin type. - -1999-08-28 Mark Mitchell - - * cp-tree.h (strip_array_types): New function. - * decl.c (maybe_deduce_size_from_array_init): New function, split - out from cp_finish_decl. - (layout_var_decl): Likewise. - (maybe_commonize_var): Likewise. - (maybe_inject_for_scope_var): Likewise. - (initialize_local_var): Likewise. - (build_cleanup_on_safe_obstack): Likewise. - (check_initializer): Likewise. - (make_rtl_for_nonlocal_decl): Likewise. - (cp_finish_decl): Use them. - * typeck.c (strip_array_types): New function. - - * cp-tree.def (LABEL_STMT): New tree node. - * cp-tree.h (LABEL_STMT_LABEL): New macro. - (shadow_label): Remove. - (declare_local_label): New function. - (finish_label_decl): Likewise. - * decl.c (make_label_decl): New function, split out from - lookup_label. - (shadowed_labels): Remove. - (binding_level): Add shadowed_labels. - (clear_binding_level): Remove. - (push_binding_level): Just bzero the new binding level. - (pushlevel): Fix indentation. - (pop_label): New function. - (pop_labels): Likewise, split out from poplevel. - (poplevel): Pop local labels. Use pop_labels. - (maybe_push_to_top_level): Don't clear shadowed_labels. - (lookup_label): Use make_label_decl. - (shadow_label): Remove. - (declare_local_label): New function. - (define_label): Simplify. - (start_function): Don't clear shadowed_labels. - (cp_function): Remove shadowed_labels. - (push_cp_function_context): Don't save shadowed_labels. - (pop_cp_function_context): Don't restore it. - * dump.c (dequeue_and_dump): Handle LABEL_STMT. - * parse.y (label_decl): Use finish_label_decl. - * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label - declarations. - * semantics.c (finish_label_stmt): Add a LABEL_STMT when - building_stmt_tree. - (finish_label_decl): New function. - (expand_stmt): Handle LABEL_STMTs and local label declarations. - -1999-08-26 Mark Mitchell - - * decl.c (lookup_label): Build labels on the permanent obstack - when building statement trees. Don't build RTL for labels when - building statement trees. - * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when - building statement trees. - (finish_label_stmt): Likewise. - (expand_stmt): Adjust accordingly. - * pt.c (tsubst_expr); Likewise. - (do_decl_instantiation): Robustify. - - * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro. - * tree.c (build_cplus_new): Set it. - * expr.c (cplus_expand_expr): Use it. - * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR. - - * decl.c (store_parm_decls): Reset immediate_size_expand. - (finish_function): Likewise. - - * tree.c (cplus_unsave_expr_now): Don't return a value. - - * semantics.c (do_poplevel): Always initialize the return value. - -1999-08-26 Gavin Romig-Koch - - * cp-tree.h (cplus_unsave_expr_now) : Correct return type. - * tree.h (cplus_unsave_expr_now) : Same. - -1999-08-25 Mark Mitchell - - * decl.c (grokdeclarator): Amend comment. - * except.c (expand_start_catch_block): Call push_template_decl for - catch-block parameters. - * method.c (synthesize_method): Build an empty compound statement - for the body of a constructor. - -1999-08-25 Jason Merrill - - * tree.c (cp_build_qualified_type_real): If we're asking for the - same quals we already have, just return. - -1999-08-25 Mark Mitchell - - * cp-tree.def (SUBOBJECT): New tree node. - * cp-tree.h (CLEANUP_P): New macro. - (SUBOBJECT_CLEANUP): Likewise. - (keep_next_level): Add parameter. - (get_temp_regvar): Don't declare. - (emit_base_init): Remove parameter. - (expand_aggr_init): Rename to build_aggr_init. - (expand_vec_init): Rename to build_vec_init. - (do_pushlevel): Remove. - (do_poplevel): Likewise. - (finish_cleanup): New function. - (finish_subobject): Likewise. - (stmts_are_full_exprs_p): New variable. - * decl.c (keep_next_level): Add parameter. - (cp_finish_decl): Use build_aggr_init, not - expand_aggr_init. Use finish_expr_stmt to expand the code. - (expand_static_init): Use tree-generating, not RTL-generating, - functions to handle the initialization. - (start_function): Remove dead code. Always have a momentary - obstack inside the function, even before hitting the first curly - brace. - (cplus_expand_expr_stmt): Move calls to - expand_{start,end}_target_temps into semantics.c. - (cp_function): Add stmts_are_full_exprs_p. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - * decl2.c (get_temp_regvar): Move to init.c. - (do_static_initialization): Use build_{aggr,vec}_init. - (do_static_destruction): Fix typo in comment. - * dump.c (dequeue_and_dump): Handle INIT_EXPR. - * except.c (expand_throw): Use create_temporary_var. - * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init. - * init.c (expand_vec_init_try_block): Remove. - (expand_vec_init_catch_clause): Likewise. - (get_temp_regvar): New function. - (begin_init_stmts): Likewise. - (finish_init_stmts): Likewise. - (perform_member_init): Use build_{aggr,vec}_init. Build up tree - structure here. - (emit_base_init): Likewise. Remove unused parameter. - (expand_virtual_init): Likewise. - (expand_cleanup_for_base): Use finish_subobject. - (expand_aggr_vbase_init_1): Simplify. - (construct_virtual_bases): Use tree-generating functions to build - up initialization. - (expand_aggr_init): Likewise. Rename to build_aggr_init. - (expand_default_init): Likewise. - (expand_aggr_init_1): Likewise. - (expand_vec_init): Rename to build_vec_init. - * method.c (do_build_copy_constructor): Use tree-generating - functions. Don't call clear_last_expr. - (do_build_assign_ref): Likewise. - (synthesize_method): Call clear_last_expr here. - * parse.y (base_init): Don't call clear_last_expr here. - (nodecls): Likewise. - * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set. - * semantics.c (do_pushlevel): Move to here. - (do_poplevel): Likewise. - (stmts_are_full_exprs_p): New variable. - (finish_expr_stmt): Handle logic for temoprary cleanup here. - (finish_for_stmt): Use finish_expr_stmt. - (finish_cleanup): New function. - (finish_function_try_block): Fix indentation. - (finish_subobject): New function. - (setup_vtbl_ptr): Call keep_next_level here. - (finish_stmt_expr): Handle a block with no scope inside the - statement-expression. - (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle - SUBOBJECT. - * tree.c (search_tree): Handle INIT_EXPR. - (mapcar): Likewise. - * typeck.c (build_modify_expr): Don't build an RTL_EXPR. - * typeck2.c (store_init_value): Change expand_aggr_init to - build_aggr_init in comment. - -1999-08-25 Mark Mitchell - - * dump.c (dequeue_and_dump): Dump TARGET_EXPRs. - -1999-08-25 Nathan Sidwell - - * decl2.c (handle_class_head): Be graceful about additional - scope qualifiers. Adjust comments to reflect reality. - -1999-08-24 Jason Merrill - - * call.c (build_conditional_expr): Fix typo. - * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an - lvalue before trying to mess with the sides. - - * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly. - -Mon Aug 23 22:17:20 1999 Mumit Khan - - * g++spec.c (lang_specific_driver): Add room for NULL in arglist. - -1999-08-23 Jason Merrill - - * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2. - Return arbitrary pointer or NULL. - (check_eh_spec): Call __throw_type_match_rtti_2. - * tinfo.h (*::dcast): Return int. Add valp parm. - * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers. - * tinfo2.cc (__throw_type_match_rtti_2): Likewise. - (__throw_type_match_rtti): Now just a wrapper. - - * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind. - (init_exception_processing): Don't initialize them. - -1999-08-23 Paul Burchard - - * decl.c (check_default_argument): Fix typo. - -1999-08-22 Mark Mitchell - - * cp-tree.def (STMT_EXPR): Fix typo in node name. - - * dump.c (dump_next_stmt): New function. - (dequeue_and_dump): Use it. - - * pt.c (tsubst_copy): Make sure to initialize return value for a - STMT_EXPR, even when processing_template_decl. - * semantics.c (finish_stmt_expr): A statement-expression whose - last statement is not an expression-statement has type `void'. - -1999-08-20 Mark Mitchell - - * semantics.c (finish_stmt_expr): Fix typo in comment. - * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR. - (mapcar): Likewise. - * init.c (build_vec_delete_1): Make the children of a permanent - BIND_EXPR permanent. - * pt.c (register_specialization): Don't register a specialization - more than once. - -1999-08-18 Andrew Haley - - * method.c (process_overload_item): Call build_mangled_C9x_name () - for all integer parameter types larger than long long. - -1999-08-19 Mark Mitchell - - * pt.c (redeclare_class_template): Merge default template - arguments in both directions. - - * typeck.c (common_type): Undo 1999-08-18 change. Remove - compiler_error message. - -1999-08-19 Jason Merrill - - * cp-tree.h: Declare flag_use_repository. - * pt.c (do_decl_instantiation): Don't complain about duplicate - instantiation with -frepo. - (do_type_instantiation): Likewise. - - * pt.c (push_template_decl_real): Complain about everything - that isn't a valid template. - - * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't - affect inlines. - -1999-08-19 Mark Mitchell - - * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code. - * decl2.c (build_expr_from_tree): Handle it. - * error.c (dump_expr): Likewise. - * pt.c (for_each_template_parm): Likewise. - (tsubst_copy): Likewise. - * tree.c (search_tree): Likewise. - * semantics.c (finish_pseudo_destructor_call): Create it. - -1999-08-18 Mark Mitchell - - * search.c (setup_class_bindings): Robustify. - * typeck.c (common_type): Use same_type_p, not pointer equality, - to compare types. - - * cp-tree.h (build_lang_field_decl): Remove. - * class.c (build_vtable): Replace calls to build_lang_field_decl - with build_lang_decl. - (prepare_fresh_vtable): Likewise. - (finish_struct_1): Likewise. - (init_class_processing): Likewise. - * decl.c (push_using_decl): Likewise. - (init_decl_processing): Likewise. - (grokvardecl): Likewise. - (build_ptrmemfunc_type): Likewise. - (grokdeclarator): Likewise. - (build_enumerator): Likewise. - * decl2.c (grok_x_components): Likewise. - (do_class_using_decl): Likewise. - * except.c (call_eh_info): Likewise. - * init.c (init_init_processing): Likewise. - * rtti.c (expand_class_decl): Likewise. - * tree.c (build_base_fields): Likewise. - (build_vbase_pointer_fields): Likewise. - * lex.c (build_lang_decl): Build declarations on the permanent - obstack if we're building statmeent trees. - (retrofit_lang_decl): Handle both the full lang_decl and also the - smaller lang_decl_flags here. - (build_lang_field_decl): Remove. - * pt.c (push_template_decl_real): Issue errors for variable - declarations that are not static members. - -1999-08-18 Richard Henderson - - * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too. - (mapcar): Likewise. - -1999-08-17 Mark Mitchell - - * cp-tree.h (back_end_hook): New variable. - * decl2.c (back_end_hook): Define it. - (finish_file): If it's non-NULL, call it. - - * decl.c (add_decl_to_level): New function. - (push_local_binding): Use it. - (find_binding): Fix typo in comment. - (pushdecl): Use add_decl_to_level. Put templates on the - corresponding namespace-scope binding levels. - * dump.c (dequeue_and_dump): Print the specializations of a - template. - * pt.c (push_template_decl_real): Don't push a template multiple - times. - -1999-08-17 Mark Mitchell - - * cp-tree.h (CALL_DECLARATOR_PARMS): New macro. - (CALL_DECLARATOR_QUALS): Likewise. - (CALL_DECARATOR_EXCEPTION_SPEC): Likewise. - * decl.c (grokdeclarator): Adjust to use them. - * decl2.c (grokfield): Likewise. - (reparse_absdcl_as_casts): Likewise. - * lex.c (make_call_declarator): Likewise. - (set_quals_and_spec): Likewise. - * pt.c (tsubst): Likewise. - * tree.c (mapcar): Remove special hack to handle third operand of - a CALL_EXPR. - -1999-08-16 Mark Mitchell - - * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro. - * class.c (build_vtable): Use build_lang_field_decl to build the - VAR_DECLs for vtables. - (prepare_fresh_vtable): Likewise. - * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if - CAN_HAVE_FULL_LANG_DECL_P. - (push_using_decl): Use build_lang_decl to build USING_DECLs. - (grokdeclarator): Use build_lang_decl to build TYPE_DECLs. - * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P. - (build_lang_field_decl): Likewise. - (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much - to copy. - - * cp-tree.def (STMT_EXPR): New tree node. - * cp-tree.h (STMT_EXPR_STMT): New macro. - (store_return_init): Change prototype. - (finish_named_return_value): New function. - (expand_stmt): Likewise. - (expand_body): Likewise. - (begin_stmt_tree): Likewise. - (finish_stmt_tree): Likewise. - (expanding_p): New variable. - (last_expr_type): Likewise. - (building_stmt_tree): New macro. - * decl.c (start_function): Use building_stmt_tree, not - processing_template_decl, where appropriate. - (store_parm_decls): Likewise. - (store_return_init): Move most of the body to semantics.c. - (finish_function): Use building_stmt_tree. - (finish_stmt): Clear last_expr_type here. - (cp_function): Add expanding_p, last_tree, last_expr_type. - (push_cp_function_context): Save them. - (pop_cp_function_context): Restore them. - * decl2.c (setup_vtbl_ptr): Move to semantics.c. - * error.c (dump_expr): Handle STMT_EXPR. - * except.c (expand_start_catch_block): Use building_stmt_tree. - Use add_decl_stmt. - * expr.c (cplus_expand_expr): Handle STMT_EXPR. - (do_case): Move add_tree call to semantics.c. - * parse.y (return_init): Use finish_named_return_value. - (for.init.statement): Use finish_expr_stmt. - * parse.c: Regenerated. - * pt.c (do_pushlevel): Move to semantics.c. - (do_poplevel): Likewise. - (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR. - (tsubst_expr): Don't expand all the way to RTL here. Handle - RETURN_INIT and CTOR_INITIALIZER. - (instantiate_decl): Call expand_body after tsubst'ing into - DECL_SAVED_TREE. - * semantics.c (expand_stmts): New function. - (expanding_p): New variable. - (last_expr_type): Likewise. - (finish_expr_stmt): Use building_stmt_tree. - (begin_if_stmt): Likewise. - (finish_if_stmt_cond): Likewise. - (finish_then_clause): Likewise. - (begin_else_clause): Likewise. - (finish_else_clause): Likewise. - (begin_while_stmt): Likewise. - (finish_while_stmt_cond): Likewise. - (finish_while_stmt): Likewise. - (finish_do_body): Likewise. - (finish_do_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (fnish_for_init_stmt): Likewise. - (finish_for_cond): Likewise. - (finish_for_expr): Likewise. - (finish_for_stmt): Likewise. - (finish_break_stmt): Likewise. - (finish_continue_stmt): Likewise. - (finish_switch_cond): Likewise. - (finish_switch_stmt): Likewise. - (finish_case_label): Call add_tree here if necessary. - (finish_goto_statement): Use building_stmt_tree. - (begin_try_block): Likewise. - (begin_function_try_block): Likewise. - (finish_try_block): Likewise. - (finish_function_try_block): Likewise. - (finish_handler_sequence): Likewise. - (finish_function_handler_sequence): Likewise. - (begin_handler): Likewise. - (finish_handler_parms): Likewise. - (finish_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_compound_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (finish_named_return_value): New function. - (setup_vtbl_ptr): Moved here from decl2.c. - (do_pushlevel): Moved here from pt.c. - (do_poplevel): Likewise. - (begin_stmt_expr): Use building_stmt_tree. - (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR, - when building_stmt_tree. - (begin_stmt_tree): New function. - (finish_stmt_tree): Likewise. - (expand_stmt): Likewise. - (expand_body): Likewise. - * tree.c (build_cplus_method_type): Make sure the argument types - end up on the same obstack as the METHOD_TYPE. - (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR, - THROW_EXPR, STMT_EXPR. - (mapcar): Break out common cases. Handle COMPOUND_EXPR, - MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than - sorry, if an unsupported node is encountered. - * typeck.c (require_complete_type_in_void): Handle BIND_EXPR. - (c_expand_return): Don't call add_tree here. - -1999-08-15 Mark Mitchell - - * pt.c (check_default_tmpl_args): Don't check in local scopes. - (tsubst_decl): Make sure the declaration is on a saveable - obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local - variable. - (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs. - -1999-08-14 Jason Merrill - - Speed up Koenig lookup. - * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm - to return namespaces we've looked at. - * decl2.c (lookup_using_namespace): Likewise. - (add_function): Don't call ovl_member. - (lookup_arg_dependent): Initialize k.namespaces to the list of - namespaces seen in unqualified lookup. - * call.c (equal_functions): Move here from tree.c. - (joust): Use it to handle duplicate candidates. - * tree.c (ovl_member): Use ==. - -1999-08-13 Mark Mitchell - - * cp-tree.def (DECL_STMT): Make it smaller. - * cp-tree.h (lang_decl_flags): Move saved_tree to ... - (lang_decl): ... here. Add next. - (DECL_SAVED_TREE): Adjust accordingly. - (DECL_IMPLICIT_TYPEDEF_P): New macro. - (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. - (DECL_STMT_DECL): Likewise. - (create_implicit_typedef): New function. - (maybe_push_decl): Likewise. - (tsubst_default_argument): New function. - (at_function_scope_p): Likewise. - (add_decl_stmt): Likewise. - (push_permanent_obstack): Likewise. - * call.c (convert_default_arg): Use tsubst_default_argument. - * class.c (add_method): Use push_permanent_obstack. - (build_self_reference): Create a TEMPLATE_DECL for the - self-reference, if necessary. - * decl.c (pseudo_global_level_p): Only look at the current binding - level. - (push_binding): Use push_permanent_obstack. - (create_implicit_typedef): New function. - (pushtag): Use it. - (duplicate_decls): Use push_permanent_obstack. - (maybe_push_decl): New function. - (start_decl): Use it. Remove dead code. Use add_decl_stmt. - (start_decl_1): Remove dead code. - (cp_finish_decl): Remove DECL_STMT handling here. Don't use - pseudo_global_level_p. - (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a - template. - (grokdeclarator): Likewise, for TYPE_DECLs. Don't use - pseudo_global_level_p. - * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in - a template. - (get_sentry): Use push_permanent_obstack. - * dump.c (dequeue_and_dump): Enable DECL_STMT. - * except.c (call_eh_info): Use push_permanent_obstack. - (build_eh_type_ref): Likewise. - (do_pop_exception): Likewise. - (expand_eh_spec): Likewise. - (alloc_eh_object): Likewise. - (expand_throw): Likewise. - * init.c (build_java_class_ref): Likewise. - * lex.c (get_time_identifier): Likewise. - (free_lang_decl_chain): Correct type. - (retrofit_lang_decl): Adjust accordingly. - (build_lang_field_decl): Likewise. - * lex.h (free_lang_decl_chain): Likewise. - * parse.y (lang_extdef): Don't use pseudo_global_level_p. - * parse.c: Regenerated. - * pt.c (tsubst_default_arguments): New function. - (retrieve_local_specialization): Likewise. - (register_local_specialization): Likewise. - (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use - pseudo_global_level_p to determine whether or not a template is - primary. - (lookup_template_class): Likewise. Use create_implicit_typedef. - (instantiate_class_template): Call tsubst_default_arguments for - member functions, if appropriate. - (tsubst_default_argument): New function. - (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs. - * search.c (at_function_scope_p): New function. - * semantics.c (finish_asm_stmt): Use push_permanent_obstack. - (finish_label_stmt): Likewise. - (add_decl_stmt): New function. - (begin_class_definition): Likewise. - (finish_typeof): Likewise. - * tree.c (copy_template_template_parm): Likewise. - (copy_to_permanent): Likewise. - (push_permanent_obstack): Define. - (mark_addressable): Use it. - * typeck.c (mark_addressable): Likewise. - -1999-08-13 Gavin Romig-Koch - - * cp-tree.h (init_cplus_unsave): New. - (cplus_unsave_expr_now): New. - * lex.c (init_parse): Call init_cplus_unsave. - * tree.c (init_cplus_unsave): New. - (cplus_unsave_expr_now): New. - -1999-08-13 Mark Mitchell - - * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and - decl_constant_value to simplify array bounds. - -1999-08-11 Jason Merrill - - * lang-options.h: Add -fms-extensions. - * cp-tree.h: Declare flag_ms_extensions. - * decl2.c: Define it. - * class.c (instantiate_type): Don't complain about taking the address - of a bound member function if -fms-extensions. - * typeck.c (build_unary_op): Likewise. - * decl.c (grokdeclarator): Or about implicit int. - * init.c (resolve_offset_ref): Or about implicit '&'. - -1999-08-11 Mark Mitchell - - * cp-tree.h (minimal_parse_mode): Remove. - (finish_label_stmt): New function. - * decl.c (saved_scope): Remove minimal parse mode. - (maybe_push_to_top_level): Don't save it. - (pop_from_top_level): Don't restore it. - (define_label): Split out template-handling code to semantics.c. - (start_decl): Don't use minimal_parse_mode. - (cp_finish_decl): Likewise. - (start_function): Don't increment it. - (store_return_init): Don't use it. - (finish_function): Don't decrement it. - * parse.y (label_colon): Use finish_label_stmt throughout. - * parse.c: Regenerated. - * pt.c (minimal_parse_mode): Don't define it. - (tsubst_expr): Use finish_label_stmt. - * semantics.c (finish_label_stmt): New function. - - * dump.c (queue): Be careful when computing bitmasks. - (dequeue_and_dump): Describe binfos as binfos, not as - vectors. - - * parse.y (pedantic): Give it itype. Adjust usage accordingly - throughout. - * parse.c: Regenerated. - - * Make-lang.in (CXX_SRCS): Remove sig.c. - * Makefile.in (CXX_OBJS): Remove sig.o. - (sig.o): Remove. - * cp-tree.h (CPTI_OPAQUE_TYPE): Remove. - (CPTI_SIGNATURE_TYPE): Likewise. - (CPTI_SIGTABLE_ENTRY_TYPE): Likewise. - (opaque_type_node): Likewise. - (signature_type_node): Likewise. - (sigtable_entry_type): Likewise. - (flag_handle_signatures): Likewise. - (lang_type): Remove is_signature, is_signature_pointer, - is_signature_reference, has_opaque_typedecls, - sigtables_has_been_generated. Adjust dummy. Remove signature, - signature_pointer_to, signature_reference_to. - (IS_SIGNATURE): Remove. - (SET_SIGNATURE): Remove. - (CLEAR_SIGNATURE): Remove. - (IS_SIGNATURE_POINTER): Remove. - (IS_SIGNATURE_REFERENCE): Remove. - (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove. - (SIGTABLE_HAS_BEEN_GENERATED): Remove. - (CLASSTYPE_SIGNATURE): Remove. - (SIGNATURE_TYPE): Remove. - (SIGNATURE_METHOD_VEC): Remove. - (SIGNATURE_POINTER_TO): Remove. - (SIGNATURE_REFERENCE_TO): Remove. - (lang_decl_flags): Remove is_default_implementation. Rename - memfunc_pointer_to to saved_tree. - (IS_DEFAULT_IMPLEMENTATION): Remove. - (DECL_MEMFUNC_POINTER_TO): Remove. - (DECL_MEMFUNC_POINTING_TO): Remove. - (DECL_SAVED_TREE): Adjust definition. - (tag_types): Remove signature_type_node. - (SIGNATURE_FIELD_NAME): Remove. - (SIGNATURE_FIELD_NAME_FORMAT): Likewise. - (SIGNATURE_OPTR_NAME): Likewise. - (SIGNATURE_SPTR_NAME): Likewise. - (SIGNATURE_POINTER_NAME): Likewise. - (SIGNATURE_POINTER_NAME_FORMAT): Likewise. - (SIGNATURE_REFERENCE_NAME): Likewise. - (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise. - (SIGTABLE_PTR_TYPE): Likewise. - (SIGTABLE_NAME_FORMAT): Likewise. - (SIGTABLE_NAME_FORMAT_LONG): Likewise. - (SIGTABLE_TAG_NAME): Likewise. - (SIGTABLE_VB_OFF_NAME): Likewise. - (SIGTABLE_VT_OFF_NAME): Likewise. - (finish_base_specifiers): Change prototype. - (build_signature_pointer_type): Remove. - (build_signature_reference_type): Remove. - (build_signature_pointer_constructor): Remove. - (build_signature_method_call): Remove. - (build_optr_ref): Likewise. - (append_signature_fields): Likewise. - (signature_error): Likewise. - * call.c (build_this): Remove signature support. - (build_over_call): Likewise. - (build_new_method_call): Likewise. - * class.c (add_implicitly_declared_members): Likewise. - (finish_struct_1): Likewise. - (finish_struct): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_pointer_force): Likewise. - (ocp_convert): Likewise. - * decl.c (sigtable_decl_p): Remove. - (init_decl_processing): Remove support for signatures. - (cp_finish_decl): Likewise. - (grokdeclarator): Likewise. - (grokparms): Likewise. - (xref_tag): Likewise. - (start_function): Likewise. - (start_method): Likewise. - * decl2.c (finish_sigtable_vardecl): Remove. - (flag_handle_signatures): Remove. - (lang_f_options): Remove handle-signatures. - (grokfield): Remove support for signatures. - (grokbitfield): Likewise. - (finish_file): Likewise. - (reparse_absdcl_as_casts): Likewise. - * error.c (dump_type_real): Likewise. - (dump_function_decl): Likewise. - * friend.c (make_friend_class): Likewise. - * gxx.gperf: Remove __signature__, signature, __sigof__, sigof. - * hash.h: Regenerated. - * init.c (build_new_1): Remove support for signatures. - * lang-options.h: Remove -fhandle-signatures, - -fno-handle-signatures. - * lex.c (init_parse): Remove support for signatures. - (yyprint): Likewise. - * lex.h (rid): Remove RID_SIGNATURE. - * method.c (build_decl_overload_real): Remove support for - signatures. - (hack_identifier): Likewise. - * parse.y (base_class): Likewise. - (base_class.1): Likewise. - (access_specifier): Likewise. - * search.c (lookup_member): Likewise. - * semantics.c (finish_qualified_object_call_expr): Likewise. - (finish_template_type_parm): Likewise. - (begin_class_definition): Likewise. - (finish_base_specifier): Likewise. - * sig.c: Remove. - * tree.c (build_cplus_method_type): Remove support for signatures. - * typeck.c (require_complete_type): Likewise. - (c_sizeof): Likewise. - (c_alignof): Likewise. - (build_object_ref): Likewise. - (build_component_ref): Likewise. - (build_indirect_ref): Likewise. - (build_c_cast): Likewise. - (build_modify_expr): Likewise. - (convert_for_initialization): Likewise. - * typeck2.c (signature_error): Remove. - (store_init_value): Remove support for signatures. - (digest_init): Likewise. - (build_x_arrow): Likewise. - (build_functional_cast): Likewise. - * xref.c (GNU_xref_decl): Likewise. - -1999-08-10 Martin v. Loewis - - * lex.c (do_identifier): Remove unnecessary lookup of class field. - -1999-08-09 Martin v. Loewis - - * decl2.c (set_decl_namespace): Do not complain about non-matching - decls if processing a template. - -1999-08-09 Mark Mitchell - - * decl.c (build_ptrmemfunc_type): Handle qualified - pointer-to-member types here. - * tree.c (cp_build_qualified_type_real): Simplify handling here. - -1999-08-09 Kaveh R. Ghazi - - * lex.c (lang_identify): Likewise. - -1999-08-09 Bernd Schmidt - - * Makefile.in: Update dependencies. - * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with - NULL_RTX. - * decl.c: Include "function.h" - (cleanup_label, return_label): Delete declarations. - (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX. - (finish_function): Rename last_parm_insn variable to - fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX. - * decl2.c: Include "function.h". - (rtl_expr_chain): Delete declaration. - * method.c: Include "function.h" - * tree.c (build_vbase_pointer_fields): Don't initialize - DECL_SAVED_INSNS with NULL_RTX. - * typeck.c: Include "function.h" - -1999-08-09 Jason Merrill - - * semantics.c (begin_function_try_block, finish_function_try_block, - finish_function_handler_sequence): New fns. - * parse.y (function_try_block): Use them. - * pt.c (instantiate_decl): Likewise. - - * cp-tree.h: Declare in_function_try_handler. - * decl.c: Define it. - (start_function): Clear it. - (struct cp_function, push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - * parse.y (function_try_block): Set and clear it. - * except.c (expand_end_catch_block): Rethrow if we reach the end - of a function-try-block handler in a ctor or dtor. - * typeck.c (c_expand_return): Complain about returning from a - function-try-block handler of a ctor. - - * parse.y (function_try_block): Call end_protect_partials - before expand_start_all_catch. - -1999-08-08 Jason Merrill - - * decl.c (struct binding_level): Add eh_region field. - (push_binding_level): Set it. - (define_label): Complain about jumping into an EH block. - - * ptree.c (print_lang_type): Print the real type of a PMF. - Print what exceptions a fn type throws. - -1999-08-07 Kaveh R. Ghazi - - * class.c (count_fields, add_fields_to_vec): Add static prototype. - - * cp-tree.h (opname_tab, assignop_tab, operator_name_string, - get_id_2, composite_pointer_type, dump_node_to_file): Constify a - char*. - - * decl.c (named_label_list, cp_finish_decl, grokdeclarator): - Constify a char*. - - * decl2.c (finish_static_data_member_decl, grokfield): Constify a - char*. - - * dump.c (queue_and_dump_index, dump_int, dump_string, - dump_string_field, dequeue_and_dump, dump_node_to_file): Constify - a char*. - (dump_stmt): Add static prototype. - - * errfn.c (cp_thing): Constify a char*. - - * error.c (dump_unary_op, dump_binary_op, aggr_variety, - dump_aggr_type, dump_global_iord, dump_decl, dump_function_name, - dump_expr): Constify a char*. - - * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc, - read_line_number): Add static prototype. - (opname_tab, assignop_tab, operator_name_string): Constify a char*. - (real_yylex): Move label `letter' into the scope where it is used. - - * method.c (build_mangled_template_parm_index, build_overload_int, - build_decl_overload_real, get_id_2): Constify a char*. - - * search.c (check_final_overrider): Make static. - - * typeck.c (composite_pointer_type): Constify a char*. - -1999-08-06 Jason Merrill - - * pt.c (maybe_get_template_decl_from_type_decl): Make sure that - we're looking at a class. - - * decl.c (lookup_name_real): Set the complain flag if we're - looking for a namespace member. - - * lex.c (real_yylex): We can have a number with no digits. - - * cvt.c (cp_convert_to_pointer): Don't force pmf conversions. - - * search.c (binfo_from_vbase): New fn. - * cp-tree.h: Declare it. - * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion - from pointer to member of virtual base. - * typeck.c (get_delta_difference): Likewise. - -1999-08-06 Alexandre Oliva - - * pt.c (tsubst): Use build_index_type to build in-template array - index type. Fixes g++.oliva/dwarf1.C. - * decl.c (grokdeclarator): Likewise, just for consistency, as it - doesn't seem to trigger the bug without it. - -1999-08-06 Jason Merrill - - * typeck2.c (add_exception_specifier): Use complete_type. - -1999-08-06 Mark Mitchell - - * error.c (dump_expr): Handle EXACT_DIV_EXPR. - (dump_binary_op): Bulletproof. - * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR]. - * tree.c (search_tree): Don't enumerate all the nodes of classes - `1', `2', and `<'; handle them generically. Don't be sorry about - "unrecognized tree codes"; just abort. - (no_linkage_check): Don't do linkage checks for templates. - - * tree.c (cp_build_qualified_type_real): Handle - pointer-to-member-function types correctly. - -1999-08-05 Jason Merrill - - * decl.c (pushdecl): Only give an error for shadowing a parm - from *this* function. - -Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com) - - * typeck2.c: Update URLs and mail addresses. - -1999-08-04 Nathan Sidwell - - * cp-tree.h (empty_except_spec): New global var. - (compexcepttypes): Remove prototype. - (comp_except_specs): Prototype new global function. - (add_exception_specifier): Prototype new global function. - * decl.c (empty_except_spec): Define new global var. - (duplicate_decls): Use comp_except_specs, reword error message. - (init_decl_processing): Initialize empty_except_spec. - Adjust build_exception_variant calls. - * parse.y (exception_specification_opt): Use empty_except_spec. - (ansi_raise_identifier): Call check_for_new_type. - (ansi_raise_identifiers): Use add_exception_specifier. - * pt.c (tsubst): Use add_exception_specifier to build exception - specifier. - * search.c (check_final_overrider): New static function, broken - out of get_matching_virtual. Check throw specifiers, reword - diagnostics. - (get_matching_virtual): Use check_final_overrider. - * tree.c (build_exception_variant): Use comp_except_specs. - * typeck.c (compexcepttypes): Remove. - (comp_except_types): New static function, helper for - comp_except_specs. Compare two types as exception specifiers. - (comp_except_specs): New global function, compare two exception - specifiers. - (comptypes): Adjust for comp_except_specs. - * typeck2.c (add_exception_specifier): New global function. - - * class.c (check_for_override): Reword error message. - -1999-08-03 Nathan Sidwell - - * call.c (convert_arg_to_ellipsis): Use pod_type_p. - * cp-tree.h (struct lang_type): Added non_pod_class flag. - (CLASSTYPE_NON_POD_P): New macro to access it. - * class.c (finish_struct_1): Determine non-PODness. - Check for arrays of pointers (-Weffc++). - Remove array inspection duplicated code. - * tree.c (pod_type_p): Detect non-pod non-aggregate types. - Use CLASSTYPE_NON_POD_P. - -1999-08-03 Nathan Sidwell - - * class.c (duplicate_tag_error): Preserve template information. - -1999-08-03 Nathan Sidwell - - * decl.c (start_enum): Show location of previous definition. - * parse.y (enumlist_opt): New reduction. - (structsp): Simplify enum rules to use enumlist_opt. - -1999-08-03 Jason Merrill - - * lex.c (yyprint): Handle PFUNCNAME. - - * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only - build_expr_from_tree on the args of a TEMPLATE_ID_EXPR. - -1999-08-03 Mumit Khan - - * decl.c (start_decl): Set attributes before duplicate_decls call. - -1999-08-02 Mark Mitchell - - * Make-lang.in (CXX_SRCS): Add dump.c. - * Makefile.in (CXX_OBJS): Add dump.o. - (dump.o): New target. - * cp-tree.h (DECL_CONV_FN_P): Document. - (DECL_OVERLOADED_OPERATOR_P): New function. - (TYPE_PTRMEM_CLASS_TYPE): New macro. - (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. - (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE. - (ASM_VOLATILE_P): New macro. - (STMT_LINENO): Likewise. - (cp_namespace_decls): New function. - (dump_node_to_file): New function. - * decl.c (cp_namespace_decls): New function. - (walk_namespaces_r): Use it. - (wrapup_globals_for_namespace): Likewise. - * decl2.c (flag_dump_translation_unit): New variable. - (lang_decode_option): Handle -fdump-translation-unit. - (finish_file): If flag_dump_translation_unit is set, dump the - translation unit. - * dump.c: New file. - * lang-options.h: Add -fdump-translation-unit. - * pt.c (tsubst_template_parms): Robustify. - (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P. - (tsubst_expr): Use STMT_LINENO. - * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check - for invalid cv-qualifiers even while building templates. - -1999-08-02 Richard Henderson - - * call.c: Include defaults.h instead of expr.h. - * decl.c: Likewise. - * pt.c: Likewise. - * typeck.c: Include defaults.h. - -1999-08-02 Mark Mitchell - - * lex.c (errorcount, sorrycount): Don't declare. - * repo.c (errorcount, sorrycount): Likewise. - * typeck2.c (errorcount, sorrycount): Likewise. - -1999-08-02 Jakub Jelinek - - * call.c (convert_default_arg, build_over_call): Change all uses of - PROMOTE_PROTOTYPES, so that it tests it as a C expression. - Ensure expr.h is included. - * decl.c (grokparams): Ditto. - * pt.c (tsubst_decl): Ditto. - * typeck.c (convert_arguments): Ditto. - -1999-08-02 Jason Merrill - - * class.c (mark_overriders): Fix order of args to overrides. - (warn_hidden): Likewise. Fix for having virtual and non-virtual - functions with the same name. - -1999-08-02 Richard Henderson - - * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null. - -1999-08-01 Mark Mitchell - - * call.c (build_conditional_expr): Fix typo in comment. - -1999-08-01 Bernd Schmidt - - * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack, - case_stack; use in_control_zone_p. - * typeck.c (c_expand_return): Likewise. - -1999-07-31 Bernd Schmidt - - * except.c (catch_clauses): Delete declaration. - -1999-07-30 Mark Mitchell - - * call.c (build_conditional_expr): Call convert_from_reference to - avoid reference/non-reference type confusion. Fix typo. - -1999-07-30 Richard Henderson - - * typeck2.c (initializer_constant_valid_p): Moved to c-common.c. - * cp-tree.h (initializer_constant_valid_p): Remove. - -1999-07-28 Mark Mitchell - - * call.c (conditional_conversion): Don't build BASE_CONVs for - conversions between things that have the same type. - (build_conditional_expr): Tweak. - (convert_like): Some BASE_CONVs really do require the generation - of code. - - * init.c (perform_member_init): Don't go through build_modify_expr - for simple initializations. - -1999-07-27 Jason Merrill - - * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro. - * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for - virtual functions and MI. Simplify. - - * method.c: Remove prototype for largest_union_member. - * pt.c (determine_specialization): Fix uninitialized warning. - * lex.c (real_yylex): Likewise. - -1999-07-27 Mark Mitchell - - * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS - here too. - - * cp-tree.h (BINFO_VIRTUALS): Document new format. - * class.c (modify_one_vtable): Change prototype accordingly. - (modify_all_vtables): Likewise. - (modify_all_direct_vtables): Likewise. - (modify_all_indirect_vtables): Likewise. - (build_vtable_entry_for_fn): New function. - (set_rtti_entry): Simplify for new BINFO_VIRTUALS format. - (modify_vtable_entry): Likewise. - (add_virtual_function): Likewise. - (build_vtbl_initializer): New function. - (finish_vtbls): Simplify for new BINFO_VIRTUALS format. - (fixup_vtable_deltas1): Likewise. - (fixup_vtable_deltas): Likewise. - (override_one_vtable): Likewise. - (finish_struct_1): Likewise. - - * error.c (dump_expr): Likewise. - * search.c (get_abstract_virtuals_1): Likewise. - (get_abstract_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to - __pure_virtual here. - -1999-07-26 Mark Mitchell - - * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error - as per 1999-07-26 change. - - * typeck.c (c_sizeof): Don't allow non-static data members. - (expr_sizeof): Likewise. - -1999-07-26 Jason Merrill - - * input.c (feed_input): Only touch lineno and input_filename - if !USE_CPPLIB. Save the old values before setting the new ones. - - * input.c (feed_input): Add file, line parms. - * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust. - (real_yylex): Check linemode before input_redirected(). - - * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL - from op new to warning. - -1999-07-26 Mark Mitchell - - * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion. - * call.c: All uses changed. - * typeck.c: Likewise. - -1999-07-26 Nathan Sidwell - - * exception.cc (__cplus_type_matcher): Match __eh_matcher - prototype. - -1999-07-26 Mark Mitchell - - * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro. - (ARITHMETIC_TYPE_P): Adjust definition for standard conformance. - (strip_top_quals): Declare. - (ncp_convert): Likewise. - (type_after_usual_arithmetic_conversions): Likewise. - (composite_pointer_type): Likewise. - * call.c (strip_top_quals): Don't make it static. - (promoted_arithmetic_type_p): New function. - (conditional_conversion): Likewise. - (null_ptr_cst_p): Allow `false' as a NULL pointer constant. - (standard_conversion): Use same_type_p. Don't build BASE_CONVs - for converting a type to itself. - (reference_binding): Honor LOOKUP_NO_TEMP_BIND. - (implicit_conversion): Make sure the from and to types are - complete. - (add_builtin_candidate): Correct handling of ?: operator. - (add_builtin_candidates): Improve documentation. - (build_conditional_expr): New function. - (can_convert): Implement in terms of can_convert_arg. - (ncp_convert): New function. - * typeck.c (type_after_usual_arithmetic_conversions): New - function, split out from common_type. - (composite_pointer_type): New function, split out from - build_conditional_expr. - (common_type): Use type_after_usual_arithmetic_conversions. - Remove redundant attribute merging. - (comptypes): Tidy. Handle COMPLEX_TYPE. - (build_binary_op_nodefault): Use null_ptr_cst_p. - (build_conditional_expr): Remove. - (convert_for_assignment): Use new conversion functions. - - * cp-tree.h (abstract_virtuals_error): Change declaration. - * typeck2.c (abstract_virtuals_error): Check to see if an error - occurred, and return a boolean value accordingly. - (build_functional_cast): Adjust accordingly. - * class.c (finish_struct_1): Likewise. - * cvt.c (ocp_convert): Likewise. - * decl.c (cp_finish_decl): Likewise. - (grokparams): Likewise. - (grok_op_properties): Likewise. - (start_function): Likewise. - * init.c (build_new_1): Likewise. - - * pt.c (unify): Don't get confused by pointers-to-member functions. - - * search.c (build_cplus_new): Robustify. - -1999-07-24 Richard Henderson - - * gxx.gperf (__builtin_va_arg): New. - * parse.y (VA_ARG): New token. - (unary_expr): Recognize it. - -Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com) - - * g++FAQ.texi: Deleted per Joe Buck's request. - * Makefile.in: Corresponding changes. - -1999-07-23 Jason Merrill - - * lex.c: Sync with C frontend. - (whitespace_cr): New fn. - (skip_white_space): Use it. - (init_parse): Reorder. - (yyprint): Support CONSTANT. - (pragma_getc, pragma_ungetc): Bring back. - (read_line_number): Change in_system_header directly. - (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file. - (parse_float): Update to C version. - (yylex): Handle '$' under the letter case. - Remove looking_for_typename handling. - Support hex floating point constants. - Follow C's lead for choosing type of integer constants. - Rearrange stuff to match C frontend. - (yyungetc, reinit_parse_for_block, yylex): Support indent_level. - * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC. - -1999-07-23 Mark Mitchell - - * call.c (reference_binding): Tweak. - (mayble_handle_implicit_object): Use direct_reference_binding to - create the right implicit conversion sequence. - -1999-07-22 Mark Mitchell - - * pt.c (convert_nontype_argument): Don't call decl_constant_value - if we're converting to a reference type. - - * call.c (NEED_TEMPORARY_P): New macro. - (standard_conversion): Set it, for derived-to-base conversions. - (reference_related_p): New function. - (reference_compatible_p): Likewise. - (convert_class_to_reference): Likewise. - (direct_reference_binding): Likewise. - (reference_binding): Rework for standards-compliance. - (convert_like): Adjust accordingly. - (maybe_handle_ref_bind): Simplify; the right conversion sequences - are now built up in reference_binding. - (initialize_reference): New function. - * cp-tree.h (ICS_USER_FLAG): Document. - (ICS_THIS_FLAG): Likewise. - (ICS_BAD_FLAG): Likewise. - (NEED_TEMPORARY_P): Likewise. - (cp_lvalue_kind): New type. - (real_lvalue_p): Return it. - * error.c (dump_expr): Provide more accurate representation for - AGGR_INIT_EXPRs. - * init.c (expand_default_init): Do not try to perform implicit - conversions for a brace-enclosed initializer. - * search.c (lookup_conversions): Document. - * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate - appropriately. - (real_lvalue_p): Adjust accordingly. - (lvalue_p): Likewise. - (build_cplus_new): Don't allow the creation of an abstract class. - * typeck.c (convert_for_initialization): Use initialize_reference. - -1999-07-21 Gavin Romig-Koch - - * lex.c (real_yylex) : Correct the test for overflow when lexing - integer literals. - -1999-07-20 Jason Merrill - - * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL, - not DECL_BUILT_IN, to determine if a function is internally declared. - (duplicate_decls): Likewise. Improve handling of builtins. - (push_overloaded_decl): Remove special handling of builtins. - - * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P. - - * decl.c (grokdeclarator): Pull out decl_constant_value in - templates, too. - - * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm. - * cp-tree.h, pt.c, semantics.c: Adjust. - * method.c (largest_union_member): Remove. - - * lang-specs.h (c++-cpp-output): Pass -fpreprocessed. - - * lex.c (token_getch, token_put_back): New fns. - (real_yylex): Use them. - - * lex.c (lang_init): Generalize. - (lang_init_options): Tell cpplib this is C++. - (nextchar): Remove. Replace uses with put_back. - (skip_white_space): Handle linemode here. Optimize for cpplib. - (extend_token_buffer_to): New fn. - (extend_token_buffer): Use it. - (read_line_number, check_newline): Just deal with tokens. - (real_yylex): More cpplib optimizations. Simplify. Don't produce - EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here. - * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING. - * parse.y (PAREN_STAR_PAREN): Remove. - * input.c: Don't use the putback machinery with cpplib. - (sub_getch): Fold back into getch. - (getch): Don't handle linemode here. - (feed_input): Unget any text in the token buffer. - - * lex.c (set_typedecl_interface_info, set_vardecl_interface_info, - nextyychar, nextyylval): Remove. - -1999-07-20 Michael Tiemann - Jason Merrill - - * lex.c (indent_level): New variable. - (init_parse): Set cpp_token to CPP_DIRECTIVE. - (consume_string): Make this smart about USE_CPPLIB. - (yyungetc): Use put_back function. - (pragma_getc, pragma_ungetc): Functions deleted. - (check_newline): Rewrite to be intelligent about USE_CPPLIB. - Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and - pragma_ungetc. - (real_yylex): Rewrite to be intelligent about USE_CPPLIB. - Also, clean up cases where we redundantly set token_buffer[0]. - (read_line_number): New fn. - * input.c (feed_input): Use integrated cpplib if USE_CPPLIB. - (end_input): Call cpp_pop_buffer if USE_CPPLIB. - (sub_getch): Conditionalize out code that's not appropriate if - USE_CPPLIB. - (put_back): Rewrite in case USE_CPPLIB is defined. - (input_redirected): Ditto. - -Tue Jul 20 11:24:19 1999 Bernd Schmidt - - * cp-tree.h: Delete lots of declarations of tree nodes; replaced by - c_global_trees and accessor macros defined in c-common.h. - (cp_tree_index): New enumeration. - (cp_global_trees): Declare new array. Add accessor macros for it, and - delete declarations of tree nodes replaced by it. - (builtin_function): Delete macro, add declaration for new function. - Include c-common.h. - * decl.c: Delete definitions for tree nodes that were replaced by - cp_global_trees and c_global_trees. - (init_decl_processing): Call c_common_nodes_and_builtins; delete code - to generate the common builtins here. - (builtin_function): New function. - * decl2.c (abort_fndecl): Delete declaration. - * except.c (expand_builtin_return_address): Delete declaration. - (builtin_return_address_fndecl): Delete variable. - (const_ptr_type_node): Delete declaration. - * lex.c (cons_up_default_function): Delete declaration of - void_list_node. - * parse.y (void_list_node): Delete declaration. - * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type): - Delete variables. - (const_string_type_node): Delete declaration. - * search.c (abort_fndecl): Delete declaration. - * Makefile.in: Update dependencies. - -1999-07-19 Mark Mitchell - - * pt.c (check_default_tmpl_args): Move test for missing default - arguments here, from ... - (end_template_parm_list): Here. - -1999-07-18 Mark Mitchell - - * decl.c (lookup_nested_type): Remove. - (pushtag): Don't call it. - -Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (INTERFACE): Bump to 2. - -1999-07-17 Alexandre Oliva - - * typeck2.c (my_friendly_abort): Updated URL with bug reporting - instructions to gcc.gnu.org. Removed e-mail address. - -1999-07-17 Mark Mitchell - - * pt.c (determine_specialization): Tighten error-checking. - (end_template_parm_list): Likewise. - -1999-07-14 Mark Mitchell - - * pt.c (check_default_tmpl_args): Handle friends defined in the - class just like member functions defined in the class. - -1999-07-09 Michael Tiemann - Jason Merrill - - * cp-tree.h (struct lang_decl): Added field for storing sorted - FIELD_DECLs (used in TYPE_DECLs). - (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union. - (DECL_SORTED_FIELDS): New macro. - * class.c (method_name_cmp): New function. - (finish_struct_methods): Modified to support sorting and searching - methods. - (finish_struct_anon): Changed code in inner loop to use ELT rather - than UELT (which required an extra indirection for every reference). - (field_decl_cmp): New function to support sorting FIELD_DECLs. - (finish_struct_1): Sort fields. - * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them. - (lookup_fnfields_1): Search sorted methods in METHOD_VEC. - Also, switch to using array indexing rather than a changing pointer. - * ptree.c (print_lang_decl): Handle TYPE_DECLs that have - DECL_SORTED_FIELDS. - -1999-07-09 Jason Merrill - - * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style - casts in system headers or extern "C" blocks. - - * pt.c (do_decl_instantiation): Downgrade duplicate instantiation - errors to pedwarn. - -1999-07-09 Michael Tiemann - - * decl2.c (write_virtuals): Deleted declaration. - * cp-tree.h (write_virtuals): Deleted extern declaration. - * class.c (finish_struct_1): Removed #if 0'd code that mentions - write_virtuals. - * semantics.c (begin_class_definition): Rewrite code to not depend - on write_virtuals. - - * lex.c (cp_pragma_interface): New function. - (cp_pragma_implementation): Likewise. - (handle_cp_pragma): Call them. - - * typeck.c (comptypes): Simplify C code in look_hard. - - * xref.c (PALLOC): Use xcalloc, not calloc. - (SALLOC): Use xmalloc, not malloc. - - * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary. - - * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS - is NO_DEBUG. - - * decl.c (duplicate_decls): If a redeclaration doesn't match the - initial declaration, then don't save the inline info and by all - means don't mark the function as a builtin function. - - * decl.c (lookup_name_real): Set NONCLASS to 1 if - CURRENT_CLASS_TYPE is 0. - - * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to - NULL_TREE. - - * ptree.c (print_lang_type): Added vtable-needs-writing. - -Wed Jul 7 01:26:47 1999 Alexandre Oliva - - * decl2.c (mark_vtable_entries): Fix check for rtti offset. - -1999-07-06 Gavin Romig-Koch - - * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : - Merged into c-common. - -1999-07-05 Dave Brolley - - * lex.c (errorcount): Declare it. - (finish_parse): Update errorcount for when using CPPLIB. - -1999-07-05 Mark Mitchell - - * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template - parameters. - (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro. - * decl.c (push_class_binding): Use it. - (lookup_name_real): Likewise. - -1999-07-02 Gavin Romig-Koch - - * cp-tree.h (widest_integer_literal_type_node, - widest_unsigned_literal_type) : New. - * decl.c (widest_integer_literal_type_node, - widest_unsigned_literal_type) : New. - (init_decl_processing): Handle/use the two new types. - * lex.c (real_yylex): Same. - * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : - Same. - -1999-07-01 Mark Mitchell - - * decl.c (grokdeclarator): Don't give names "for linkage purposes" - to anonymous cv-qualified types. - -1999-07-01 Gavin Romig-Koch - - * lex.c (real_yylex) : Change integer literal overflow handling to - be like c-lex.c. - - * lex.c (real_yylex): Improve 'integer constant out of range' messages. - -1999-06-28 Richard Henderson - - * decl.c (cp_finish_decl): Fix typo in cp_warning_at call. - -1999-06-28 Jason Merrill - - * error.c (dump_type_real): Handle TREE_LIST again. - - * typeck.c (comp_target_parms): Don't complain about - converting from () to (...) if !flag_strict_prototype. - - * decl.c (grokdeclarator): Update the names of all variants when - de-anonymizing. - -1999-06-21 Mark Mitchell - - * init.c (expand_aggr_vbase_init): Rename to - construct_virtual_bases. Conditionalize construction here, - rather than ... - (emit_base_init): Here. - -1999-06-19 Mark Mitchell - - * semantics.c (finish_asm_stmt): Apply decay conversions to - input operands. - - * decl.c (expand_static_init): When building an anonymous function - for use with atexit, compute its body before and after entering - the function. - - * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and - EXIT_EXPR. - -1999-06-18 Mark Mitchell - - * init.c (expand_aggr_vbase_init): Add flag parameter. - (build_partial_cleanup_for): Remove, inlining into .. - (expand_cleanup_for_base): ... here. Take flag parameter. - (emit_base_init): Pass the in_chrg parameter to - emit_aggr_vbase_init. - (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base. - -1999-06-16 Mark Mitchell - - * decl2.c (import_export_decl): Use same_type_p, rather than - relying on pointer-equality for types. - - * method.c (do_build_copy_constructor): Simplify. - - * call.c (build_method_call): Remove bogus code for two-argument - delete. - * init.c (build_new_1): Expand on comment, and remove dead code. - - * init.c (expand_cleanup_for_base): New function, split out - from ... - (emit_base_init): Here. - (expand_aggr_vbase_init): Use it. - -1999-06-15 Mark Mitchell - - * cp-tree.h (class_cache_firstobj): Declare. - (maybe_push_cache_obstack): Rename to push_cache_obstack. - * class.c (permanent_obstack): Remove declaration. - (class_cache_firstobj): Make it global. - (add_method): Don't use permanent_obstack directly. - (pushclass): Only free the class_cache_obstack if we know how far - back to free it. - (maybe_push_cache_obstack): Rename to push_cache_obstack. - * decl.c: Remove dead comment. - (saved_scope): Add class_cache_firstobj. - (push_to_top_level): Save it. - (pop_from_top_level): Restore it. - (push_class_level_binding): Use push_cache_obstack, not - maybe_push_cache_obstack. - * search.c (push_class_decls): Likewise. - -1999-06-14 Martin von Löwis - - * pt.c (tsubst_friend_function): Push into namespace of friend - function before pushdecl'ing it. - -1999-06-14 Nathan Sidwell - - * call.c (build_new_op): Remove REF_BIND from all operands. - -1999-06-13 Alexandre Oliva - - * init.c (build_new_1): Look up operator delete even if there was - no explicit new placement. - -1999-06-08 Nathan Sidwell - - * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out - of ... - (build_throw): ... here. Call it. - (process_start_catch_block): Call it. - -1999-06-07 Mark Mitchell - - * search.c (convert_pointer_to_single_level): Reimplement without - using get_binfo. - -1999-06-06 Mark Mitchell - - * method.c (is_back_referenceable_type): Back-reference bools when - not squangling. - -1999-06-07 Dave Brolley - - * lex.c (real_yylex): Replace unused bytes from bad multibyte char. - * input.c (putback_buffer): New structure type. - (putback): Replaces putback_char member. - (putback): Replaces putback_char static variable. - (feed_input): Use putback. - (end_input): Use putback. - (sub_getch): Use putback. - (put_back): Use putback. - -1999-06-05 Mark Mitchell - - * decl.c (grokdeclarator): Fix typo in last change. - -1999-06-04 Jason Merrill - - * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack. - (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise. - -1999-06-04 Nathan Sidwell - - * except.c (build_throw): Check throw expression validity. - -1999-06-03 Mark Mitchell - - * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned - just because flag_signed_bitfields is false. - -1999-06-03 Nathan Sidwell - - * semantics.c (begin_class_definition): Update the struct's - location here ... - * class.c (finish_struct): ... rather than here. - - * decl.c (make_typename_type): Don't rely on uninitialized - variable. - -1999-05-31 Kaveh R. Ghazi - - * Makefile.in (ALL_CFLAGS): Add '-W -Wall'. - -1999-05-31 Mark Mitchell - - * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange - and friends rather than messing with current_obstack directly. - (cp_build_qualified_type_real): Rework ARRAY_TYPE - allocation to match practice throughout the rest of the - compiler. - -1999-05-30 Mark Mitchell - - * lex.c (make_lang_type): Create TYPE_BINFO for - TEMPLATE_TYPE_PARMs just like for non-template types. - - * decl.c (start_decl): Move checks on initialization to ... - (cp_finish_decl): Here. Tidy formatting slightly. - -1999-05-28 Mark Mitchell - - * decl.c (add_binding): Don't complain about a redeclaration of a - semantically identical typedef in a local scope. - -1999-05-28 Nathan Sidwell - - * decl.c (complete_array_type): Allocate off same obstack. Fix - DO_DEFAULT comment to match reality. - - * friend.c (make_friend_class): Fix diagnostic typo. - -1999-05-28 Mark Mitchell - - * decl.c (lookup_namespace_name): Handle getting a - TEMPLATE_ID_EXPR. - (expand_static_init): Don't call pushdecl for implicitly declared - `atexit' used to register destructors. - -1999-05-25 Mark Mitchell - - * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to - initialize a vtable. - - * cp-tree.h (NAMESPACE_LEVEL): Reformat. - (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes - by combining TEMPLATE_INFO and LEVEL into a single union. - (DECL_TEMPLATE_INFO): Reformat. - (DECL_SAVED_TREE): Document. - (DECL_TEMPLATE_INJECT): Remove. - * class.c (finish_struct): Remove code to deal with - DECL_TEMPLATE_INJECT. - - * decl.c (maybe_process_template_type_declaration): Handle all new - types in templates uniformly. - * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not - DECL_CONTEXT. - * pt.c (lookup_template_class): Inject template instantiations of - forward-declarations. - (instantiate_class_template): Remove code processing - DECL_TEMPLATE_INJECT. - - * pt.c (lookup_template_class): Tweak lookup to find member - templates. - - * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into - ASM_CV_QUAL. - * semantics.c (finish_asm_stmt): Make strings permanent if they're - used in a template. - -1999-05-25 Jason Merrill - - * typeck.c (casts_away_constness, casts_away_constness_r): Strip both - parts of pointer to data member types. - -1999-05-24 Mark Mitchell - - * decl2.c (mark_vtable_entries): Don't make a copy of a function, - and then make it look like `abort'. Just use `abort' instead. - - * typeck.c (build_static_cast): Don't allow static_casts that cast - away constness. - (casts_away_constness_r): New function. - (casts_away_constness): Likewise. - - * decl.c (lookup_tag): Remove code no longer needed after - name-lookup improvements. - * decl2.c (handle_class_head): Make error-recovery more robust. - * friend.c (make_friend_class): Reject templated typename types. - * lex.c (is_global): A template parameter isn't global. - * parse.y (class_head): Robustify. - * parse.c: Regenerated. - -1999-05-22 Mark Mitchell - - * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs, - INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs. - - * cp-tree.h (push_nested_namespace): Declare. - (pop_nested_namespace): Likewise. - * decl.c (push_nested_namespace): New function. - (pop_nested_namespace): Likewise. - * pt.c (instantiate_class_template): Use them. - - * tree.c (mapcar): Handle NON_LVALUE_EXPR. - - * cp-tree.h (cplus_expand_constant): Declare. - * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're - converted from one pointer-to-object type to another. - * expr.c (cplus_expand_constant): Don't make it static. - * typeck.c (build_component_ref): Don't crash when presented with - a component which is a TEMPLATE_DECL. - (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a - cast from a pointer-to-member constant to its own type does not - result in a valid non-type template argument. - -1999-05-21 Mark Mitchell - Nathan Sidwell - - * Make-lang.in (cc1plus): Make it depend on gxx.gperf. - * cp-tree.h: Fix typo in documentation on pointers-to-members. - (cp_build_qualified_type): Make it a macro. - (cp_build_qualified_type_real): Declare. - * decl.c (grokdeclarator): Remove misleading comment. Avoid - problem with template parameters and restrict-qualification. - * gxx.gperf: Replace NORID with RID_UNUSED throughout. - * hash.h: Regenerated. - * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into - the enumeration. - (NORID): Remove definition. - * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real. - (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs. - (fn_type_unification): Check that the function type resulting from - the deduction is legal. - (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially. - (unify): Use cp_build_qualified_type_real. - * tree.c (build_cplus_array_type_1): Handle error_marks as inputs. - (cp_build_qualified_type): Rename to ... - (cp_build_qualified_type_real): Add additional COMPLAIN parameter - and modify appropriately. - - * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to - reveal optimization opportunities. - - * pt.c (tsubst): Don't issue error messages when we're not - complaining, even if we see a qualified function type. - (check_cv_quals_for_unify): Don't allow a qualified function - type. - -1999-05-20 Jason Merrill - - * class.c (instantiate_type): Downgrade errors for object-dependent - memfn refs to pedwarn. - -1999-05-20 Mark Mitchell - - * decl.c (grokdeclarator): Don't treat [] as indicating a - zero-sized array in a typedef. - - * call.c (build_object_call): Don't look at DECL_NAME for a type. - (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK. - (typeck.c): Or TYPE_MAIN_VARIANT for a type. - - * pt.c (for_each_template_parm): Rework to match documentation. - Don't be fooled by a COMPONENT_REF with no TREE_TYPE. - -1999-05-20 Jason Merrill - - * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P. - - * class.c (finish_base_struct): Allow non-COM bases for COM classes - except at the leftmost position. - (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable): - Pass the binfo's class, not the most derived, to skip_rtti_stuff. - * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise. - - * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue. - (build_cplus_new): Make sure that what we return is of the right type. - -1999-05-20 Mark Mitchell - - * cp-tree.h (make_ptrmem_cst): New function. - * expr.c (cplus_expand_constant): Split out from ... - (cplus_expand_expr): Here. Use cplus_expand_constant. - (init_cplus_expand): Set lang_expand_constant. - * pt.c (convert_nontype_argument): Use make_ptrmem_cst. - - * tree.c (make_ptrmem_cst): Define. - * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst. - * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst. - -1999-05-19 Mark Mitchell - - * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P. - - * decl2.c (start_static_storage_duration_function): Fix comment. - (finish_file): Create static storage duration functions lazily. - -1999-05-19 Jason Merrill - - Implement anonymous structs. - * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P. - * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust. - * class.c (finish_struct_1): Remove redundant check for anon struct. - * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union. - (check_tag_decl): Check for anonymous struct here. - * decl2.c (build_anon_union_vars): Catch anon struct at file scope. - * init.c (sort_member_init, emit_base_init): Handle getting fields - as well as names in current_member_init_list. - (perform_member_init): Handle getting an anon aggr. - * method.c (do_build_assign_ref): Don't descend into anon aggrs. - (do_build_copy_constructor): Likewise. - -1999-05-19 Mark Mitchell - - * tree.c (cp_build_qualified_type): Don't allow qualified function - types. - -Wed May 19 02:50:53 1999 Arvind Sankar - - * gxxint.texi: Fix typo. - -1999-05-19 Jason Merrill - - * call.c (find_scoped_type, resolve_scope_to_name): Lose. - * class.c (finish_struct_1): Use CLASS_TYPE_P. - * ptree.c (print_lang_type): Likewise. - * typeck.c (build_modify_expr, c_expand_asm_operands): Use - IS_AGGR_TYPE_CODE. - * typeck2.c (digest_init): Likewise. - -1999-05-18 Jason Merrill - - * call.c (joust): Compare the types of the conv ops, not the - target types of the conversions. - -Tue May 18 00:21:34 1999 Zack Weinberg - - * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc - was not given. - -1999-05-17 Mark Mitchell - - * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation. - * decl.c (grokfndecl): Don't allow inline declarations of friend - template specializations, or friend template specializations with - default arguments. - * pt.c (tsubst): Handle substitution into array types that does - not yield a fixed upper bound, even when not processing a - template. - (tsubst_copy): Deal with the fact that the second operand to a - TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC. - * search.c (marked_pushdecls_p): Don't descend into - TEMPLATE_TYPE_PARMs and the like. - (unmarked_pushdecls_p): Likewise. - - * call.c (build_over_call): Don't throw away - initializations/copies of empty classes; use MODIFY_EXPR and - INIT_EXPR as for non-empty classes. - * class.c (finish_struct_1): Put the padding byte for an empty - class on the TYPE_NONCOPIED_PARTS list for the class. - -1999-05-16 Mark Mitchell - - * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that - indicate a reference to a field that is a qualified name. - -1999-05-16 Jason Merrill - - * decl2.c (finish_objects): Don't use .?tors.* if we don't have - ASM_OUTPUT_CONSTRUCTOR. - - * friend.c (do_friend): Add attrlist arg. Remove support for - getting a non-decl as 'decl'. - * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or - rtl. - (grokdeclarator): Adjust. - * cp-tree.h: Adjust. - -1999-05-16 Mark Mitchell - - * cp-tree.h (permanent_p): New function. - * init.c (build_new_1): Use mapcar, not copy_node, to copy a - possibly complex tree node. - * tree.c (mapcar): Adjust comments, and follow coding standards in - conditional. - (permanent_p): New function. - -1999-05-13 Per Bothner - - * class.c (push_lang_context): Turn off DECL_IGNORED_P for - primitive Java types, if we actually see `extern "Java"'. - -1999-05-10 18:21 -0400 Zack Weinberg - - * lang-specs.h: Pass -$ to the preprocessor. - -1999-05-10 Jason Merrill - - * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too. - Don't bother wrapping an OFFSET_TYPE around unknown_type_node. - (resolve_offset_ref): Don't handle a raw baselink. - * cvt.c (build_expr_type_conversion): Likewise. - * typeck.c (decay_conversion, build_c_cast, convert_for_assignment, - convert_for_initialization): Likewise. - * class.c (instantiate_type): Handle seeing a baselink under an - OFFSET_REF. - * error.c (dump_expr): Likewise. - * pt.c (for_each_template_parm): Likewise. - (resolve_overloaded_unification): Likewise. - * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise. - * typeck.c (expr_sizeof): Also complain about other permutations - of overloaded functions. - -1999-05-07 Jason Merrill - - * init.c (resolve_offset_ref): Don't return a raw method. - Use BASELINK_P. - * typeck.c (decay_conversion): Don't handle a raw method. - Resolve all OFFSET_REFs. - (get_member_function_from_ptrfunc): 0 is a valid vtable index. - (build_binary_op_nodefault): Handle resolving overloaded fns. Use - same_type_p for pmf bits. Don't use build_binary_op to compare - raw pointers to methods. - (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE, - to decide when to call resolve_offset_ref. - (build_c_cast, convert_for_initialization): Likewise. - * cvt.c (build_expr_type_conversion): Likewise. - -1999-05-06 Nathan Sidwell - - * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class. - -1999-05-05 Mark Mitchell - - * decl2.c (start_objects): Don't let static constructors and - destructors get inlined. - - * parse.y (nested_name_specifier): Make sure ordinary types are - complete, just like template types. - * parse.c: Regenerated. - - * pt.c (check_explicit_specialization): Improve error messages. - -1999-05-04 Martin von Löwis - - * typeck.c (string_conv_p): Use same_type_p to check whether we - try to convert between char and wchar_t. - -1999-05-03 Mark Mitchell - - * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous - lookup to error_mark_node here. - (lookup_member): Revise documentation. Add comments. Don't set - the TREE_TYPE to error_mark_node here, and don't build up an extra - TREE_LIST for ambiguous lookups. - (setup_class_bindings): Adjust accordingly. - (push_class_decls): Revise out-of-date comments. - - * typeck.c (build_const_cast): Tighten checks for legality. - -1999-05-02 Martin von Löwis - - * init.c (build_member_call): Lookup names coming from - namespace-scoped LOOKUP_EXPR. - -1999-05-03 Jim Blandy - - * gxxint.texi: Add documentation for 'I'. - -1999-05-02 Martin von Löwis - - * tinfo.cc (operator==): Qualify type_info with std::. - -1999-05-02 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy. - (DECL_COMDAT): Remove definition. - -1999-05-01 Mark Mitchell - - * decl.c (wrapup_globals_for_namespace): Fix thinko in previous - change. - -1999-04-30 Mark Mitchell - - * class.c (build_vtable): Use build_lang_decl when building - vtables, not just build_decl. - (prepare_fresh_vtable): Likewise. - * decl.c (wrapup_globals_for_namespace): Mark vtables as - DECL_EXTERNAL when calling wrapup_global_declarations. - * decl2.c (priority_info_s): Add initializations_p and - destructions_p members. - (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED, - when deciding what vtables to write out. - (ssdf_decls): New variable. - (ssdf_decls_used): Likewise. - (start_static_storage_duration_function): Deal with being called - multiple times. Avoid inlining this function. - (generate_inits_for_priority): Deal with reuse of priority map. - (get_priority_info): Clear initializations_p and destructions_p. - (do_static_initialization): Tweak comment. - (do_static_destruction): Likewise. Fix condition on sentries for - destruction. - (generate_ctor_or_dtor_function): Call all of the static storage - duration functions. - (generate_ctor_or_dtor_function_for_priority): Check - initializations_p and destructions_p to see what priorities need - initialization functions. - (finish_file): Rework to generate multiple static storage duration - functions, rather than just one. - - * typeck.c (build_const_cast): Tweak last change to handle - templates correctly. - - * typeck.c (build_const_cast): Disallow use of const_cast to - anything but a pointer or reference type. - -1999-04-30 Nathan Sidwell - - * decl.c (cp_finish_decl): Don't permit arrays of abstract or - signature type. - -1999-04-29 Mark Mitchell - - * decl2.c (do_static_destruction): Remove obsolete FIXME comment. - (finish_file): Indent comments properly. - -1999-04-29 Richard Henderson - - * decl2.c (do_static_initialization): Call do_pending_stack_adjust. - (do_static_destruction): Likewise. - -1999-04-29 Nathan Sidwell - - * cp-tree.h (TYPE_NOTHROW_P): New macro. - * decl2.c (delete_sanity): Warn on deleting void *. - * init.c (build_new_1): Use TYPE_NOTHROW_P. - * typeck.c (c_expand_return): cp_pedwarn on returning NULL from - throwing operator new. - -1999-04-28 Nathan Sidwell - - * cp-tree.h (build_component_addr): Remove prototype. - * typeck.c (build_component_addr): Make static. Remove MSG - argument. - (build_component_addr): Remove MSG parameter, clean up - comment. - (build_x_function_call): Use cp_error. - (build_unary_op): Adjust call of build_component_addr. - -1999-04-28 Mark Mitchell - - * pt.c (tsubst_friend_class): Check for NULL. - -Wed Apr 28 11:42:22 1999 Andreas Schwab - - * search.c (binfo_for_vtable): Initialize bfvi.var. - -1999-04-27 Nathan Sidwell - - * rtti.c (build_x_typeid): Check rtti is enabled. - -1999-04-26 Mark Mitchell - - * search.c (is_subobject_of_p): Make sure we're looking at the - right baseclasses. - -1999-04-26 Marc Espie - - * Make-lang.in (cplib2.ready): Don't depend on phony targets. - -1999-04-23 Mark Mitchell - - * decl2.c (finish_file): Tweak handling of extern inlines so that - they are not unnecessarily put out. - - * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and - such as base classes. - -1999-04-22 Brendan Kehoe - - * tree.c (build_exception_variant): Fix typo: use the chain of U, - not trying V, while cycling through U. - -1999-04-22 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove returns_first_arg and - preserves_first_arg. Enlarge dummy accordingly. - (DECL_TINFO_FN_P): New macro. - (SET_DECL_TINFO_FN_P): Likeiwse. - (DECL_RETURNS_FIRST_ARG): Remove. - (DECL_PRESERVES_THIS): Likewise. - (DECL_INIT_PRIORITY): New macro. - (finish_struct_1): Change prototype. - (cat_namespace_levels): Remove prototype. - (vtable_decl_p): New prototype. - (vtype_decl_p): Likewise. - (sigtable_decl_p): Likewise. - (walk_globals_pred): New typedef. - (walk_globals_fn): Likewise. - (walk_globals): New prototype. - (walk_namespaces_fn): New typedef. - (walk_namespaces): New prototype. - (wrapup_globals_for_namespace): Likewise. - (walk_vtables): Remove prototype. - (walk_sigtables): Likewise. - (instantiate_pending_templates): New prototype. - * class.c (finish_struct_1): Don't return a value. - * decl.h (pending_statics): Remove declaration. - * decl.c (walk_namespaces_r): New function. - (walk_globals_r): Likewise. - (vtable_decl_p): Likewise. - (vtype_decl_p): Likewise. - (sigtable_decl_p): Likewise. - (walk_namespaces): Likewise. - (walk_globals_data): New type. - (walk_globals): New function. - (wrapup_globals_for_namespace): Likewise. - (expand_static_init): Remove assertion. Remove redundancy in - conditional. Don't put static data members in static_aggregates - Tidy. - (finish_function): Remove redundancy in conditional. Don't set - DECL_RETURNS_FIRST_ARG. - (cat_namespace_levels): Remove. - * decl2.c: Include splay-tree.h and varray.h. - (priority_info_s): New structure. - (finish_vtable_vardecl): Change prototype. Adjust for new calling - conventions. - (prune_vtable_vardecl): Likewise. - (finish_sigtable_vardecl): Likewise. - (setup_initp): Remove. - (do_dtors): Remove. - (do_ctors): Remove. - (start_static_storage_duration_function): New function. - (generate_inits_for_priority): Likewise. - (finish_static_storage_duration_function): Likewise. - (get_priority_info): Likewise. - (do_static_initialization): Likewise. - (do_static_destruction): Likewise. - (do_static_initialization_and_destruction): Likewise. - (generate_ctor_or_dtor_function): Likewise. - (generate_ctor_and_dtor_functions_for_priority): Likewise. - (pending_statics): Make it a varray. - (pending_statics_used): New variable. - (saved_inlines): Make it a varray. - (saved_inlines_used): New variable. - (finish_static_data_member): Change method of updating - pending_statics. - (mark_inline_for_output): Remove #if 0'd code. Change method of - updating saved_inlines. - (walk_vtables): Remove. - (walk_sigtables): Likewise. - (import_export_decl): Use DECL_TINFO_FN_P. - (pending_templates): Remove declaration. - (maybe_templates): Likewise. - (static_aggregates_initp): Likewise. - (setup_initp): Likewise. - (finish_objects): Simplify. - (INITIALIZE_P_IDENTIFIER): New macro. - (PRIORITY_IDENTIFIER): New macro. - (SSDF_IDENTIFIER): New macro. - (initialize_p_decl): New variable. - (priority_decl): Likewise. - (ssdf_decl): Likewise. - (priority_info_map): Likewise. - (finish_file): Recode output of static intializers and other - file-scope finalization tasks. - * error.c (OB_END_TEMPLATE_ID): New macro. - (dump_type_real): Use it. - (dump_decl): Likewise. - (dump_function_name): Likewise. - * lex.c (set_typedecl_interface_info): Adjust for new walk_globals - interface. - (check_newline): Use walk_globals, not walk_vtables. - * pt.c (pending_tempalte_expansions): Remove. - (set_vardecl_interface_info): Likewise. - (pending_templates): Make static. - (maybe_templates): Likewise. - (instantiate_class_template): Adjust call to finish_struct_1. - (instantiate_pending_templates): New function. - * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P. - * tree.c (static_aggregates_initp): Remove. - (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY - instead. - * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h. - - * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes - with the RTL code RETURN. - * hash.h: Regenerated. - * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD. - * parse.y: Replace RETURN with RETURN_KEYWORD throughout. - * parse.c: Regenerated. - * pt.c: Include varray.h. Include rtl.h since varray.h requires - it. - (inline_parm_levels): New variable. - (inline_parm_levels_used): Likewise. - (maybe_begin_member_template_processing): Update them. - (maybe_end_member_template_processing): Use them, rather than - guessing how many levels to pop. - - * decl.c (make_typename_type): Tighten error-checking. - -1999-04-20 Mark Mitchell - - * cp-tree.h (build_binary_op): Remove unneeded parameter. - * class.c (build_vrable_entry_ref): Adjust call to - build_binary_op. - * decl.c (expand_static_init): Likewise. - (grokdeclarator): Likewise. - (finish_function): Likewise. - * decl2.c (delete_sanity): Likewise. - (do_dtors): Likewise. - (do_ctors): Likewise. - * error.c (dump_type_suffix): Likewise. - * expr.c (cplus_expand_expr): Likewise. - * init.c (resolve_offset_ref): Likewise. - (build_new): Likewise. - (build_new_1): Likewise. - (build_vec_delete_1): Likewise. - (expand_vec_init_catch_clause): Likewise. - (build_delete): Likewise. - * pt.c (tsubst): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - * search.c (expand_upcast_fixups): Likewise. - (expand_direct_vtbls_init): Likewise. - * typeck.c (get_member_function_from_ptrfunc): Likewise. - (build_binary_op_nodefault): Likewise. - (point_int_sum): Likewise. - (pointer_diff): Likewise. - (build_unary_op): Likewise. - (build_modify_expr): Likewise. - (get_delta_difference): Likewise. - (build_ptrmemfunc): Likewise. - (expand_ptrmemfunc_cst): Likewise. - -1999-04-20 Jason Merrill - - * decl.c (grokfndecl): Always call cplus_decl_attributes. - * decl2.c (grokfield): Pass attrlist to grokdeclarator. - -1999-04-19 Mark Mitchell - - * cp-tree.h (finish_static_data_member_decl): New function. - * decl2.c (finish_static_data_member_decl): Split out from ... - (grokfield): Here. - * pt.c (instantiate_class_template): Use it here instead of - trying to fake it. - (tsubst_decl): Don't set DECL_ASSEMBLER_NAME; - finish_static_data_member_decl will do that. Explicit set - DECL_EXTERNAL to match non-template processing. - -1999-04-18 Mark Mitchell - - * cp-tree.h (finish_class_definition): Add parameter. - * parse.y (structsp): Use it. Don't call pop_scope here. - * parse.c: Regenerated. - * semantics.c (finish_class_definition): Pop it here. - -1999-04-17 Mark Mitchell - - * decl.c (xref_tag): Revise handling of nested template - declarations. - * pt.c (check_explicit_specialization): Tweak handling of friend - templates in template classes. - (tsubst_friend_class): Handle friend declarations for nested - member template classes. - -1999-04-16 Mark Mitchell - - * class.c (finish_struct): Remove unused variable. - (pushclass): Likewise. - (invalidate_class_lookup_cache): Likewise. - * cp-tree.def (TYPENAME_TYPE): Improve documentation. - * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME - doesn't get obliterated. - (make_typename_type): Handle template classes correctly. - - * cp-tree.h (TREE_NONLOCAL_FLAG): Remove. - (storetags): Declare. - * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG. - (pushclass): Likewise. Use storetags to install tag declarations, - not pushtag. - (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG. - * decl.c (storetags): Make it global. - (push_class_binding): Set INHERITED_VALUE_BINDING_P for an - implicit typename declaration. - (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG. - * method.c (hack_identifier): Likewise. - * search.c (lookup_member): Likewise. - - * decl.c (warn_about_implicit_typename_lookup): New function. - (lookup_name_real): Use it. Rework handling of implicit typename - extension. - -1999-04-15 Mark Mitchell - - * cp-tree.h (lookup_nested_field): Remove. - * class.c (push_nested_class): Handle UNION_TYPEs. - (pop_nested_class): Likewise. - * decl.c (lookup_name_real): Don't call lookup_nested_field. - (start_decl): Use push_nested_class, not just pushclass. - (cp_finish_decl): Use pop_nested_class, not just popclass. - * search.c (lookup_nested_field): Remove. - - * cp-tree.h (lang_type): Add documentation. - * decl2.c (handle_class_head): Create template declarations here, - as appropriate. - * parse.y (class_head): Return whether or not we entered a new - scope, as well as the type named. - (named_class_head): Likewise. - (named_complex_class_head_sans_basetype): Likewise. - (structsp): Adjust accordingly. Pop scope when required. - * parse.c: Regenerated. - * pt.c (check_default_tmpl_args): Robustify. - (redeclare_class_template): Likewise. - (instantiate_class_template): An instantiation of an - anonymous union is itself an anonymous union. - * semantics.c (begin_class_definition): Don't create template - declarations here. - -1999-04-15 Jason Merrill - - * parse.y (after_type_declarator_intern): New nonterminal. - (after_type_declarator): Use it. - (direct_after_type_declarator): Likewise. Move above - nonnested_type to fix reduce/reduce conflict resolution. - (declmods): Reducing from just 'attributes' has EMPTY precedence. - * Makefile.in (CONFLICTS): Update. - - * decl.c (define_label): Downgrade error for jumping over a - non-POD decl to pedwarn. - -1999-04-14 Mark Mitchell - - * cp-tree.h (popclass): Change declaration. - (pop_nested_class): Likewise. - (poplevel_class): Remove declaration. - * call.c (convert_default_argument): Pass no arguments to - popclass. - * class.c (finish_struct_1): Likewise. - (finish_struct): Likewise. - (popclass): Remove argument. Simplify code accordingly. - (pop_nested_class): Likewise. - * decl.c (poplevel_class): Declare it here, and make it static. - (poplevel): Handle class scopes. - (poplevel_class): Don't take an rgument. Simplify. - (pop_everything): Pass no arguments to pop_nested_class. - (cp_finish_decl): Pass no arguments to popclass. - (grokdeclarator): Pass no arguments to pop_nested_class. - (finish_function): Likewise. - * decl2.c (grokfield): Likewise. - (pop_scope): Pass no arguments to popclass. - * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class. - * pt.c (instantiate_class_template): Move call to pushclass, and - document. Pass no arguments to popclass. - (regenerate_decl_from_template): Likewise. - -1999-04-14 Jason Merrill - - * typeck.c (build_unary_op): Handle taking the address of a unique - bound non-static member function. - -1999-04-13 Martin von Loewis - - * lang-options.h (-Wdeprecated): New flag. - * decl2.c (warn_deprecated): New flag. - (lang_decode_option): Deprecated this-is-variable, - external-templates, alt-external-templates. - Support -Wdeprecated. - * errfn.c (cp_deprecated): New function. - -1999-04-13 Jason Merrill - - * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead - of the decls themselves. - - * pt.c (tsubst_function_type): Copy attributes over. - - * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority - and com_interface. - * cp-tree.h: Add prototype. - * decl.c (init_decl_processing): Set valid_lang_attribute. - -1999-04-13 Mark Mitchell - - * class.c (finish_struct_1): Look at the const-ness of the field's - type, not the TREE_READONLY-ness of the declaration. - * method.c (synthesize_method): Likewise. - * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when - creating new declarations. - -1999-04-13 Mike Stump - - * decl2.c (import_export_decl): Because vtables always reference - virtual functions, even if they are inlined, don't allow - -fno-implement-inlines to not emit them, instead, emit them with - the vtable. - * decl.c (start_function): Likewise. - -1999-04-12 Jason Merrill - - * cp-tree.h (struct lang_type): Add com_interface. - (CLASSTYPE_COM_INTERFACE): New macro. - * class.c (set_rtti_entry): COM interface classes have no RTTI - entries in their vtables; adjust. - (add_virtual_function, finish_base_struct, skip_rtti_stuff, - modify_one_vtable, fixup_vtable_deltas1, override_one_vtable, - finish_struct_1): Likewise. - * decl2.c (mark_vtable_entries): Likewise. - * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise. - * search.c (get_abstract_virtuals_1, get_abstract_virtuals, - expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - - * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro. - * typeck.c (comptypes): If we get it, ignore attributes. - * class.c (instantiate_type): Use BASELINK_P. Change complain - parameter to flags; 2 means ignore attributes. - * call.c (build_op_delete_call): Pass it. - - * decl.c (xref_tag): Only complain once about using a typedef-name - with 'struct'. Downgrade to pedwarn. - - * decl.c (grokdeclarator): Allow [] syntax for zero-length array. - - * parse.y (absdcl_intern): New nonterminal. - (absdcl, direct_abstract_declarator): Use it. - - * pt.c (lookup_template_class): Look through implict typename. - -1999-04-11 Mark Mitchell - - * friend.c (add_friend): Deal gracefully with error_mark_node. - * method.c (build_overload_value): Handle pointers-to-members as - template parameters. - - * decl.c (push_binding): Fix typo in comment. - -1999-04-10 Mark Mitchell - - * error.c (dump_type_real): If a typename is a template-id, put - out the template arguments. - (dump_expr): Handle TEMPLATE_ID_EXPR. - * pt.c (lookup_template_class): Now that full arguments are - available everywhere, remove code that tried to guess them. - -1999-04-09 Mark Mitchell - - * decl.c (make_typename_type): Complain if we don't find a type - when trying to make a typename type for a non-template type. - -1999-04-09 Jason Merrill - - * decl.c (start_decl): Pass attributes to grokdeclarator. - (grokdeclarator): Handle attributes on constructor-syntax - initializers. - -1999-04-08 Mark Mitchell - - * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands - don't have types. - - * search.c (template_self_reference_p): Tweak. - -1999-04-07 Mark Mitchell - - * init.c (build_offset_ref): Don't build yet another weird data - structure to describe overloaded functions. - -1999-04-06 Mark Mitchell - - * cp-tree.h (BASELINK_P): New macro. - (SET_BASELINK_P): Likewise. - * init.c (build_member_call): Remove needless assignment in if - statement. - * search.c (lookup_field_r): Fix handling when we are looking - specifically for a type; these are not hidden by functions and - variables. - (lookup_member): Use SET_BASELINK_P. - * tree.c (is_overloaded_fn): Use BASELINK_P. - (really_overloaed_fn): Likewise. - (get_first_fn): Likewise. - -1999-04-05 Mark Mitchell - - * decl.c (lookup_name_current_level): Tweak, and improve - documentation. - - * class.c (maybe_fixup_vptrs): Remove declaration. - (build_class_init_list): Likewise. - * decl.c (pushdecl_class_level): Call check_template_shadow here - ... - (push_class_level_binding): ... not here. - * search.c (dfs_push_type_decls): Only avoid - template-self-reference TYPE_DECLs if they are from base classes. - -1999-04-04 Mark Mitchell - - * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL - nodes. Tidy. - -1999-04-03 Jason Merrill - - * class.c (maybe_fixup_vptrs, build_class_init_list): Lose. - (finish_struct_1): Don't call build_class_init_list. - -1999-04-02 Mark Mitchell - - * tinfo.h (__class_type_info): Fix illegal declaration. - - * cp-tree.def (TEMPLATE_ID_EXPR): Update comment. - * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro. - (IDENTIFIER_CLASS_VALUE): Improve documentation. - (is_properly_derived_from): Declare. - (invalidate_class_lookup_cache): Likewise. - (maybe_maybe_note_name_used_in_class): Likewise. - (note_name_declared_in_class): Likewise. - (push_using_decl): Remove duplicate declaration. - (id_in_current_class): Remove declaration. - (push_class_binding): Change prototype. - (clear_identitifer_class_values): Declare. - * call.c (is_properly_derived_from): Make it global. - (build_new_function_call): Be careful about updating candidates. - (build_new_method_call): Handle COMPONENT_REFs. Don't crash when - asked to make illegal calls. - * class.c: Include splay-tree.h. - (class_stack_node): Add names_used slot. - (check_member_decl_is_same_in_complete_scope): Remove. - (add_method): Fix comment. Push the declaration into class - scope. - (finish_struct_1): When popping the class, pop the bindings too. - Remove check for data member/function member conflict. - (finish_struct): Remove calls to - check_member_decl_is_same_in_complete_scope. Change calls to - popclass. - (pushclass): Clear names_used in the class stack entry. - Use invalidate_class_lookup_cache to remove cached entries, rather - than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE - before entering a new class. Remove dead code. Don't mess with - current_function_decl when pushing declarations. - (invalidate_class_lookup_cache): New function, split out from ... - (popclass): Here. Clean up names_used on our way out. - (instantiate_type): Adjust. - (build_self_reference): Don't push the declaration here. - (maybe_note_name_used_in_class): New function. - (note_name_declared_in_class): Likewise. - * decl.c (add_binding): Change prototype. - (find_class_binding_level): New function. - (innermost_nonclass_level): Likewise. - (current_binding_level): Update documentation. - (inner_binding_level): Remove. Replace with current_binding_level - throughout. - (push_binding_level): Remove special handling of - class_binding_level. - (pop_binding_level): Likewise. Use find_class_binding_level. - (suspend_binding_level): Likewise. - (global_bindings_p): Use innermost_nonclass_level. - (toplevel_bindings_p): Likewise. - (namespace_bindings_p): Likewise. - (pseudo_global_level_p): Likewise. - (push_binding): Clear INHERITED_VALUE_BINDING_P. - (add_binding): Check for illegal multiple declarations. Return a - value indicating whether or not the new binding was legal. - (push_local_binding): Skip over class binding levels. Check - return value from add_binding. - (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call - note_name_declared_in_class. - (pushlevel_class): Remove "fake out the rest of the compiler" - code. - (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs. - (clear_identifier_class_values): New function. - (pop_from_top_level): Use it. - (pop_everything): Tweak. - (maybe_process_template_type_declaration): Don't push the - declaration for the template here. - (pushtag): Don't push tag declarations into class scope here. - (pushdecl): Apply DeMorgan's law for readability. - (pushdecl_class_level): Remove special-case code for - TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions. - (push_class_level_bindng): Deal with inherited bindings. - (lookup_name_real): Remove special-case code for - TYPE_BEING_DEFINED, and some implicit typename magic. - (grokdeclarator): Handle COMPONENT_REF for a template function. - (build_enumerator): Don't call pushdecl_class_level here. - (id_in_current_class): Remove. - * decl2.c (grokfield): Don't call pushdecl_class_level or - check_template_shadow. - * errfn.c (cp_file_of): Don't declare. - (cp_line_of): Likewise. - * error.c (dump_decl): Handle an OVERLOAD. - (cp_file_of): Likewise. - (cp_line_of): Likewise. - * init.c (build_member_call): Handle a COMPONENT_REF. - * lex.c (do_identifier): Call maybe_note_name_used_in_class, not - pushdecl_class_level. - * method.c (hack_identifier): Build COMPONENT_REFs for references - to member templates as well as member functions. Remove dead - code. - * parse.y (left_curly): Remove. - (nonnested_type): Call maybe_note_name_used_in_class, not - pushdecl_class_level. - * parse.c: Regenerated. - (nested_name_specifier_1): Likewise. - * pt.c (check_explicit_specialization): Adjust, for robustness. - (check_template_shadow): Handle OVERLOADs. - (build_template_decl): Set DECL_CONSTRUCTOR_P on the - TEMPLATE_DECL, if appropriate. - * search.c (envelope_add_decl): Remove. - (dfs_pushdecls): Likewise. - (dfs_compress_decls): Likewise. - (dfs_push_decls): New function. - (dfs_push_type_decls): Likewise. - (setup_class_bindings): Likewise. - (template_self_reference_p): Likewise. - (lookup_field_r): Use it. - (looup_member): Remove old comment. Deal with ambiguity. - (push_class_decls): Use dfs_push_decls and dfs_push_type_decls, - and remove envelope processing. - * semantics.c (begin_class_definition): Let pushclass push - declarations for base classes. - (finish_member_declaration): Push declarations into class scope. - * typeck.c (build_component_ref): Just put an OVERLOAD into the - COMPONENT_REF, not a TREE_LIST of an OVERLOAD. - (build_x_function_call): Deal with OVERLOAD. Handle template-ids. - * Makefile.in (class.o): Depend on splay-tree.h. - -Wed Mar 31 11:30:43 1999 Nathan Sidwell - - * cvt.c (convert_pointer_to_real): Use same_type_p. - * typeck.c (comp_target_types): Use same_type_p. - -1999-03-31 Jason Merrill - - * semantics.c (begin_inline_definitions, - finish_inline_definitions): Rename from finish_default_args and - begin_inline_definitions, respectively, to something that isn't a - total lie. :) - * parse.y (structsp): Adjust. - - * tree.c (hash_tree_cons): Remove obsolete via_* parms. - (list_hash_lookup): Likewise. - (hash_tree_chain): Adjust. - * pt.c (tsubst): Adjust. - (tsubst_arg_types): Use plain hash_tree_cons. - * cp-tree.h (hash_tree_cons_simple): Lose. - * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons. - -Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi - - * Makefile.in (hash.h): Generate using gperf language 'C', not - 'KR-C', so gperf uses the `const' keyword on strings. - - * gxx.gperf (resword): Const-ify a char*. - -1999-03-30 Jason Merrill - - * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST, - CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES, - CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH, - CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST, - CLASSTYPE_BINFO_AS_LIST): Remove cruft. - * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c, - tree.c: Adjust. - -1999-03-29 Jason Merrill - - * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall. - -1999-03-28 Jason Merrill - - * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops. - -1999-03-27 Mark Mitchell - - * cp-tree.h (add_friend): Declare. - (add_friends): Likewise. - * friend.c (add_friend): Make it global. Don't add to - DECL_BEFRIENDING_CLASSES if the befriending class is a template. - (add_friends): Make it global. - (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the - befriending class is a template. - * parse.y (component_decl_1): Fix typo in comment. - * parse.c: Regenerated. - * pt.c (instantiate_class_template): Use add_friend and - add_friends rather that duplicating some of their functionality - here. - -1999-03-27 Jason Merrill - - * call.c (build_field_call): Unify 'this' and non-'this' cases. - - * typeck.c (build_indirect_ref): Check for 'this' sooner. - -Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi - - * call.c (op_error): Const-ify a char*. - (add_candidate, source_type, add_warning): Add static prototype. - (print_z_candidates): Const-ify a char*. - - * class.c (resolve_address_of_overloaded_function, - fixed_type_or_null, build_vtable_entry_ref): Add static prototype. - (get_vtable_name, finish_struct_1): Const-ify a char*. - - * cvt.c (convert_to_reference): Likewise. - - * decl.c (redeclaration_error_message, record_builtin_type, - record_unknown_type, member_function_or_else, bad_specifiers): - Likewise. - (find_binding, select_decl, unqualified_namespace_lookup, - lookup_flags, qualify_lookup, record_builtin_java_type, tag_name): - Add static prototype. - (warn_extern_redeclared_static, duplicate_decls, pushdecl, - implicitly_declare, record_builtin_java_type, define_function, - grok_op_properties, tag_name): Const-ify a char*. - - * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const. - (define_function, finish_builtin_type): Const-ify a char*. - (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn, - cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args. - (file_name_nondirectory): Const-ify a char*. - (init_filename_times): Don't prototype. - (compiler_error): Prototype. - (yyerror, init_repo): Const-ify a char*. - (build_srcloc): Don't prototype. - (build_x_indirect_ref, build_indirect_ref, build_component_addr): - Const-ify a char*. - (warn_for_assignment): Don't prototype. - (convert_for_initialization, readonly_error, check_for_new_type, - GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call): - Const-ify a char*. - - * decl2.c (acceptable_java_type, output_vtable_inherit, - setup_initp, start_objects, finish_objects, do_dtors, do_ctors, - merge_functions, decl_namespace, validate_nonmember_using_decl, - do_nonmember_using_decl): Add static prototype. - (lang_f_options): Const-ify a char*. - (finish_builtin_type): Likewise. - (add_function, arg_assoc_namespace, arg_assoc_class): Add static - prototype. - - * errfn.c: Include cp-tree.h. - (cp_thing): Add static prototype. - (compiler_error): Don't protoptype. - (cp_compiler_error): Cast `compiler_error' to `errorfn' before - passing it to `cp_thing'. - - * error.c (interesting_scope_p): Add static prototype. - - * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify - a char*. - - * init.c (compiler_error): Don't prototype. - (member_init_ok_or_else): Const-ify a char*. - (build_java_class_ref): Add static prototype. - - * lex.c (compiler_error): Don't prototype. - (get_time_identifier, interface_strcmp, extend_token_buffer, - handle_cp_pragma): Const-ify a char*. - (is_global, init_filename_times): Add static prototype. - (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*. - (compiler_error): Change from fixed args to variable args. - (yyerror): Const-ify a char*. - - * parse.y (cond_stmt_keyword): Const-ify a char*. - (parse_decl): Add static prototype. - - * pt.c (template_args_equal, print_template_context): Likewise. - (print_candidates, check_default_tmpl_args): Const-ify a char*. - (instantiate_class_template): Likewise. - - * repo.c (get_base_filename, open_repo_file, init_repo): Likewise. - - * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc, - expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise. - - * search.c (lookup_field_info, lookup_member): Likewise. - (lookup_member): Cast the first argument of `bzero' to a PTR. - - * sig.c (compiler_error): Don't prototype. - (build_signature_pointer_or_reference_nam): Const-ify a char*. - (get_sigtable_name, build_member_function_pointer): Likewise. - - * tree.c (compiler_error): Don't prototype. - (no_linkage_helper, build_srcloc): Add static prototype. - (build_vbase_pointer_fields): Const-ify a char*. - (__eprintf): Don't unnecessarily handle `const' when !__STDC__. - - * typeck.c (compiler_error): Don't prototype. - (convert_for_assignment): Const-ify a char*. - (comp_cv_target_types): Add static prototype. - (build_x_indirect_ref, build_indirect_ref, convert_arguments, - build_component_addr, build_unary_op, convert_for_initialization): - Const-ify a char*. - - * typeck2.c (ack): Add static prototype and change from fixed args - to variable args. - (readonly_error, check_for_new_type): Const-ify a char*. - - * xref.c (_XREF_FILE, find_file, filename, fctname, declname, - fixname, open_xref_file, classname, GNU_xref_begin): Likewise. - (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'. - (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call, - gen_assign, GNU_xref_member): Const-ify a char*. - -1999-03-25 Martin von Löwis - - * gxxint.texi: Remove old discussion on copying virtual bases. - -1999-03-25 Zack Weinberg - - * Make-lang.in: Remove all references to g++.o/g++.c. - Link g++ from gcc.o. - -1999-03-25 Jason Merrill - - * decl2.c (comdat_linkage): Treat vtables like functions. - -1999-03-25 Mark Mitchell - - * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES. - -1999-03-25 Nathan Sidwell - - * decl.c (init_decl_processing): Add `signed' type as a synonym - for `int'. - -1999-03-25 Jason Merrill - - * typeck.c (common_type): Handle cv-qual unification for pointers - to members. - - * decl.c (unqualified_namespace_lookup): Return error_mark_node - on error. - (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing. - * lex.c (do_identifier): If we got error_mark_node, call - lookup_name again. - -1999-03-24 Martin von Löwis - - * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty - classes. - -1999-03-24 Jason Merrill - - * decl.c (lookup_name_real): Do nested field lookup regardless of - TYPE_BEING_DEFINED. - -1999-03-24 Mark Mitchell - - * cp-tree.h (lang_type): Remove has_assignment and - has_real_assignment. Add befriending_classes. - (TYPE_HAS_ASSIGNMENT): Remove. - (TYPE_HAS_REAL_ASSIGNMENT): Likewise. - (CLASSTYPE_BEFRIENDING_CLASSES): New macro. - (lang_decl): Document. - (DECL_BEFRIENDING_CLASSES): New macro. - (FRIEND_NAME): Move declaration to more obvious location. - (FRIEND_DECLS): Likewise. - * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT. - * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES. - (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT. - (grok_op_properties): Likewise. - * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS. - (add_friend): Likewise. Don't do weird things with assignment - operators. Update DECL_BEFRIENDING_CLASSES. - (add_friends): Don't do weird things with assignment operators. - (make_friend_class): Likewise. Update - CLASSTYPE_BEFRIENDING_CLASSES. - * pt.c (instantiate_class_template): Don't set - TYPE_HAS_ASSIGNMENT. - (tsubst_copy): Substitute the TREE_TYPE for more unary - expressions. - * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT. - * search.c (protected_accessible_p): New function. - (friend_accessible_p): Likewise. - (accessible_p): Use them. - -1999-03-23 Mark Mitchell - - * pt.c (convert_nontype_argument): Don't create things that aren't - PTRMEM_CSTs when applying a qualification conversion to a - PTRMEM_CST. - -1999-03-23 Mark Mitchell - - * Makefile.in (OBJS): Don't mention hash.o. - (OBJDEPS): Likewise. - -1999-03-23 Jason Merrill - - * decl2.c (finish_file): Set at_eof to 2 after expanding ctors. - * decl.c (expand_static_init): Make sure we don't add any after - then. - - * decl.c (cp_finish_decl): Move intelligence about handling - DECL_COMDAT for variables from here... - * decl2.c (comdat_linkage): ...to here. - (maybe_make_one_only): Tweak. - (import_export_decl): Call comdat_linkage for variables, too. - (finish_file): Handle template statics properly. - -1999-03-22 Mark Mitchell - - * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG. - Document internals of pointer-to-member-functions. - (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc. - (PFN_FROM_PTRMEMFUNC): Likewise. - (build_type_conversion): Remove unused parameter. - (build_ptrmemfunc1): Declare. - (expand_ptrmemfunc_cst): New function. - (delta2_from_ptrmemfunc): Likewise. - (pfn_from_ptrmemfunc): Likewise. - * cvt.c (cp_convert_to_pointer): Remove unused parameter to - build_type_conversion. Use TYPE_PTRMEM_P for readability. - (convert_to_reference): Remove unused parameter to - build_type_conversion. - (ocp_convert): Likewise. - (build_user_type_conversion): Likewise. - * error.c (dump_expr): Handle NULL pointer-to-member functions. - * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions. - * method.c (build_overload_value): Don't go splitting CONSTRUCTORs - open when handling pointer-to-member functions. - * pt.c (convert_nontype_argument): Clean up error messages. Be - more stringent with pointers-to-members. - * typeck.c (build_ptrmemfunc1): Don't declare. Make it global. - (build_unary_op): Tidy ever-so-slightly. - (build_conditional_expr): Remove extra parameter to - build_type_conversion. - (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function - we're using. - (expand_ptrmemfunc_cst): Define. - (delta2_from_ptrmemfunc): Likewise. - (pfn_from_ptrmemfunc): Likewise. - -1999-03-19 Mark Mitchell - - * init.c (build_member_call): Handle template-id expressions - correctly. - * typeck.c (build_x_function_call): Likewise. - -1999-03-19 Chip Salzenberg - - * friend.c (make_friend_class): Avoid core dump when - not-yet-defined friend type lacks TYPE_LANG_SPECIFIC(). - -1999-03-18 Jason Merrill - - * decl.c (start_function): Suppress normal linkage heuristics - for #pragma interface under MULTIPLE_SYMBOL_SPACES. - -1999-03-19 Alexandre Oliva - - * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c. - ($(srcdir)/cp/parse.c): Moved from ../Makefile.in. - -1999-03-17 Martin von Löwis - - * parse.y (named_complex_class_head_sans_basetype): - Do not push a scope for error_mark_node. - (maybe_base_class_list): Likewise. - - * decl.c (start_decl): Check for error_mark_node as a type. - Detected by g++.brendan/array-refs.C. - (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C. - (maybe_build_cleanup_1): Likewise. Detected by - g++.jason/incomplete1.C. - - * tree.c (build_dummy_object): Use void_zero_node instead of the - error_mark_node. - (is_dummy_object): Check for such a node. - Detected by g++.bob/inherit1.C - -1999-03-16 Jason Merrill - - * method.c (old_backref_index): Split out... - (flush_repeats): From here. Rename back from try_old_backref. - (build_mangled_name): Put back some old-style repeat handling. - -Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi - - * lex.c: Don't include setjmp.h. - (parse_float): New static function. - (pf_args): New struct. - (real_yylex): Use them in call to `do_float_handler'. - -1999-03-15 Mark Mitchell - - * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here. - * tree.c (layout_basetypes): Not here. - * search.c (dfs_search): Remove; no longer used. - -1999-03-12 Mark Mitchell - - * decl2.c (validate_nonmember_using_decl): Issue sensible - error-messages on bogus qualifiers. - -1999-03-14 Jason Merrill - - * call.c (add_function_candidate): Fix uninitialized variable. - - * Makefile.in (search.o): Add dependency on varray.h. - -1999-03-13 Jason Merrill - - * decl.c (duplicate_decls): Use same_type_p. - * method.c (try_old_backref): Renamed from flush_repeats. Use - same_type_p. Don't try to handle repeats. Return success. - (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support - calls from old-style code, too. - (check_ktype): Use same_type_p. - (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT. - (build_qualified_name): Simplify logic. - (process_overload_item): Strip typedefs and quals at the top. - (build_mangled_name_for_type_with_Gcode): Remove call to - type_canonical_variant. - (build_mangled_name): Likewise. Remove support for old-style - repeats, which have been disabled since 2.7.2. Don't mess with - TREE_USED. - (build_decl_overload_real): Don't mess with TREE_USED. - -1999-03-13 Nathan Sidwell - - * error.c (cp_printers): Add 'F' escape character. - (dump_type_real): Remove TREE_LIST (fnargs) printing. - Functionality moved to dump_parameters. - (dump_type_suffix): Use dump_parameters and dump_exception_spec. - (dump_function_decl): Extend meaning of V parameter. Use - dump_parameters and dump_exception_spec. - (dump_parameters): New static function. - (dump_exception_spec): New static function. - (fndecl_as_string): Change argument semantics. Use - dump_function_decl directly. - - * sig.c (build_signature_table_constructor): Use cp_error. - -1999-03-13 Martin von Löwis - - * semantics.c (finish_switch_cond): Handle error cases gracefully. - Detected by g++.law/enum5.C. - - * typeck.c (build_modify_expr): Check for errors after resolving - offsets. Detected by g++.brendan/static1.C. - - * decl.c (complete_array_type): Ignore initial_value if it is an - error. Detected by g++.benjamin/17930.C. - - * typeck2.c (process_init_constructor): Return error if one argument - is in error. Detected by g++.benjamin/13478.C. - -1999-03-12 Martin von Löwis - - * decl.c (select_decl): Allow class templates when we need types. - * decl2.c (ambiguous_decl): Likewise. - -1999-03-12 Mark Mitchell - - * lex.c (do_identifier): Correct call to enforce_access. - * search.c (accessible_p): Tweak comment. - -1999-03-10 Mark Mitchell - - * semantics.c (begin_class_definition): Call build_self_reference. - (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs. - - * search.c (assert_canonical_unmarked): Fix typo in prototype. - - * search.c (dfs_canonical_queue): New function. - (dfs_assert_unmarked_p): Likewise. - (assert_canonical_unmarked): Likewise. - (access_in_type): Use it. - (accessible_p): Likewise. Walk the whole tree when umarking. - - * sig.c (build_signature_table_constructor): Use accessible_p - instead of compute_access. - -1999-03-09 Jason Merrill - - * call.c (add_builtin_candidates): Handle overloaded conversion ops. - -1999-03-09 Mark Mitchell - - * cp-tree.h (flag_access_control): Declare. - (TREE_VIA_PPUBLIC): Document. - (DECL_NONSTATIC_MEMBER_P): New macro. - (enforce_access): Return an indication of whether or not access - was permitted. - (build_self_reference): Change prototype. - (compute_access): Replace with ... - (accessible_p): New function. - (dfs_walk): Change prototype. - (dfs_unmark): Likewise. - (markedp): Likewise. - * call.c (enforce_access): Use accessible_p. - * class.c (build_self_reference): Insert the declaration into the - list of members for this type, and make it public. - * decl.c (xref_basetypes): Avoid ill-timed recursion. - * init.c (build_offset_ref): Use lookup_member, not three separate - name-lookups. Call enforce_access rather than checking for - illegal accesses here. - (resolve_offset_ref): Likewise. - * lex.c (do_identifier): Likewise. - * method.c (hack_identifier): Likewise. - * parse.y (self_reference): Remove. - (opt_component_decl_list): Don't use it. - * parse.c: Regenerated. - * pt.c (print_candidates): Generalize to handle lists of - overloaded functions. - (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's - not set. - (get_template_base): Use new calling convention for dfs_walk. - * search.c: Include varray.h. Add prototypes. - (dfs_walk): Accept a data pointer to pass to the work functions. - All callers changed. All work functions changed. - (breadth_first_search): Rename to bfs_walk, and make consistent - with dfs_walk. - (dfs_walk_real): New function. - (canonical_binfo): New function. - (context_for_name_lookup): Likewise. - (shared_marked_p): Likewise. - (shared_unmarked_p): Likewise. - (lokup_field_queue_p): Likewise. - (lookup_field_r): Generalize to handle both functions and fields. - (lookup_field): Just call lookup_member. - (lookup_fnfields): Likewise. - (lookup_member): Move body of lookup_field here and generalize. - (dfs_accessible_queue_p): Likewise. - (dfs_accessible_p): Likewise. - (dfs_access_in_type): Likewise. - (access_in_type): Likewise. - (compute_access): Remove, and replace with ... - (accessible_p): New function. - (vbase_types): Remove. - (vbase_decl_ptr_intermediate): Likewise. - (vbase_decl_ptr): Likewise. - (vbase_init_result): Likewise. - (closed_envelopes): Likewise. - (bvtable): Likewise. - -1999-03-09 Jason Merrill - - * call.c (add_function_candidate): Check for proper number of args - before checking the validity of those args. - -1999-03-06 Jason Merrill - - * cp-tree.h (struct lang_type): Add anon_union field. - (ANON_UNION_TYPE_P): Use it instead of examining type. - (SET_ANON_UNION_TYPE_P): New macro. - * decl.c (check_tag_decl): Use it. - - * search.c (compute_access): Handle non-type contexts earlier, and - handle NULL_TREE. - - * tree.c (build_exception_variant): Use copy_to_permanent. - - * decl2.c (setup_initp): Give statics with no priority the default - priority here. - (do_dtors, do_ctors, finish_file): Remove special handling of - non-prioritized statics. - -1999-03-05 Mark Mitchell - - * cp-tree.h (ANON_UNION_TYPE_P): Robustify. - * decl.c (make_typename_type): Don't issue an error if an - immediate lookup fails; it migt be resolved later. - * friend.c (is_friend): Add comment. - * search.c (breadth_first_search): Add POSTFN and DATA - parameters. Tidy. All callers changed. - (lookup_field_queue_p): New function. - (lookup_field_r): Likewise. - (lookup_field_post): Likewise. - (lookup_field): Use them, via breadth_first_search, instead of - duplicating logic. - (compute_access): Robustify. - (lookup_fnfield_info): New structure. - -1999-03-05 Jason Merrill - - * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again. - -1999-03-03 Jason Merrill - - * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4 - cc happy. - - * decl2.c (import_export_class): Also return if - CLASSTYPE_INTERFACE_ONLY is set. - -1999-03-03 Martin von Löwis - - * decl.c (push_overloaded_decl): Only overwrite the old binding if - there was one. - * decl2.c (do_local_using_decl): Fix loop termination. - -1999-03-02 Mark Mitchell - - * cp-tree.h (determine_specialization): Don't declare. - * pt.c (determine_specialization): Make it static. Eliminate - complain parameter. Note that decl is always non-NULL now, and - simplify accordingly. - - * decl.c (maybe_push_to_top_level): Always call - push_cp_function_context. - (pop_from_top_level): Always call pop_cp_function_context. - -1999-02-26 Nathan Sidwell - - * typeck.c (complete_type_or_else): Add VALUE arg, for helpful - diagnostics. - * cp-tree.h (complete_type_or_else): Added VALUE parameter. - * init.c (build_new_1): Extra arg to complete_type_or_else. - (build_delete): Likewise. - * typeck.c (require_complete_type): Likewise. - (pointer_int_sum): Likewise. - (pointer_diff): Likewise. - (build_component_ref): Likewise. - - * typeck2.c (incomplete_type_error): Always use cp_error. - Show declaration of undefined type, if appropriate. - Deal with UNKNOWN_TYPE nodes. - - * typeck.c (require_complete_type): Use TYPE_SIZE as - size_zero_node to mean incomplete type. - (require_complete_type_in_void): New function. - (build_compound_expr): Call complete_type_in_void for LHS. - (build_c_cast): Call complete_type_in_void for void cast. - * cvt.c (ocp_convert): Call complete_type_in_void for void cast. - * decl.c (cplus_expand_expr_stmt): Void expression checks moved to - require_complete_type_in_void. Call it. - * cp-tree.h (require_complete_type_in_void): Prototype new function. - - * typeck.c (convert_arguments): Use alternative format for - function decls. Don't require_complete_type here. Simplify - diagnostic printing. - (convert_for_initialization): Don't require_complete_type on RHS yet. - * call.c (convert_arg_to_ellipsis): Call require_complete_type. - - * call.c (build_over_call): Cope with qualified void return type. - * semantics.c (finish_call_expr): Likewise. - * typeck.c (build_function_call_real): Likewise. - (c_expand_return): Likewise. - * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type. - - * call.c (print_z_candidates): Use alternate print format, to be - consistent with (pt.c) print_candidates. - * method.c (hack_identifier): List candidate members. - * search.c (lookup_field): Build ambiguous list, and show it, if - ambiguous. - -1999-02-26 Mark Mitchell - - * typeck.c (decay_conversion): Don't confuse constant array - variables with their initializers. - - * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when - merging decls. - * pt.c (regenerate_decl_from_template): Tweak for clarity. - (instantiate_decl): Mark a decl instantiated before regenerating - it to avoid recursion. - * tree.c (mapcar): Don't call decl_constant_value unless we know - something is TREE_READONLY_DECL_P. - - * class.c (check_for_override): Don't stop checking when we find - the first overridden function. Delete #if 0'd code. - * search.c (get_matching_virtual): Likewise. - -1999-02-25 Richard Henderson - - * lang-specs.h: Define __FAST_MATH__ when appropriate. - -1999-02-24 Mike Stump - - * typeck.c (convert_for_assignment): Allow boolean integral constant - expressions to convert to null pointer. - -1999-02-24 Martin von Loewis - - * decl.c (lookup_namespace_name): Resolve namespace aliases. - - * class.c (push_nested_class): Allow namespaces. - - * decl2.c (set_decl_namespace): Add friendp parameter. - * decl.c (grokfndecl): Pass it. - (grokvardecl): Likewise. - * cp-tree.h: Change declaration. - -1999-02-24 Jason Merrill - - * pt.c (tsubst): Allow an array of explicit size zero. - -1999-02-23 Jason Merrill - - * errfn.c: Change varargs code to look like toplev.c. - - * method.c (process_modifiers): Don't prepend 'U' for char or - wchar_t. - -1999-02-20 Craig Burley - - * Make-lang.in (cplib2.ready): Don't consider updating - cplib2 stuff if the current directory isn't writable, as - it won't work (such as during a `make install'). - -Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org) - - * decl2.c (start_objects): Make file scope constructors and - destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and - ASM_OUTPUT_DESTRUCTOR are defined. - -1999-02-19 Mark Mitchell - - * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment. - (fn_type_unification): Adjust prototype. - (lookup_fnfields_1): Declare. - * call.c (add_template_candidate_real): Adjust call to - fn_type_unification. - * class.c (add_method): Don't allow duplicate declarations of - constructors or destructors. - (resolve_address_of_overloaded_function): Remove unused variable. - Adjust call to fn_type_unification. - * decl.c (grokfndecl): Be more robust in the face of illegal - specializations. - * decl2.c (check_classfn): Remove hokey handling of member - templates. - * pt.c (determine_specialization): Improve comments. Adjust to - handle template argument deduction as per the standard. - (check_explicit_specialization): Fix comment spacing. Handle - type-conversion operators correctly. Improve error-recovery. - (fn_type_unification): Remove EXTRA_FN_ARG parameter. - (get_bindings_real): Simplify handling of static members. - * search.c (lookup_fnfields_1): Make it have external linkage. - * typeck.c (compparms): Fix comment. - (build_unary_op): Don't try to figure out which template - specialization is being referred to when when the address-of - operator is used with a template function. - -Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi - - * cp-tree.h (lvalue_or_else): Qualify a char* with the `const' - keyword to match an analogous change at the top level. - - * tree.c (lvalue_or_else): Likewise. - -1999-02-17 Mark Mitchell - - * decl.c (xref_basetypes): Comment. - * pt.c (instantiate_class_template): Use xref_basetypes. - -1999-02-16 Mark Mitchell - - * cp-tree.h (tsubst): Change prototype. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (type_unification): Remove prototype. - * call.c (convert_default_arg): Adjust call to tsubst_expr. - * class.c (resolve_address_of_overloaded_function): Just use - fn_type_unification. - * decl.c (grokdeclarator): Adjust call to tsubst. - * method.c (build_template_parm_names): Likewise. - * pt.c (GTB_VIA_VIRTUAL): New macro. - (GTB_IGNORE_TYPE): Likewise. - (resolve_overloaded_unification): Add `complain' parameter. - (try_one_overload): Likewise. - (tsubst_template_arg_vector): Likewise. - (tsubst_template_parms): Likewise. - (tsubst_aggr_type): Likewise. - (tsubst_arg_types): Likewise. - (tsubst_call_declarator_parms): Likewise. - (unify): Remove explicit_mask. - (type_unification_real): Likewise. - (get_template_base_recursive): Likewise. - (coerce_template_template_parms): Provide prototype. - (tsubst_function_type): Likewise. - (try_class_unification): New function. - All callers changed to use new complain parameter. - (get_template_base): Use try_class_unification. - (unify): Adjust handling of classes derived from template types. - (fn_type_unification): Substitute explicit arguments before - unification. - -1999-02-16 Kriang Lerdsuwanakij - - * decl.c (pushdecl): Remove dead code. - -1999-02-16 Jason Merrill - - * decl2.c (finish_objects): Fix code I missed in previous change. - -1999-02-13 Jason Merrill - - * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node. - (grokdeclarator): Don't expect error_mark_node from grokfndecl. - - * pt.c (maybe_process_partial_specialization): Complain about - 'template <>' on non-specialization. - -1999-02-10 Jason Merrill - - * decl.c (grokdeclarator): Catch weird declarators. - * decl2.c (finish_file): Don't abort because of namespace parsing - failure. - (check_decl_namespace): Remove. - -1999-02-09 Mark Mitchell - - * cp-tree.h (get_template_base): Don't declare. - (dfs_walk): Declare. - (dfs_unmark): Likewise. - (markedp): Likewise. - * pt.c (unify): Remove duplicate declaration. Pass tparms and - targs to get_template_base. - (get_template_base_recursive): Move here from search.c. Check to - see that the base found can be instantiated to form the desired - type. - (get_template_base): Likewise. - (get_class_bindings): Simplify. - * search.c (get_template_base_recursive): Move to pt.c. - (get_template_base): Likewise. - (markedp): Make it global. - (dfs_walk): Likewise. - (dfs_unmark): Likewise. - -1999-02-07 Jason Merrill - - * pt.c (maybe_process_partial_specialization): Complain about - specialization in wrong namespace. - * tree.c (decl_namespace_context): New fn. - -1999-02-06 Kriang Lerdsuwanakij - - * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM. - * pt.c (coerce_template_template_parms): Handle nested - template template parameters. - -Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com) - - * typeck2.c: Update email addresses. - -1999-02-04 Kriang Lerdsuwanakij - - * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag - turned off. - -1999-02-04 Jason Merrill - - * lex.c (retrofit_lang_decl): Split out... - (build_lang_decl): From here. - * decl.c (pushdecl): Call it for functions generated by the middle - end that don't have DECL_LANG_SPECIFIC. - * cp-tree.h: Declare it. - - * decl2.c: Remove flag_init_priority. Always enable initp stuff. - (start_objects, finish_objects): Only use special - init_priority code if the user specified a priority. - (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp - objects. - -Wed Feb 3 22:50:17 1999 Marc Espie - - * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and - mkstemp.o. Get them from libiberty now. - (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o. - -Tue Feb 2 22:38:48 1999 Theodore Papadopoulo - - * decl2.c (lang_decode_option): Use read_integral_parameter. - -1999-02-01 Mark Mitchell - - * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED - before calling complete_type_or_else. - -Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi - - * input.c (inline): Don't define, its handled by system.h. - -Sun Jan 31 20:34:29 1999 Zack Weinberg - - * decl2.c: Don't define flag_no_ident here. Don't process - -f(no-)ident here. - * cp-tree.h: Don't declare flag_no_ident here. - * lang-specs.h: Map -Qn to -fno-ident. - -1999-01-28 Jason Merrill - - * cp-tree.h (struct tree_binding): Replace scope field with a union. - (BINDING_SCOPE): Adjust. - * decl.c (BINDING_LEVEL): Adjust. - -1999-01-26 Jason Merrill - - * pt.c (instantiate_class_template): Set up the DECL_INITIAL of - member constants. - - * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in - a ctor initializer. - - * tree.c (equal_functions): Fix name in prototype. - - * decl.c (push_local_binding): Add FLAGS argument. - (pushdecl, push_overloaded_decl): Pass it. - * decl2.c (do_local_using_decl): Likewise. - * cp-tree.h: Adjust prototype. - * decl.c (poplevel): Fix logic. - - * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST. - (poplevel): Handle that. Fix logic for removing TREE_LISTs. - (cat_namespace_levels): Don't loop forever. - -1999-01-25 Richard Henderson - - * typeck.c (build_reinterpret_cast): Fix typo in duplicated test. - -1999-01-25 Jason Merrill - - * class.c (resolve_address_of_overloaded_function): Mark the - chosen function used. - - * call.c (build_call): Make sure that a function coming in has - been marked used already. - * decl.c (expand_static_init): Call mark_used instead of - assemble_external. - * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec, - alloc_eh_object, expand_throw): Likewise. - * init.c (build_builtin_delete_call): Likewise. - * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1, - expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, - expand_generic_desc): Likewise. - -1999-01-25 Martin von Löwis - - * tree.c (equal_functions): New function. - (ovl_member): Call it. - -1999-01-24 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf. - -1999-01-25 Martin von Loewis - - * decl.c (decls_match): Return 1 if old and new are identical. - (push_overloaded_decl): Set OVL_USED when PUSH_USING. - -1999-01-24 Jason Merrill - - * decl.c (start_function): Make member functions one_only on windows. - * decl2.c (import_export_decl): Likewise. - - * decl.c (grokdeclarator): Don't complain about implicit int in - a system header. Change same-name field check to not complain in - a system header instead of within extern "C". - -1999-01-21 Mark Mitchell - - * cp-tree.h (PUSH_GLOBAL): New macro. - (PUSH_LOCAL): Likewise. - (PUSH_USING): Likewise. - (namespace_bindings_p): Declare. - (push_overloaded_decl): Likewise. - * decl.c (push_overloaded_decl): Don't make it static. Check for - illegal declarations after using declarations here. - (namespace_bindings_p): Likewise. - (duplicate_decls): Don't consider declarations from different - namespaces to be the same. - (pushdecl): Use symbolic PUSH_ constants in calls to - push_overloaded_decl. - (push_overloaded_decl_1): Likewise. - * decl2.c (validate_nonmember_using_decl): Tweak `std' handling. - (do_nonmember_using_decl): Check for illegal using declarations - after ordinary declarations here. - (do_local_using_decl): Call pushdecl to insert declarations. - -1999-01-21 Jason Merrill - - * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo. - -1999-01-21 Mark Mitchell - - * tree.c (build_cplus_array_type_1): Don't call build_array_type - for types involving template parameters. - - * cp-tree.h (PARM_DECL_EXPR): Delete. - (convert_default_arg): Change prototype. - (check_default_argument): Declare. - (search_tree): Likewise. - * call.c (convert_default_arg): Take the function to which the - default argument belongs as a parameter, and do any necessary - instantiation here, instead of ... - (build_over_call): Here. - * decl.c (local_variable_p): New function. - (check_default_argument): Likewise, split out and tidied from ... - (grokparms): Here. - * error.c (dump_expr): Don't set PARM_DECL_EXPR. - * pt.c (tsubst_call_declarator_parms): New function. - (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing - with CALL_EXPRs, rather than trying to be clever. - (tsubst): Use tsubst_call_declarator_parms. - * tree.c (search_tree): Don't make it static. - * typeck.c (convert_arguments): Use new interface to - convert_default_arg. - -1999-01-20 Mark Mitchell - - * error.c (dump_function_decl): Don't print the argument types for - a function when the verbosity level is negative. - - * call.c (build_over_call): Check format attributes at call-time. - - * pt.c (tsubst_copy): Fix comment. - (unify): Don't allow unification with variable-sized arrays. - - * semantics.c (finish_stmt_expr): When processing a template make - the BIND_EXPR long-lived. - -1999-01-19 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Make vtables comdat here. - (import_export_vtable): Not here. - -1999-01-18 Jason Merrill - - * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique - non-static member function. - -1999-01-18 Nathan Sidwell - - * class.c (instantiate_type): Only diagnose illegal address of member - function if complaining. - - * decl.c (lookup_name_real): Remove duplicate code. - -1999-01-18 Jason Merrill - - * tree.c (copy_template_template_parm): Use permanent_obstack. - -1999-01-18 Kriang Lerdsuwanakij - - * pt.c (unify): Remove restrictions on deduction of argument - of template template parameters. - -1999-01-18 Nathan Sidwell - - * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs. - - * class.c (resolve_address_of_overloaded_function): Show list of - all candidates, when none of them match. - -1999-01-18 Chip Salzenberg - - * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up - definition of 'casting away const' in reinterpret_cast<>. - -1999-01-18 Graham - - * cvt.c: Add include for decl.h, remove extern for - static_aggregates which is now provided by decl.h. - - * Makefile.in (cvt.o): Add dependency for decl.h and missing - dependencies for convert.h and flags.h. - -1999-01-18 Nathan Sidwell - - * decl2.c (do_dtors): Set current location to that of the - decl, for sensible diagnostics and debugging. - (check_classfn): Issue `incomplete type' error, if - class is not defined. - -1999-01-16 Jason Merrill - - * cp-tree.h: Add prototype for bound_pmf_p. - -1999-01-16 Jason Merrill - Manfred Hollstein - - * decl.c (grokdeclarator): Don't make 'main(){}' an error with only - -Wreturn-type. - -1999-01-16 Nathan Sidwell - - * cp-tree.h (struct lang_type): Added has_mutable flag. - (CLASSTYPE_HAS_MUTABLE): New macro to access it. - (TYPE_HAS_MUTABLE_P): New macro to read it. - (cp_has_mutable_p): Prototype for new function. - * class.c (finish_struct_1): Set has_mutable from members. - * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if - it contains a mutable. - * typeck.c (cp_has_mutable_p): New function. - -1999-01-15 Mark Mitchell - - * pt.c (process_template_parm): Ignore top-level qualifiers on - non-type parameters. - - * decl.c (start_function): Use current_function_parms in the call - to require_complete_type_for_parms, not the probably empty - DECL_ARGUMENTS. - -1999-01-14 Jason Merrill - - * semantics.c (finish_asm_stmt): Don't warn about redundant volatile. - - * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means - that we don't suppress the other copies. - * lex.c (handle_cp_pragma): Likewise. - -1999-01-13 Mark Mitchell - - * decl.c (grokdeclarator): Undo 1998-12-14 change. - * tree.c (build_cplus_array_type_1): Likewise. - * pt.c (instantiate_class_template): Remove misleading comment. - (tsubst_aggr_type): Substitute if there are template parameters, - regardless of whether or not they use template arguments. - (unify): Likewise, but for unification. - -1999-01-12 Richard Henderson - - * cp-tree.h (flag_permissive): Declare extern. - -1999-01-06 Mark Mitchell - - * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT - here. - (lang_type): Add is_partial_instantiation. Decrease width of - dummy. - (PARTIAL_INSTANTIATION_P): New macro. - (OPERATOR_TYPENAME_P): Remove. - * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not - OPERATOR_TYPENAME_P. - (grok_op_properties): Likewise. - * friend.c (do_friend): Handle friends that are member functions - correctly. - * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT. - * pt.c (instantiate_class_template): Rework for clarity. Avoid - leaving TYPE_BEING_DEFINED set in obscure cases. Don't do - any more partial instantiation than is absolutely necessary for - implicit typename. Set PARTIAL_INSTANTIATION_P. - (tsubst_decl): Use IDENTIFIER_TYPENAME_P. - * semantics.c (begin_class_definition): Handle partial - specializations of a type that was previously partially - instantiated. - -Wed Jan 6 03:18:53 1999 Mark Elbrecht - - * Make-lang.in (g++.o): Depend on prefix.h. - -1999-01-04 Jason Merrill - - * tree.c (bound_pmf_p): New fn. - * typeck.c (build_c_cast): Use it. - - * decl.c (grok_op_properties): Use same_type_p. - -Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi - - * Makefile.in (cvt.o): Depend on toplev.h. - - * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes. - - * cvt.c: Include toplev.h. - - * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and - definitions. - - * init.c (expand_vec_init): Initialize variable `itype'. - - * lex.c (yyerror): Cast the argument passed to a ctype function to - an unsigned char. - - * method.c (build_mangled_C9x_name): Wrap prototype and definition - in "HOST_BITS_PER_WIDE_INT >= 64". - - * typeck.c (build_binary_op): Mark parameter `convert_p' with - ATTRIBUTE_UNUSED. - -1998-12-22 Mark Mitchell - - * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation. - * tree.c (build_exception_variant): Don't crash on empty throw - specs. - -1998-12-18 DJ Delorie - - * cvt.c (convert_to_reference): Check for both error_mark_node - and NULL_NODE after call to convert_for_initialization. - -1998-12-17 Jason Merrill - - * error.c (interesting_scope_p): New fn. - (dump_simple_decl): Use it. - (dump_expr, case CONSTRUCTOR): Force a & for a PMF. - (dump_expr, case OFFSET_REF): Print ->* if appropriate. - -1998-12-16 Mark Mitchell - - * class.c (resolve_address_of_overloaded_function): Do conversion - to correct type here, rather than ... - (instantiate_type): Here. - - * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro. - (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it. - (decl_template_parm_p): Remove. - * decl.c (pushdecl): Don't set DECL_CONTEXT for a template - parameter. - * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P. - * pt.c (push_inline_template_parms_recursive): Set it. - (decl_template_parm_p): Remove. - (check_template_shadow): Use DECL_TEMPLATE_PARM_P. - (process_template_parm): Set it. - -Wed Dec 16 16:33:58 1998 Dave Brolley - - * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus - if configured with cpplib. - -1998-12-15 Mark Mitchell - - * decl.c (poplevel): Make sure ns_binding is initialized. - - * decl.c (finish_function): Undo inadvertent change in previous - patch. - -1998-12-14 Mark Mitchell - - * class.c (pushclass): Tweak handling of class-level bindings. - (resolve_address_of_overloaded_function): Update pointer-to-member - handling. - (instantiate_type): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - * decl.c (pop_binding): Take the DECL to pop, not just the name. - Deal with `struct stat' hack. - (binding_level): Add to documentation. - (push_binding): Clear BINDING_TYPE. - (add_binding): New function. - (push_local_binding): Use it. - (push_class_binding): Likewise. - (poplevel): Adjust calls to pop_binding. - (poplevel_class): Likewise. - (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden - declarations to current binding level. - (push_class_level_binding): Likewise. - (push_overloaded_decl): Adjust handling of OVERLOADs in local - bindings. - (lookup_namespace_name): Don't crash when confronted with a - TEMPLATE_DECL. - (lookup_name_real): Do `struct stat' hack in local binding - contexts. - (build_ptrmemfunc_type): Adjust documentation. - (grokdeclarator): Don't avoid building real array types when - processing templates unless really necessary. - (finish_method): Adjust calls to pop_binding. - * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves, - not reparse_decl_as_expr. - (build_expr_from_tree): Deal with a template-id as the function to - call in a METHOD_CALL_EXPR. - * pt.c (convert_nontype_argument): Tweak pointer-to-member handling. - (maybe_adjust_types_For_deduction): Don't do peculiar things with - METHOD_TYPEs here. - (resolve_overloaded_unification): Handle COMPONENT_REFs. Build - pointer-to-member types where necessary. - * tree.c (build_cplus_array_type_1): Don't avoid building real - array types when processing templates unless really necessary. - (build_exception_variant): Compare the exception lists correctly. - -1998-12-13 Mark Mitchell - - * cp-tree.def (CPLUS_BINDING): Update documentation. - * cp-tree.h (LOCAL_BINDING_P): New macro. - (lang_identifier): Rename local_value to bindings. - (tree_binding): Make `scope' of type `void*', not `tree'. - (BINDING_SCOPE): Update documentation. - (IDENTIFIER_LOCAL_VALUE): Remove. - (IDENTIFIER_CLASS_VALUE): Document. - (IDENTIFIER_BINDING): New macro. - (IDENTIFIER_VALUE): Likewise. - (TIME_IDENTIFIER_TIME): Likewise. - (TIME_IDENTIFIER_FILEINFO): Likewise. - (IMPLICIT_TYPENAME_P): Likewise. - (set_identifier_local_value): Remove. - (push_local_binding): New function. - (push_class_binding): Likewise. - * class.c (pushclass): Update comments; use push_class_binding. - * decl.c (set_identifier_local_value_with_scope): Remove. - (set_identifier_local_value): Likewise. - (push_binding): New function. - (pop_binding): Likewise. - (binding_level): Update documentation. Remove shadowed. - (BINDING_LEVEL): New macro. - (free_binding_nodes): New variable. - (poplevel): Adjust for new name-lookup scheme. Don't mess up - BLOCK_VARs when doing for-scope extension. Remove effectively - dead code. - (pushlevel_class): Tweak formatting. - (poplevel_class): Adjust for new name-lookup scheme. - (print_binding_level): Likewise. - (store_bindings): Likewise. - (pushdecl): Likewise. - (pushdecl_class_level): Likewise. - (push_class_level_binding): Likewise. - (push_overloaded_decl): Update comments. Adjust for new - name-lookup scheme. - (lookup_name_real): Likewise. - (lookup_name_current_level): Likewise. - (cp_finish_decl): Likewise. - (require_complete_types_for_parms): Likewise. Remove misleading - #if 0'd code. - (grok_parms): Likewise. Don't call - require_complete_types_for_parms here. - (grok_ctor_properties): Don't treat templates as copy - constructors. - (grop_op_properties): Or as assignment operators. - (start_function): Document. Adjust for new name-lookup scheme. - (finish_function): Likewise. - * decl2.c (do_local_using_decl): Use push_local_binding. - * lex.c (begin_definition_of_inclass_inline): New function, split - out from ... - (do_pending_inlines): Here, and ... - (process_next_inline): Here. - (get_time_identifier): Use TIME_IDENTIFIER_* macros. - (init_filename_times): Likewise. - (extract_interface_info): Likewise. - (ste_typedecl_interface_info): Likewise. - (check_newline): Likewise. - (dump_time_statistics): Likewise. - (handle_cp_pragma): Likewise. - (do_identifier): Adjust for new name-lookup scheme. - * parse.y (function_try_block): Return ctor_initializer_opt value. - (fndef): Use it. - (fn.defpen): Pass appropriate values to start_function. - (pending_inline): Use functor_try_block value, and pass - appropriate values to finish_function. - * pt.c (is_member_template): Update documentation; remove handling - of FUNCTION_DECLs. As per name, this function should deal only in - TEMPLATE_DECLs. - (decl_template_parm_p): Change name of olddecl parameter to decl. - (check_template_shadow): Adjust for new name-lookup scheme. - (lookup_template_class): Likewise. - (tsubst_decl): Tweak so as not to confuse member templates with - copy constructors and assignment operators. - (unify): Handle UNION_TYPEs. - * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme. - (lang_print_xnode): Adjust for new name-lookup scheme. - * typeck.c (mark_addressable): Likewise. - (c_expand_return): Likewise. - -1998-12-08 Jason Merrill - - * decl.c (grokdeclarator): Allow field with same name as class - in extern "C". - - * decl.c (lookup_name_real): Don't limit field lookup to types. - * class.c (check_member_decl_is_same_in_complete_scope): No error - if icv and x are the same. - * lex.c (do_identifier): Tweak error message. - -1998-12-10 Mark Mitchell - - * decl.c (start_enum): Use push_obstacks, not - end_temporary_allocation. - (finish_enum): Call pop_obstacks. - -1998-12-10 Mark Mitchell - - * class.c (instantiate_type): Return error_mark_node rather than - junk. - -1998-12-09 Mark Mitchell - - * cp-tree.h (most_specialized_instantiation): New function. - (print_candidates): Likewise. - * class.c (validate_lhs): Remove. - (resolve_address_of_overloaded_function): New function, split out - and then substantially reworked, from ... - (instantiate_type): Use it. Simplify. - * cvt.c (convert_to_reference): Complain when caller has indicated - that's the right thing to do. Don't crash if instantiate_type - fails. - * pt.c: Substitute `parameters' for `paramters' throughout. - (print_candidates): Don't make it static. - (most_specialized_instantiation): Split out from ... - (most_specialized): Here. - -Wed Dec 9 15:33:01 1998 Dave Brolley - - * lex.c (lang_init_options): Initialize cpplib. - * decl2.c (parse_options,cpp_initialized): Removed. - (lang_decode_option): Move initialization of cpplib to - lang_init_options. - -1998-12-09 Mark Mitchell - - * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as - well as the TYPE_DECL, when a typedef name is assigned to a - previously anonymous type. - -1998-12-08 Andrew MacLeod - - * cp/except.c (call_eh_info): Use __start_cp_handler instead of - __cp_eh_info for getting the eh info pointer. Add table_index to - field list. - (push_eh_cleanup): Don't increment 'handlers' data field. - (process_start_catch_block): Don't set the 'caught' field. - - * cp/exception.cc (CP_EH_INFO): New macro for getting the - exception info pointer within library routines. - (__cp_eh_info): Use CP_EH_INFO. - (__start_cp_handler): Get exception info pointer, set caught field, - and increment the handlers field. Avoids this being done by handlers. - (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro. - (uncaught_exception): Use CP_EH_INFO macro. - -Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h - -Mon Dec 7 17:56:06 1998 Mike Stump - - * lex.c (check_newline): Add support for \ as `natural' - characters in file names in #line to be consistent with #include - handling. We support escape processing in the # 1 "..." version of - the command. See also support in cp/lex.c. - -1998-12-07 Zack Weinberg - - * cp/decl2.c: s/data/opts/ when initializing cpp_reader - structure. - -1998-12-07 Jason Merrill - - * decl.c (build_typename_type): Set DECL_ARTIFICIAL. - - * error.c (dump_simple_decl): Also print namespace context. - (dump_function_decl): Likewise. - - * decl2.c (ambiguous_decl): Don't print old value if it's - error_mark_node. - - * decl.c (lookup_name_real): Fix handling of local types shadowed - by a non-type decl. Remove obsolete code. - * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro. - - * lang-options.h: Add -fpermissive. - * decl2.c: Likewise. - * cp-tree.h: Add flag_permissive. - * decl.c (init_decl_processing): If neither -fpermissive or -pedantic - were specified, set flag_pedantic_errors. - * call.c (build_over_call): Turn dropped qualifier messages - back into pedwarns. - * cvt.c (convert_to_reference): Likewise. - * typeck.c (convert_for_assignment): Likewise. - -1998-12-05 Jason Merrill - - * decl2.c (coerce_new_type): Use same_type_p. - (coerce_delete_type): Likewise. - - * call.c (check_dtor_name): Return 1, not error_mark_node. - -1998-12-04 Jason Merrill - - * lex.c (handle_cp_pragma): Disable #pragma interface/implementation - if MULTIPLE_SYMBOL_SPACES. - - * pt.c (check_template_shadow): New fn. - * decl2.c (grokfield): Use it. - * decl.c (pushdecl): Likewise. - (pushdecl_class_level): Likewise. - (start_method): Likewise. - (xref_tag): Don't try to use 't' if we're defining. - - * call.c (check_dtor_name): Just return an error_mark_node. - * pt.c (lookup_template_class): Complain about using non-template here. - * parse.y (apparent_template_type): Not here. - - * pt.c (check_explicit_specialization): Complain about specialization - with C linkage. - - * lang-options.h: Add -f{no-,}implicit-inline-templates. - - * pt.c (convert_nontype_argument): Don't assume that any integer - argument is intended to be a constant-expression. - -1998-12-03 Mark Mitchell - - * class.c (handle_using_decl): Fix comment. Don't lookup - constructors in base classes. - (validate_lhs): Fix typo in comment. - * search.c (lookup_field_1): Don't return a USING_DECL. - - * cp-tree.h (DECL_ACCESS): Improve documentation. - - * decl.c (expand_static_init): Don't set the initialization-done - flag until the initialization is done. - -1998-12-02 Mark Mitchell - - * decl2.c (validate_nonmember_using_decl): Complain about using - declarations for class members. - -1998-11-29 Jason Merrill - - * typeck2.c (process_init_constructor): Use same_type_p. - - * decl.c (check_tag_decl): Don't warn about null decl inside a - class. - - * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than - UNIFY_ALLOW_NONE. - (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE. - (resolve_overloaded_unification): Strip baselinks. - -Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi - - * g++spec.c: Don't prototype xmalloc. - -1998-11-25 Jason Merrill - - * except.c (expand_throw): Use TYPE_PTR_P to check for pointers. - - * decl.c (check_tag_decl): Do complain about null friend decl at - file scope. - -1998-11-25 Andreas Schwab - - * lex.c (make_lang_type): Clear the whole struct lang_type, not - only the first multiple of sizeof (int). - -1998-11-24 Jason Merrill - - * decl.c (start_decl): An explicit specialization of a static data - member is only a definition if it has an initializer. - - * except.c (expand_throw): Use cp_finish_decl for the throw temp. - * cvt.c (build_up_reference): Pass DIRECT_BIND down into - cp_finish_decl. - * init.c (expand_default_init): Check for DIRECT_BIND instead of - DECL_ARTIFICIAL. - - * call.c (build_over_call): Use build_decl. - - * except.c (expand_throw): Just use convert, not - build_reinterpret_cast. - - * lex.c (handle_generic_pragma): Use token_buffer. - - * decl.c (check_tag_decl): Don't complain about null friend decl. - -1998-11-24 Dave Pitts - - * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the - first position. - * lex.c (check_newline): Use ISALPHA. - (readescape): Use ISGRAPH. - (yyerror): Use ISGRAPH. - -1998-11-24 Nathan Sidwell - - * search.c (get_abstract_virtuals): Do not use initial - CLASSTYPE_ABSTRACT_VIRTUALS. - * typeck2.c (abstract_virtuals_error): Show location of abstract - declaration. - * call.c (build_new_method_call): Use - CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate. - * class.c (finish_struct_bits): Don't bother working out whether - get_abstract_virtuals will do anything, just do it. - -1998-11-24 Graham - - * typeck.c (build_component_ref): Remove unused statement. - -1998-11-24 Jason Merrill - - * class.c (add_method): Catch invalid overloads. - - * class.c (add_method): Build up OVERLOADs properly for conversion ops. - * search.c (lookup_conversions): Handle getting real OVERLOADs. - (add_conversions): Likewise. Revert last change. - * call.c (add_conv_candidate): Pass totype to add_candidate instead - of fn. Don't add a new candidate if the last one was for the same - type. - (print_z_candidates): Handle getting a type as a function. - (joust): If we got two conversion candidates to the same type, - just pick one. - (build_object_call): Lose 'templates'. - (build_user_type_conversion_1): Handle getting real OVERLOADs. - -1998-11-23 Jason Merrill - - * typeck2.c (process_init_constructor): If there are elements - that don't have initializers and they need to have constructors - run, supply them with initializers. - - * class.c (finish_struct_1): A class with a 0-width bitfield is - still empty. - -1998-11-23 Mark Mitchell - - * pt.c (instantiate_class_template): Don't try to figure out what - specialization to use for a partial instantiation. Correct - typos in a couple of comments. Avoid calling uses_template_parms - multiple times. - -1998-11-23 Benjamin Kosnik - - * method.c (process_overload_item): Add call to - build_mangled_C9x_name for intTI_type_nodes. - (build_mangled_C9x_name): Add prototype, define. - * decl.c (init_decl_processing): Add names for - TImode_type_node. - -1998-11-23 Jason Merrill - - * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS. - - * class.c (finish_struct_1): Set things up for 0-width bitfields - like we do for others. - - * decl.c (check_tag_decl): New fn. - (shadow_tag): Split out from here. - * decl2.c (grok_x_components): Call it. - -1998-11-22 Jason Merrill - - * decl.c: Lose warn_about_return_type. - (grokdeclarator): Always complain about implicit int, except for - `main () { ... }'. - - * decl.c (tag_name): New fn. - (xref_tag): Complain about using typedef-name after class-key. - - * init.c (expand_vec_init): Also keep going if from_array. - - * tree.c (is_overloaded_fn): Also handle the output of - build_offset_ref. - - * decl.c (grokdeclarator): Use constructor_name when comparing - field name against enclosing class. - * class.c (finish_struct_anon): Likewise. - -1998-11-22 Mark Mitchell - - * decl.c (poplevel): Remove code to handle KEEP == 2. - (finish_function): Don't confuse BLOCK-order when - processing a destructor. - -1998-11-21 Jason Merrill - - * decl.c (require_complete_types_for_parms): Call layout_decl - after we've completed the type. - -1998-11-21 Martin von Löwis - - * decl2.c (validate_nonmember_using_decl): Allow using templates - from the global namespace. - -1998-11-21 Jason Merrill - - Handle specifying template args to member function templates. - * tree.c (build_overload): Always create an OVERLOAD for a template. - * search.c (add_conversions): Handle finding an OVERLOAD. - * decl2.c (check_classfn): Likewise. - * lex.c (identifier_type): See through a baselink. - * parse.y (do_id): Don't call do_identifier if we got a baselink. - * class.c (instantiate_type, case TREE_LIST): Recurse. - - * decl.c (grokdeclarator): Allow a boolean constant for array - bounds, odd as that sounds. - - * pt.c (unify): Be more strict about non-type parms, except for - array bounds. - (UNIFY_ALLOW_INTEGER): New macro. - -1998-11-19 Manfred Hollstein - - * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir). - -1998-11-19 Jason Merrill - - * semantics.c (begin_class_definition): Call - maybe_process_partial_specialization before push_template_decl. - Don't call push_template_decl for a specialization. - * search.c (lookup_field): Do return a member template class. - * decl2.c (handle_class_head): Handle member template classes. - - * decl.c (grokdeclarator): A parm type need not be complete. - - * pt.c (convert_nontype_argument): Fix thinko. - -1998-11-18 Mark Mitchell - - * cp-tree.h (PTRMEM_CST_CLASS): Fix typo. - (global_delete_fndecl): New variable. - * decl.c (global_delete_fndecl): Define it. - (init_decl_processing): Set it. - * init.c (build_builtin_delete_call): Use it. - * tree.c (mapcar): Recursively call mapcar for the type of EXPR - nodes. - -1998-11-18 Jason Merrill - - * decl.c (cplus_expand_expr_stmt): Always complain about unresolved - type. - - * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue. - * call.c (build_object_call): Also support references to functions. - * typeck.c (convert_for_initialization): Don't decay a function - if the target is a reference to function. - - * search.c (add_conversions): Get all the overloads from a class. - - * decl.c (grok_ctor_properties): Complain about any constructor - that will take a single arg of the class type by value. - - * typeck2.c (build_functional_cast): Can't create objects of - abstract classes this way. - * cvt.c (ocp_convert): Likewise. - - * decl.c (grokfndecl): Member functions of local classes are not - public. - -1998-11-18 Mark Mitchell - - * Make-lang.in (cc1plus): Add dependency on hash.o. - -1998-11-18 Jason Merrill - - * search.c (get_abstract_virtuals): Complain about virtuals with - no final overrider. - * typeck2.c (abstract_virtuals_error): Remove handling for virtuals - with no final overrider. - * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P - on virtuals with no final overrider. - - * lex.c (reinit_parse_for_block): Add a space after the initial ':'. - - * class.c (finish_struct_1): Don't remove zero-width bit-fields until - after layout_type. - - * friend.c (do_friend): Don't set_mangled_name_for_decl. - - * class.c (finish_struct_anon): Complain about non-fields. - * decl2.c (build_anon_union_vars): Likewise. - - * decl.c (grokdeclarator): Normal data members can't have the same - name as the class, either. - * class.c (finish_struct_anon): Neither can members of an - anonymous union. - -1998-11-17 Mark Mitchell - - * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses. - (TYPE_BINFO): Likewise. - (IS_AGGR_TYPE): Tweak. - (SET_IS_AGGR_TYPE): New macro. - (CLASS_TYPE_P): Tweak. - (lang_type): Group mark bitfields together. Remove linenum. - (CLASSTYPE_SOURCE_LINE): Remove macro. - (CLASSTYPE_MARKED_N): New macro. - (SET_CLASSTYPE_MARKED_N): Likewise. - (CLEAR_CLASSTYPE_MARKED_N): Likewise. - (CLASS_TYPE_MARKED_*): Use them. - (SET_CLASSTYPE_MARKED_*): Likewise. - (CLEAR_CLASSTYPE_MARKED_*): Likewise. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. - (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well. - (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE. - * class.c (class_cache_obstack): New variable. - (class_cache_firstobj): Likewise. - (finish_struct): Don't set CLASSTYPE_SOURCE_LINE. - (pushclass): Free the cache, when appropriate. - (popclass): Tidy. - (maybe_push_cache_obstack): Use class_cache_obstack. - * decl.c (include hash.h). - (typename_hash): New function. - (typename_compare): Likewise. - (build_typename_type): Check the hash table to avoid creating - duplicates. - (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE. - (grokdeclarator): Use CLASS_TYPE_P. - (xref_basetypes): Likewise. - (start_function): Likewise. Don't put current_class_ref on the - permanent obstack. - * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO - and TYPE_TI_ARGS. - * lex.c (note_got_semicolon): Use CLASS_TYPE_P. - (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated - fields for types other than class types. Do clear TYPE_ALIAS_SET - for types other than class types, though. - * method.c (build_overload_identifier): Use CLASS_TYPE_P and - TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - * pt.c (process_template_parm): Don't set - CLASSTYPE_GOT_SEMICOLON. - (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - Coerce arguments on the momentary obstack. - (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - (instantiate_class_template): Calculate template arguments on the - momentary obstack. Tidy. - (tsubst_template_arg_vector): Use make_temp_vec. - (tsubst_aggr_type): Put template arguments on the momentary - obstack. - (tsubst_decl): Likewise. - (tsubst): Copy the array bounds index to the permanent obstack - before building index types. Use new macros. - (unify): Use new macros. - (do_type_instantiation): Likewise. - * search.c (lookup_fnfields_1): Use new macros. - (dfs_pushdecls): Build envelopes on the cache obstack. - (dfs_compress_decls): Use new macros. - (push_class_decls): Build on the cache obstack. - * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON. - * sign.c (build_signature_pointer_or_reference_type): Use - SET_IS_AGGR_TYPE. - * tree.c (make_binfo): Check CLASS_TYPE_P. - (copy_template_template_parm): Adjust. - (make_temp_vec): Use push_expression_obstack. - * typeck.c (complete_type): Use new macros. - (comptypes): Likewise. - -1998-11-17 Jason Merrill - - * pt.c (tsubst): Add diagnostics for invalid array, reference - and pointer to member types. - -1998-11-16 Jason Merrill - - * typeck2.c (my_friendly_abort): Don't fatal twice in a row. - - * typeck.c (c_expand_start_case): Use build_expr_type_conversion. - Simplify. - - * parse.y (structsp): Fix cut-and-paste error. - - * init.c (build_new): Complain about non-integral size. - - * parse.y (unary_expr): Complain about defining types in sizeof. - - * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn. - - * rtti.c (build_x_typeid): Complain about typeid without - including . - (get_typeid): Likewise. Complain about typeid of incomplete type. - (get_tinfo_fn_dynamic): Likewise. - (get_typeid_1): Not static anymore. - * except.c (build_eh_type_type): Use get_typeid_1. - - * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to - ambiguous or private bases. Fix warning for reference cast. - -1998-11-16 Mark Mitchell - - * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro. - * decl.c (duplicate_decls): Remove special-case code to deal with - template friends, and just do the obvious thing. - * pt.c (register_specialization): Tweak for clarity, and also to - clear DECL_INITIAL for an instantiation before it is merged with a - specialization. - (check_explicit_specialization): Fix indentation. - (tsubst_friend_function): Handle both definitions in friend - declaration and outside friend declarations. - (tsubst_decl): Don't clear DECL_INITIAL for an instantiation. - (regenerate_decl_from_template): Tweak accordingly. - (instantiate_decl): Likewise. - -1998-11-16 Jason Merrill - - * decl.c (cplus_expand_expr_stmt): Promote warning about naked - member function reference to error. - * cvt.c (ocp_convert): Complain about converting an overloaded - function to void. - - * init.c (build_offset_ref): Just return a lone static member - function. - - * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs, - not internal ones. - - * typeck.c (build_binary_op_nodefault): Improve error handling. - - * decl.c (grokfndecl): Complain about making 'main' a template. - - * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*. - - * call.c (build_method_call): Handle a BIT_NOT_EXPR around a - TYPE_DECL in a template. - -1998-11-15 Jason Merrill - - * typeck2.c (my_friendly_abort): Add URL in the other case, too. - - * decl.c (struct cp_function): Add named_label_uses. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - (define_label): Also complain about jumping into the scope of - non-POD objects that don't have constructors. - * tree.c (pod_type_p): New fn. - - * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner. - * rtti.c (synthesize_tinfo_fn): Call import_export_decl here. - (get_tinfo_fn): Not here. - * repo.c (repo_get_id): Abort if we get called for an incomplete - type. - -1998-11-13 Mark Mitchell - - * except.c (expand_throw): Make sure first argument to - __cp_push_exception is of type `void*' to avoid spurious error - messages. - -1998-11-11 Jason Merrill - - * pt.c (try_one_overload): Take orig_targs again. Only check for - mismatches against them; we don't care what a previous call found. - (resolve_overloaded_unification): Adjust. - - * search.c (lookup_field): Don't return anything for a non-type - field from a dependent type. - * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class - in an array declarator. - (start_decl): Push into the class before looking for the field. - -1998-11-08 Mark Mitchell - - * method.c (build_overload_value): Handle REFERENCE_TYPE. - -1998-11-08 Martin von Löwis - - * decl.c (grokdeclarator): Allow namespace-scoped members if they - are friends. - -1998-11-08 Jason Merrill - - * pt.c (tsubst_decl): Don't mess with the global value of an - un-mangled DECL_ASSEMBLER_NAME. - -1998-11-03 Christopher Faylor - - * decl.c (init_decl_processing): Remove CYGWIN conditional - since CYGWIN is now able to deal with trapping signals. - -Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi - - * cp-tree.h: Don't include gansidecl.h. - * exception.cc: Include gansidecl.h (since we don't include config.h) - * g++spec.c: Don't include gansidecl.h. - -1998-11-06 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease - size of dummy. - (DECL_DEFINED_IN_CLASS_P): New macro. - (TEMPLATE_PARMS_FOR_INLINE): Document. - (check_static_variable_definition): New function. - * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if - appropriate. - (check_static_variable_definition): Split out from ... - (grokdeclarator): Here. - * pt.c (check_default_tmpl_args): New function, split out from ... - (push_template_decl_real): Here. - (instantiate_template): Fix comment. - -1998-11-04 Mark Mitchell - - * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued. - (CP_TYPE_VOLATILE_P): Likewise. - (CP_TYPE_RESTRICT_P): Likewise. - -1998-11-03 Mark Mitchell - - * pt.c (tsubst): Use build_index_type, not build_index_2_type. - -1998-11-02 Jason Merrill - - * class.c (instantiate_type): Be more helpful. - - * decl2.c (import_export_decl): Call import_export_class. - - * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR. - * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR. - * pt.c (tsubst_copy): Likewise. - -1998-11-02 Mark Mitchell - - * init.c (expand_vec_init): Fix off-by-one error. - -1998-11-02 Alexandre Oliva - - * parse.y (apparent_template_type): New type. - (named_complex_class_head_sans_basetype): Use it. - * Makefile.in (CONFLICTS): One new conflict. - * parse.c: Regenerated. - -1998-11-01 Mark Mitchell - - * cp-tree.h (COMPARE_STRICT): New macro. - (COMPARE_BASE): Likewise. - (COMPARE_RELAXED): Likewise. - (COMPARE_REDECLARATION): Likewise. - (same_type_p): Likewise. - (same_or_base_type_p): Likewise. - * call.c (standard_conversion): Use them, in place of comptypes - with numeric arguments. - (reference_binding): Likewise. - (convert_like): Likewise. - (build_over_call): Likewise. - (is_subseq): Likewise. - (is_properly_derived_from): Likewise. - (compare_ics): Likewise. - (joust): Likewise. - * class.c (delete_duplicate_fields_1): Likewise. - (resolves_to_fixed_type_p): Likewise. - (instantiate_type): Likewise. Remove #if 0'd code. - * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here. - (pushdecl): Likewise. - (lookup_name_real): Likewise. - (grokdeclarator): Likewise. Check for illegal array declarations. - (grokparms): Likewise. - (grok_op_properties): Likewise. - * decl2.c (check_classfn): Likewise. - * friend.c (is_friend): Likewise. - (make_friend_class): Likewise. - * init.c (expand_aggr_init): Likewise. - (expand_vec_init): Likewise. - * pt.c (is_member_template_class): Remove declaration. - (is_specialization_of): Use COMPARE_* and new macros. - (comp_template_parms): Likewise. - (convert_nontype_argument): Likewise. - (coerce_template_template_parms): Likewise. - (template_args_equal): Likewise. - (lookup_template_class): Likewise. - (type_unification_real): Likewise. - (unify): Likewise. - (get_bindings_real): Likewise. - * search.c (covariant_return_p): Likewise. - (get_matching_virtual): Likewise. - * sig.c (match_method_types): Likewise. - * tree.c (vec_binfo_member): Likewise. - (cp_tree_equal): Likewise. - * typeck.c (common_type): Likewise. - (comp_array_types): Likewise. Get issues involving unknown array - bounds right. - (comptypes): Update comments. Use new flags. - (comp_target_types): Use new macros. - (compparms): Likewise. - (comp_target_parms): Likewise. - (string_conv_p): Likewise. - (build_component_ref): Likewise. - (build_indirect_ref): Likewise. - (build_conditional_expr): Likewise. - (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (build_modify_expr): Likewise. - (convert_for_assignment): Likewise. - (comp_ptr_ttypes_real): Likewise. - (ptr_reasonably_similar): Likewise. - (comp_ptr_ttypes_const): Likewise. - -1998-10-31 Jason Merrill - - * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error. - -1998-10-30 Mark Mitchell - - * decl2.c (delete_sanity): Pass integer_zero_node, not - integer_two_node, to build_vec_delete. - * init.c (build_array_eh_cleanup): Remove. - (expand_vec_init_try_block): New function. - (expand_vec_init_catch_clause): Likewise. - (build_vec_delete_1): Don't deal with case that auto_delete_vec - might be integer_two_node anymore. - (expand_vec_init): Rework for initialization-correctness and - exception-correctness. - * typeck2.c (process_init_constructor): Make mutual exclusivity - of cases more obvious. - -1998-10-29 Jason Merrill - - * decl.c (lookup_name_real): OK, only warn if not lexing. - Simplify suggested fix. - - * cp-tree.h (IDENTIFIER_MARKED): New macro. - * search.c (lookup_conversions): Use breadth_first_search. - (add_conversions): Avoid adding two conversions to the same type. - (breadth_first_search): Work with base binfos, rather - than binfos and base indices. - (get_virtual_destructor): Adjust. - (tree_has_any_destructor_p): Adjust. - (get_matching_virtual): Adjust. - - * pt.c (push_template_decl_real): Generalize check for incorrect - number of template parms. - (is_member_template_class): #if 0. - -1998-10-29 Richard Henderson - - * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@, - last. - -1998-10-28 Zack Weinberg - - * lex.c: Call check_newline from lang_init always. After - calling cpp_start_read, set yy_cur and yy_lim to read from the - cpplib token buffer. - -1998-10-28 Jason Merrill - - * class.c (instantiate_type): Don't consider templates for a normal - match. - - * class.c (finish_struct_1): Don't complain about non-copy - assignment ops in union members. - - * class.c (build_vtable): Don't pass at_eof to import_export_vtable. - (prepare_fresh_vtable): Likewise. - (finish_struct_1): Don't call import_export_class. - * decl2.c (finish_vtable_vardecl): Do import/export stuff. - (finish_prevtable_vardecl): Lose. - (finish_file): Don't call it. - * pt.c (instantiate_class_template): Likewise. - * cp-tree.h: Remove it. - - * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here. - * decl.c (finish_function): Not here. - (start_function): Do set DECL_INITIAL. - - * pt.c (push_template_decl_real): Complain about default template - args for enclosing classes. - - * call.c (add_function_candidate): Treat conversion functions - as coming from the argument's class. - * cp-tree.h (DECL_CONV_FN_P): New fn. - (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE. - * class.c (add_method): Use DECL_CONV_FN_P. - * decl2.c (check_classfn): Likewise. - * error.c (dump_function_name): Likewise. - (dump_function_decl): Likewise. - * pt.c (fn_type_unification): Likewise. - * search.c (add_conversions): Likewise. - -1998-10-27 Jason Merrill - - * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL. - * method.c (hack_identifier): Also check for using RESULT_DECL - from outer context. - -1998-10-27 Mark Mitchell - - * decl.c (grokdeclarator): Use type_quals, rather than constp, - consistently. - -1998-10-27 Jason Merrill - - * call.c (standard_conversion): instantiate_type here. - (reference_binding): And here. - (implicit_conversion): Not here. - (build_op_delete_call): No need to cons up an OVERLOAD. - * cvt.c (cp_convert_to_pointer): instantiate_type here. - (convert_to_reference): And here. - * decl.c (grok_reference_init): Not here. - (grokparms): Or here. - * typeck2.c (digest_init): Or here. - * typeck.c (decay_conversion): Take the address of overloaded - functions, too. - (require_instantiated_type): Lose. - (convert_arguments): Don't handle unknown types here. - (build_c_cast): Likewise. - (build_binary_op): Gut. - (build_conditional_expr): Don't require_instantiated_type. - (build_modify_expr): Likewise. - (build_static_cast): Don't instantiate_type. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (convert_for_initialization): Likewise. - (build_ptrmemfunc): Use type_unknown_p. - (convert_for_assignment): Also do default_conversion on overloaded - functions. Hand them off to ocp_convert. - -1998-10-26 Mark Mitchell - - * error.c (dump_decl): Deal with TEMPLATE_DECLs that are - VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type. - - * class.c (finish_struct_1): Use build_cplus_array_type to build - array types. - * decl.c (init_decl_processing): Likewise. - * except.c (expand_end_eh_spec): Likewise. - * search.c (expand_upcast_fixups): Simplify very slightly. - -1998-10-26 Jason Merrill - - * decl.c (grokdeclarator): Complain about a variable using - constructor syntax coming back null from start_decl. - - * friend.c (make_friend_class): Complain about trying to make - a non-class type a friend. - - * decl.c (grokfndecl): Set DECL_INITIAL for a defn here. - (start_function): Not here. - -1998-10-26 Brendan Kehoe - - * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration. - -1998-10-26 Jason Merrill - - * typeck2.c (process_init_constructor): Only skip anonymous fields - if they are bitfields. - - * cp-tree.def (TYPEOF_TYPE): New code. - * error.c (dump_type_real): Handle it. - * pt.c (tsubst): Likewise. - * tree.c (search_tree): Likewise. - * semantics.c (finish_typeof): New fn. - * parse.y (typespec): Use it. - * cp-tree.h: Declare it. - -1998-10-26 Manfred Hollstein - - * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional. - -1998-10-26 Jason Merrill - - * typeck.c (convert_arguments): Don't handle pmf references - specially. - - * init.c (build_member_call): Don't try to convert to the base type - if it's ambiguous or pedantic. - - * typeck2.c (check_for_new_type): Only depend on pedantic for - C-style casts. - -1998-10-25 Mark Mitchell - - * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all - non-converting constructors. - -1998-10-24 Martin von Löwis - - * gxxint.texi: Correct documentation for n, N, Q, and B. - -1998-10-23 Martin von Löwis - - * parse.y (condition): Convert VAR_DECL from reference to indirect - reference. - -1998-10-23 Andrew MacLeod - - * exception.cc (__cp_pop_exception): Free the original exception - value, not the potentially coerced one. - -1998-10-23 Mark Mitchell - - * Makefile.in (hash.h): Run gperf when necessary. - - * cp-tree.h (CP_TYPE_READONLY): Remove. - (CP_TYPE_VOLATILE): Likewise. - (CP_TYPE_QUALS): New macro. - (CP_TYPE_CONST_P): Likewise. - (CP_TYPE_VOLATILE_P): Likewise. - (CP_TYPE_RESTRICT_P): Likewise. - (CP_TYPE_CONST_NON_VOLATILE_P): Likewise. - (cp_build_type_variant): Rename to ... - (cp_build_qualified_type): New function. - (c_apply_type_quals_to_decl): Declare. - (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'. - (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise. - (cp_type_qual_from_rid): New function. - (compparms): Remove unused parameter. All callers changed. - (cp_type_quals): New function. - (at_least_as_qualified_p): Likewise. - (more_qualified_p): Likewise. - - * call.c (standard_conversion): Replace calls to - cp_build_type_variant with cp_build_qualified_type. Use - CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to - compare them. Use CP_TYPE_* macros to check qualifiers. - (reference_binding): Likewise. - (implicit_conversion): Likewise. - (add_builtin_candidates): Likewise. - (build_over_call): Likewise. - * class.c (overrides): Compare all qualifiers, not just `const', - on method declarations. - * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc. - (convert_pointer_to_real): Likewise. - (type_promotes_to): Likewise. - * decl.c (check_for_uninitialized_const_var): New function. - (init_decl_processing): More CP_TYPE_QUALS conversion, etc. - (cp_finish_decl): Use check_for_uninitialized_const_var. - (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to - handle `restrict'. - (grok_ctor_properties): Likewise. - (grok_op_properties): Likewise. - (start_function): Likewise. - (rever_static_member_fn): Likewise. - * decl2.c (grok_method_quals): Likewise. - (grokfield): Likewise. - * error.c (dump_readonly_or_volatile): Rename to ... - (dump_qualifiers): New function. Handle `restrict'. - (dump_type_real): Use it. - (dump_aggr_type): Likewise. - (dump_type_prefix): Likewise. - (dump_type_suffix): Likewise. - (dump_function_decl): Likewise. - (cv_as_string): Likewise. - * gxx.gperf: Add __restrict and __restrict__. - * gxxint.texi: Document `u' as used for `__restrict', and a few - other previously undocumented codes. - * hash.h: Regenerated. - * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc. - (build_member_call): Likewise. - (build_new_1): Likewise. - * lex.c (init_parse): Add entry for RID_RESTRICT. - (cons_up_default_function): More CP_TYPE_QUALS conversion, etc. - (cp_type_qual_from_rid): Define. - * lex.h (enum rid): Add RID_RESTRICT. - * method.c (process_modifiers): Deal with `restrict'. - * parse.y (primary): More CP_TYPE_QUALS conversion, etc. - * parse.c: Regenerated. - * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc. - (tsubst_aggr_type): Likewise. - (tsubst): Likewise. - (check_cv_quals_for_unify): Likewise. - (unify): Likewise. - * rtti.c (init_rtti_processing): Likewise. - (build_headof): Likewise. - (get_tinfo_var): Likewise. - (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling. - (expand_class_desc): Likewise. - (expand_attr_desc): Likewise. - (synthesize_tinfo_fn): Likewise. - * search.c (covariant_return_p): Likewise. Fix `volatile' handling. - (get_matching_virtual): Likewise. - (expand_upcast_fixups): Likewise. - * sig.c (build_signature_pointer_or_reference_name): Take - type_quals, not constp and volatilep. - (build_signature_pointer_or_reference_type): Likewise. - (match_method_types): More CP_TYPE_QUALS conversion, etc. - (build_signature_pointer_constructor): Likewise. - (build_signature_method_call): Likewise. - * tree.c (build_cplus_array_type): Likewise. - (cp_build_type_variant): Rename to ... - (cp_build_qualified_type): New function. Deal with `__restrict'. - (canonical_type_variant): More CP_TYPE_QUALS conversion, etc. - (build_exception_variant): Likewise. - (mapcar): Likewise. - * typeck.c (qualif_type): Likewise. - (common_type): Likewise. - (comptypes): Likewise. - (comp_cv_target_types): Likewise. - (at_least_as_qualified_p): Define. - (more_qualified_p): Likewise. - (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc. - (compparms): Likewise. - (inline_conversion): Likewise. - (string_conv_p): Likewise. - (build_component_ref): Likewise. - (build_indirect_ref): Likewise. - (build_array_ref): Likewise. - (build_unary_op): Likewise. - (build_conditional_expr): Likewise. - (build_static_cast): Likewise. - (build_c_cast): Likewise. - (build_modify_expr): Likewise. - (convert_For_assignment): Likewise. - (comp_ptr_ttypes_real): Likewise. - (cp_type_quals): New function. - -1998-10-23 Jason Merrill - - * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays. - (CP_TYPE_VOLATILE): Likewise. - * decl.c (grokdeclarator): Use them. - * tree.c (canonical_type_variant): Likewise. - -1998-10-22 Martin von Löwis - - * parse.y (named_class_head): Push into class while parsing the - base class list. - * decl2.c (push_scope, pop_scope): New functions. - * cp-tree.h: Declare them. - * init.c (build_new_1): Delay cleanup until end of full expression. - -1998-10-21 Jason Merrill - - * typeck.c (build_component_ref): Use of a type here is an error. - -1998-10-19 Jason Merrill - - Revamp references to member functions. - * method.c (hack_identifier): Call build_component_ref for a - reference to a member function. - * typeck.c (build_component_ref): Only return a single function - if it's static. Otherwise, return a COMPONENT_REF. - (build_x_function_call): Handle a COMPONENT_REF. - (build_unary_op): Handle all unknown-type things. - * decl2.c (arg_assoc): Handle COMPONENT_REF. - * class.c (instantiate_type): Complain if the function we get is a - nonstatic member function. Remove code for finding "compatible" - functions. - * pt.c (tsubst_copy): Handle NOP_EXPR. - * tree.c (build_dummy_object): New fn. - (maybe_dummy_object): New fn. - (is_dummy_object): New fn. - * cp-tree.h: Declare them. - * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object. - * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object. - * init.c (build_member_call): Use maybe_dummy_object and - is_dummy_object. - (build_offset_ref): Use maybe_dummy_object. - (resolve_offset_ref): Use is_dummy_object. - * typeck.c (build_x_function_call): Call build_dummy_object. - (unary_complex_lvalue): Call is_dummy_object. - - * typeck.c (build_component_addr): Make sure field is a field. - - * call.c (build_new_op): Delete obsolete code. - - * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args. - -1998-10-18 Martin von Löwis - - * decl2.c (validate_nonmember_using_decl): Fix using-directives of - std if std is ignored. - -1998-10-18 Jason Merrill - - * decl.c (grokvardecl): Fix thinko. - - * decl.c (grokdeclarator): Embedded attrs bind to the right, - not the left. - - * parse.y (fn.def2): Fix 'attrs' format. - -1998-10-18 Alastair J. Houghton - - * Makefile.in (CONFLICTS): Update. - * parse.y (expr_or_declarator_intern): New rule. - (expr_or_declarator, direct_notype_declarator, primary, - functional_cast): Use it. - (notype_declarator_intern): New rule. - (notype_declarator, complex_notype_declarator): Use it. - -1998-10-17 Jason Merrill - - * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate. - (grokvardecl): Likewise. - -Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi - - * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR). - (add_method): Likewise for arguments 1 & 2 of `bcopy'. - - * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN. - - * pt.c (process_partial_specialization): Cast 1st argument of - `bzero' to (PTR). - - * tree.c (build_base_fields): Cast `base_align' to (int) when - comparing against one. - -1998-10-16 Mark Mitchell - - * decl.c (lookup_name_real): Handle template parameters for member - templates where said parameters have the same name as the - surrounding class. - - * decl.c (expand_static_init): Build cleanups before entering the - anonymous function used to do them to avoid access-checking - confusion. - - * decl.c (grokfndecl): Add back call to cplus_decl_attributes - accidentally removed by previous change, and make DECL_RTL here. - * class.c (add_method): Don't make DECL_RTL here. - - * pt.c (for_each_template_parm): Don't examine uninstantiated - default arguments. - -1998-10-16 Dave Brolley - - * lex.c (real_yylex): Fix unaligned access of wchar_t. - -1998-10-16 Mark Mitchell - - * class.c (add_method): Fix documentation to reflect previous - changes. Check for duplicate method declarations here. - * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL - correctly; such things never match. - (grokfndecl): Don't look for duplicate methods here. - * decl2.c (check_classfn): Don't assume names are mangled. - Don't add bogus member function declarations to a class before the - class type is complete. - (grokfield): Reformat error message. - * method.c (set_mangled_name_for_decl): Don't mangle names while - processing_template_decl. - -1998-10-16 Jason Merrill - - * typeck.c (build_indirect_ref): Complain about a pointer to data - member, too. - * typeck2.c (build_m_component_ref): Don't indirect a pointer to - data member. - * init.c (resolve_offset_ref): Don't undo the above. - - * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros. - (struct lang_decl_flags): Add `bitfield'. - * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of - DECL_BIT_FIELD. - * decl2.c (grokbitfield, grok_alignof): Likewise. - * init.c (build_offset_ref): Likewise. - * typeck.c (build_component_addr, expr_sizeof): Likewise. - * cvt.c (build_up_reference): Don't crash if taking the address - returns error_mark_node. - - * decl.c (grokfndecl): Also check ctype when checking for ::main(). - -1998-10-15 Jason Merrill - - * decl.c (grokfndecl): ::main and __builtin_* get C linkage. - Do mangling here. - (grokdeclarator): Instead of here. - * friend.c (do_friend): Lose special handling of ::main and - __builtin_*. - * cp-tree.h (DECL_MAIN_P): Check for C linkage. - - * spew.c (yylex): Clear looking_for_typename if we got - 'enum { ... };'. - -1998-10-15 Mark Mitchell - - * class.c (maybe_warn_about_overly_private_class): Improve error - messages for class with only private constructors. - - * cp-tree.def (TYPENAME_TYPE): Add to documentation. - * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document. - (build_typename_type): New function. - * decl.c (build_typename_type): Broken out from ... - (make_typename_type): Use it. - * search.c (lookup_field): Likewise. - -1998-10-14 Benjamin Kosnik - - * pt.c (convert_nontype_argument): Check against type_referred_to. - * decl.c (grokvardecl): Check for declarator name before building - DECL_ASSEMBLER_NAME. - -1998-10-14 Mark Mitchell - - * pt.c (lookup_template_class): Add comment. - (instantiate_class_template): Don't mark the _TYPE node for - member class templates as an instantiation. - -1998-10-14 Jason Merrill - - * decl.c (grokfndecl): Fix my thinko. - -1998-10-13 Jason Merrill - - * tinfo2.cc (fast_compare): Remove. - (before): Just use strcmp. - * tinfo.cc (operator==): Just use strcmp. - -1998-10-13 Klaus-Georg Adams - - * decl.c (grokfndecl): Don't check for linkage in `extern "C"' - declarations. - -1998-10-13 Mark Mitchell - - * cp-tree.h (specializations_of_same_template_p): Remove. - * search.c (get_template_base): Don't use it. - (get_template_base_recursive): Likewise. - * pt.c (specializations_of_same_template_p): Remove. - (unify): Don't use it. - (lookup_template_class): Find the correct parent when setting - CLASSTYPE_TI_TEMPLATE. - -1998-10-12 Jason Merrill - - * tinfo.cc (operator==): Always compare names. - -1998-10-12 Herman ten Brugge - - * decl.c (start_function): Fix cut-and-paste error. - -1998-10-12 Jason Merrill - - * inc/typeinfo: Add #pragma interface. - (operator!=): Just call operator==. - * tinfo.cc: Add #pragma implementation. - (operator==): Move from inc/typeinfo and tinfo2.cc. - Check __COMMON_UNRELIABLE instead of _WIN32. - - * typeck2.c (my_friendly_abort): Add URL. - -1998-10-12 Alastair J. Houghton - - * decl.c (start_method): Added extra parameter for attributes. - * cp-tree.h (start_method): Update prototype. - * parse.y (fn.def2): Update start_method parameter list. - -1998-10-11 Mark Mitchell - - * cp-tree.h (specializations_of_same_template_p): Declare. - * pt.c (specializations_of_same_template_p): New function. - (unify): Use it. - * search.c (get_template_base): Use it. - (get_template_base_recursive): Likewise. - -1998-10-10 Manfred Hollstein - - * decl2.c (start_objects): Add new variable `joiner' and - initialize it properly. - -1998-10-09 Mark Mitchell - - * search.c (expand_upcast_fixups): Tweak to match 1998-10-07 - change to vtable types. - - * cvt.c (ocp_convert): Avoid infinite recursion caused by - 1998-10-03 change. - -1998-10-08 Jason Merrill - - * pt.c (resolve_overloaded_unification): New fn. - (try_one_overload): Likewise. - (unify): Don't fail on unknown type. - (type_unification_real): Likewise. Use resolve_overloaded_unification - to handle an overloaded argument. - (template_args_equal): Split out... - (comp_template_args): From here. - (determine_specialization): Also allow a template with more - parms than were explicitly specified. - * cp-tree.h: Add template_args_equal. - * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code. - -Thu Oct 8 15:58:30 1998 Anthony Green - - * semantics.c (finish_asm_stmt): Revert my 1998-09-28 - change. - -Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com) - - * typeck.c (unsigned_type): Only return TItype nodes when - HOST_BITS_PER_WIDE_INT is >= 64 bits. - (signed_type): Likewise. - * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare - when HOST_BITS_PER_WIDE_INT is >= 64 bits. - (init_decl_processing): Only create TItype nodes when - HOST_BITS_PER_WIDE_INT is >= 64 bits. - * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare - when HOST_BITS_PER_WIDE_INT is >= 64 bits. - -Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi - - * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf. - (gxx.gperf): Update comments describing invocation flags. - (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs). - -1998-10-07 Mark Mitchell - - * class.c (finish_struct_1): Add commentary on previous change. - - * cp-tree.h (vtbl_ptr_type_node): New variable. - * class.c (build_vtbl_ref): Don't indirect through the vptr; it's - already of the right type. - (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node. - Simplify code to grow vtable. - * decl.c (vtbl_ptr_type_node): Define. - (init_decl_processing): Initialize it. - -1998-10-06 Mark Mitchell - - * cp-tree.def (PTRMEM_CST): New tree node. - * cp-tree.h (ptrmem_cst): New type. - (lang_type): Remove local_typedecls. - (dummy): Increase to 12 bits from 11. - (CLASSTYPE_LOCAL_TYPEDECLS): Remove. - (PTRMEM_CST_CLASS): New macro. - (PTRMEM_CST_MEMBER): Likewise. - (current_access_specifier): New variable. - (current_class_type): Remove duplicate declaration. - (finish_struct): Change prototype. - (unreverse_member_declarations): New function. - (pushdecl_class_level): Change prototype. - (grok_enum_decls): Remove. - (fixup_anonymous_union): New function. - (grok_x_components): Change prototype. - (tsubst_chain): Remove. - (finish_member_template_decl): Likewise. - (check_explicit_specialization): Fix indentation. - (finish_class_definition): Change prototype. - (finish_member_class_template): Likewise. - (finish_member_declaration): New function. - (check_multiple_declarators): Likewise. - * class.c (class_stack_node_t): New type. - (current_class_base): Remove. - (current_class_stack): Change type. - (current_access_specifier): New variable. - (grow_method): Remove. - (check_member_decl_is_same_in_complete_scope): Break out from - finish_struct. - (make_method_vec): New function. - (free_method_vec): Likewise. - (add_implicitly_declared_members): Break out from finish_struct_1. - (free_method_vecs): New variable. - (add_method): Rework for direct use from parser. - (handle_using_decl): Watch for NULL_TREE while iterating through - CLASSTYPE_METHOD_VEC. - (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here; - just do some error-checking. - (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC. - (finish_struct_1): Simplify. Use add_implicitly_declared_members. - (finish_struct): Change prototype. Simplify; fields and methods - are already set up at this point. - (init_class_processing): Set up current_class_stack. - (pushclass): Save current_access_specifier. - (popclass): Restore it. - (currently_open_class): Simplify. - (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS. - * decl.c (saved_scope): Add access_specifier. - (maybe_push_to_top_level): Save it. - (pop_from_top_level): Restore it. - (maybe_process_template_type_declaration): Use - finish_member_declaration. - (pushtag): Likewise. - (pushdecl_class_level): Don't return a value. - (fixup_anonymous_union): Break out from grok_x_components. - (shadow_tag): Use it. - (xref_tag): Complain about using an elaborated type specifier to - reference a template type parameter or typedef name. - (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS. - (current_local_enum): Remove. - (build_enumerator): Call finish_member_declaration. - (grok_enum_decls): Remove. - * decl2.c (grok_x_components): Simplify. - (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC. - (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS. - (merge_functions): Add to comment. - (arg_assoc_type): Prototype. - (arg_assoc): Pass as many arguments as there are parameters. - * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of - OFFSET_REF. - * expr.c (cpls_expand_expr): Remove dead code. Handle - PTRMEM_CST. - * friend.c (do_friend): Lookup friends when in nested classes. - Change comments. - * init.c (build_offset_ref): Do lookup even for classes that are - only partially defined. - (decl_constant_value): Remove dead code. - * method.c (build_overload_value): Remove hack where by TYPE was - not a TYPE. Handle PTRMEM_CST. - (build_template_parm_names): Don't pass a PARM_DECL where a TYPE - should go. - * parse.y (components, notype_components, component_decl, - component_decl_1, component_declarator, component_declarator0): - Now all are itype rather than ttype. Rework to add members to - classes on the fly. - (typesqpecqual_reserved): Use check_multiple_declarators. - (structsp): Update class to finish_class_definition. - (do_xref_defn): Unsplit into named_class_head. - (access_specifier): Set current_access_specifier. - * pt.c (set_current_access_from_decl): New function. - (finish_member_template_decl): Don't take the parameters. - (comp_template_args): Make more robust. - (lookup_template_class): Don't use current_local_enum. - (for_each_template_parm): Handle PTRMEM_CST. - (instantiate_class_template): Use set_current_access_from_decl, - finish_member_declaration and unreverse_member_declarations. Set - lineno/input_filename before generating implicit member functions. - (type_unification_real): Don't assume back-unification happens - only for the last argument. - (regenerate_decl_from_template): Call pushclass a bit earlier. - (tsubst_chain): Remove. - (tsubst_enum): Use set_current_access_from_decl. - (set_mangled_name_for_template_decl): Fix indentation. - * search.c (lookup_fnfields_1): Change iteration through - CLASSTYPE_METHOD_VEC. - (dfs_pushdecls): Likewise. - (dfs_compress_decls): Likewise. - (add_conversions): Likewise. - * semantics.c (finish_class_definition): Don't take components. - Change call to finish_struct. - (finish_member_declaration): New function. - (finish_member_class_template): Don't take template parameters. - Change call to grok_x_components. Call finish_member_template_decl. - (check_multiple_declarators): New function. - * sig.c (append_signature_fields): Work from the TYPE_METHODS, not - a passed in fieldlist. - * tree.c (search_tree): Handle PTRMEM_CST. - (mapcar): Likewise. - * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not - INTEGER_CSTs, for pointer-to-data members. - - * call.c (resolve_args): Resolve template specializations, if - possible. - -Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi - - * Makefile.in (spew.o): Depend on toplev.h. - - * call.c (compare_ics): Initialize variables `deref_from_type2', - `deref_to_type1' and `deref_to_type2'. - - * except.c (get_eh_type): Hide prototype and definition. - (process_start_catch_block_old): Remove unused static prototype. - - * pt.c (tsubst_decl): Initialize variable `argvec'. - - * spew.c: Include toplev.h. - -1998-10-05 Jason Merrill - - * pt.c (instantiate_decl): Do save and restore file position. - -1998-10-05 Martin von Löwis - - * method.c (build_decl_overload_real): Clear - numeric_output_need_bar after __. - -1998-10-05 Nathan Sidwell - - * call.c (build_new_method_call): Issue 'incomplete type' error, - if class is not defined. - -1998-10-05 Kaveh R. Ghazi - - * call.c (build_object_call): Move declaration of variable - `fn' into the scope where it is used. Don't access variable - `fn' when it is uninitialized, instead use `fns'. - -1998-10-04 Theodore Papadopoulo - - * errfn.c (cp_thing): Print buf as a string not as a printf format - to avoid problems with the operator%. Consequently, `%%' sequences - in format are copied as `%' in buf. - -1998-10-04 Jason Merrill - - * pt.c (pop_tinst_level): Call extract_interface_info. - (instantiate_decl): Don't save and restore file position. - - * decl.c (cp_finish_decl): Make statics in extern inlines and - templates common, if possible and the target doesn't support weak - symbols. - - * decl.c (grokdeclarator): Remove redundant calls to - build_type_variant and some duplicated code. - * sig.c (build_signature_reference_type): Only take the type parm. - (build_signature_pointer_type): Likewise. - * tree.c (build_cplus_method_type): Adjust. - * cp-tree.h: Update. - -1998-10-04 Mark Mitchell - - * call.c (build_over_call): Make pedwarns about dropped qualifiers - into full-fledged errors. - * cvt.c (convert_to_reference): Likewise. - * typeck.c (convert_for_assignment): Likewise. - - * search.c (expand_upcast_vtables): In addition to unsetting - TREE_READONLY, remove top-level const type qualifier. - -1998-10-03 Mark Mitchell - - * class.c (current_class_ptr, current_class_ref): Clarify - documentation. - * cvt.c (ocp_convert): Don't expect fold to remove all trivial - NOP type conversions. - * decl.c (decls_match): Use comptypes directly; ignore - qualifiers on the DECL. - (duplicate_decls): Remove qualifier checks on DECL. - (grokdeclarator): Make the type built up include top-level - qualifiers. - * decl2.c (do_dtors): Fix spelling error. - * error.c (dump_simple_decl): Don't look at qualifiers on the decl - when printing type information. - * init.c (build_new_1): Add documentation. Deal with the fact - that type of allocated memory now contains qualifiers. - * lex.c (is_global): Improve error-recovery. - * sig.c (build_member_function_pointer): Don't cast away const - on fields of sigtable_entry_type. - * tree.c (lvalue_type): Don't look at top-level qualifiers on - expressions. - * typeck.c (decay_conversion): Likewise. - (build_component_ref): Make sure the type of the COMPONENT_REF - contains top-level qualifiers, as appropriate. Improve - error-handling. - (build_indirect_ref): Simplify. Don't strip top-level qualifiers. - (build_array_ref): Likewise. - (build_unary_op): Improve error-recovery. - (unary_complex_lvalue): Make taking the address a bound member - function an error, not a sorry. - (build_conditional_expr): Look at the type qualifiers, not the - qualifiers on the expression itself. - -1998-10-03 Jason Merrill - - * decl2.c (merge_functions): Remove duplicates. - - * decl2.c: Add -f{no-,}implicit-inline-templates. - (import_export_decl): Check it. - - * decl.c (lookup_name_real): Template parms also take precedence - over implicit typename. Only warn if yylex. - - * typeck.c (build_conditional_expr): Only fold if ifexp is an - INTEGER_CST. - - * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN - instead of linkage. - -1998-10-01 Jason Merrill - - * cp-tree.h (FORMAT_VBASE_NAME): New macro. - * class.c (build_vbase_pointer): Use it. - * rtti.c (expand_class_desc): Likewise. - * tree.c (build_vbase_pointer_fields): Likewise. - -Thu Oct 1 10:43:45 1998 Nick Clifton - - * decl.c (start_decl): Add invocation of - SET_DEFAULT_DECL_ATTRIBUTES, if defined. - (start_function): Add invocation of - SET_DEFAULT_DECL_ATTRIBUTES, if defined. - - * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with - HANDLE_GENERIC_PRAGMAS. - -1998-09-28 Anthony Green - - * semantics.c (finish_asm_stmt): Always permit volatile asms. - -1998-09-28 Mark Mitchell - - * decl.c (grokdeclarator): Tighten checks for invalid - destructors. Improve error-messages and error-recovery. - * decl2.c (check_classfn): Don't assume that mangled destructor - names contain type information. - -1998-09-25 Jason Merrill - - * search.c (get_base_distance): Remove assert. - - * decl2.c (build_anon_union_vars): Don't process a field with no - name. - (finish_anon_union): Also complain about local anon unions with no - members. - -1998-09-25 Martin von Löwis - - * decl.c (lookup_namespace_name): If the name is a namespace, - return it immediately. - -Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi - - * cp-tree.h (define_case_label): Remove unused parameter. - (check_java_method): Likewise. - (grokclassfn): Likewise. - (expand_aggr_init): Likewise. - (build_x_delete): Likewise. - (maybe_end_member_template_processing): Likewise. - (unshare_base_binfos): Add prototype. - (string_conv_p): Likewise. - (my_friendly_abort): Mark with ATTRIBUTE_NORETURN. - - * cvt.c (build_up_reference): Remove unused parameter - `checkconst', all callers changed. - (build_type_conversion): Mark parameter `code' with - ATTRIBUTE_UNUSED. - (build_expr_type_conversion): Initialize variable `conv'. - - * decl.c (push_namespace): Initialize variable `d'. - (define_case_label): Remove unused parameter `decl', all callers - changed. - - * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter - `argc' with ATTRIBUTE_UNUSED. - (grokclassfn): Remove unused parameter `cname', all callers - changed. - (check_java_method): Likewise for parameter `ctype'. - (copy_assignment_arg_p): Mark parameter `virtualp' with - ATTRIBUTE_UNUSED. - (finish_prevtable_vardecl): Likewise for parameter `prev'. - - * expr.c (extract_init): Likewise for parameters `decl' and `init'. - - * init.c (expand_aggr_init_1): Remove unused parameter - `alias_this', all callers changed. - (expand_aggr_init): Likewise. - (expand_default_init): Likewise. - (build_new_1): Initialize variable `susp'. - (build_x_delete): Remove unused parameter `type', all callers - changed. - - * lex.c (set_typedecl_interface_info): Mark parameter `prev' with - ATTRIBUTE_UNUSED. - (readescape): Use (unsigned) value in shift. - (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when - comparing to a signed quantity. - - * pt.c (maybe_end_member_template_processing): Remove unused - parameter `decl', all callers changed. - (check_explicit_specialization): Add braces around empty body in - an else-statement. - (current_template_args): Initialize variable `args'. - (lookup_template_class): Likewise for variable `prev_local_enum'. - (tsubst_decl): Likewise for variable `r'. - (set_mangled_name_for_template_decl): Initialize variable - `context'. - - * spew.c (scan_tokens): Change type of parameter `n' to unsigned. - Likewise for variable `i'. - (yylex): Initialize variable `trrr'. - - * typeck.c (compparms): Mark variable `strict' with - ATTRIBUTE_UNUSED. - - * xref.c (simplify_type): Cast argument of ctype function to - `unsigned char'. - -1998-09-24 Mark Mitchell - - * cp-tree.h (language_lvalue_valid): Remove. - * decl.c (grokdeclarator): Don't disallow references to functions. - * tree.c (lvalue_p_1): New function, combining duplicated - code from ... - (lvalue_p): Use it. - (real_lvalue_p): Likewise. - * typeck.c (language_lvalue_valid): Remove. - (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though - they don't have TREE_READONLY set. - * typeck2.c (readonly_error): Add case for FUNCTION_DECLs. - -1998-09-24 Benjamin Kosnik - - * spew.c (yylex): Give diagnostic. - * hash.h (is_reserved_word): Add export. - * gxx.gperf: Likewise. - * lex.h (rid): Add RID_EXPORT. - * lex.c (init_parse): Likewise. - -Tue Sep 22 21:01:19 1998 Gerald Pfeifer - - * friend.c (do_friend): Make warning a full sentence. - -1998-09-22 Mark Mitchell - - * parse.y (component_decl_list): Improve error-recovery. - -1998-09-22 Benjamin Kosnik - - * decl.c (make_typename_type): Move error to point where name - variable can be used by dump_type. - -1998-09-22 Mark Mitchell - - * decl.c (grokfndecl): Improve error-recovery. - * decl2.c (grokfield): Likewise. - * pt.c (finish_member_template_decl): Likewise. - -1998-09-20 Martin von Löwis - - * method.c (hack_identifier): Finding multiple members is always - an error. - -1998-09-21 Per Bothner - - * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o. - -Mon Sep 21 01:53:05 1998 Felix Lee - - * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT (). - -1998-09-20 Mark Mitchell - - * class.c (maybe_warn_about_overly_private_class): Reformat. - -1998-09-17 Andrew MacLeod - - * exception.cc (__cplus_type_matcher): Realign some code. - -1998-09-16 Mark Mitchell - - * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling. - (tinfo2.o): Likewise. - (exception.o): Likewise. - (new.o): Likewise. - (opnew.o): Likewise. - (opnewnt.o): Likewise. - (opvnew.o): Likewise. - (opvnewnt.o): Likewise. - (opdel.o): Likewise. - (opdelnt.o): Likewise. - (opvdel.o): Likewise. - (opvdelnt.o): Likewise. - -1998-09-16 Richard Henderson - - * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp. - -1998-09-15 Alexandre Oliva - - * call.c (build_field_call): Handle static data members too. - - * typeck.c (comptypes): When comparing pointer types, check - whether referred types match even in strictest modes. - -1998-09-15 Mark Mitchell - - * cp-tree.h: Revert previous change. - (finish_struct_methods): Remove declaration. - * class.c: Revert previous change. - (maybe_warn_about_overly_private_class): New function. - (finish_struct_methods): Declare here, and make static. Remove - unnecessary parameters. Tidy slightly. Use - maybe_warn_about_overly_private_class. - (finish_struct_1): Adjust. Remove check for private constructors, - now done elsewhere. - (finish_struct): Adjust. - -1998-09-15 Andrew MacLeod - - * except.c (expand_start_catch_block): No need to check for new - exception model. - (process_start_catch_block_old): Deleted. - (process_start_catch_block): Add call to start_decl_1(). - (expand_end_catch_block): Add call to end_catch_handler(). - * exception.cc (__cplus_type_matcher): Only check the exception - language if there is an exception table. - -1998-09-15 Andrew MacLeod - - * search.c (expand_indirect_vtbls_init): Mark temporary stack slots - as used to prevent conflicts with virtual function tables. - -1998-09-14 Mark Mitchell - - * cp-tree.h (lang_type): Add has_non_private_static_mem_fn. - (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it. - * class.c (maybe_class_too_private_p): New function. - (finish_struct_methods): Use it. - (finish_struct_1): Likewise. - (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if - appropriate. - - * pt.c (check_specialization_scope): Fix spelling error. - (check_explicit_specialization): Remove code to handle explicit - specializations in class scope; they are now correctly diagnosed - as errors. - -1998-09-10 Mark Mitchell - - * decl.c (pushdecl): Don't copy types if the - DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the - type. - -1998-09-09 Kriang Lerdsuwanakij - - * class.c (get_enclosing_class): New function. - (is_base_of_enclosing_class): Likewise. - * cp-tree.h (get_enclosing_class): Declare. - (is_base_of_enclosing_class): Likewise. - * pt.c (coerce_template_parms): Use them. - -1998-09-09 Jason Merrill - - * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is - null to decide whether to use it. - - * error.c (dump_type_real): Handle NAMESPACE_DECL. - * parse.y (base_class.1): Avoid crash on error. - -1998-09-08 Martin von Löwis - - * decl.c (make_typename_type): If context is a namespace, the code - is in error. - -1998-09-08 Mumit Khan - - * parse.y (nomods_initdcl0): Set up the parser stack correctly. - -1998-09-08 Mark Mitchell - - * cp-tree.h (anonymous_namespace_name): Declare. - * decl.c: Define it. - (push_namespace): Use anonymous_namespace_name, rather than local - static anon_name. - * error.c (dump_decl): If a namespace is named - anonymous_namespace_name, call it {anonymous}. - - * decl.c (grokparms): Distinguish between references and pointers - in error message. - -1998-09-08 Richard Henderson - Mark Mitchell - - * pt.c (process_partial_specialization): Consistently allocate - and zero tpd.parms based on ntparms. Use tpd2.parms, not - tpd.parms, where appropriate. - -Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (INCLUDES): Update after recent toplevel gcc - reorganizations. - -1998-09-05 Mark Mitchell - - * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove. - * class.c (finish_struct): Remove hackery to deal with explicit - specializations in class scope. - * decl.c (grokfndecl): Improve error-recovery. - * decl2.c (grokfield): Likewise. - * pt.c (check_specialization_scope): New function. - (begin_specialization): Call it. - (process_partial_specialization): New function, split out from - push_template_decl. Check partial specializations more - stringently. - (push_template_decl): Call it. - (check_explicit_specialization): Don't attempt to handle explicit - specializations in class scope. - (template_parm_data): Document. Add current_arg and - arg_uses_template_parms. - (mark_template_parm): Set it. - (tsubst_arg_types): Remove unused variable. - * semantics.c (begin_class_definition): Tweak. - -1998-09-04 Mark Mitchell - - * inc/typeinfo (type_info::type_info(const char*)): Make - `explicit'. - - * cp-tree.h (hash_tree_cons_simple): New macro. - * pt.c (tsubst_arg_types): New function. Use hash_tree_cons. - (coerce_template_parms): Use make_temp_vec, instead of - make_tree_vec. Document this behavior. - (lookup_template_class): Likewise. - (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types. - Remove dead code (and add assertion to check its deadness). Fix - bug w.r.t. exception specifications. - -1998-09-03 Jason Merrill - - * decl2.c (import_export_vtable): Always make artificials comdat. - (import_export_decl): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - -1998-09-03 Mark Mitchell - - * cp-tree.h (finish_globally_qualified_member_call_expr): - Rename to ... - (finish_qualified_call_expr). - * semantics.c: Likewise. - * parse.y (primary): Use it. - * method.c (hack_identifier): Remove redundant code. - - * init.c (resolve_offset_ref): Call convert_from_reference to - handle members of reference type. Improve error recovery. - -1998-09-03 Benjamin Kosnik - - * cp-tree.h: Declare warn_nontemplate_friend. - * decl2.c (lang_decode_option): Set. - * lang-options.h: Add -Wnon-template-friend. - * friend.c (do_friend): Use to toggle non-template function warning. - -1998-09-03 Mark Mitchell - - * decl.c (finish_enum): Don't resolve CONST_DECLs to their - corresponding INTEGER_CSTs when processing_template_decl. - * pt.c (tsubst_enum): Tweak accordingly. - -1998-09-03 Benjamin Kosnik - - * decl.c (pushdecl_class_level): Add warning here. - (pushdecl): Tweak. - -1998-09-02 Jason Merrill - - * cvt.c (convert_pointer_to_real): Tidy. - * search.c (get_base_distance_recursive): Simplify. - (get_base_distance): Likewise. - - * pt.c (unify): Only special-case INTEGER_TYPE if it uses template - parms. - -Wed Sep 02 09:25:29 1998 Nick Clifton - - * lex.c (check_newline): Call HANDLE_PRAGMA before - HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages - if unknown pragmas are encountered. - (handle_sysv_pragma): Interpret return code from - handle_pragma_token (). Return success/failure indication rather - than next unprocessed character. - (pragma_getc): New function: retrieves characters from the - input stream. Defined when HANDLE_PRAGMA is defined. - (pragma_ungetc): New function: replaces characters back into the - input stream. Defined when HANDLE_PRAGMA is defined. - -1998-09-01 Jason Merrill - - * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands. - * class.c (build_vtable_entry_ref): Likewise. - -1998-09-01 Mark Mitchell - - * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro. - * decl2.c (import_export_decl): Likewise. - * pt.c (instantiate_decl): Use it. - -1998-09-01 Jason Merrill - - * decl.c (lookup_name_real): Also do implicit typename thing for - artificial TYPE_DECLs. - * search.c (lookup_field): Likewise. - (lookup_fnfields, lookup_field): Adjust for implicit typename kludge. - * semantics.c (begin_constructor_declarator): Use enter_scope_of. - (enter_scope_of): Extract type from implicit typename. - (begin_class_definition): Likewise. - * lex.c (identifier_type): Handle implicit typename when checking - for SELFNAME. - - * cp-tree.h: Declare flag_strict_prototype. - * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if - -fstrict-prototype. - * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't - specified, set it to the value of pedantic. - -1998-09-01 Mark Mitchell - - * decl2.c (arg_assoc): Handle template-id expressions as arguments. - -1998-08-31 Mark Mitchell - - * decl.c (finish_enum): Handle member enums of classes declared in - template functions. - - * decl2.c (grok_x_components): Strip attributes before calling - groktypename. - -1998-08-31 Jason Merrill - - * cp-tree.h, decl2.c: Remove support for -fall-virtual, - -fenum-int-equivalence and -fno-nonnull-objects. - * class.c (check_for_override): Remove support for -fall-virtual. - (finish_struct_1): Likewise. - * call.c (build_new_op): Remove support for -fenum-int-equivalence. - * typeck.c (build_binary_op_nodefault): Likewise. - * cvt.c (ocp_convert): Likewise. - * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects. - * class.c (build_vbase_path): Likewise. - -Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org) - - * Makefile.in (INTERFACE): New, set to 1. - -1998-08-30 Mark Mitchell - - * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when - comparing with global_namespace. - (dump_aggr_type): Likewise. - - * decl.c (grokfndecl): Issue error on declaration of friend - templates with explicit template arguments. - - * pt.c (convert_template_argument): New function, split out - from... - (coerce_template_parms): Here. - (tsubst): Attempt better error-recovery. - -1998-08-28 Benjamin Kosnik - - * pt.c (decl_template_parm_p): Add checks for - TEMPLATE_TEMPLATE_PARM. - -1998-08-28 Mark Mitchell - - * lex.c (do_identifier): Fix thinko in previous change. - -1998-08-28 Jason Merrill - - * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns. - * decl2.c (output_vtable_inherit): Call binfo_for_vtable. - -1998-08-28 Richard Henderson - - Add support for discarding unused virtual functions. - * lang-options.h: Add -fvtable-gc. - * cp-tree.h: Add flag_vtable_gc. - * decl2.c (output_vtable_inherit): New fn. - (finish_vtable_vardecl): Call it. - * class.c (build_vtable_entry_ref): New fn. - (build_vtbl_ref): Call it. - -1998-08-28 Mark Mitchell - - * cp-tree.h (build_enumerator): Take the enumeration type as a - parameter. - * decl.c (finish_enum): Don't set the TREE_TYPE for the - enumeration constant values if we're processing_template_decls. - Don't set the type for the CONST_DECLs either; that's done in - build_enumerator. - (build_enumerator): Take the enumeration type as a - parameter. - * lex.c (do_identifier): Don't resolve enumeration constants while - processing template declarations, even if they happen to be - TEMPLATE_PARM_INDEXs. - - * parse.y (current_enum_type): New variable. - (primary): Don't allow statement-expression in local classes just - as we don't in global classes. - (structsp): Use current_enum_type. - (enum_list): Likewise. - * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by - finish_enum; they no longer occur. - - * cp-tree.h (finish_base_specifier): New function. - * parse.y (base_class): Use it. - * semantics.c (finish_base_specifier): Define it. - - * parse.y (structsp): Warn on use of typename outside of template - declarations. - -1998-08-27 Jason Merrill - - * lex.c (handle_cp_pragma): Remove #pragma vtable. - * lang-options.h: Remove +e options. - * decl2.c (lang_decode_option): Likewise. - (import_export_vtable): Don't check write_virtuals. - (finish_vtable_vardecl, finish_file): Likewise. - * search.c (dfs_debug_mark): Likewise. - * semantics.c (begin_class_definition): Likewise. - * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise. - - * call.c (build_over_call): Check flag_elide_constructors. - * decl2.c: flag_elide_constructors defaults to 1. - * typeck.c (convert_arguments): Remove return_loc parm. - (build_function_call_real): Adjust. - - * search.c: Tear out all mi_matrix and memoize code. - (lookup_field, lookup_fnfields): Use scratch_tree_cons. - * lang-options.h: Remove documentation for -fhandle-exceptions, - -fmemoize-lookups and -fsave-memoized. - * cp-tree.h: Lose mi_matrix and memoize support. - * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized. - * class.c: Lose struct class_level. - (pushclass, popclass): Lose memoize support. - * init.c (build_offset_ref): Likewise. - - Never change BINFO_INHERITANCE_CHAIN. - * init.c (emit_base_init): Change modification of - BINFO_INHERITANCE_CHAIN to an assert. - * search.c (get_base_distance_recursive): Likewise. - (get_base_distance): Likewise. - (lookup_member): Likewise. - (convert_pointer_to_single_level): Likewise. - (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs. - (lookup_fnfields): Likewise. - * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos. - (unshare_base_binfos): Don't call propagate_binfo_offsets. - (layout_basetypes): Call propagate_binfo_offsets instead of - unshare_base_binfos. - * decl.c (xref_basetypes): Call unshare_base_binfos. - * pt.c (instantiate_class_template): Likewise. - * tree.c (reverse_path): Remove 'copy' parm; always make a - temporary copy. - * class.c (build_vbase_path): Just call it. - * search.c (compute_access): Likewise. Don't re-reverse. - -1998-08-27 Mark Mitchell - - * class.c (build_vbase_path): Use reverse_path. - (finish_base_struct): Move warnings for inaccessible bases to - layout_basetypes. - (modify_one_vtable): Remove check of TREE_USED (binfo). - (fixup_vtable_deltas1): Likewise. - * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here. - (xref_tag): Remove binfos parameter. - (make_binfo): Remove chain parameter. - (reverse_path): Add copy parameter. - * decl.c (init_decl_processing): Change calls to xref_tag. - (xref_tag): Remove binfos parameter. - (xref_basetypes): Change calls to make_binfo. - * decl2.c (grok_x_components): Change calls to xref_tag. - (handle_class_head): Likewise. - * friend.c (do_friend): Likewise. - * lex.c (make_lang_type): Change calls to make_binfo. - * parse.y (structsp): Change calls to xref_tag. - (named_complex_class_head_sans_basetype): Likewise. - (named_class_head): Likewise. - * rtti.c (init_rtti_processing): Likewise. - * search.c (compute_access): Change calls to reverse_path. - (dfs_get_vbase_types): Change calls to make_binfo. - (get_vbase_types): Remove dead code. - * tree.c (unshare_base_binfos): Change calls to make_binfo. - (layout_basetypes): Warn here about inaccessible bases. - (make_binfo): Remove chain parameter. - (reverse_path): Add copy parameter. - -1998-08-27 Jason Merrill - - * class.c: #if 0 complete_type_p. - * init.c (build_java_class_ref, build_new_1): Remove unused locals. - * method.c (process_overload_item): Likewise. - * typeck.c (comp_target_types): Likewise. - - Stop sharing binfos for indirect virtual bases. - * tree.c (propagate_binfo_offsets): Unshare vbases, too. - (layout_basetypes): Likewise. - (unshare_base_binfos): Copy vbases, too. - * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED, - BINFO_VBASE_INIT_MARKED): Remove obsolete macros. - (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED, - CLEAR_BINFO_PUSHDECLS_MARKED): New macros. - * search.c (lookup_field, lookup_fnfields, lookup_member): Remove - reference to BINFO_VIA_PUBLIC. - (marked_pushdecls_p, unmarked_pushdecls_p): New fns. - (push_class_decls): Use them. - (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED. - (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED. - -1998-08-27 Mark Mitchell - - * decl.c (build_enumerator): Set DECL_CONTEXT for the - CONST_DECLs. - -1998-08-26 Mark Mitchell - - * cp-tree.h (finish_enum): Change prototype. - * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a - VALUES parameter. Don't try to compute mins/maxs if - processing_template_decl. - * parse.y (structsp): Use new calling sequence for finish_enum. - * pt.c (tsubst_enum): Likewise. Take the new type as input. - (lookup_template_class): Remove unused variables. Tweak. - Register enums on instantiation list before substituting - enumeration constants. - (tsubst_decl): Remove unused variables. - (regenerate_decl_from_template): Likewise. - - * decl.c (duplicate_decls): Don't obliterate the - DECL_TEMPLATE_INFO for a template if we're not replacing it with - anything. - - * lex.c (do_identifier): Fix typo in comment. - -Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi - - * errfn.c: Remove stdarg.h/varargs.h. - * tree.c: Likewise. - -1998-08-25 Brendan Kehoe - - * pt.c (tsubst_copy): Only do typename overloading on an - IDENTIFIER_NODE that happens to look like a typename if it actually - has a type for us to use. - -1998-08-25 Jason Merrill - - * typeck.c (comp_cv_target_types): Split out... - (comp_target_types): From here. Don't allow cv-qual changes under - a pointer if nptrs == 0. Fix OFFSET_TYPE handling. - (build_ptrmemfunc): Pass 1 to nptrs. - * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes. - -1998-08-25 Mark Mitchell - - * search.c (dependent_base_p): Don't compare a binfo to - current_class_type; use the TREE_TYPE of the binfo instead. - - * cp-tree.h (CLASS_TYPE_P): Revise definition. - -1998-08-25 Jason Merrill - - * decl.c (duplicate_decls): Don't complain about different - exceptions from an internal decl even if pedantic. - - * typeck.c (convert_for_assignment): Converting from pm of vbase - to derived is an error, not a sorry. - - * call.c (build_over_call): Use convert_pointer_to_real for 'this'. - * class.c (fixed_type_or_null): Rename from - resolves_to_fixed_type_p. Return the dynamic type of the - expression, if fixed, or null. - (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type - does not match the static type. - (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use - resolves_to_fixed_type_p again. - -1998-08-24 Mark Mitchell - - * pt.c (tsubst_decl): Move special case code for dealing with - tricky friend templates here from ... - (regenerate_decl_from_template): Here. - -1998-08-24 Jason Merrill - - * decl.c (start_decl): Remove redundant linkage check. - -1998-08-24 Gavin Romig-Koch - - * typeck.c (c_expand_return): Handle the case that valtype - is wider than the functions return type. - -1998-08-24 Mark Mitchell - - * cp-tree.h (CLASS_TYPE_P): New macro. - * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE. - * pt.c (process_template_parm): Undo previous change. - -1998-08-24 Benjamin Kosnik - - * cp-tree.h: Declare. - * pt.c (decl_template_parm_p): New function. - * decl.c (pushdecl): Check decls for redeclaring template parms. - (xref_tag): Make redeclaration an error, print decl. - * decl2.c (grokfield): Check field_decls for redeclaration as well. - -1998-08-24 Jason Merrill - - * parse.y (primary): Fix up the type of string constants. - -1998-08-24 Mark Mitchell - - * typeck.c (convert_for_initialization): Move check for odd uses - of NULL to avoid duplicate warnings. - -1998-08-24 Jason Merrill - - * tree.c (lvalue_type): Fix for arrays. - * typeck.c (string_conv_p): New fn. - (convert_for_assignment): Use it. - (build_unary_op): Use lvalue_type. - * call.c (standard_conversion, convert_like): Use string_conv_p. - (add_function_candidate): Use lvalue_type. - * cvt.c (convert_to_reference): Likewise. - * decl2.c (lang_decode_option): Ignore -traditional. - * decl.c (init_decl_processing): flag_writable_strings inhibits - flag_const_strings. - -1998-08-24 Andrew MacLeod - - * lang-options.h (lang_options): Add fconst-strings to the list - of valid options. - * decl2.c (lang_f_options, lang_decode_option): Likewise. - -1998-08-24 Nathan Sidwell - - * lex.c (real_yylex): Don't warn about long long constants if - we're allowing long long. - -1998-08-24 Martin von Löwis - - * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of - accessing bindings directly. - - * search.c (my_tree_cons): Reimplement. - - * lang-specs.h: Remove __HONOR_STD. - * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise. - -1998-08-23 Mark Mitchell - - * decl.c (grokdeclarator): Complain about in-class initialization - of aggregates and/or references. - * pt.c (process_template_parm): Clear IS_AGGR_TYPE for - TEMPLATE_TYPE_PARMs. - - * decl2.c (grok_array_decl): Add comment. - (mark_used): Don't instantiate an explicit instantiation. - * friend.c (make_friend_class): Remove bogus comment. Fix check - for partial specializations. - * pt.c (check_explicit_specialization): Don't - SET_DECL_EXPLICIT_INSTANTIATION here. - (mark_decl_instantiated): Or here. - (do_decl_instantiation): Do it here, instead. Add checks for - duplicate explicit instantiations, etc. Tidy. - (do_type_instantiation): Likewise. - (instantiate_decl): Improve comments. Complain about explicit - instantiations where no definition is available. - - * cp-tree.h (ansi_null_node): Remove. - * call.c (build_over_call): Warn about converting NULL to an - arithmetic type. - * cvt.c (build_expr_type_conversion): Likewise. Use - null_ptr_cst_p instead of expanding it inline. - * decl.c (ansi_null_node): Remove. - (init_decl_processing): Make null_node always have integral type. - * except.c (build_throw): Warn about converting NULL to an - arithmetic type. - * lex.c (init_parse): Remove handling of ansi_null_node. - * pt.c (type_unification_real): Don't convert NULL to void* type. - * typeck.c (build_binary_op_nodefault): Fix NULL warnings. - (convert_for_assignment): Warn about converting NULL to an - arithmetic type. - (convert_for_initialization): Likewise. - -1998-08-20 Jason Merrill - - * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn. - * pt.c (coerce_template_parms): Use no_linkage_check. - * decl.c (grokvardecl): Likewise. - (grokfndecl): Likewise. Members of anonymous types have no linkage. - - * method.c (process_overload_item): Remove useless code. - -1998-08-20 Per Bothner - - Handle new'ing of Java classes. - * init.c (build_class_classref): New function. - (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject; - constructor does not return this; don't need to exception-protect. - - * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag. - * decl2.c (acceptable_java_type): Handle template-derived types. - -1998-08-20 Per Bothner - - * decl2.c (import_export_vtable): Suppress vtables for Java classes. - -1998-08-20 Mark Mitchell - - * decl.c (duplicate_decls): Always merge the old and new patterns - for templates, regardless of whether or not the new one has - DECL_INITIAL. Don't throw away specializations. Merge - DECL_SAVED_TREE. - * pt.c (tsubst_decl): Use the right pattern when calculating the - complete args for a new template instance. - (do_decl_instantiation): Fix typo in comment. - (regenerate_decl_from_template): Deal with tricky friend template - case. - (instantiate_decl): Likewise. - -Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com) - - * init.c (build_builtin_delete_call): Add missing assemble_external - call. - -1998-08-20 Jason Merrill - - * parse.y (notype_unqualified_id): Also accept ~A. - -1998-08-19 Mark Mitchell - - * typeck.c (build_binary_op_nodefault): Warn on use of NULL in - arithmetic. - * except.c (build_throw): Warn when NULL is thrown, even with - -ansi. Use ansi_null_node, rather than integer_zero_node, in the - thrown expression. - - * cp-tree.h (ansi_null_node): New variable. - * decl.c (ansi_null_node): New variable. - (init_decl_processing): Initialize its type. - * lex.c (init_parse): Initialize its value. Use ansi_null_node - for null_node in non-ANSI mode. - * typeck.c (build_binary_op_nodefault): Use ansi_null_node in - place of null_node to avoid spurious errors. - -1998-08-17 Mark Mitchell - - * cp-tree.h (enter_scope_of): New function. - * parse.y (complex_direct_notype_declarator): Use it. - * semantics.c (enter_scope_of): New function. - -1998-08-17 Jason Merrill - - * decl.c (grokparms): No, here. - - * decl.c (grokdeclarator): Catch parm with pointer to array of - unknown bound here... - * method.c (process_overload_item): ...not here. - - * gxxint.texi: Remove obsolete documentation of overloading code. - - * decl.c (finish_enum): Also set TYPE_SIZE_UNIT. - * class.c (finish_struct_bits): Likewise. - - * tree.c (lvalue_type): Fix for arrays. - * typeck.c (build_unary_op): Use lvalue_type. - * call.c (add_function_candidate): Likewise. - * cvt.c (convert_to_reference): Likewise. - - * decl2.c (lang_decode_option): Ignore -traditional. - - * init.c (build_offset_ref): Don't mess with error_mark_node. - * lex.c (do_scoped_id): Use cp_error. - - * rtti.c (get_tinfo_fn): Don't mess with the context for now. - -1998-08-17 Benjamin Kosnik - - * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified. - -Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com) - - * cp-tree.h (set_identifier_local_value): Provide prototype. - - * decl2.c (do_namespace_alias): Remove unused variables `binding' - and `old'. - -Fri Aug 14 16:42:27 1998 Nick Clifton - - * Makefile.in: Rename BBISON to BISON so that it can be properly - inherited from the parent makefile. - -1998-08-13 Jason Merrill - - * lang-options.h: Add -finit-priority. - * decl2.c: Likewise. Check flag_init_priority instead of - USE_INIT_PRIORITY. - - * decl2.c (setup_initp): New fn. - (start_objects, finish_objects, do_ctors): Handle init_priority. - (do_dtors, finish_file): Likewise. - -1998-08-13 Jason Merrill - - * pt.c (tsubst_copy): Hush warning. - - * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P. - -1998-08-12 Mark Mitchell - - * pt.c (print_template_context): Don't abort when instantiating a - synthesized method. - - * decl.c (grokdeclarator): Issue errors on namespace qualified - declarators in parameter lists or in class scope. - -1998-08-09 Mark Mitchell - - * pt.c (check_explicit_specialization): Don't abort on bogus - explicit instantiations. - -1998-08-07 Mark Mitchell - - * typeck.c (require_complete_type): Use complete_type_or_else. - (complete_type_or_else): Always return NULL_TREE on failure, as - documented. - - * pt.c (tsubst_aggr_type): Prototype. - (tsubst_decl): New function, split out from tsubst. Set - input_filename and lineno as appropriate. - (pop_tinst_level): Restore the file and line number saved in - push_tinst_level. - (instantiate_class_template): Set input_filename and lineno as - appropriate. - (tsubst): Move _DECL processing to tsubst_decl. Make sure the - context for a TYPENAME_TYPE is complete. - - * decl2.c (grokbitfield): Issue errors on bitfields declared with - function type. - (do_dtors): As in do_ctors, pretend to be a member of the same - class as a static data member while generating a call to its - destructor. - - * cvt.c (cp_convert_to_pointer): Handle NULL pointer - conversions, even in complex virtual base class hierarchies. - -1998-08-06 Mark Mitchell - - * cp-tree.h (ENUM_TEMPLATE_INFO): New macro. - (TYPE_TEMPLATE_INFO): Likewise. - (SET_TYPE_TEMPLATE_INFO): Likewise. - (ENUM_TI_TEMPLATE): Likewise. - (ENUM_TI_ARGS): Likewise. - (lookup_nested_type_by_name): Remove. - * decl.c (maybe_process_template_type_declaration): Handle enums. - (start_enum): Don't check for primary-template enum declarations - here. - (finish_enum): Clean up, document. Make sure template enum - constants get the correct type. - (build_enumerator): Copy initializers for template enumerations, - too. - (grok_enum_decls): Document. - * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit - better. Build LOOKUP_EXPRs for local variables, even if they are - TREE_PERMANENT. - * pt.c (tsubst_enum): Remove field_chain parameter. - (template_class_depth): Include the depth of surrounding function - contexts. - (push_template_decl): Check for primary-template enum declarations - here. Deal with enumeration templates. - (lookup_template_class): Likewise. - (for_each_template_parm): Likewise. - (instantiate_class_template): Don't call tsubst_enum directly, - call tsubst instead, to instantiate enums. Deal with all - field_chain issues here, not in tsubst_enum. - (lookup_nested_type_by_name): Remove. - (tsubst_aggr_type): Revise handling of enumeration types. - (tsubst): Likewise. - (tsubst_copy): Likewise. - (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs. - -1998-08-04 Mark Mitchell - - * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it - uses template parameters. - * method.c (build_template_parm_names): Use the full set of - template arguments for tsubst'ing. - (build_overload_identifier): Pass the full set of template - arguments to build_template_parm_names, not just the - innermost_args. - * pt.c (TMPL_ARGS_DEPTH): Define using - TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity. - (NUM_TMPL_ARGS): New macro. - (add_outermost_template_args): Deal with the case where the outer - args will be completely discarded. - (coerce_template_parms): Use the full set of template arguments - for tsubst'ing. Simplify. Add some asserts. Improve - error messages. - (lookup_template_class): Pass the full set of template arguments - to coerce_template_parms. - (tsubst): Add assertion. - (do_type_instantiation): Don't instantiate member template - classes. - - * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose - name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE. - -1998-08-03 Jason Merrill - - * method.c (set_mangled_name_for_decl): Change return type to void. - - * decl.c (lookup_name_real): A namespace-level decl takes priority - over implicit typename. Avoid doing the same lookup twice. - - * search.c (dependent_base_p): New fn. - (dfs_pushdecls, dfs_compress_decls): Use it. - - * typeck.c (get_member_function_from_ptrfunc): Don't try to handle - virtual functions if the type doesn't have any. - -1998-08-03 Mark Mitchell - - * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it - uses template parameters. - -1998-08-02 Mark Mitchell - - * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument. - * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation. - * lex.c (do_identifier): Don't use a second argument, or a type, - when building LOOKUP_EXPRs. - (do_identifier): Likewise. - (do_scoped_id): Likewise. - * method.c (hack_identifier): Improve error message. - * pt.c (lookup_template_function): Don't needlessly call - copy_to_permanent or build_min. - (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if - necessary. - (do_decl_instantiation): Improve error message. - * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy. - (build_min): Copy the type to the permanent obstack, too. - -1998-08-01 Jason Merrill - - * init.c (init_init_processing): Remove BI* handling. - (build_builtin_call): Remove. - (build_builtin_delete_call): New fn. - (build_delete): Use it. - -1998-07-31 Mark Mitchell - - * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro. - (maybe_check_template_type): New function. - * decl.c (maybe_process_template_type_declaration): New function, - split out from pushtag Call maybe_check_template_type. - (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P. - (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P. - * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P. - * pt.c (template_class_depth_real): Generalization of ... - (template_class_depth): Use it. - (register_specialization): Use duplicate_decls for duplicate - declarations of specializations. - (maybe_check_template_type): New function. - (push_template_decl_real): Fix comment. - (convert_nontype_argument): Likewise. - (lookup_template_class): Likewise. Avoid an infinite loop on - erroneous code. - (tsubst_friend_function): Fix comment. - (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is - an IDENTIFIER_NODE. - * semantics.c (begin_function_definition): Use - reset_specialization to note that template headers don't apply - directly to declarations after the opening curly for a function. - -1998-07-29 Jason Merrill - - * decl.c (push_overloaded_decl): Use current_namespace instead of - DECL_CONTEXT (decl) to determine where we go. - - * decl.c (lookup_name_real): Fix typo. - -1998-07-28 Mark Mitchell - - * friend.c (is_friend): Be lenient with member functions to deal - with nested friends. - -1998-07-28 Jason Merrill - - * class.c (finish_struct_1): Convert integer_zero_node to - ssizetype before passing it to set_rtti_entry. - * typeck2.c (initializer_constant_valid_p): Allow conversion of 0 - of any size to a pointer. - -1998-07-27 Mark Mitchell - - * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove. - (build_template_decl_overload): Remove. - (set_mangled_name_for_decl): New function. - (innermost_args): Remove is_spec parameter. - (most_specialized, most_specialized_class): Remove declarations. - (lookup_template_class): Add entering_scope parameter. - (maybe_process_partial_specialization): New function. - (finish_template_decl): Likewise. - (finish_template_type): Likewise. - * class.c (finish_struct): Clean up processing of member template - specializations. - * decl.c (pushtag): Fix formatting. - (lookup_tag): Improve handling of pseudo-global levels. - (make_typename_type): Adjust call to lookup_template_class. - (shadow_tag): Use maybe_process_partial_specialization. - (xref_tag): Improve handling of member friends. - (start_function): Call push_nested_class before - push_template_decl. Don't call push_template_decl for - specializations. - * decl2.c (grok_x_components): Don't call xref_tag for - template instantiations. Handle UNION_TYPEs like RECORD_TYPEs. - (grokclassfn): Use set_mangled_name_for_decl. - (arg_assoc_class): Adjust call to innermost_args. - (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL. - * error.c (dump_function_name): Improve printing of template - function names. - * friend.c (is_friend): Don't compare types of decls to determine - friendship, unless flag_guiding_decls. - (make_friend_class): Partial specializations cannot be friends. - (do_friend): Use set_mangled_name_for_decl. Call - push_template_decl_real instead of push_template_decl. - * method.c (build_decl_overload_real): Remove prototype. Give it - external linkage. - (build_overload_identifier): Adjust call to innermost_args. - (build_template_decl_overload): Remove. - (set_mangled_name_for_decl): New function. - * parse.y (.finish_template_type): New non-terminal. - (template_def): Use finish_template_decl. Use template_extdef - instead of extdef. - (template_extdef, template_datadef): New non-terminals, containing - only those rules for things which can be templates. - (datadef): Tidy. - (template_type, self_template_type): Use .finish_template_type. - (named_class_head): Use maybe_process_partial_specialization. - * pt.c (mangle_class_name_for_template): Remove context parameter. - (get_class_bindings): Remove outer_args parameter. - (complete_template_args): Remove. - (add_outermost_template_args): New function. - (register_specialization): Return the specialization. - (unregister_specialization): New function. - (tsubst_template_parms): Likewise. - (most_specialized, most_specialized_class): Prototype here as - static. - (original_template): Rename to most_general_template. - (tsubst_template_parms): New function. - (set_mangled_name_for_template_decl): Likewise. - (TMPL_ARGS_DEPTH): New macro. - (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust. - (TMPL_ARGS_LEVEL): New macro. - (SET_TMPL_ARGS_LEVEL): Likewise. - (TMPL_ARG): Likewise. - (SET_TMPL_ARG): Likewise. - (TMPL_ARGS_DEPTH): Likewise. - (finish_member_template_decl): Use finish_template_decl. - (maybe_process_partial_specialization): New function, split out - from tsubst. - (inline_needs_template_parms): Use TMPL_PARMS_DEPTH. - (maybe_begin_member_template_processing): Use new macros. - (is_member_template): Likewise. - (is_member_template_class): Likewise. - (add_to_template_args): Likewise. Deal with multiple levels of - args. - (maybe_process_partial_specialization): New function. - (retrieve_specialization): Add consistency check. - (determine_specialization): Return full argument list. - (check_explicit_specialization): Tweak friend handling. Use full - argument lists. Simplify. - (current_template_args): Use new macros. - (push_template_decl_real): Change ill-named mainargs to specargs. - Check that a partial specialization actually specializes at least - one parameter. Improve friend handling. Modify for full - template arguments. - (classtype_mangled_name): Don't mangle the names of - specializations. - (lookup_template_class): Add entering_scope parameter. Use it to - avoid finding a template type when an instantiation is required. - Simplify. Use full template arguments. - (tsubst_friend_function): Use unregister_specialization. Use new - macros. Use full template arguments. - (tsubst_friend_class): Substitute, using tsubst_template_parms, - into the template parameters before passing them to - redeclare_class_template. - (instantiate_class_template): Simplify. Use full template - arguments. Adjust calls to get_class_bindings. Use - SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling. - (innermost_args): Use new macros. - (tsubst_aggr_type): New function, split out from tsubst. - (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling - conventions for lookup_template_class. Refine handling of partial - instantiations. Remove calls to complete_template_args. - Simplify. Add consistency checks. Use set_mangled_name_for_decl - and set_mangled_name_for_template_decl. - (tsubst_copy): Use tsubst_aggr_type. - (instantiate_template): Use full template arguments. - (more_specialized): Improve formatting. - (more_specialized_class): Adjust calls to get_class_bindings. - (get_bindings_real): Don't call complete_template_args. - (most_specialized): Don't overwrite input; create a new list. - (most_specialized_class): Use most_general_template. - (regenerate_decl_from_template): Use unregister_specialization. - Use full template arguments. - (instantiate_decl): Use full template arguments. - (set_mangled_name_for_template_decl): New function. - * semantics.c (begin_class_definition): Use - maybe_process_partial_specialization. - (finish_member_class_template): New function. - (finish_template_decl): Likewise. - (finish_template_type): Likewise. - (typeck.c): Don't crash after issuing a compiler_error. - * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict. - -1998-07-27 Jason Merrill - - * typeck2.c (build_functional_cast): Handle default-initialization. - - * call.c (build_over_call): Pass 1 to popclass. - - * parse.y (direct_notype_declarator): Add precedence declaration - to notype_unqualified_id case. - * Makefile.in (EXPECT): Adjust. - - * tree.c (ovl_member): Fix for single function in OVL. - -1998-07-27 Dave Brolley - - * c-lex.c (yylex): Fix boundary conditions in character literal and - string literal loops. - -1998-07-24 Jason Merrill - - * decl.c (lookup_name_real): OK, do return the from_obj value - unless got_object depends on template parms. - - * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT. - - * pt.c (coerce_template_parms): Also complain about local enums. - - * cp-tree.h: Add prototype for set_identifier_local_value. - * decl.c (set_identifier_local_value_with_scope): Make static, - prototype. - * search.c (covariant_return_p): Likewise. - * except.c (build_terminate_handler, alloc_eh_object): Likewise. - - * call.c (build_method_call): Only pull out the type of a destructor - if it's a template type parm. - * decl.c (lookup_name_real): Never return the from_obj value. - -1998-07-23 Jason Merrill - - * except.c (process_start_catch_block_old): Call start_decl_1 for - catch parm. - * decl.c (start_decl_1): Avoid duplicate error. - - * init.c (expand_default_init): Only perform the initialization if - it will do something. - -1998-07-23 H.J. Lu (hjl@gnu.org) - - * parse.y (base_class): Check for invalid base class. - -1998-07-23 Jason Merrill - - * decl2.c (import_export_template): Fold in... - (import_export_class): ...to here. Handle dllimport/export. - - * class.c (build_vtable): Pass at_eof to import_export_vtable. - (prepare_fresh_vtable): Likewise. - * decl2.c (import_export_class): Split out... - (finish_prevtable_vardecl): From here. - * class.c (finish_struct_1): Call import_export_class if at_eof. - - * decl.c (start_function): #if 0 mysterious code I wrote and have - forgotten why. - * rtti.c (get_tinfo_fn): If this is for a class type, set - DECL_CONTEXT. - -1998-07-22 Jason Merrill - - * inc/exception: Change terminate and unexpected to (). - - * parse.y (named_class_head_sans_basetype_defn): A - named_class_head_sans_basetype followed by '{' or ':' is a defn. - -1998-07-21 Jason Merrill - - * tree.c (canonical_type_variant): New fn to handle arrays. - * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove. - * pt.c (unify, default case): Also fold arg. Fix array bounds case. - * method.c (process_overload_item): Use build_overload_value for - arrays. - -1998-07-20 Dave Brolley - - * lex.c (mbchar.h): #include it. - (GET_ENVIRONMENT): New macro. - (init_parse): Set character set based on LANG environment variable. - (real_yylex): Handle multibyte characters in character literals. - (real_yylex): Handle multibyte characters in string literals. - -1998-07-19 Jason Merrill - - * lex.c (do_identifier): Look for class value even if we don't - have a global value. Do implicit declaration if parsing is 2. - * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig - lookup. - -1998-07-19 Mark Mitchell - - * decl.c (pushtag): Revert previous change. - * pt.c (lookup_template_class): Don't put out debugging - information for types that use template parameters. - - * decl.c (pushtag): Don't put out debugging information for - compiler-generated typedefs. - - * error.c (dump_type_real): Don't crash when presented with - intQI_type_node or the like. - - * semantics.c (finish_translation_unit): Fix spelling error in - comment. - -1998-07-17 Jason Merrill - - * decl.c (lookup_name_real): Pull out single function here. - (select_decl): Not here. - (unqualified_namespace_lookup): Use CP_DECL_CONTEXT. - - * decl.c (qualify_lookup): Tweak again. - - * pt.c (lookup_template_class): Don't mess with the context of the - instantiation. - * decl2.c (current_decl_namespace): Remove special handling for - templates. - - * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for - a member template specialization. - - * tree.c (ovl_member): Use decls_match to compare functions. - * decl.c (decls_match): Check the context of a function. - - * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER - in Koenig lookup support rules. - * semantics.c (finish_call_expr): Handle the new cases. - - * typeck.c (build_x_function_call): Handle overloaded methods. - - * decl.c (grokvardecl): Don't call build_static_name for extern "C". - -1998-07-16 Mark Mitchell - - * semantics.c (finish_object_call_expr): Revert previous change. - * call.c (build_new_method_call): Likewise. Instead, convert - TYPE_DECLs to IDENTIFIERs here, in the presence of templates. - -1998-07-16 Jason Merrill - - * decl.c (qualify_lookup): Handle templates. - - * decl2.c (do_using_directive): Don't pass ancestor. - * decl.c (push_using_directive): Calculate ancestor. - - * decl2.c (do_nonmember_using_decl): Allow for type shadowing. - * decl.c (pushdecl): Move type shadowing handling from here... - (duplicate_decls): ...to here. - * decl.c (set_identifier_local_value_with_scope): New fn. - (pushdecl): Use it. - (set_identifier_local_value, lookup_type_current_level): New fns. - * decl2.c (do_local_using_decl): Handle types and binding level - stuff properly. - - * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD. - * decl.c (select_decl): Extract a lone function from an OVERLOAD. - (lookup_namespace_name): Likewise. - * typeck.c (build_unary_op): Not here anymore. - - * decl2.c (do_class_using_decl): Make sure we get an identifier. - * class.c (handle_using_decl): Ignore TYPE_DECLs. - - * decl.c (qualify_lookup): New fn. - (lookup_name_real): Use it. - -1998-07-16 Martin v. Loewis - - * decl2.c (add_using_namespace): When directly using a namespace - that was indirect before, promote it. - - * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES, - LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY, - LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros. - * decl.c (select_decl): Replace two flag parameters by one. - (unqualified_namespace_lookup): Likewise, pass flag. - (lookup_flags): New function. - (lookup_name_real): Compute flags, pass them. - (lookup_namespace_name): Call with zero-flag. - * decl2.c (ambiguous_decl): Add flag parameter, complain only - according to flags. - (lookup_using_namespace, qualified_lookup_using_namespace): - Add flag parameter, pass them through. - * lex.c (do_scoped_id): Call with zero-flag. - -1998-07-16 Jason Merrill - - * typeck.c (convert_for_assignment): Use comptypes. - -1998-07-16 Mark Mitchell - - * semantics.c (finish_object_call_expr): Move test for the - function called being a TYPE_DECL to ... - * call.c (build_new_method_call): Here. - -1998-07-15 Jason Merrill - - * decl2.c (arg_assoc_class): Also look at template arguments, if any. - (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST. - - * lex.c (looking_for_typename): Don't initialize. - - * decl2.c (ambiguous_decl): Clarify error message. - - * decl.c (push_using_directive): Iterate over namespaces used - indirectly. - -1998-07-15 Martin v. Löwis - - * decl2.c (add_using_namespace): Iterate over namespaces used - indirectly. - - * decl.c (lookup_name_real): Accept namespace aliases as locals. - (cat_namespace_levels): Ignore aliases. - (duplicate_decls): Ignore duplicate aliases. - * decl2.c (do_namespace_alias): Process block level namespace - aliases. Store alias with pushdecl. Remove odr errors. - * parse.y (namespace_alias): New non-terminal. - (extdef): Use it. - -1998-07-15 Jason Merrill - - * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE. - Handle TEMPLATE_TYPE_PARM. - (arg_assoc): Rewrite. - - * pt.c (complete_template_args): Don't look at the context unless - we have to. - - * method.c (build_decl_overload_real): Fix namespace handling. - - * typeck.c (build_unary_op): Extract a lone function from an - OVERLOAD. - - * call.c (build_scoped_method_call): Handle getting a namespace - for basetype in a destructor call. - (check_dtor_name): Handle enums. - - * parse.y (using_directive): New nonterminal. - (extdef, simple_stmt): Use it. - -1998-07-14 Martin von Löwis - - * decl2.c (add_function): Move error message ... - (arg_assoc_namespace): ... from here. - -1998-07-14 Jason Merrill - - * parse.y (namespace_qualifier): Fix multiple level handling. - * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT. - (arg_assoc): Don't skip the first argument of a function. - -Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com) - - * search.c (my_tree_cons): Clean up. - -1998-07-14 Jason Merrill - - * call.c (joust): Don't warn about "confusing" conversions to the - same type. - -1998-07-14 Martin von Löwis - - * class.c (push_nested_class): Complain about namespaces. - * decl.c (start_decl): Enter the object's namespace. - (cp_finish_decl): Leave it. - (grokdeclarator): Likewise. - * decl2.c (check_decl_namespace): New function. - (finish_file): Call it. - * parse.y (complex_direct_notype_declarator): Set complexity - of namespace-qualified ids to -1, enter the namespace. - - * method.c (build_template_decl_overload): Expect _DECL as first - parameter. Put context temporarily into current_namespace. - * pt.c (check_explicit_specialization): Change caller. - (tsubst): Likewise. - - * init.c (build_offset_ref): Call mark_used and - convert_from_reference for namespace members. - -Mon Jul 13 23:25:28 1998 Martin von Löwis - - * search.c (my_tree_cons): The bitfield is at index 2. - -Mon Jul 13 17:21:01 1998 Nick Clifton - - * lang-options.h: Format changed to work with new --help support - in gcc/toplev.c - -1998-07-12 Martin von Löwis - - * decl2.c (build_expr_from_tree): Change calls of do_identifier. - Do Koenig lookup in CALL_EXPR. - (arg_assoc): Handle error_mark. - * lex.c (is_global): New function. - (do_identifier): Expect arguments for Koenig lookup. - * parse.y (primary): Add rules for calls of unqualified function calls. - (do_id): Change call of do_identifier. - * pt.c (finish_stmt_expr): Likewise. - * semantics.c (finish_id_expr): Likewise. - (finish_call_expr): Add integer parameter to indicate - argument-dependent lookup. - - * decl.c (struct binding_level): New field using_directives. - (push_using_decl): Not sorry anymore. - (push_using_directive): New function. - (lookup_tag): Use CP_DECL_CONTEXT to iterate. - (unqualified_namespace_lookup): New function, code from ... - (lookup_name_real): ... here. - * decl2.c (lookup_using_namespace): Pass using list instead of - initial scope. - (validate_nonmember_using_decl): New function. - (do_nonmember_using_decl): New function. - (do_toplevel_using_decl): Use them. - (do_local_using_decl): New function. - (do_using_directive): Support block-level directives. - * parse.y (simple_stmt): Support using declarations and - directives. - (namespace_qualifier, namespace_using_decl): New non-terminals. - - * xref.c (classname): New function. - (GNU_xref_hier): Change class and base parameters to tree. - * decl.c (xref_baseypes): Change caller. - * friend.c (make_friend_class): Likewise. - -1998-07-12 Kriang Lerdsuwanakij - - * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter - comparison. - - * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a - template template parameter, record its use. - (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse - its template arguments if exists. - - * pt.c (coerce_template_template_parms): New function equivalent - to coerce_template_parms when IS_TMPL_PARM is true. - (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter, - all callers changed. - - (coerce_template_parms): Access ARGLIST properly when creating a - new vector. Only accept implicit TYPE_DECL as valid argument for - a template template parameter when it is a base class of - current_class_type. Don't display error message when COMPLAIN is - false. - -1998-07-12 Klaus Kaempf (kkaempf@progis.de) - - * repo.c (get_base_filename): Use file_name_nondirectory. - (open_repo_file): Likewise. - * cp-tree.h (file_name_nondirectory): Add prototype. - -1998-07-12 Jason Merrill - - * friend.c (do_friend): Pull the identifier out of declarator. - Use cp_error and friends. - * decl2.c (qualified_lookup_using_namespace): Fix call to - purpose_member. - * decl.c (lookup_name_real): Don't call complete_type on a namespace. - (grokvardecl): Use DECL_CLASS_SCOPE_P. - * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner. - * class.c (warn_hidden): Fix for OVERLOAD. - From grahams@rcp.co.uk: - * cp-tree.h (DEFARG_NODE_CHECK): New macro. - (DEFARG_LENGTH, DEFARG_POINTER): Use it. - -Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com) - - * g++.1 (-traditional): Remove duplicated documentation. - -1998-07-11 Mark Mitchell - - * method.c (flush_repeats): Add nrepeats parameter. - (issue_nrepeats): Likewise. - (is_back_referenceable_type): New function. Don't back-reference - TEMPLATE_TYPE_PARMs as well as simple types like integers. - (build_mangled_name_for_type): Likewise. - (build_mangled_name_for_type_with_Gcode): Likewise. - (lasttype): Remove. - (nrepeats): Likewise. - (Nrepeats): Likewise. - (start_squangling): Don't clear the variables removed above. - (end_squangling): Likewise. - (flush_repeats): Tidy. Use nrepeats parameter rather than - Nrepeats global. - (issue_nrepeats): Likewise, but with nrepeats global. Use - is_backreferenceable_type. - (build_overload_nested_name): Tidy. Add comment. Use - build_mangled_name_for_type. - (build_underscore_int): Comment. - (build_overload_scope_ref): Use build_mangled_name_for_type. - (build_overload_int): Likewise. - (build_template_template_parm_names): Tidy. - (build_template_parm_names): Use build_mangled_name_for_type. - (build_overload_identifier): Add comments. - (build_mangled_name_for_type_with_Gcode): Split out from - build_mangled_name. - (build_mangled_name_for_type): Use it. - (build_mangled_name): Rework to use build_mangled_name_for_type - and to not use global nrepeats/Nrepeats. Tidy. - (process_modifiers): Tidy. - (check_btype): Use is_backreferenceable_type. Add comment. - Rename `node' to `type'. - (process_overload_item): Set numeric_output_need_bar here. - Use build_mangled_name_for_type. Tidy. - (build_decl_overload_real): Tidy. Don't use Nrepeats. Use - build_mangled_name_for_type. - - * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO - for TYPE_DECLs. - -1998-07-08 Vladimir N. Makarov - - * cp-tree.h (warn_long_long): Define. - * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for - warning "ANSI C++ does not support `long long'". - * decl2.c (warn_long_long): Define. - (lang_decode_option): Parse -Wlong-long, -Wno-long-long options. - -1998-07-07 Jason Merrill - - * decl.c (xref_tag): Handle attributes between 'class' and name. - * parse.y (aggr): Likewise. - * semantics.c (finish_class_definition): Likewise. - * Makefile.in (EXPECTED): Adjust. - - * cp-tree.h: Declare flag_optional_diags and warn_multichar. - * decl2.c: Define them. - (lang_decode_option): Handle them. - * lang-options.h: Add -foptional-diags. - * class.c (finish_struct): Don't complain about multiple meanings of - name if -fno-optional-diags. - * decl.c (pushdecl_class_level): Likewise. - * lex.c (real_yylex): Check warn_multichar. - -1998-07-06 Jason Merrill - - * decl.c (lookup_tag): Use CP_DECL_CONTEXT. - - * tree.c (make_binfo): Fix length. - -1998-06-30 Benjamin Kosnik - - * decl2.c (lang_decode_option): Remove warn_template_debugging. - * lang-options.h: Likewise. - -Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi - - * except.c (build_eh_type_type_ref): Remove unused variable `susp'. - (process_start_catch_block): Likewise for variables - `false_label_rtx', `call_rtx' and `return_value_rtx'. - -1998-06-29 Brendan Kehoe - - * tree.c (build_srcloc): Make sure we allocate this node on the - permanent obstack. - -Sat Jun 27 23:34:18 1998 Fred Fish - - * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined. - (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY. - (lang_specific_driver): Only add -lm automatically if need_math is - nonzero. - -Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o - -Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi - - * Makefile.in (EXPR_H): New dependency variable. - (decl2.o): Depend on $(EXPR_H). - (typeck.o): Likewise. - (init.o): Likewise. - (expr.o): Likewise. - -1998-06-25 Benjamin Kosnik - - * decl.c (start_enum): Put local enums on permanent_obstack. - -1998-06-25 Mark Mitchell - - * cp-tree.h (c_get_alias_set): Declare. - * decl.c (init_decl_processing): Set lang_get_alias_set. - -1998-06-25 Andrew MacLeod - - * cp-tree.h (mark_all_runtime_matches): Add function prototype. - * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED - flag for all function decls which are in the exception table. - * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match. - * decl2.c (finish_file): Call mark_all_runtime_matches to make sure - code is emitted for any referenced rtti function. - -1998-06-25 Dave Brolley - - * lang-specs.h: Use new | syntax to eliminate - string concatenation. - -1998-06-25 Jason Merrill - - * cp-tree.h (CP_DECL_CONTEXT): New macro. - * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it. - * method.c (build_overload_nested_name): Likewise. - * sig.c (build_signature_pointer_or_reference_type): Don't set - DECL_CONTEXT. - -1998-06-24 Martin v. Löwis - - Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace. - * cp-tree.h (FROB_CONTEXT): New macro. - (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE. - * decl.c (namespace_binding): Replace NULL_TREE with - global_namespace. - (set_namespace_binding, pop_namespace, lookup_name_real): Likewise. - * decl2.c (is_namespace_ancestor, lookup_using_namespace): - Likewise. - * decl.c (pushtag): Use FROB_CONTEXT. - (pushdecl, make_typename_type, define_function, grokdeclarator): - Likewise. - * decl2.c (set_decl_namespace, do_namespace_alias): Likewise. - * pt.c (push_template_decl_real, lookup_template_class, tsubst): - Likewise. - * decl2.c (decl_namespace): Return global_namespace if no context. - * method.c (build_overload_nested_name): Expect null as context. - * pt.c (mangle_class_name_for_template): Do nothing for null - contexts. - (lookup_template_class): Allow for null id_context. - -1998-06-25 Richard Henderson - - * method.c (emit_thunk): Set current_function_is_thunk for the - ASM_OUTPUT_MI_THUNK case as well. - -1998-06-23 Andrew MacLeod - - * exception.cc (__cplus_type_matcher): Get a match_info pointer - instead of an exception table entry as a parameter. - -1998-06-23 Andrew MacLeod - - * parse.y (function_try_block): Don't call start_catch_handler. - * except.c (call_eh_info): Remove coerced field from declaration. - (build_eh_type_type_ref): New function to create an address of a - rtti function for the new style exception tables. - (expand_start_catch_block): Split function, this contains the - common part. - (process_start_catch_block_old): New function to perform the rest - of expand_start_catch_block under old style exceptions. - (process_start_catch_block_old): New function to perform the rest - of expand_start_catch_block under new style exceptions. - (expand_end_catch_block): Only pop the false label off the stack under - the old style of exceptions. - * semantics.c (finish_try_block): Don't call start_catch_handler. - * exception.cc (struct cp_eh_info): Add original_value field. - (__cplus_type_matcher): Perform type matching on the original exception - value, and if we have a match, set the current value. - (__cp_push_exception): Set the original exception value. - -1998-06-23 Jason Merrill - - * call.c (joust): Fix confusing conversion warning. - - * call.c (build_op_delete_call): Add placement parm. Check - LOOKUP_SPECULATIVELY. - * cp-tree.h, decl2.c, init.c: Adjust. - * decl.c (finish_function): Use it. - - * pt.c (tsubst): Diagnose creating void fields or variables. - -Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi - - * call.c (build_scoped_method_call): Remove unused variable `tmp'. - - * cp-tree.h (check_dtor_name): Add prototype. - - * init.c (expand_member_init): Remove unused variables - `ptr_type_node', `parm' and `rval'. - - * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier - in call to fprintf. - (lang_print_xnode): Likewise. - - * typeck2.c (enum_name_string): Cast argument to sprintf to long - and use %ld specifier. - - * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC - specifier in call to fprintf. - (GNU_xref_member): Cast argument to sprintf to int. - -Fri Jun 19 23:22:42 1998 Bruno Haible - - * typeck2.c (pop_init_level): Warn about implicit zero initialization - of struct members. - -Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi - - * cp-tree.h: Prototype function `check_java_method'. - -1998-06-17 Jason Merrill - - * class.c (finish_struct): Make conflicting use of id a pedwarn. - * decl.c (pushdecl_class_level): Likewise. - -1998-06-17 Mark Mitchell - - * pt.c (convert_nontype_argument): Issue an error when presented - with an integer (real) constant that cannot be simplified to an - INT_CST (REAL_CST). - - * cp-tree.h (c_get_alias_set): Remove declaration added in - 1998-06-13 change that should never have been checked in. - -1998-06-17 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Change % in format strings - to %%. - - * decl.c (grokvardecl): Don't build_static_name for decls that - aren't at namespace scope. - - * init.c (perform_member_init): Catch default-initialization of - references. - -1998-06-17 Mark Mitchell - - * errfn.c (cp_thing): Handle the `%%' formatting sequence. - -1998-06-17 Jason Merrill - - * method.c (hack_identifier): Complain about getting a namespace - or class template. - * typeck.c (decay_conversion): Remove check for namespaces. - * typeck2.c (incomplete_type_error): Likewise. - * parse.y (template_arg): Add PTYPENAME expansion. - -1998-06-16 Andrew MacLeod - - * decl.c (grokvardecl): Don't build external assembler names for - TYPENAMEs in other namespaces as there is no declarator. - * error.c (cp_file_of, cp_line_of): Don't extract file or line number - info from DECL_CONTEXT if it is NULL. - -1998-06-16 Jason Merrill - - * call.c (check_dtor_name): Split out. - (build_scoped_method_call): Use it. - (build_method_call): Use it. - * init.c (build_offset_ref): Use it. - - * typeck.c (build_static_cast): Fix handling of pointers to members. - - * decl.c (finish_function): Just return nothing from a constructor. - * typeck.c (c_expand_return): Complain about returning a void - expression from a destructor. - -1998-06-13 Mark Mitchell - - * class.c (alter_access): Accept a BINFO explaining how to get - from the entity whose accessed is being altered to the type doing - the altering. - (handle_using_decl): New function containing code split out from ... - (finish_struct_1): Here. - - * cp-tree.h (complete_type_or_else): Declare. - * init.c (build_new_1, build_delete): Use it. - * typeck.c (require_complete_type): Use complete_type, rather than - expanding it inline. - (complete_type_or_else): New function. - (build_component_ref): Use it. - (pointer_int_sum): Make sure the type pointed to is complete. - (pointer_diff): Likewise. - - * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for - types. - - * search.c (get_matching_virtual): Note that member templates - cannot override virtual functions. - -1998-06-12 Brendan Kehoe - - * pt.c (check_explicit_specialization): If DECLARATOR turned into - an error_mark_node from lookup_template_function, return the same. - (determine_specialization): Also make sure TEMPLATE_ID isn't an - error_mark_node, before we try to read its operands. - * decl.c (grokdeclarator): If we got an error_mark_node from - check_explicit_specialization, just return it right back. - -1998-06-12 Mark Mitchell - - * class.c (instantiate_type): Don't treat template-ids that don't - specify any template arguments as equivalent to ordinary - identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to - pointer-to-members for member templates. Tidy slightly. - * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation. - * init.c (build_offset_ref): Handle template-ids like ordinary - identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the - offset part of the OFFSET_REF. - * typeck.c (build_unary_op): Change check for unknown types to - look for OFFSET_REFs, not SCOPE_REFs. - -1998-06-11 Mark Mitchell - - * pt.c (is_member_template_class): New function. - (push_template_decl_real): Use it. - -1998-06-11 Benjamin Kosnik - - * friend.c (do_friend): Add support for nested classes using - member functions of the enclosing class as friends. - -1998-06-10 Mark Mitchell - - * call.c (convert_default_arg): Make global, not static. - (convert_arg_for_ellipsis): Split out from ... - (build_over_call): Here. - * cp-tree.h (convert_default_arg); Declare. - (convert_arg_to_ellipsis): Likewise. - (do_member_init): Remove. - * init.c (do_member_init): Remove; this code is dead. - (expand_member_init): Remove much of this code; it is dead. - * typeck.c (convert_arguments): Use convert_default_arg and - convert_arg_for_ellipsis, rather than duplicating here. - - * call.c (convert_like): Don't fail silently if - build_user_type_conversion fails. Always return error_mark_node - for failure. - -1998-06-10 Jason Merrill - - * search.c (covariant_return_p): Complain about ambiguous base. - - * typeck.c (build_component_ref): Diagnose ref to nested type. - -1998-06-10 Brendan Kehoe - - * decl.c (grokparms): Check that INIT isn't an error_mark_node - before giving error about invalid type for default arg. - -1998-06-10 Jason Merrill - - * call.c (build_method_call): Fix thinko. - -1998-06-10 Dave Brolley - - * decl2.c (lang_decode_option): New argc/argv interface. - * cp-tree.h (lang_decode_option): New argc/argv interface. - * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is - specified for cpplib-enabled compilers. - * lex.c (lang_init): Don't check_newline for cpplib. - (init_parse): Don't initialize cpplib here. - -1998-06-10 Brendan Kehoe - - * typeck.c (build_component_ref): Make sure FIELD has a lang_specific - piece before checking DECL_MUTABLE_P. - -1998-06-10 John Carr - - * tree.c (debug_binfo): Make printf format match arguments. - - * error.c (OB_PUTI): Make printf format match arguments. - -1998-06-10 Jason Merrill - - * init.c (perform_member_init): Handle default-initialization. - - * except.c (build_throw): Handle throwing NULL. - - * typeck.c (build_x_function_call): Use resolve_offset_ref. - - * search.c (compute_access): Only strip an anonymous union - for a FIELD_DECL. - - * call.c (add_builtin_candidates): Tweak. - - * cvt.c (build_expr_type_conversion): Restore code for conversion - from class types. - * decl2.c (delete_sanity): Use it. Clean up. - - * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons. - -1998-06-10 Branko Cibej - - * typeck.c (c_expand_return): Don't warn about void expressions on - return statements in functions returning void. - -1998-06-09 Mark Mitchell - - * pt.c (fn_type_unification): Revise documentation. Tidy. - (type_unification): Likewise. - -1998-06-09 Andrew MacLeod - - * semantics.c (finish_try_block): Rename expand_start_catch, and delete - expand_end_catch. - * parse.y (function_try_block): Rename expand_start_catch, and delete - expand_end_catch. - * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete - expand_end_catch. - -1998-06-09 Jason Merrill - - * search.c (lookup_member): New fn. - * class.c (finish_struct_1): Use it. - * decl.c (lookup_name_real): Use it. - -Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi - - * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h. - - * cp-tree.h: Add prototype for `maybe_print_template_context' and - `maybe_make_one_only'. - - * decl.c (auto_function): Remove unused variable `decl'. - - * decl2.c: Include dwarf2out.h and dwarfout.h. - - * lex.c: Remove redundant declarations of `set_float_handler' and - `asm_out_file'. - -1998-06-08 Andrew MacLeod - - * except.c (init_exception_processing): Remove NEW_EH_MODEL compile - time flag. Call __cp_eh_info instead of __cp_exception_info. - * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag. - (__cp_exception_info): Return offset into cp_eh_info structure to - match what use to be the start of this structure. - (__cp_eh_info): New function to return a pointer to cp_eh_info struct. - (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL - compile time flag. - (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call - __cp_eh_info instead of __cp_exception_info. - -1998-06-08 Jason Merrill - - * decl.c (cp_finish_decl): Disable inlining of extern inlines - with static variables. - -1998-06-08 Mark Mitchell - - * init.c (build_offset_ref): Correct previous change to use build, - not build_min. - -1998-06-07 Mark Mitchell - - * class.c (instantiate_type): Handle pointer-to-members where the - member is a template. - * init.c (build_offset_ref): Likewise. - * typeck.c (build_unary_op): Likewise. - -1998-06-07 Richard Henderson - - * lex.c (lang_init_options): New function. - (lang_init): Remove flag_exceptions == 2 hack. - -1998-06-05 Jason Merrill - - * search.c (envelope_add_decl): Tweak for implicit typename. - - * call.c (joust): Also warn about confusing conversion op/constructor - overload resolution. - - * spew.c (yylex): Also return the TYPE_DECL if got_object. - Don't clear got_object after '~'. - * call.c (build_scoped_method_call): Tweak destructor handling. - (build_method_call): Likewise. - * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with - TYPE_MAIN_VARIANT for destructors. - * semantics.c (finish_object_call_expr): Complain about calling a - TYPE_DECL. - -1998-06-05 Per Bothner - - * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles): - Define - update needed by gcc.c change. - -1998-06-05 Jason Merrill - - * error.c (cp_printers): Use 'o' instead of '_' for the null entry. - -1998-06-05 Martin v. Loewis - - * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare. - * decl.c (lookup_name_real): Add namespaces_only parameter. - If set, return only NAMESPACE_DECLs. - (select_decl): Likewise. - (identifier_type_value): Give additional parameter. - (lookup_name_nonclass): Likewise. - (lookup_name): Likewise. - (find_binding): Skip namespace aliases. - (binding_for_name): Likewise. - (push_namespace): Check for namespace aliases. - (lookup_name_namespace_only): New function. - (begin_only_namespace_names, end_only_namespace_names): New functions. - * decl2.c (set_decl_namespace): Skip namespace aliases. - (do_using_directive): Likewise. - (do_namespace_alias): Produce namespace aliases, fix alias - redeclaration. - * error.c (dump_decl): Support SCOPE_REF. - * parse.y (extdef): Wrap lookup with namespace_only for namespace - aliases and using declarations. - -1998-06-04 Jason Merrill - - * tree.c (really_overloaded_fn): Only see through one TREE_LIST. - - * error.c (dump_expr): Clean up NEW_EXPR case. - -1998-06-04 Martin von Löwis - - Suggested by Brendan Kehoe - * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL, - treat it as using ::decl. - - * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE. - - * tree.c (mapcar): Support NEW_EXPR. - - * error.c (dump_expr): Support NEW_EXPR. - -1998-06-03 Jason Merrill - - * method.c (make_thunk): Use overload machinery to make name. - * search.c (covariant_return_p): New fn. - (get_matching_virtual): Use it. - - * init.c (build_new_1): Fix check for void. - -1998-06-01 Per Bothner - - * cp-tree.h (TYPE_FOR_JAVA): New macro. - * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node, - java_int_type_node, java_long_type_node, java_float_type_node, - java_double_type_node, java_char_type_node, java_boolean_type_node): - New "primitive" types, with predefined names __java_byte etc. - (record_builtin_java_type): New function. - (init_decl_processing): Make Java types with record_builtin_java_type. - (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA". - (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class. - (grokfndecl): Call check_java_method for Java classes. - * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA. - (process_overload_item): Match types against specific - java_XX_type_node types, rather than using is_java_type. - * class.c (finish_struct_1): Don't add default copy constructor - or operator= if TYPE_FOR_JAVA. - (pop_lang_conext): Restore strict_prototyp proper if Java. - * decl2.c (acceptable_java_type, check_java_method): New functions. - * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern. - (tsubst): Move common statement after if statement. - * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match. - -1998-06-01 Jason Merrill - - * pt.c (for_each_template_parm): Use first_rtl_op. - - * tree.c (build_cplus_array_type_1): Also check index_type for - template parms. - -1998-05-31 Jason Merrill - - * pt.c (tsubst): Always copy BINFO_BASETYPES. - -1998-05-29 scott snyder - - * tree.c (layout_basetypes): If we change TYPE_SIZE, change - TYPE_SIZE_UNIT too. - -1998-05-29 Mark Mitchell - - * decl.c (grokdeclarator): Don't complain about in-class - initialization of static consts if we don't really know the type - of the variable. - -1998-05-29 Jason Merrill - - * cp-tree.h (DECL_DESTRUCTOR_P): New macro. - * method.c (build_destructor_name): New fn. - * decl2.c (maybe_retrofit_in_chrg): Split out... - (grokclassfn): From here. Reorganize. - * decl.c (grok_ctor_properties): Make sure ctors for types with - vbases have the in_chrg parm. - * pt.c (instantiate_class_template): Update - TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call - grok_*_properties. - (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg. - -1998-05-28 Mark Mitchell - - * pt.c (instantiate_decl): Make test for whether or not static - variables should be instantiated early match its comment. - -1998-05-28 Jason Merrill - - * decl.c (start_decl): Always pedwarn about vacuously redeclaring - a member. - (start_function): Call check_default_args. - * decl2.c (grokfield): Don't call check_default_args. - (check_default_args): Use cp_error_at. - * lex.c (do_pending_defargs): Call check_default_args. - -1998-05-27 Brendan Kehoe - - * call.c (build_method_call): Make sure get_type_value returns - something before we try to use its TYPE_MAIN_VARIANT. - (build_scoped_method_call): Likewise. - -1998-05-27 Jason Merrill - - * typeck2.c (digest_init): Complain about getting a TREE_LIST to - initialize an array. - - * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and - DECL_VIRTUAL_P. - - * friend.c (do_friend): Clarify template warning. - -1998-05-27 Mark Mitchell - - * decl.c (shadow_label): Don't treat decls as identifiers. - (maybe_push_to_top_level): Clear shadowed_labels. - - * pt.c (instantiate_decl): Reset lineno and filename after calling - regenerate_decl_from_template. - - * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an - error_mark_node. - -1998-05-27 Kevin Buhr - - * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE. - -1998-05-26 Kriang Lerdsuwanakij - - * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes. - (convert_nontype_argument): Handle cases when nontype template - parameters become classes after substitution. - -1998-05-26 Mark Mitchell - - * friend.c (is_friend): Use comptypes, rather than == to compare - types. Modify for new representation of template friends. - (make_friend_class): Likewise. - * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak. - (instantiate_class_template): Deal with template friends. - - * decl.c (store_parm_decls): Remove redundant call to - expand_main_function. - -1998-05-26 Benjamin Kosnik - - * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before - DECL_USE_TEMPLATE. - -1998-05-26 Per Bothner - - * language_as_string: Handle lang_java. - -1998-05-26 Jason Merrill - - * decl.c (pushdecl): Don't copy the type_decl. - -1998-05-26 Martin v. Löwis - - * class.c (pushclass): Always store TYPE_MAIN_VARIANT in - current_class_type. - * decl.c (grokdeclarator): Put typedefs on the type's obstack. - - * parse.y (complex_direct_notype_declarator): Use $1 to access - scope of notype_qualified_id. - -1998-05-26 Dave Brolley - - * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib. - (init_parse): Initialize cpplib interface. - - * Makefile.in (CXX_OBJS): Make sure dependencies never end with an - empty continuation. - -1998-05-26 Mark Mitchell - - * decl.c (pushtag): Avoid crashing on erroneous input. - -1998-05-25 Martin v. Löwis - - * decl.c (push_namespace): Only produce one unique name for - anonymous namespaces. - (get_unique_name): Remove. - -1998-05-25 Mark Mitchell - - * call.c (tourney): Don't do any extra comparisons. - - * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions. - - * cp-tree.h (processing_template_parmlist): Declare. - * decl.c (pushtag): Don't call push_template_decl when we - shouldn't. - * pt.c (processing_template_parmlist): New variable. - (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro. - (complete_template_args): Use it. - (add_to_template_args): Likewise. - (innermost_args): Likewise. - (tsubst): Likewise. - (begin_template_parm_list): Use processing_template_parmlist. - (end_template_parm_list): Likewise. - - * cp-tree.h (ANON_UNION_TYPE_P): New macro. - * decl.c (grokdeclarator): Use it. - * decl2.c (grok_x_components): Likewise. - * init.c (initializing_context): Likewise. - * method.c (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - * search.c (compute_access): Likewise. - * typeck.c (build_component_ref): Likewise. - - * decl.c (grokdeclarator): Don't give a cv-qualified version of an - unnamed type a typedef name "for linkage purposes". - - * pt.c (lookup_template_class): Don't look at - IDENTIFIER_CLASS_VALUE when there's no current_class_type. - - * method.c (build_overload_int): Handle error cases gracefully. - - * pt.c (instantiate_decl): Handle static member variables - correctly. - - * pt.c (tsubst): Use the tsubst'd type when producing new - TEMPLATE_PARM_INDEX nodes. - -1998-05-24 Mark Mitchell - - * tree.c (cp_tree_equal): Handle pointers to member functions. - - * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make - sure the type of the REF_BIND is a reference type. - (maybe_handle_ref_bind, compare_ics): Rename reference_type to - target_type for clarity. - - * parse.y (xcond): Move call to condition_conversion ... - * semantics.c (finish_for_cond): Here. - * parse.c: Regenerated. - -1998-05-24 Jason Merrill - - * decl.c (push_namespace): Namespaces have type void. - * typeck2.c (incomplete_type_error): Complain about namespace - used as expression. - * typeck.c (decay_conversion): Likewise. - -1998-05-24 Martin von Löwis - - * error.c (dump_expr): Support namespaces. - -1998-05-23 Jason Merrill - - * cp-tree.def: Add SRCLOC. - * cp-tree.h: Add struct tree_srcloc and accessor macros. - * tree.c (build_srcloc, build_srcloc_here): New fns. - * pt.c (add_pending_template): Use build_srcloc_here. - (push_tinst_level): Update last_template_error_tick before erroring. - (instantiate_decl): Restore lineno and input_filename before - calling add_pending_template. - * decl2.c (finish_file): Set up lineno and input_filename for - pending templates. - -1998-05-22 Jason Merrill - - * decl.c (lang_print_error_function): New fn. - (init_decl_processing): Set print_error_function to use it. - * errfn.c (cp_thing): Don't call maybe_print_template_context here. - - * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and - ICS_BAD_FLAG. - - * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for - copy-initialization. - - * class.c (build_vtable_entry): Use int_fits_type_p. - (build_vtable): Pass a signed offset to build_vtable_entry. - (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1, - set_rtti_entry): Likewise. - -1998-05-22 Per Bothner - - * cp-tree.h: Add comments documenting which LANG_FLAGS are used. - (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used. - -1998-05-22 Jason Merrill - - * pt.c (print_template_context): Use fprintf instead of cp_error. - - * pt.c (determine_specialization): Just return an error_mark_node. - Also print the decl we want in error messages. If we complain, - return error_mark_node. - (tsubst_friend_function): Set lineno and input_filename so - error messages will be useful. - (instantiate_template): Just return an error_mark_node. - (check_explicit_specialization): Don't mess with a returned - error_mark_node. - - * pt.c (print_template_context): Add new argument. - (maybe_print_template_context): New fn. - (push_tinst_level): Increment tinst_level_tick. - (pop_tinst_level): Likewise. - * errfn.c (cp_thing): Call maybe_print_template_context. Use - xrealloc instead of xmalloc. - - * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT. - -1998-05-21 Jason Merrill - - * pt.c (tsubst_friend_class): Don't call redeclare_class_template - if the template we looked up is the same as the one we already - have. - -Thu May 21 11:54:44 1998 Dave Brolley - - * lex.c: (handle_sysv_pragma): FILE* parameter not used. - (cpp_reader,parse_in): Add for cpplib. - (check_newline): Call handle_sysv_pragma with new interface. - (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line. - - * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib. - (sub_getch): Call GETC for cpplib. - - * cp-tree.h: (get_directive_line): Different prototype for cpplib. - (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line. - - * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib. - -1998-05-21 Jason Merrill - - * decl2.c (maybe_make_one_only): New fn. - (import_export_vtable): Use it. - (import_export_decl): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - -1998-05-21 Mark Mitchell - - * decl2.c (find_representative_member): Rename to ... - (build_anon_union_vars): New function. - (finish_anon_union): Fix stupidity of previous change. - -1998-05-20 Jason Merrill - - * decl.c (grokfndecl): Handle definition of specialization in - friend declaration. - - * error.c (dump_decl): Fix LOOKUP_EXPR handling. - -1998-05-20 Mark Mitchell - - * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P - to look for type declarations. - (finish_struct): Deal with templates on the CLASSTYPE_TAGS list. - * cp-tree.h (DECL_DECLARES_TYPE_P): New macro. - (finish_member_class_template): Declare. - * decl.c (pushtag): Put member class templates on the - CLASSTYPE_TAGS list, just as for ordinary member classes. - (pushdecl_class_level): Use DECL_DECLARES_TYPE_P. - (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with - IDENTIFIER_NAMESPACE_VALUEs. - * parse.y (component_decl): Move code to ... - * semantics.c (finish_member_class_template): New function. - Don't put member class templates on the list of components for a - class. - * parse.c: Regenerated. - * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types. - In fact, don't use DECL_CONTEXT at all here. - -1998-05-20 Martin von Loewis - - * decl.c (record_unknown_type): New function. - (init_decl_processing): Call it for the unknown and global type - nodes. - -1998-05-20 Mark Mitchell - - * decl2.c (find_representative_member): New function. - (finish_anon_union): Use it. - - * cp-tree.h (MAIN_NAME_P): New macro. - (DECL_MAIN_P): Likwise. - * decl.c (pushdecl): Avoid crashing on redefinitions of `main'. - (grokfndecl): Use the new macros. - (grokdeclarator): Likewise. - (start_function): Likewise. - (store_parm_decls): Likewise. - (finsh_function): Likewise. - * friend.c (do_friend): Likewise. - * typeck.c (build_function_call_real): Likewise. - (build_unary_op): Likewise. - -Wed May 20 02:16:01 1998 Jason Merrill - - * decl2.c (start_objects, finish_objects, do_dtors, - do_ctors): Split out from... - (finish_file): ...here. - -Tue May 19 20:36:23 1998 Jason Merrill - - * tree.c (is_overloaded_fn): Don't abort on placeholders from - push_class_decls. - -Tue May 19 15:16:22 1998 Brendan Kehoe - - * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node. - - * error.c (dump_expr): Handle an ARROW_EXPR. - -Tue May 19 15:13:39 1998 Mark Mitchell - - * decl.c (saveable_obstack): Declare. - (pushdecl): Copy TYPE_DECLs to the same obstack as the type they - declare, if necessary. - -Tue May 19 14:50:27 1998 Mark Mitchell - - * call.c (compare_qual): Remove. - (is_subseq): Tweak. - (is_properly_derived_from): New function. - (maybe_handle_ref_bind): Likewise. - (maybe_handle_implicit_object): Likewise. - (compare_ics): Modify substantially to bring into conformance with - the standard. - * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro. - (comp_cv_qualification): Declare. - (comp_cv_qual_signature): Likewise. - * typeck.c (comp_cv_qualification): Likewise. - (comp_cv_qual_signature): Likewise. - -Tue May 19 10:05:02 1998 Kaveh R. Ghazi - - * Makefile.in (parse.o): Depend on toplev.h. - - * class.c (typecode_p): Remove prototype and definition. - - * cp-tree.h (currently_open_class, is_empty_class, member_p): - Add prototype. - - * decl.c (push_overloaded_decl_top_level): Remove prototype and - definition. - - * errfn.c (cp_error): Cast function pointer `error' to (errorfn *) - in call to `cp_thing'. - (cp_warning): Likewise for function pointer `warning'. - - * except.c (do_function_call): Remove prototype and definition. - (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL. - - * method.c (is_java_type): Add prototype and make it static. - - * parse.y: Include toplev.h. - - * pt.c (type_unification): Remove unused variable `arg'. - (instantiate_decl): Likewise for `save_ti'. - - * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'. - -Tue May 19 02:43:25 1998 Jason Merrill - - * init.c (build_member_call): Handle template_ids. - * parse.y (primary): Add global_scope template_id. - -Mon May 18 23:22:52 1998 Jason Merrill - - * decl2.c (get_sentry): Use end_temporary_allocation. - Don't declare permanent_obstack. - -Mon May 18 12:28:44 1998 Mark Mitchell - - * parse.y (.finish_new_placement): New non-terminal. - (unary_expr, new_type_id): Use it. - * parse.c: Regenerated. - -Mon May 18 12:20:27 1998 Brendan Kehoe - - * pt.c (redeclare_class_template): Say where the original definition - of the template-parameter's default argument appeared. - -Mon May 18 03:00:57 1998 Jason Merrill - - * call.c (build_over_call): Tweak empty class handling. - - * decl.c (make_typename_type): Use currently_open_class. - - * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG. - -Mon May 18 01:43:01 1998 Martin v. Loewis - - * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE - for a type unless it is one. - - * class.c (finish_struct_1): Use OVL_CURRENT in error message. - -Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (program_transform_name, objdir): Define. - - * Makefile.in (BISON): Use bison from the build tree if it exists. - (FLEX): Likewise. - -Sun May 17 14:52:08 1998 Martin v. Loewis - - * typeck.c (type_unknown_p): Return true for TREE_LIST also. - - * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs. - -Sun May 17 14:51:41 1998 Jason Merrill - - * call.c (build_scoped_method_call): Likewise. - -Sun May 17 13:53:48 1998 Mark Mitchell - - * init.c (build_new_1): Call suspend_momentary around the creation - of values that must be saved for exception handling. - * parse.y (.build_new_placement): New non-terminal. - (unary_expr, new_placement): Use it. - * parse.c: Regenerated. - -Sun May 17 12:32:08 1998 Jason Merrill - - * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare - old and new types. - - * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the - canonical type. - - * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace. - -Fri May 15 20:28:00 1998 Jason Merrill - - * decl.c (start_decl): Revert problem change. - - * Makefile.in (CONFLICTS): Fix. - -Fri May 15 15:34:02 1998 Benjamin Kosnik - - * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits. - -Fri May 15 00:46:05 1998 Jason Merrill - - * class.c (finish_struct_1): Use BINFO_SIZE. - - * decl.c (start_decl): Use 'tem'. - -Thu May 14 16:30:47 1998 Andrew MacLeod - - * exception.cc: Include eh-common.h. - (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL. - (__cplus_type_matcher): First stab at new C++ runtime type matcher. - (__cp_push_exception): Initialize eh_info struct as well. - * except.c: Remove local structs and include eh-common.h. - (init_exception_processing): Set language and version codes. - (call_eh_info): Add presence of eh_info to runtime description of - struct cp_eh_info. - (expand_end_eh_spec): Call start_catch_block() and end_catch_block(). - * semantics.c (finish_try_block): Call start_catch_block() and - end_catch_block(). - * parse.y (function_try_block): Call start_catch_block() and - end_catch_block(). - -Thu May 14 12:27:34 1998 Brendan Kehoe - - * typeck.c (original_type): New function. - (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2, - to see if they're actually the same. - * cp-tree.h (original_type): Declare. - -Wed May 13 12:54:30 1998 Kaveh R. Ghazi - - * Makefile.in (lex.o): Depend on output.h. - - * call.c (add_function_candidate): Remove unused variable `cand'. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - - * cp-tree.h: Add prototype for `types_overlap_p'. - - * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED. - - * decl2.c (merge_functions): Remove unused variables `tmp' and - `tempn'. - - * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED. - (code_as_string): Likewise. - (language_as_string): Likewise. - (parm_as_string): Likewise. - (op_as_string): Likewise. - (assop_as_string): Likewise. - (cv_as_string): Likewise. - - * lex.c: Include output.h. - - * pt.c (type_unification): Cast first argument of `bzero' to a char*. - - * search.c (dfs_no_overlap_yet): Mark parameter `t' with - ATTRIBUTE_UNUSED. - - * tinfo.cc (__class_type_info::dcast): Change the type of variable - `i' from int to size_t. - - * typeck.c (language_lvalue_valid): Mark parameter `exp' with - ATTRIBUTE_UNUSED. - -Tue May 12 21:37:49 1998 Jason Merrill - - * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or - DECL_NAMESPACE_SCOPE_P. - (lang_decl_name): Likewise. - * pt.c (tsubst_friend_function, tsubst): Likewise. - * decl.c (pushdecl, redeclaration_error_message, start_decl, - cp_finish_decl, start_function): Likewise. - * class.c (finish_struct_1): Likewise. - * call.c (build_over_call): Likewise. - (compare_ics): Use DERIVED_FROM_P. - -Tue May 12 07:24:18 1998 Mark Mitchell - - * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro. - * method.c (build_mangled_name): Use it. - (build_decl_overload_real): Likewise. - - * error.c (dump_simple_decl): New function, broken out from ... - (dump_decl): Use it. - -Mon May 11 11:38:07 1998 Mark Mitchell - - * ptree.c (lang_print_xnode): Add missing `break'. - - * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE. - - * call.c (add_template_candidate): Adjust for changes to - fn_type_unification. - (add_template_candidate_real): Likewise. - (add_template_conv_candidate): Likewise. - (build_user_type_conversion_1): Likewise. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - * class.c (instantiate_type): Likewise. - * cp-tree.h (unification_kind_t): New type. - (fn_type_unification): Adjust prototype. - (type_unificaiton): Likewise. - * pt.c (UNIFY_ALLOW_NONE): New macro. - (UNIFY_ALLOW_MORE_CV_QUAL): Likewise. - (UNIFY_ALLOW_LESS_CV_QUAL): Likewise. - (UNIFY_ALLOW_DERIVED): Likewise. - (unify): Change prototype. - (maybe_adjust_types_for_deduction): New function. - (check_cv_quals_for_unify): Likewise. - (determine_specialization): Adjust. - (fn_type_unification): Likewise. - (type_unification): Likewise. - (type_unification_real): Likewise. Use - maybe_adjust_types_for_deduction. Fix mishandling of - back-unification of template functions passed as arguments. Pass - appropriate combination of UNIFY_ALLOW_* to unify. - (unify): Remove unused NTPARMS parameter. Use - check_cv_quals_for_unify. Remove bogus code that allowed - too-generous unification in order to adhere more closely to standard. - (get_bindings_real): Adjust. - (get_class_bindings): Likewise. - - * method.c (build_overload_identifier): Only use the innermost - template arguments when mangling. - * pt.c (tsubst_template_argument_vector): New function. - (complete_template_args): Deal with the situation where the - extra_args contain more than one level of arguments. - (lookup_template_class): Deal with member template classes, which - may have more than one level of arguments. - (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE. - Improve handling of member template classes. Use - DECL_PRIMARY_TEMPLATE instead of inline expansion. Use - tsubst_template_argument_vector where appropriate. - (regenerate_decl_from_template): Break out from ... - (instantiate_decl): Here. - - * lex.c (yyprint): Remove TYPENAME_ELLIPSIS. - * parse.h: Regenerated. - * parse.c: Really regenerated. - - * cp-tree.h (finish_unary_op_expr): New function. - (finish_id_expr): Likewise. - (begin_new_placement): Likewise. - (finish_new_placement): Likewise. - (finish_declarator): Likewise. - (finish_translation_unit): Likewise. - (finish_parmlist): Likewise. - (begin_class_definition): Likewise. - (finish_class_definition): Likewise. - (finish_default_args): Likewise. - (finish_inline_definitions): Likewise. - * parse.y (GCC_ASM_KEYWORD): Remove. - (TYPENAME_ELLIPSIS): Likewise. - * parse.c: Regenerated. - Use new functions in semantics.c in the actions for many rules. - * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD. - * hash.h: Regenerated. - * semantics.c (finish_expr_stmt): Allow NULL expr. - (finish_unary_op_expr): New function, containing - code previously in parse.y. - (finish_id_expr): Likewise. - (begin_new_placement): Likewise. - (finish_new_placement): Likewise. - (finish_declarator): Likewise. - (finish_translation_unit): Likewise. - (finish_parmlist): Likewise. - (begin_class_definition): Likewise. - (finish_class_definition): Likewise. - (finish_default_args): Likewise. - (finish_inline_definitions): Likewise. - -Sun May 10 23:43:13 1998 Mark Mitchell - - * typeck.c (build_c_cast): Don't decay arrays and functions to - pointer type when converting to a class type. - -Sun May 10 22:53:56 1998 Jason Merrill - - * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro. - (DECL_CLASS_SCOPE_P): Likewise. - -Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org) - - * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT. - * decl2.c (constructor_name_full): Likewise. - -Sun May 10 22:48:12 1998 Mike Stump - - * tree.c (mapcar): Add OVERLOAD support. - - * init.c (resolve_offset_ref): We must use basetype_path before we - destroy it with a call to convert_pointer_to. - -Sat May 9 14:44:37 1998 Jason Merrill - - * class.c (currently_open_class): New fn. - * decl.c (lookup_name_real): Use it. - * search.c (lookup_field): Likewise. - -Fri May 8 23:32:42 1998 Martin von Loewis - - * cp-tree.def (OVERLOAD): New node. - * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE, - SET_IDENTIFIER_NAMESPACE_VALUE): Define. - (NAMESPACE_BINDING): Remove. - (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use - namespace_binding. - (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED): - Define. - (tree_overload): New struct. - (IDENTIFIER_TYPE_VALUE): Use identifier_type_value. - (REAL_IDENTIFIER_TYPE_VALUE): Define. - (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE. - (lang_decl_flags): Remove in_namespace. - (lang_decl): Remove chain. - (DECL_CHAIN, DECL_NAMESPACE): Remove. - (flag_honor_std): Declare extern. - (identifier_type_value, pushdecl_namespace_level, push_using_decl, - namespace_binding, set_namespace_binding, - lookup_function_nonclass, cat_namespace_levels, - set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons, - scratch_ovl_cons, ovl_member, build_overload): Declare. - (decl_list_length, get_namespace_id, current_namespace_id, - overloaded_globals_p): Remove. - (lookup_using_namespace, qualified_lookup_using_namespace): Change - return type. - (push_scratch_obstack): New macro. - * call.c (add_function_candidate): Special-case type of OVERLOAD node. - (build_user_conversions_1): Iterate using OVL_NEXT for ctors, - convs, fns. - (build_new_function_call): Iterate using OVL_CHAIN. - Print DECL_NAME in when reporting ambiguities. - (build_object_call): Iterate using OVL_NEXT for fns, convs. - (build_new_op): Call lookup_function_nonclass. - Iterate using OVL_NEXT. - (build_op_delete_call): Change detection of members. - Do not wrap TREE_LIST around fields and single global functions. - (build_over_call): Don't push a class level if the context is a - namespace. - (build_new_method_call): Iterate using OVL_NEXT. - * class.c (add_method): Chain overloaded members using - build_overload. Remove copying of method. - (grow_method): When iterating through the obstack, expect OVERLOAD - nodes. Chain overload members. - (finish_struct_methods): Chain overload members. Unpack OVERLOAD - nodes in call to get_baselinks. - (duplicate_tag_error): Expect OVERLOAD nodes when unchaining. - (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle - fdecls that are OVERLOAD nodes. - (validate_lhs): New function. - (instantiate_type): Do not copy OVERLOAD nodes. Remove dead - code. Use DECL_NAME in error messages. Split code between global - and member function processing. - * decl.c (global_type_node): New static variable. - (in_std): New global. - (struct binding_level): New field usings. - (resume_binding_level): Assert that we are not in a class. - (toplevel_bindings_p): Just check for namespace_p or - pseudo_global. - (resume_level): Remove. - (find_binding): New function. - (binding_for_name): Call it. - (namespace_binding, set_namespace_binding): New functions. - (push_namespace): Associate binding level with new namespace, - resume_binding_level for existing namespace. Remove old code. - Fake std by counting. - (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE. - (maybe_push_to_top_level): Save current namespace. - (pop_from_top_level): Restore saved namespace. - (pop_namespace): Call suspend_binding_level. Remove old code. - (cat_namespace_levels): New function. - (set_identifier_type_value_with_scope): For namespace bindings, - set BINDING_TYPE, and use global_type_node. - Use REAL_IDENTIFIER_TYPE_VALUE otherwise. - (identifier_type_value): New function. - (pushtag): If no context, use current_namespace. - (duplicate_decls): Don't process DECL_CHAIN. - (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not - already set. Never reset it to NULL_TREE. Lookup global variables - in their namespace. Push overloaded templates if they are on - namespace level. - (pushdecl_namespace_level): New function. - (pushdecl_top_level): Implement using pushdecl_namespace_level. - (pushdecl_using_decl): New function. - (overloaded_globals_p): Remove. - (push_overloaded_decl): Create OVERLOAD nodes, and iterate through - them. Use namespace_binding and set_namespace_value. - (redeclaration_error_message): Complain if the declarations come - from different namespaces. - (lookup_tag): On namespace level, look in the BINDING_TYPE. - (lookup_namespace_name): Pass tree_bindings from stack. Remove - old code. - (select_decl): New function. - (lookup_name_real): Call it for qualified and unqualified lookup. - Pass tree_bindings from the stack. - If prefer_type is 1, also accept namespaces. - (lookup_function_nonclass): New function. - (init_decl_processing): Set the binding level of the global - namespace to global_binding_level. - Build a proper type list for __builtin_apply. - Initialize std_node to "fake std" if flag_honor_std is set. - Initialize global_type_node. - Allocated bad_alloc in namespace std if flag_honor_std. - (define_function): Set the DECL_CONTEXT to the current_namespace. - (start_decl): A namespace is not considered as a context here. If - the DECL_CONTEXT is a namespace, push the decl. - (cp_finish_decl): Check for namespaces used as initializers. - (grokfndecl): Add namespace parameter. Remove processing of - DECL_CHAIN. - (grokvardecl): Add namespace parameter. - (grokdeclarator): Process SCOPEs that are namespaces. For - mangling, temporarily set the DECL_CONTEXT on anonymous structs. - (start_function): Check for contexts that are namespaces. - Set context for declarations that have not been pushed. - (store_parm_decls): Check for ::main only. - (finish_function): Likewise. - (start_method): Check for contexts that are namespaces. - (start_method): Remove DECL_CHAIN processing. - * decl2.c (flag_honor_std): Declare. - (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given. - (decl_namespace_list): New static global. - (grok_x_components): Ignore namespaces as type contexts. - (check_classfn): Expect OVERLOAD nodes. - (grokfield): Remove DECL_CHAIN processing. - (finish_file): Call cat_namespace_levels. - (merge_functions): New function. - (ambiguous_decl): Rewrite. - (lookup_using_namespace): Produce tree_bindings. - (qualified_lookup_using_namespace): Likewise. - (set_decl_namespace, decl_namespace, current_decl_namespace, - push_decl_namespace, pop_decl_namespace): New functions. - (arg_lookup): New struct. - (add_function, arg_assoc_namespace, arg_assoc_class, - arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent): - New functions. - (get_namespace_id, current_namespace_id): Remove. - (do_toplevel_using_decl): Rewrite. - (do_class_using_decl): Complain about namespace qualifiers. - (do_using_directive): Sorry if not on namespace level. Complain - about unknown namespaces. - * error.c (dump_aggr_type): Check for namespace contexts. - * except.c (init_exception_processing): Push terminate into std. - * friend.c (is_friend): A namespace is not a context, here. - * init.c (expand_member_init): Remove DECL_CHAIN processing. - (build_offset_ref): Process OVERLOAD nodes. - * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std. - * lex.c (identifier_type): Loop using OVL_CHAIN. - (see_typename): Set looking_for_typename to 2. - (real_yylex): Likewise. - (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs. - (do_scoped_id): Expect OVERLOAD nodes. - Change calling convention for qualified_lookup_using_namespace. - (build_lang_decl): Don't set in_namespace anymore. - * method.c (typevec_size): New global. - (build_overload_nested_name): Return if global_namespace. - Otherwise, always expect a declaration context. - (build_qualified_name): Likewise. - Make sure we don't write beyond typevec_size. - (build_decl_overload_real): Likewise. - Allocate one extra slot for the namespace. - (hack_identifier): Mark code dead. - Process OVERLOAD and NAMESPACE_DECL nodes. - * parse.y (program): Pop namespaces until in global namespace. - (extdef): In a using-declaration, don't discard the identifier if - there is no declaration. - (left_curly): Ignore type contexts which are namespaces. - (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type - used as scope. - * pt.c (template_class_depth): Expect types to be namespaces. - (determine_specialization): Simplify by expecting OVERLOAD nodes. - (push_template_decl): Push into namespace level. - Reset ctx if it is a namespace. - Set DECL_CONTEXT to current_namespace if not set already. - Ignore real contexts that are namespaces. - (mangle_class_name_for_template): Skip global_namespace. - Mangle other namespaces as declarations. - (lookup_template_function): Set type of OVERLOAD nodes to unknown. - (lookup_template_class): Push into namespace of context. - If the context is a namespace, set it to global_namespace. - Use id_context for mangling. - (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes. - (tsubst_friend_function): Ignore namespace contexts. - Push into namespace level. - (tsubst): Handle NAMESPACE_DECL nodes. - Remove DECL_CHAIN processing. - (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes. - * ptree.c (print_lang_identifier): Print bindings. - (lang_print_xnode): Print OVERLOAD nodes. - * rtti.c (init_rtti_processing): Push type_info into std. - * search.c (lookup_fnfields_here): Expect OVERLOAD nodes. - (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual, - dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions, - lookup_fnfields_here): Likewise. - Process all nodes, instead of going through TREE_CHAIN. - * sig.c (build_signature_pointer_or_reference_type): Set context - to global_namespace. - (build_signature_table_constructor): Expect OVERLOAD nodes. - * spew.c (yylex): Save old setting of looking_for_typename. - * tree.c (decl_list_length): Remove. - (binding_init): New function. - (count_functions): Rewrite. - (is_overloaded_fn): Expect OVERLOAD nodes. - (really_overloaded_fn, get_first_fn, lvalue_type): Likewise. - (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after, - ovl_member): New functions. - * typeck.c (require_complete_type): Expect OVERLOAD nodes. - (type_unknown_p): Likewise. - (require_instantiated_type): Likewise. - (build_component_ref): Declare code dead. - (build_x_function_call): Create and expect OVERLOAD nodes. - (build_function_call_real): Check for ::main only. - (build_unary_op): Likewise. Expect OVERLOAD nodes. - (convert_for_assignment): Check for TREE_LIST before accessing - TREE_VALUE. - * decl.c (duplicate_decls): Check for namespace bindings instead - of global bindings. - (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real, - lookup_name_current_level, start_decl, xref_tag, - finish_enum): Likewise. - * init.c (build_offset_ref): Likewise. - * search.c (lookup_field): Likewise. - (lookup_fnfields): Likewise. - (dfs_debug_mark): Likewise. - * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE. - (poplevel_class, pop_from_top_level): Likewise. - * decl2.c (finish_method): Likewise. - * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE. - * decl.c (record_builtin_type): Likewise. - (init_decl_processing, grokfndecl): Likewise. - * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise. - (make_lang_type): Likewise. - * parse.y (make_thunk): Likewise. - * pt.c (tsubst): Likewise. - * tree.c (debug_binfo): Likewise. - * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h, - tinfo2.cc, inc/new.h: Add std qualifications. - * inc/new: Wrap with namespace std if __HONOR_STD. - * inc/typeinfo: Likewise. - -Fri May 8 00:43:50 1998 Jason Merrill - - * call.c (build_user_type_conversion_1): Handle second_conv - properly for templates. - -Thu May 7 17:09:25 1998 Andrew MacLeod - - * method.c (build_decl_overload_real): Set TREE_USED flag to - zero for build_type_variants nodes as well. - -Wed May 6 19:27:09 1998 Jason Merrill - - * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE. - -Wed May 6 16:49:48 1998 Jim Wilson - - * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o, - except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o, - rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o, - xref.o): Add toplev.h dependencies. - -Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com) - - * errfn.c (cp_error, cp_warning): Remove declarations for - error and warning respectively. - -Wed May 6 14:28:18 1998 Kaveh R. Ghazi - - * error.c: Convert to using ctype macros defined in system.h. - * method.c: Likewise. - * xref.c: Likewise. - * lex.c: Likewise. Also remove redundant system header stuff. - -Wed May 6 06:36:41 1998 Robert Lipe - - * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c, - expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c, - search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c, - xref.c: Add include of toplev.h. - -Wed May 6 02:33:39 1998 Jason Merrill - - * tree.c (perm_manip): Also regenerate the RTL of an extern. - (copy_to_permanent): Use end_temporary_allocation. - -Tue May 5 23:54:04 1998 Jason Merrill - - * init.c (expand_vec_init): The initialization of each array - element is a full-expression. - -Tue May 5 18:24:13 1998 Andrew MacLeod - - * method.c (build_mangled_name): Add a call to build_type_variant - to get the right type. - -Tue May 5 01:25:03 1998 Jason Merrill - - * Makefile.in: Add .SUFFIXES. - - * cp-tree.def: Remove NAMESPACE_DECL. - -Sun May 3 01:32:14 1998 Jason Merrill - - * call.c (build_over_call): Do evaluate arg even if it has empty - class type. - * decl.c (start_function): Don't push a member function. - -Thu Apr 30 18:59:23 1998 Jim Wilson - - * Makefile.in (g++FAQ.info): Put -o option before input file. - -Thu Apr 30 13:05:33 1998 Andrew MacLeod - - * gxxint.texi: Add info for squangling codes K and B. - -Tue Apr 28 13:22:01 1998 Mark Mitchell - - * semantics.c (begin_stmt_expr): Avoid duplicating the effect of - the expression in templates. - (finish_stmt_expr): Likewise. - -1998-04-28 Brendan Kehoe - - * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int. - -Mon Apr 27 13:58:10 1998 Mark Mitchell - - * decl.c (maybe_push_to_top_level): Always clear - current_template_parms and processing_template_decl. - (pushtag): Remove check of current_class_type and some comments, - since maybe_push_to_top_level no longer creates confusion. - -Sun Apr 26 12:10:18 1998 Mark Mitchell - - * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro. - (DECL_CLASS_TEMPLATE_P): Likewise. - (DECL_PRIMARY_TEMPLATE): Likewise. - (PRIMARY_TEMPLATE_P): Use it. - (push_template_decl_real): New function. - (redeclare_class_template): Take new template parameters as - input. - (is_specialization_of): New function. - (comp_template_args): Declare. - * decl.c (pushtag): Handle friend template classes. - (xref_tag): Likewise. Use new calling convention for - redeclare_class_template. - * decl2.c (grok_x_components): Handle friend templates. - * friend.c (is_friend): Use is_specialization_of where - appropriate. Deal with friend class templates. - (make_friend_class): Let a class template be friends with itself. - * pt.c (comp_template_args): Remove declaration. - (tsubst_friend_class): New function. - (push_template_decl_real): New function. - (push_template_decl): Use it. - (redeclare_class_template): Adjust for new calling convention. - (comp_template_args): Give it external linkage. - (instantiate_class_type): Use tsubst_friend_class to deal - with friend templates. - * typeck.c (comptypes): Use comp_template_args, rather than - expanding it inline. - * parse.y (component_decl): Handle a nested template type - like other component type declarations. - - * pt.c (check_explicit_specialization): Handle overloaded - constructors correctly. - - * pt.c (mabybe_get_template_decl_from_type_decl): New function. - (lookup_template_class): Use it. - -Thu Apr 23 21:19:06 1998 Jason Merrill - - * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops. - * cp-tree.h: Add WRAPPER support. - * call.c (add_candidate): Split out from add_*_candidate fns. - (build_over_call): Take the candidate instead of function and args. - Enforce access control here. Emit overload warnings here. - (add_warning): New fn. - (joust): Add WARN parm. If not set, call add_warning instead of - printing a warning. Re-enable some warnings. - (tourney): Pass it. - (convert_like): Adjust. - (build_new_op): Adjust. - (build_new_function_call): Adjust. - (build_user_type_conversion_1): Adjust. - (USER_CONV_FN): Adjust. - * tree.c (build_expr_wrapper, build_expr_ptr_wrapper, - build_int_wrapper): New fns. - -Thu Apr 23 18:27:53 1998 Mark P. Mitchell - - * pt.c (unify): Fix typo in previous change. - -Thu Apr 23 09:32:58 1998 Jason Merrill - - * error.c (dump_type_real): Declare canonical_name. - - * typeck.c (comp_target_types): Fix PMFs. - -Wed Apr 22 13:24:48 1998 Mark Mitchell - - * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for - the DECL_RESULTs of a member TEMPLATE_DECL, not just the - TEMPLATE_DECL. - - * pt.c (tsubst): Decrease the template-level of - TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a - TEMPLATE_PARM_INDEX. - (template_decl_level): New function. - (unify): Make sure to record unifications for template - parameters, even when the parameters exactly match the arguments. - Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and - TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that - aren't from the level we're currently working on. - -Tue Apr 21 22:00:04 1998 Mark Mitchell - - * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory. - - * decl2.c (check_member_template): Set DECL_IGNORED for member - class templates, too. - - * decl2.c (grokfield): Remangle the name of a member TYPE_DECL. - -Tue Apr 21 18:59:11 1998 Benjamin Kosnik - - * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function. - -Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com) - - * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare. - * decl.c (intTI_type_node, unsigned_intTI_type_node): Define. - (init_decl_processing): Handle TI types. - * typeck.c (unsigned_type, signed_type): Handle TI types. - -Sat Apr 18 15:25:21 1998 Jim Wilson - - * g++spec.c (lang_specific_driver): New argument in_added_libraries. - New local added_libraries. Increment count when add library to - arglist. - -Fri Apr 17 21:25:00 1998 Mark Mitchell - - * cp-tree.h (type_as_string_real): New function. - * pt.c (mangle_class_name_for_template): Use it. - * error.c (dump_aggr_type): Change prototype. - (dump_type_prefix): Likewise. - (dump_type_suffix): Likewise. - (dump_type_real): Convert from dump_type. If desired, the - "canonica" name of a typedef, i.e., the name of the underlying - type, can be printed. - (dump_type): Call dump_type_real. - -Fri Apr 17 14:30:45 1998 Jason Merrill - - * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks. - - * typeck.c (comp_target_types): Tweak pedantic case. - (comp_target_parms): Tweak pedantic case. Clean up somewhat. - Return -1 or 1 instead of 1 or 2. - (compparms): Remove STRICT handling. - (convert_for_assignment): Fix handling of pmfs. - -Fri Apr 17 14:04:16 1998 Mark Mitchell - - * typeck.c (comp_target_types): Handle references like pointers. - (comp_target_parms): Note that return code from comp_target_types - can be negative to indicate failure. - -Fri Apr 17 09:10:52 1998 Andreas Schwab - - * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG), - which requires a working target compiler to build. - -Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com) - - * tree.c (avoid_overlap): Add prototype. - - * spew.c (num_tokens): Add prototype. - (nth_noken, add_token, consume_token, debug_yychar): Likewise. - - * search.c (dfs_check_overlap): Add prototype. - (dfs_no_overlap_yet): Likewise. - - * pt.c (original_template): Add prototype. - (inline_needs_template_parms): Likewise. - (push_inline_template_parms_recursive): Likewise. - (retrieve_specialization, register_specialization): Likewise. - (print_candidates, reduce_template_parm_level): Likewise. - (build_template_decl, mark_template_parm): Likewise. - (tsubst_friend_function, get_bindings_real): Likewise. - - * method.c (start_squangling): Add prototype. - (end_squangling, check_ktype, issue_ktype): Likewise. - (build_overloaded_scope_ref, check_btype): Likewise. - (build_mangled_template_parm_index): Likewise. - - * lex.c (init_cpp_parse): Add prototype. - (handle_cp_pragma, handle_sysv_pragma): Likewise. - (reduce_cmp, token_cmp): Likewise. - - * except.c (call_eh_info): Add prototype. - (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise. - (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise. - - * decl2.c (is_namespace_ancestor): Add prototype. - (namespace_ancestor, add_using_namespace): Likewise. - (ambiguous_decl): Likewise. - - * decl.c (indent): Add prototype. - - * call.c (add_template_candidate_real): Add prototype. - -Fri Apr 17 01:57:12 1998 Jason Merrill - - * decl2.c (build_expr_from_tree): Just return a PMF. - -Fri Apr 17 00:45:12 1998 Mark Mitchell - - * typeck2.c (process_init_constructor): Don't strip cv-qualifiers - when doing initializations. - - * pt.c (unify): Use comptypes to compare type args. - -Fri Apr 17 00:24:22 1998 Jason Merrill - - * decl.c (duplicate_decls): Fix check for when it's safe to free - the new decl. - - * pt.c (mangle_class_name_for_template): Don't pass a typedef type - to type_as_string. - -Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com) - - * pt.c (build_template_parm_index): Add prototype. - - * search.c (my_tree_cons): Don't clear words outside the - newly allocated node. - -Wed Apr 15 15:34:44 1998 Dave Brolley - - * lex.c (init_parse): Now returns char* containing the filename. - -Wed Apr 15 13:20:06 1998 John Carr - Jeff Law - - * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer - than a pointer. - -Sun Apr 12 22:31:19 1998 Richard Kenner - - * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION. - -Fri Apr 10 12:16:49 1998 Benjamin Kosnik - - * decl.c (duplicate_decls): Don't warn for redundant decls if - friend: let add_friend take care of it. - -Thu Apr 9 02:40:48 1998 Jason Merrill - - * sig.c (build_signature_pointer_constructor): Don't set - TREE_HAS_CONSTRUCTOR for a signature pointer. - * cvt.c (ocp_convert): Don't force a temporary for internal structs. - * init.c (resolve_offset_ref): Warn about implicit & on pmfs - here, too. - * typeck.c (build_unary_op): Only allow taking the address of a - real constructor. - * typeck2.c (digest_init): Simplify. - (store_init_value): Don't pedwarn about using { } for pmfs. - -Thu Apr 9 22:16:57 1998 Per Bothner - - * cp-tree.h (start_decl): Update prototype. - * decl.c (start_decl): Like the C version, new parameters - for the attributes. Call cplus_decl_attributes here, - (pushdecl): Like C version, do build_type_copy if TYPE_DECL, - (grokdeclarator): Pass NULL for new start_decl arguments. - * pt.c (tsubst_expr): Likewise. - * parse.y: Merge cplus_decl_attribute calls into start_decl calls. - * typeck.c (common_type): Check TYPE_MAIN_VARIANT. - * lex.c (build_lang_decl): Add lang_name_java. - * class.c (push_lang_context): Add lang_name_java. - * method.c (build_mangled_name): Check for is_java_type. - -Thu Apr 9 22:16:57 1998 Benjamin Kosnik - - * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT. - * call.c (build_scoped_method_call): Check for TREE_CODE for - VOID_TYPE instead of type == void_type_node. - (build_method_call): Likewise. - * decl.c (lookup_name_real): Likewise. - (grokdeclarator): Likewise. - (start_decl): Likewise. - (grokparms): Likewise. - (start_function): Likewise. - (finish_function): Likewise. - (start_method): Likewise. - -Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com) - - * lex.c (finput): New variable. - (init_cpp_parse): Renamed from init_parse. - (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished. - (finish_parse): New function. - * cp-tree.h (init_lex, init_parse): Remove declarations. - -Mon Apr 6 02:25:05 1998 Jason Merrill - - * call.c (build_call): Still evaluate the actual argument. - * class.c (is_empty_class): Update for -fnew-abi. - - * decl2.c: -fnew-abi implies -fsquangle. - - * method.c (do_build_assign_ref): Don't do anything to copy - an empty class. - (do_build_copy_constructor): Likewise. - * call.c (build_over_call): Likewise. - -Sat Apr 4 18:43:58 1998 Jason Merrill - - * tree.c (avoid_overlap): Return a value. - -Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com) - - * method.c (check_btype): Add missing argument to xrealloc. - (check_ktype): Likewise. - -Fri Apr 3 02:22:59 1998 Jason Merrill - - Implement empty base optimization. - * class.c (finish_struct_1): Add vbase fields earlier. Set - CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty. - * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns. - (types_overlap_p): New fn. - * tree.c (avoid_overlap): New fn. - (build_base_fields): Use it to avoid overlapping empty bases. - * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi. - - * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs. - - Re-implement allocation of base class subobjects. - * tree.c (unshare_base_binfos): New fn. - (layout_basetypes): Use it. Now handles offsets of both virtual and - non-virtual bases, after layout_type. - (layout_vbasetypes): Remove. - (build_base_fields): Generate FIELD_DECLs for each non-virtual base. - (build_vbase_pointer_fields): Split out from old layout_basetypes. - * class.c (finish_base_struct): Lose offset handling code. - Move nonvdtor warning here. Don't mess with t_binfo anymore. - (finish_struct_1): Don't mess with t_binfo anymore. Use fns above. - * cp-tree.h: Adjust. - -Thu Apr 2 14:25:13 1998 Jason Merrill - - * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff. - * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise. - * class.c (duplicate_tag_error): Likewise. - (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN. - * tree.c (layout_vbasetypes): Update from layout_record, remove - var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE. - (layout_basetypes): Likewise. - -Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com) - - * class.c, Make sure system.h is included just after config.h. - Delete lingering stdio and errno references too. - * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise. - -Wed Apr 1 15:38:36 1998 Jason Merrill - - * friend.c (is_friend): Fix access control for local classes. - - * class.c (is_empty_class): New fn. - * call.c (build_call): Don't pass empty class objects to a function. - -Wed Apr 1 14:58:35 1998 Mark Mitchell - - * call.c (build_over_call): Do name resolution for default - arguments of function templates in the scope of the templates. - -Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com) - - * call.c: Include system.h. Remove includes, declarations and - defines provided by system.h. - * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise. - * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise. - * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise. - * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise. - * typeck2.c, xref.c: Likewise. - * Makefile.in: Dependencies updated as appropriate. - * Make-lang.in: Likewise. - -Mon Mar 30 12:15:00 1998 Mark Mitchell - - * pt.c (fn_type_unification): Allow incomplete unification without - an immediate error message. - -Mon Mar 30 08:55:42 1998 Jason Merrill - - * tree.c (member_p): New fn. - * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for - initializing class members. - - * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'. - * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX. - - * call.c (build_method_call): Handle non-scoped destructors, too. - * pt.c (tsubst_copy): Likewise. - - * pt.c (print_template_context): Split out... - (push_tinst_level): ...from here. - - * friend.c (is_friend): Don't pass a type to decl_function_context. - - * typeck.c (convert_for_initialization): Always hand off - conversions to class type. - -Sun Mar 29 20:01:59 1998 Jason Merrill - - * friend.c (is_friend): Local classes have the same access as the - enclosing function. - -Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com) - - * typeck.c (expand_target_expr): Delete dead function. - - * search.c: Put various prototypes inside #ifdef MI_MATRIX. - - * repo.c (save_string): Delete dead function. - - * method.c (thunk_printable_name): Delete dead function. - - * lex.c (yynextch): Delete dead function. - - * expr.c (tree_extract_aggr_init): #if 0 out. - - * except.c (do_unwind): Delete dead function. - (easy_expand_asm): Likewise. - - * cvt.c (build_conversion_type_1): Delete dead function. - - * cp-tree.h (push_expression_obstack): Declare. - - * call.c (source_type): #if 0 out. - - * class.c (alter_access): Remove unused label. Add braces - around empty else clause. - - * lex.c (yyprint): Fix argument to printf. - -Sat Mar 28 17:43:52 1998 Mark Mitchell - - * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs. - - * pt.c (instantiate_class_template): Make sure template - arguments are permanent. - * init.c (resolve_offset_ref): Don't go looking around in - template types. - - * semantics.c: Add routines to handle expressions, and some - declaration processing. - * parse.y: Use them. - (current_class_depth): Move declaration to cp-tree.h. - * parse.c: Regenerated. - * cp-tree.h: Use them. - (current_class_depth): Declare. - * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr. - -Fri Mar 27 20:23:18 1998 Mark Mitchell - - * error.c (dump_decl): Be a bit more explicit with template - type arguments, when verbose. - -Fri Mar 27 18:16:40 1998 Jason Merrill - - * inc/exception: Reorder closing braces. - -Fri Mar 27 13:22:18 1998 Mark Mitchell - - * pt.c (redeclare_class_template): New function. - * cp_tree.h (redeclare_class_template): Declare it. - * decl.c (xref_tag): Use it. - -Thu Mar 26 11:16:30 1998 Jason Merrill - - * call.c (build_over_call): Check IS_AGGR_TYPE, not - TYPE_LANG_SPECIFIC. - * typeck.c (convert_arguments): Likewise. - - * decl.c (grokdeclarator): Remove const and volatile from type after - setting constp and volatilep. - - * class.c (finish_struct_1): Don't warn about bool bitfield larger - than one bit. - -Thu Mar 26 10:25:52 1998 Mark Mitchell - - * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate. - -Thu Mar 26 10:24:05 1998 Mark Mitchell - - * call.c (build_object_call): Complain about ambiguous operator(), - rather that crashing. - (build_new_op): Likewise. - (build_op_delete_call): Likewise. - -Thu Mar 26 10:23:24 1998 Mark Mitchell - - * cvt.c (perform_qualification_conversions): Use comp_target_types - instead of comp_ptr_ttypes. - -Wed Mar 25 16:10:50 1998 Mark Mitchell - - * cp-tree.h (enforce_access): Declare. - * call.c (enforce_access): Make it extern, not static. - * class.c (alter_access): Use enforce_access; modify code for ISO - compliance, rather than ARM rules. - -Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij - - * cp-tree.h: Fix typo. - -Wed Mar 25 02:01:02 1998 Jason Merrill - - * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing - if (aggregate_value_p (type)). - - * decl2.c (constructor_name_full): Handle TYPENAME_TYPE. - -Tue Mar 24 16:12:01 1998 Mark Mitchell - - * tree.c (mapcar): When dealing with a DECL, use it's constant - value, if any. - * pt.c (lookup_template_class): Don't mangle the names of template - classes whose arguments are unknown. - - * pt.c (tsubst_expr): Handle GOTO_STMT correctly. - -Tue Mar 24 12:21:55 1998 Benjamin Kosnik - - * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1. - -Tue Mar 24 12:21:48 1998 Jim Wilson - - * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for - boolean_type_node to 1. - -Tue Mar 24 10:23:47 1998 Mark Mitchell - - * error.c (dump_expr): Remove unused variable `l'. - - * pt.c (for_each_template_parm): New function, created by - converting uses_template_parms. - (tree_fn_t): New typedef. - (uses_template_parms): Use it. - (mark_template_parm): New function. - (push_template_decl): Check that the argument list of a partial - specialization uses all the template parameters. - - * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done - with it; we might want it for debugging. - * cp-tree.h (type_unification): Change interface. - * class.c (finish_struct_1): Skip nested template types, just like - ordinary nested types. - (instantiate_type): Use new interface to type_unification. - * lex.c (init_lex): Add __sz as opname for sizeof. - * method.c (build_overload_scope_ref): New function. - (build_overload_int): Handle complex expressions. Set - numeric_output_need_bar if necessary. - (build_overload_value): Handle non-PARM_DECL nodes; this - routine is now used by build_overload_int. Remove some - assignments to numeric_output_need_bar. Use - build_overload_scope_ref. - (build_qualified_name): Note that some template mangled names end - with digits, and set numeric_output_need_bar appropriately. Use - build_underscore_int. - * pt.c (unify): Change interface. - (type_unification_real): Likewise. - (determine_specialization): Use new interfaces. - (tsubst): Deal gracefully with situations in which the argument - vector is not fully filled. - (fn_type_unification): Use new interfaces. - (type_unification): Likewise. Remove NOP_EXPR hack. - (type_unification_real): Likewise. - (unify): Likewise. Deal with unification of complex expressions. - -Mon Mar 23 12:24:37 1998 Jason Merrill - - * pt.c (complete_template_args): Initialize skip properly. - - * decl.c (make_typename_type): Revert. - (make_implicit_typename): Remove. - (lookup_name_real): Don't call it. Call lookup_field if we see a - TYPE_DECL from a template base. - * search.c (lookup_field): Do implicit typename stuff. - -Sun Mar 22 00:50:42 1998 Nick Clifton - Geoff Noer - - * Makefile.in: Various fixes for building cygwin32 native toolchains. - * Make-lang.in: Likewise. - -Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij - - * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify. - -Fri Mar 20 10:42:07 1998 Jason Merrill - - * decl.c (make_implicit_typename): Rewrite removed code. - (make_typename_type): Call it if the type we look up comes from - a base that uses template parms. - - * pt.c (complete_template_args): Rewrite. - (tsubst, FUNCTION_DECL): Use it. - -Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org) - - * semantics.c (finish_asm_stmt): Fix combine strings. Call - c_expand_asm_operands () if output_operands, input_operands or - clobbers is not NULL_TREE. - -Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij - - * pt.c (complete_template_args): New function. - (get_bindings): Deal with specializations of function templates - with return type containing parameters from outer class - templates. - (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level, - substitute arguments and compose a new type. - -Thu Mar 19 19:01:48 1998 Mark Mitchell - - * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new - FUNCTION_DECLs. - -Thu Mar 19 11:51:58 1998 Jason Merrill - - * decl.c (make_implicit_typename): Lose useless code. - - * call.c (standard_conversion): Handle A* -> const A* properly. - - * pt.c (get_bindings_real): Rename from get_bindings. Add - check_rettype parm. - (get_bindings): Pass 1. - (get_bindings_overload): Pass 0. - -Wed Mar 19 09:08:12 1998 Mark Mitchell - - * pt.c (check_explicit_specialization): When reverting a static - member function, also remove the `this' parameter from - last_function_parms. - -Thu Mar 19 02:27:48 1998 Jason Merrill - - * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting - a function context. - - * decl.c (store_bindings): Use free_binding_vecs. - (pop_from_top_level): Likewise. - -Wed Mar 18 12:41:43 1998 Jason Merrill - - * decl.c (make_implicit_typename): Only change the type of a - TYPENAME_TYPE. - -Wed Mar 18 10:09:51 1998 Mark Mitchell - - * semantics.c: New file, containing routines to perform the - semantic phase of parsing. - * parse.y: Use it. - * pt.c (tsubst_expr): Likewise. - * cp-tree.h: Declare the various functions in semantics.c. - Provide macros to access _STMT tree nodes. - * cp-tree.def: Add ASM_STMT tree node. - * Makefile.in, Make-lang.in: Add dependencies on and for - semantics.c. - -Wed Mar 18 00:24:10 1998 Jason Merrill - - * pt.c (push_template_decl): Only check primary templates. - - * pt.c (check_explicit_specialization): Complain about default args - in explicit specialization. - - * parse.y (nomods_initdcl0): Also call cp_finish_decl for a - constructor_declarator. - -Tue Mar 17 14:44:54 1998 Mark Mitchell - - * typeck2.c (build_x_arrow): Don't crash when an aggregate type - has no overloaded operator ->. - - * call.c (build_field_call): Don't crash when presented with a - field that is actually a nested type. - - * decl.c (pushtag): Deal with friend class injection in local - classes. - - * call.c (build_object_call): Don't crash if OBJ is a - pointer-to-member-function. - -Tue Mar 17 11:40:26 1998 Jason Merrill - - * pt.c (push_template_decl): Complain about template with C linkage, - anonymous template class. - -Mon Mar 16 12:10:39 1998 Jason Merrill - - * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX. - * search.c: Likewise. - - * lex.c (do_pending_defargs): Only call - maybe_{begin,end}_member_template_processing for FUNCTION_DECLs. - - * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al. - -Mon Mar 16 10:47:22 1998 Mark Mitchell - - * parse.y: Deal with CONSTRUCTORS in new_initializers. - -Mon Mar 16 10:54:21 1998 Mark Mitchell - - * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more - closely mimics the behavior in parse.y. - (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing - into a compound statement. - -Sun Mar 15 02:07:26 1998 Jason Merrill - - * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro. - * pt.c (inline_needs_template_parms): New fn. - (original_template): New fn. - (push_inline_template_parms_recursive): New fn. - (maybe_begin_member_template_processing): Use them. - (maybe_end_member_template_processing): Likewise. - (is_member_or_friend_template): Rename to is_member_template. - Member functions of local classes are never member templates. - -Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij - - * lex.c (do_identifier): Handle TEMPLATE_DECL that was - added in the class scope to catch redefinition error. - - * pt.c (reduce_template_parm_level): Also copy - the DECL_TEMPLATE_PARMS field. - -Sun Mar 15 10:54:08 1998 Mark Mitchell - - * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a - reduced-level template type parameter. - -Sun Mar 15 12:26:02 1998 Manfred Hollstein - - * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider. - (DECL_NEEDS_FINAL_OVERRIDER_P): New macro. - * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P. - * decl.c (duplicate_decls): Propagate it. - * typeck2.c (abstract_virtuals_error): Use two loops to emit - abstract virtual functions and virtual functions which need a - final overrider separately. - -Thu Mar 12 09:39:40 1998 Manfred Hollstein - - * lang-specs.h: Properly put brackets around array elements in - initializer. - - * typeck.c (build_binary_op_nodefault): Correctly place parens around - && and || in expression. - -Thu Mar 12 09:26:04 1998 Manfred Hollstein - - * call.c (default_parm_conversions): Remove prototype definition. - (build_method_call): Remove unused variable result. - - * cvt.c (ocp_convert): Remove unused variable conversion. - - * decl2.c (ambiguous_decl): Add explicit parameter definition for name. - - * except.c (do_unwind): #if 0 definition of unused variables fcall - and next_pc. - - * expr.c (extract_scalar_init): #if 0 prototype and function - definition. - - * init.c (expand_aggr_init_1): Remove unused variable init_type. - (build_new_1): Remove unused variable t. - - * pt.c (instantiate_class_template): Remove unused variable newtag; - cast called function return value to void. - (do_decl_instantiation): Remove unused variables name and fn. - - * tree.c (get_type_decl): Add default return to shut up compiler from - complaining control reaches end of non-void function. - - * typeck.c (build_x_conditional_expr): Remove unused variable rval. - -Thu Mar 12 09:12:15 1998 Manfred Hollstein - - * call.c (default_parm_conversions): Remove prototype definition. - (build_method_call): Remove unused variable result. - (build_over_call): Add default case in enumeration switch. - -Thu Mar 12 08:39:13 1998 Manfred Hollstein - - * decl2.c (lang_decode_option): Change j's type to size_t. - - * tree.c (layout_vbasetypes): record_align and desired_align are of - type unsigned int; const_size and nonvirtual_const_size likewise. - -Wed Mar 11 07:25:20 1998 Mark Mitchell - - * parse.y (new_initializer): Make sure all initializers are - lists. - -Tue Mar 10 07:32:36 1998 Mark Mitchell - - * decl2.c (import_export_decl): Mark tinfo functions for - cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN. - -Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com) - - * method.c: Fix typo. - -Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi - - * method.c: Include "system.h" to get stdlib.h, stdio.h, - ctype.h, string.h, etc. - (issue_nrepeats): Add default case in enumeration switch. - (check_btype): Likewise. - (process_overload_item): Likewise. - - * Makefile.in (method.o): Depend on system.h. - -Wed Mar 4 22:26:53 1998 Andreas Schwab - - * lex.c (do_scoped_id): Fix parenthesizing. - -Wed Mar 4 12:11:53 1998 Michael Tiemann - - * rtti.c (get_tinfo_fn_dynamic): If this function is called an - FLAG_RTTI is unset, initialize type info machinery and continue - with FLAG_RTTI enabled. - (get_typeid): Likewise. - -Wed Mar 4 11:47:55 1998 Jason Merrill - - * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes - from B. - -Wed Mar 4 11:28:08 1998 Mark Mitchell - - * pt.c (finish_member_template_decl): Deal more gracefully with - invalid declarations. - -Tue Mar 3 01:38:17 1998 Jason Merrill - - * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c, - cp-tree.h: Clean up more old overloading code, old RTTI code, and - some formatting quirks. - - * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c, - method.c, pt.c, ptree.c, typeck.c: Remove support for - -fno-ansi-overloading and overloading METHOD_CALL_EXPR. - * class.h: Remove. - * Makefile.in: Adjust. - - * pt.c (unify): Don't allow reduced cv-quals when strict. - - * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from - *type_unification* and unify. - -Mon Mar 2 12:11:06 1998 Jason Merrill - - * parse.y (explicit_template_type): Remove TEMPLATE keyword. - (nested_name_specifier): And add it before this use. - (typename_sub0): And this use. Also add use without the keyword. - (typename_sub1): Likewise. - * pt.c (instantiate_class_template): Don't actually instantiate - anything if our type uses template parms. - -Mon Mar 2 11:04:59 1998 Jim Wilson - - * decl.c (start_function): Don't call temporary_allocation for a - nested function. - -Sun Mar 1 21:06:37 1998 Jason Merrill - - * pt.c (instantiate_class_template): Don't mess with friends if - our type uses template parms. - -Sat Feb 28 12:06:44 1998 Jason Merrill - - * parse.y (nested_name_specifier): Use explicit_template_type. - (typename_sub): Allow a template_type, an explicit_template_type, - or an implicit template type at the end. - * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL. - * decl.c (make_typename_type): Handle template-id where the name - is a TEMPLATE_DECL. - * call.c (build_scoped_method_call): Handle member template - destructor call. - * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member - destructor is represented by the type. - - * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro. - * parse.y (nested_name_specifier): Add 'template' case. - (explicit_template_type): New rule. - (typename_sub): Use it. - * decl.c (make_typename_type): Handle getting a template-id for NAME. - * pt.c (tsubst): Likewise. - -Fri Feb 27 11:17:50 1998 Jason Merrill - - * pt.c (add_to_template_args): Fix thinko. - (instantiate_class_template): Call it later. - - * pt.c (get_class_bindings): Add outer_args parm. - (most_specialized_class): Likewise. - (instantiate_class_template): Pass it. - (more_specialized_class): Likewise. - (lookup_template_class): Get context from template if none - was specified. - (finish_member_template_decl): Don't do anything with a - partial specialization. - * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of - AGGREGATE_TYPE_P. - * class.c (finish_struct): Member class templates have already been - checked for name clashes. - * decl.c (pushdecl_with_scope): Handle pushing at class level. - -Fri Feb 27 02:25:16 1998 Jason Merrill - - * pt.c (tsubst, TEMPLATE_DECL): Support member class templates. - (tsubst, *_PARM): Support multiple levels of template classes. - (instantiate_class_template): Look up the pattern from the - original template. - (lookup_template_class): Handle getting a template for d1. - (push_template_decl): Correct setting of 'primary'. - (reduce_template_parm_level): Add 'levels' parm. - (finish_member_template_decl): Support member class templates. - (template_class_depth): Handle multiple levels. - * parse.y (component_decl_1, fn.def2): Remove member template case. - (component_decl): Add member template cases. - * decl2.c (check_member_template): We now handle member template - classes. - * decl.c (pushtag): Handle member templates. - * method.c (do_inline_function_hair): Don't touch - IDENTIFIER_GLOBAL_VALUE. - * init.c (build_offset_ref): If name isn't an identifier, just - return it. - * spew.c (yylex): Handle PTYPENAME like TYPENAME. - - * typeck.c (get_delta_difference): Do adjust for conversions to - and from virtual base. - -Wed Feb 25 09:51:29 1998 Jason Merrill - - * typeck.c (get_delta_difference): Give hard error for conversion - from virtual base. - - * cp-tree.h: Tweak formatting. - -Wed Feb 25 00:35:33 1998 Jason Merrill - - * decl.c (push_namespace): Handle redeclaration error. - - * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro. - (IDENTIFIER_NAMESPACE_BINDINGS): New macro. - (NAMESPACE_BINDING): New macro. - (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING. - * *.c: Use them. - - * pt.c (push_template_decl): Use innermost_args. - - * decl.c (get_unique_name): Tweak from earlier in the name. - -Tue Feb 24 22:15:04 1998 Martin von Loewis - - * cp-tree.def: Add CPLUS_BINDING node. - * cp-tree.h (tree_binding): New struct. - (BINDING_SCOPE, BINDING_VALUE): New macros. - (current_namespace, global_namespace): Declare extern. - (struct lang_decl_flags): New field in_namespace. - (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros. - (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros. - (TREE_INDIRECT_USING): New macro. - * decl2.c (current_namespace, global_namespace): Declare. The - value is a NAMESPACE_DECL now, not a TREE_LIST. - (is_namespace_ancestor, namespace_ancestor): New static functions. - (add_using_namespace, ambiguous_decl): Likewise. - (lookup_using_namespace): New support function for lookup_name. - (qualified_lookup_using_namespace): New support function for - do_scoped_id and lookup_namespace_name. - (get_namespace_id): Mark as obsolete. - (current_namespace_id): Likewise. - (do_namespace_alias): Implement. - (do_using_directive): Implement as call to add_using_namespace. - * decl.c (binding_for_name): New function. - (push_namespace, pop_namespace): Implement. - (push_decl): Don't install a FUNCTION_DECL in the global branch. - (lookup_namespace_name): Implement using qualified lookup. - (lookup_name_real): For global scoping, lookup in - global_namespace. For namespace scoping, lookup in given - namespace. For unscoped lookup, iterate over namespace, - considering using directives. - (init_decl_processing): Initialize global_namespace. - (grokvardecl): Build assembler name as static name for globals. - (grokdeclarator): Remove old namespace mangling. - (xref_tag): When installing a global binding for the - tag, make sure we have an identifier. - * method.c (build_overload_nested_name): Mangle namespaces. - (build_qualified_name): Likewise. - (build_decl_overload_real): Likewise. - * lex.c (build_lang_decl): Set namespace for new declaration to - current_namespace. - (do_scoped_id): Find global names in global or current - namespace, or using qualified namespace lookup, depending on - context. - * init.c (build_member_call): When scope is namespace, use - build_x_function_call instead. - (build_offset_ref): When scope is namespace, collapse processing - to lookup_namespace_name instead. - * error.c (dump_decl): Support NAMESPACE_DECL. - * decl.c (pushdecl): Bind globals to current namespace. - (push_overloaded_decl): Likewise. - (lookup_tag): Likewise. - (lookup_name_current_level): Likewise. - (xref_tag): Likewise. - (start_function): Likewise. - * lex.c (do_identifier): Likewise. - (identifier_typedecl_value): Likewise. - (real_yylex): Likewise. - * method.c (do_inline_function_hair): Likewise. - * parse.y (unscoped): Likewise. - * pt.c (check_explicit_specialization): Likewise. - (lookup_template_class): Likewise. - * rtti.c (call_void_fn): Likewise. - * sig.c (build_sigtable): Likewise. - * ptree.c (lang_print_xnode): New function. - -Tue Feb 24 01:40:24 1998 Jason Merrill - - * pt.c (instantiate_class_template): Don't instantiate if pedantic - and the args use template parms. - - * pt.c (push_tinst_level): If the instantiation uses template parms, - fail silently. - * decl.c (xref_basetypes): Do call complete_type for basetypes - that involve template parameters. - -Tue Feb 24 00:36:43 1998 Jason Merrill - - * typeck2.c (process_init_constructor): Fix labeled init check. - -Mon Feb 23 05:08:55 1998 Jason Merrill - - * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS - argument to tsubst and friends. - - * pt.c (tsubst, FUNCTION_DECL): Tidy. - - * typeck.c (build_x_function_call): Handle static member function - templates like non-templates. Handle friend templates like normal - function templates. - * pt.c (tsubst, *_PARM): Don't use orig_level. - (get_bindings): Don't call add_to_template_args. - (instantiate_template): Likewise. - (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate. - * ptree.c (print_lang_type): Print index/level for template parms. - -Mon Feb 23 02:52:29 1998 Mark Mitchell - - * Make-lang.in (cc1plus): Note that cc1plus depends on - cp/cp-tree.h and cp/cp-tree.def. - - * cp-tree.def (TEMPLATE_CONST_PARM): Remove. - (TEMPLATE_PARM_INDEX): New tree code, used to indicate a - position in a template parameter list. - * cp-tree.h (template_parm_index): New structure, used as the tree - structure for a TEMPLATE_PARM_INDEX. - (TEMPLATE_PARM_IDX): New macro. - (TEMPLATE_PARM_LEVEL): Likewise. - (TEMPLATE_PARM_DESCENDANTS): Likewise. - (TEMPLATE_PARM_ORIG_LEVEL): Likewise. - (TEMPLATE_PARM_DECL): Likewise. - (TEMPLATE_TYPE_PARM_INDEX): Likewise. - (TEMPLATE_TYPE_ORIG_LEVEL): Likewise. - (TEMPLATE_TYPE_DECL): Likewise. - (TEMPLATE_CONST_IDX): Remove. - (TEMPLATE_CONST_LEVEL): Likewise. - (TEMPLATE_CONST_SET_INFO): Likewise. - (TEMPLATE_TYPE_SET_INFO): Likewise. - (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX - node. - (TEMPLATE_TYPE_LEVEL): Likewise. - * decl.c (decls_match): Call comp_template_parms, rather than - expanding it inline. - (duplicate_decls): If two template declarations are being merged, - then their TEMPLATE_INFOs should be merged as well. - (grokfndecl): Save template-id information when declaring a friend - with explicit template arguments. Pass arguments to - check_explicit_specialization via correct convention; at some - point check_explicit_specialization changed, but these call-sites - did not. - (grokdeclarator): Tidy up slightly. - * decl2.c (check_classfn): Tidy up slightly. Don't assume that - two template functions with the same DECL_ASSEMBLER_NAME the same, - since the names are not yet mangled. - * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of - TEMPLATE_CONST_PARM. - (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the - decl for a non-type parameter, rather than printing `'. - * friend.c (is_friend): Handle TEMPLATE_DECL friends. - (do_friend): Deal with template friends. - * lex.c (do_pending_inlines): Call - maybe_begin_member_template_processing, rather than - conditionally calling begin_member_template_processing. - (process_next_inline): Likewise. Call - maybe_end_member_template_processing, rather than - conditionally calling end_member_template_processing. - (do_pending_defargs): Likewise. - (do_identifier): Use TEMPLATE_PARM_INDEX instead of - TEMPLATE_CONST_PARM. - * method.c (build_mangled_template_parm_index): New function. - (build_overload_value): Use it. - (build_overload_name): Likewise. - * pt.c (finish_member_template_decl): Allow friend declarations. - (template_class_depth): New function. - (is_member_template): Rename, and modify, to become... - (is_member_or_friend_template): New function. - (end_member_template_processing): Rename, and modify, to become... - (maybe_end_member_template_processing). - (build_template_parm_index): New function. - (reduce_template_parm_level): New function. - (process_template_parm): Modify to use build_template_parm_index. - (push_template_decl): Deal with friend templates. - (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of - TEMPLATE_CONST_PARM. - (tsubst_friend_function): New function. - (instantiate_class_template): Generate the DECL_FRIENDLIST - for a new instantiation by using tsubst_friend_function rather - than just tsubst. - (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL. - Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the - appropriate new macros. Use reduce_template_parm_level to - generate lower-level template parameters. Handle tsubst'ing into - TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget - to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created - templates. Similarly for the template parameters for a new - template. - (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead - of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them. - (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM. - (get_bindings): Call add_to_template_args if necessary. - (instantiate_decl): Handle instantiations of friend templates. - * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a - TEMPLATE_TYPE_PARM as a list of fields; it's not! - * spew.c (yylex): Do a little manual constant propagation to - clarify the code. - -Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com) - - * error.c: Include sys/types.h. - -Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com) - - * method.c (build_mangled_name): Start CPP directives in column zero. - -Thu Feb 19 10:36:48 1998 Jason Merrill - - * typeck2.c (process_init_constructor): Sorry about non-trivial - labeled initializers. - * parse.y (initlist): Re-enable labeled initializers. - -Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij - - * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm, - all callers changed. Rely on the new parameter instead of arg - being a TREE_LIST when determine whether we are working inside - template template parameter. Clean up is_type test. - -Thu Feb 19 10:04:12 1998 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT. - * typeck2.c (initializer_constant_valid_p): Allow conversions - between pointers and references. - -1998-02-19 Brendan Kehoe - - * typeck.c (build_unary_op): Only warn about incr/decr a pointer - if pedantic || warn_pointer_arith. - -Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij - - * pt.c (unify): Handle TEMPLATE_DECL. - -1998-02-18 Brendan Kehoe - - * cp-tree.h (strip_attrs): Remove decl. - -1998-02-18 Doug Evans - - * decl.c (duplicate_decls): Call merge_machine_decl_attributes. - Update olddecl's attributes too. - (strip_attrs): Remove function. - * typeck.c (common_type): Call merge_machine_type_attributes. - -Tue Feb 17 14:07:52 1998 Mark Mitchell - - * parse.y (initdcl0_innards): New grammar symbol. - (nomods_initdecls, nomods_initdcl0): Change type from itype to - none, since the resulting value is never used. - (parse_decl): New function. - (datadef): Remove redundant actions. - (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards. - * parse.c: Regenerated. - -Tue Feb 17 11:54:16 1998 Jason Merrill - - * parse.y (simple_stmt): Use getdecls() to check for decl. - -Sat Feb 14 11:50:51 1998 Manfred Hollstein - - * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New - macros. - (c++.install-common): Install c++filt properly as native or as cross - variant. - (c++.uninstall): Add c++filt. - -Fri Feb 13 14:55:37 1998 Jason Merrill - - * call.c (standard_conversion): Fix multi-level ptr conversions. - -Fri Feb 13 14:06:22 1998 Mike Stump - - * init.c (build_new): Propagate error_mark_node up. - -Fri Feb 13 13:24:32 1998 Jason Merrill - - * parse.y (simple_stmt): If the condition isn't a declaration, - start the controlled block after the test. - -Fri Feb 13 02:26:10 1998 Andreas Schwab - - * call.c (build_over_call): Convert builtin abs, labs and fabs to - tree-codes. - * decl.c (init_decl_processing): Re-enable abs, labs and fabs as - builtins. - -Fri Feb 13 01:36:42 1998 Jason Merrill - - * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV. - -Fri Feb 13 00:21:59 1998 Jason Merrill - - * cp-tree.h: Add access_protected_virtual_node. - * class.c (init_class_processing): Initialize it. - * decl.c (xref_basetypes): Use it. - * parse.y (base_class_access_list): Likewise. - - * Make-lang.in (DEMANGLER_PROG): Add $(exeext). - (c++.install-common): Install c++filt. - -Thu Feb 12 12:46:51 1998 Benjamin Kosnik - - * decl.c (shadow_tag): Give error for typedef-ing built-in types. - -Wed Feb 11 23:28:05 1998 Mark Mitchell - - * call.c (reference_binding): Use comptypes when comparing - TYPE_MAIN_VARIANTS to handle non-canonical array/index types. - -Wed Feb 11 16:42:04 1998 Mark Mitchell - - * tree.c (is_overloaded_fn): Use really_overloaded_fn. - (really_overloaded_fn): Move check here from is_overloaded_fn. - (get_first_fn): Use really_overloaded_fn and is_overloaded_fn. - -Wed Feb 11 15:54:18 1998 Mark Mitchell - - * typeck.c (build_ptrmemfunc): Type-check pointer-to-member - conversions. - -Mon Feb 9 22:23:31 1998 Mark Mitchell - - * cp-tree.h (push_template_decl): Return the decl passed in, or an - equivalent duplicate. - * decl.c (pushtag): Use the return value from push_template_decl. - (duplicate_decls): When duplicating a template declaration, merge - the DECL_TEMPLATE_RESULTs as well. - (make_implicit_typename): Don't try to dive into typename types to - find a context for making a new implicit typename. - (start_decl): Use the return value from push_template_decl. - (grokdeclarator): Complain about declarations list `const operator - int'. Since we don't correctly handle in-class initializations of - non-static data members, complain about this (now illegal) - practice. Issue an error for initializations of non-const statics - since that is illegal as well, and since we don't handle that case - correctly either. - (start_function): Use the return value from push_template_decl. - (start_method): Likewise. - * decl2.c (grokfield): Likewise. Since the change to - grokdeclarator ensures that all initialized fields are in fact - static, remove a redundant test for TREE_PUBLIC. - * parse.y (initlist): Disable labeled initializers since they do - not work as per the documentation, and since they do not use the - same syntax as the C front end. - * pt.c (push_template_decl): Return the decl passed in, or an - equivalent duplicate. - (lookup_template_class): When searching in a nested context, - use the right arguments. - (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL. - * typeck.c (build_component_ref): Assign the correct type to the - result of build_vfn_ref. - -Tue Feb 10 23:56:46 1998 Jason Merrill - - * pt.c (convert_nontype_argument): Fix typo. - (check_explicit_specialization): Allow old-style specialization - of class template members. - -Tue Feb 10 20:36:52 1998 Jason Merrill - Manfred Hollstein - - * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead - when deciding to override DECL_ASSEMBLER_NAME. - -Tue Feb 10 15:30:55 1998 Andrew MacLeod - - * decl2.c (lang_f_options): Add -fsquangle to option processing list. - * cp-tree.h (flag_do_squangling): Add declaration. - * lang-options.h: Add -fsquangle and -fno-squangle. - * method.c: Add macros and static variables for squangling. - (build_overload_name): Rename to build_mangled_name, add logic for B - compression, and split into process_modifiers and - process_overload_item. - (process_modifiers): New function, to handle constant, reference, - and pointer types. - (process_overload_item): New function, handles issue of type codes. - (build_overload_name): New function, start squangling and call - build_mangled_name. - (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline. - (start_squangling): New function to initialize squangling structs. - (end_squangling): New function to destroy squangling structs. - (nrepeats): Rename variable to Nrepeats. - (issue_nrepeats): New function for issuing 'n' type repeats. - (check_ktype): New function to check for type K name compression. - (build_overload_nested_name): Add a check for K name compression. - (build_qualified_name): Add a check for K name compression and don't - use DECL_ASSEMBLER_NAME when squangling is on. - (check_btype): New function, checks for B type compression. - (build_static_name, build_decl_overload_real): Initiate squangling. - (build_typename_overload, build_overload_with_type): Initiate - squangling - -Sun Feb 8 23:47:38 1998 scott snyder - - * method.c (make_thunk): Avoid name buffer overflow. - -Sat Feb 7 16:48:54 1998 Jason Merrill - - * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we - don't define them yet. - - * parse.y (nomods_initdcl0): Add constructor_declarator case. - -Fri Feb 6 21:32:25 1998 Richard Kenner - - * config-lang.in (diff_excludes): Use basename only. - -Thu Feb 5 19:10:40 1998 Jason Merrill - - * tinfo2.cc: Add tinfo for signed char. - -Thu Feb 5 14:38:23 1998 Mike Stump - - * search.c (compute_access): Handle protected constructors in derived - classes as accessible. - -Wed Feb 4 01:26:49 1998 Jason Merrill - - * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code): - Call convert_from_reference sooner. - -Tue Feb 3 23:50:52 1998 Mark Mitchell - - * cvt.c (ocp_convert): Obtain the constant values from constant - decls even if the destination type is the same as the type of the - decl. - - * decl2.c (finish_file): Make sure that static inlines with - definitions are not marked DECL_EXTERNAL before returning. - -Tue Feb 3 22:43:42 1998 Jason Merrill - - * decl.c: Lose arg_looking_for_template. - (lookup_name_real): Likewise. - * parse.y: Lose processing_template_arg, template_arg1. - (primary): Likewise. - * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too. - -Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij - - * error.c (dump_decl): Fix type of default arguments for template - template parameters and nontype template parameters. - * parse.y (template_parm): Handle invalid default template - template arguments here. - - * parse.y (template_parm): Use template_arg instead of PTYPENAME - for default template template argument. - * pt.c (coerce_template_parms): Merge default template argument - codes. Can treat RECORD_TYPE as template name if it is implicitly - created. Fix argument index in error message. - * typeck.c (comptypes): Merge template argument comparison codes in - TEMPLATE_TEMPLATE_PARM and RECORD_TYPE. - -Tue Jan 6 01:42:44 1998 Mumit Khan - - * lex.c (file_name_nondirectory): Also check for '/'. - -Mon Feb 2 11:24:22 1998 Mark Mitchell - - * parse.y (primary): Deal with statement-expressions in - templates. - * pt.c (tsubst_copy): Handle BIND_EXPR. - * tree.c (mapcar): Likewise. - - * call.c (add_template_candidate_real): Pass extra parameter to - fn_type_unification. - * cp-tree.h (fn_type_unification): Add parameter. - * pt.c (fn_type_unification): Add additional parameter to deal with - static member functions. - (get_bindings): Deal with static member functions. - - * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro. - (revert_static_member_fn): Declare. - * decl.c (revert_static_member_fn): Remove declaration. Change - linkage from internal to external. - (cp_finish_decl): Deal with virtual functions in classes local to - template functions. - * decl2.c (finish_file): Don't forget to emit increment/decrement - expressions in initializers for file-scope variables. - * parse.y (typename_sub2): If the typename doesn't names a - template, rather than a type, issue an error message. - * pt.c (check_explicit_specialization): Handle specializations of - static member functions. - (coerce_template_parms): Handle offset references to lists of - member functions. - * search.c (note_debug_info_needed): Don't crash when handed a - type which is being defined. - * typeck.c (complete_type): Don't crash when handed NULL_TREE; - that can happen with some illegal code. - -Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi - - * call.c (user_harshness): Initialize `code' to 0. - (build_method_call): Initialize `candidates', `cp' and `len' to 0. - (null_ptr_cst_p): Add parentheses around && within ||. - (standard_conversion): Likewise. - (z_candidate): Likewise. - (build_user_type_conversion_1): Initialize `args' to NULL_TREE. - (build_object_call): Likewise for `mem_args'. - (build_new_op): Likewise for `mem_arglist'. Add `return' from - default case in enumeration switch. - - * class.c (build_vtable_entry): Add explicit braces to avoid - ambiguous `else'. - (build_class_init_list): Likewise. - (finish_struct_1): Initialize `width' to 0. - (instantiate_type): Initialize `name' to NULL_TREE. Add - explicit braces to avoid ambiguous `else'. - - * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous - `else'. - - * decl.c (grok_reference_init): Eliminate unused parameter, all - callers changed. - (record_builtin_type): Initialize `tdecl' to NULL_TREE. - (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE. - (cp_finish_decl): Initialize `ttype' to NULL_TREE. - (grokdeclarator): Add parentheses around && within ||. Add - explicit braces to avoid ambiguous `else'. - (grokparms): Initialize `type' to NULL_TREE. - (xref_tag): Remove unused label `just_return'. - (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE. - (finish_function): Initialize `cond' and `thenclause' to NULL_TREE. - (hack_incomplete_structures): Add parentheses around assignment - used as truth value. - - * decl2.c (coerce_delete_type): Hide definition of `e3'. - - * error.c: Include . - (dump_expr): Change the type of `i' to size_t. Remove unused - label `error'. - - * except.c (init_exception_processing): Remove unused variable `d'. - (expand_throw): Likewise for `label'. - - * friend.c (add_friends): Add explicit braces to avoid ambiguous - `else'. - - * init.c (sort_member_init): Initialize `last_field' to NULL_TREE. - (sort_base_init): Likewise for `binfo'. - (expand_member_init): Likewise for `rval'. - (build_member_call): Add parentheses around assignment used as - truth value. - (build_offset_ref): Add explicit braces to avoid ambiguous `else'. - (build_new): Initialize `nelts' to NULL_TREE. Initialize - `old_immediate_size_expand' to 0. - (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE. - (build_vec_delete_1): Remove unused variable `block'. - (expand_vec_init): Initialize `itype' to NULL_TREE. - - * lex.c: Include if we don't have . Protect - declaration of `index' and `rindex' with autoconf macros. - (reinit_parse_for_expr): Remove unused variables - `look_for_semicolon' and `look_for_lbrac'. - (cons_up_default_function): Initialize `args' to NULL_TREE. - (readescape): Initialize `firstdig' to 0. - (real_yylex): Add parentheses around assignment used as truth value. - - * method.c: Include if we don't have . - Protect declaration of `index' with autoconf macro. - - * parse.y (primary): Add explicit braces to avoid ambiguous `else'. - Initialize `type' to NULL_TREE. - (structsp): Remove unused variable `id'. - - * pt.c (coerce_template_parms): Add explicit braces to avoid - ambiguous `else'. - (lookup_template_class): Initialize `template' to NULL_TREE. - (instantiate_class_template): Remove unused variable `name' and `e'. - (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE. - (do_poplevel): Initialize `saved_warn_unused' to 0. - (type_unification): Remove unused varable `parm'. - (unify): Likewise for `j'. - - * repo.c (init_repo): Add parentheses around assignment used as - truth value. - (finish_repo): Remove unused varable `p'. - - * search.c (get_binfo): Initialize `type' to NULL_TREE. - (get_base_distance): Likewise. - (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path' - and `new_v' to NULL_TREE. - (lookup_fnfields): Likewise for `rval_binfo_h'. - (breadth_first_search): Add parentheses around assignment used as - truth value. - (get_template_base): Initialize `type' to NULL_TREE. - - * sig.c (append_signature_fields): Initialize `last_mfptr' to - NULL_TREE. - (build_signature_table_constructor): Likewise for - `last_rhs_field', `pfn' and `vt_off'. - (build_sigtable): Likewise for `init'. - - * tree.c (break_out_calls): Initialize `t2' to NULL_TREE. - (propagate_binfo_offsets): Likewise for `delta'. - (hash_tree_cons): Initialize hashcode to 0. - (can_free): Likewise for `size'. - (cp_tree_equal): Add explicit braces to avoid ambiguous `else'. - - * typeck.c (convert_sequence): Hide prototype. - (common_type): Add explicit braces to avoid ambiguous `else'. - (comp_target_types): Likewise. - (build_x_function_call): Initialize `ctypeptr' to NULL_TREE. - (build_function_call_real): Add explicit braces to avoid ambiguous - `else'. - (convert_arguments): Initialize `called_thing' to 0. - (convert_for_initialization): Initialize `savew' and `savee' to 0. - - * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0. - (digest_init): Initialize `old_tail_contents' to NULL_TREE. - (build_x_arrow): Likewise for `last_rval'. - - * xref.c (GNU_xref_decl): Initialize `cls' to 0. - -Sun Feb 1 12:45:34 1998 J"orn Rennecke - - * decl.c (init_decl_processing): Use set_sizetype. - * decl2.c (sizetype): Don't declare. - * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype. - (c_sizeof_nowarn, build_binary_op_nodefault): Likewise. - (build_component_addr, unary_complex_lvalue): Likewise. - * rtti.c (expand_class_desc): Likewise. - * class.c (get_vfield_offset): Likewise. - -Thu Jan 29 10:39:30 1998 Mark Mitchell - - * pt.c (convert_nontype_argument): Move check for is_overloaded_fn - early to avoid bogus error. Handle overloaded function - names provided as template arguments correctly. - (coerce_template_parms): Don't mishandle overloaded functions when - dealing with template template parameters. - (lookup_template_class): Issue an error message, rather than - crashing, when the TYPE_DECL provided is not a template type. - -Wed Jan 28 23:14:44 1998 Jason Merrill - - * class.c (instantiate_type): Don't just return a known type if - it's wrong. - -Wed Jan 28 11:04:07 1998 Mark Mitchell - - * class.c (instantiate_type): Remove handling of FUNCTION_DECL - since that code could never be reached. - - * error.c (dump_decl): Avoid aborting in the midst of printing an - error message about an illegal template declaration. - - * parse.y (structsp): Print an error message, rather than crashing, - when a class-head does not name a class. - - * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE - template arguments as a g++ extension. - - * cp-tree.def (ALIGNOF_EXPR): New tree code. - * decl2.c (grok_alignof): If processing_template_decl, just store - the expression. - * typeck.c (c_alignof): Likewise. - * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR. - * error.c (dump_expr): Likewise. - * pt.c (tsubst_copy): Likewise. - * tree.c (cp_tree_equal): Likewise. - * pt.c (uses_template_parms): Correctly determine whether or not a - SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant - folding can be done. - - * cp-tree.h (grok_enum_decls): Remove type parameter. - * decl.c (grok_enum_decls): Likewise. - * decl2.c (grok_x_components): Call grok_enum_decls - unconditionally, since it will do nothing if there is no - current_local_enum. Use the new calling sequence. - * pt.c (tsubst_enum): Use the new calling sequence for - grok_enum_decls. - - * decl.c (start_function): Make member functions of local classes - in extern inline functions have comdat linkage here... - (grokdeclarator): Rather than here. - -Wed Jan 28 10:55:47 1998 Jason Merrill - - * pt.c (convert_nontype_argument): Use decl_constant_value. - -Tue Jan 27 16:42:21 1998 Mark Mitchell - - * call.c (add_template_candidate_real): New function. - (add_template_candidate): Use it. - (add_template_conv_candidate): Likewise. - (joust): Pass extra argument to more_specialized. - * class.c (instantiate_type): Handle a single FUNCTION_DECL. - (is_local_class): Remove. - (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG. - * cp-tree.h (is_local_class): Remove. - (perform_array_to_pointer_conversion): Likewise. - (finish_member_template_decl): Add. - (check_explicit_specialization): Return a tree, not an int. - (more_specialized): Take additional argument. - (get_bindings): Likewise. - (TI_PENDING_SPECIALIZATION_FLAG): New macro. - * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes. - (perform_array_to_pointer_conversion): Remove. - * decl.c (saved_scope): Add processing_specialization, - processing_explicit_instantiation fields. - (maybe_push_to_top_level): Save them. - (pop_from_top_level): Restore them. - (grokfndecl): Use new return value from - check_explicit_specialization. - (start_decl): Don't check flag_guiding_decls before pushing - decls. - (cp_finish_decl): Remove previous (bogus) change. - (grok_declarator): Use decl_function_context rather than - is_local_class. - * decl2.c (finish_file): Pass extra argument to get_bindings. - (build_expr_from_tree): Let build_x_component_ref check - validity of arguments rather than doing it here. - * lex.c (cons_up_default_function): Remove code fooling with - processing_specialization, processing_explicit_instantiation - flags, as that is now done in {maybe_push_top,pop_from}_top_level. - * method.c (build_overload_identifier): Mangle local classes in - template functions correctly. - * parse.y (finish_member_template_decl): Move to pt.c. - * pt.c (finish_member_template_decl): Moved here from parse.y. - (print_candidates): New function. - (determine_specialization): Change interface. Properly look for - most specialized versions of template candidates. - (check_explicit_specialization): Fully process explicit - instantiations. - (push_template_decl): Avoid looking at CLASSTYPE fields in - FUNCTION_DECLS. - (determine_overloaded_function): Remove. - (convert_nontype_argument): Change name from - convert_nontype_parameter. Use determine_overloaded_function - instead of instantiate_type. - (mangle_class_name_for_template): Handle type contexts as well as - function contexts. - (classtype_mangled_name): Likewise. - (lookup_template_class): Likewise. - (tsubst): Likewise. - (more_specialized): Take explicit template arguments as a - parameter. - (most_specialized): Likewise. - (get_bindings): Likewise. Check that return types match before - proclaiming a function a match. - (do_decl_instantiation): Remove code searching for function to - instantiate; that is now done in check_explicit_specialization. - (add_maybe_template): Pass extra argument to get_bindings. - * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify - implementation. - * typeck.c (build_component_ref): Check for invalid arguments. - -Tue Jan 27 01:44:02 1998 Jason Merrill - - * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that - return_target and call_target are equivalent. - - * pt.c (type_unification_real): Just accept function parms that - don't use any template parms. - -Sun Jan 25 03:30:00 1998 Jason Merrill - - * decl.c (cp_finish_decl): When bailing on a comdat variable, also - unset DECL_NOT_REALLY_EXTERN. - - * parse.y (typename_sub*): Fix std::. - -Sat Jan 24 12:13:54 1998 Jason Merrill - - * error.c (dump_decl): Fix type default template args. - (dump_type): Hand TEMPLATE_DECL off to dump_decl. - -Fri Jan 23 18:34:37 1998 Mumit Khan - - * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. - (file_name_nondirectory): Use. - -Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij - - * pt.c (coerce_template_parms): Don't access elements of ARGLIST - that are not really present. Substitute default arguments in - template template arguments. Correctly convert TEMPLATE_DECL to - TEMPLATE_TEMPLATE_PARM. - (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM - are no longer treated specially here. - * parse.y (template_template_parm): Fix copy error. - * decl.c (grokdeclarator): Warn about missing `typename' for nested - type created from template template parameters. - * parse.y (bad_parm): Likewise - - * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM. - (push_nested_class): Likewise. - * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code. - * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro. - (copy_template_template_parm): Declare. - * decl.c (arg_looking_for_template): New variable. - (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM. - Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM - node if arg_looking_for_template is nonzero. - (pushdecl): Handle TEMPLATE_TEMPLATE_PARM. - (grok_op_properties, xref_tag, xref_basetypes): Likewise. - (grokdeclarator): Handle TEMPLATE_DECL. - * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM. - * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM. - (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM. - (dump_decl): Handle unnamed template type parameters. - Handle template template parameters. - (dump_function_name): Handle template template parameters. - * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef): - Handle TEMPLATE_TEMPLATE_PARM. - * method.c (build_template_template_parm_names): New function. - (build_template_parm_names): Handle TEMPLATE_DECL. - (build_overload_nested_name, build_overload_name): - Handle TEMPLATE_TEMPLATE_PARM. - * parse.y (maybe_identifier): New nonterminal. - (template_type_parm): Use it. - (template_template_parm, template_arg1): New nonterminal. - (template_parm): Add template_template_parm rules. - (template_arg): Set processing_template_arg. - (template_arg1): Rules moved from template_arg. - (primary, nonnested_type): Set arg_looking_for_template if we are - processing template arguments. - * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL. - (process_template_parm): Handle template template parameters. - (coerce_template_parms, comp_template_args): Likewise. - (mangle_class_name_for_template, lookup_template_class): Likewise. - (uses_template_parms): Handle TEMPLATE_DECL and - TEMPLATE_TEMPLATE_PARM. - (current_template_args): Handle TEMPLATE_DECL. - (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM. - * search.c (dfs_walk, dfs_record_inheritance): - Handle TEMPLATE_TEMPLATE_PARM. - * tree.c (copy_template_template_parm): New function. - (mapcar): Handle TEMPLATE_TEMPLATE_PARM. - * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM. - -Mon Jan 19 22:40:03 1998 Mark Mitchell - - * decl.c (start_decl): Don't allow duplicate definitions of static - data members. - - * call.c (build_user_type_conversion_1): Handle user-defined - template conversion operators correctly. - - * decl2.c (build_expr_from_tree): Issue an error message if the - object in a COMPONENT_REF is a TEMPLATE_DECL. - - * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs. - - * class.c (is_local_class): New function. - * cp-tree.h (is_local_class): Declare it. - (last_tree): Likewise. - (begin_tree): Likewise. - (end_tree): Likewise. - (lookup_template_class): Change prototype. - * decl.c (cp_finish_decl): Check for NULL where necessary. - Consider FUNCTION_DECLS to declare objects with top-level binding, - when calling make_decl_rtl. - (grokdeclarator): Give members of local classes internal linkage. - (start_function): Remove declaration of last_tree. - (finish_function): Set flag_keep_inline_functions around call to - rest_of_compilation if we are processing a member function in a - local class. - (start_method): Call push_template_decl for member functions of - local classes in template functions. - * decl2.c (import_export_decl): Don't give external linkage to - instantiations of templates with internal linkage. - * parse.y (last_tree): Remove declaration. - (template_type): Pass extra parameter to lookup_template_class. - (self_template_type): Likewise. - (structsp): Move call to reset_specialization into left_curly. - (left_curly): Call reset_specialization, and begin_tree. - * pt.c (saved_trees): New variable. - (mangle_class_name_for_template): Change prototype. Use - additional function context to name local classes in templates - correctly. - (classtype_mangled_name): Pass the context. - (push_template_decl): Handle local classes and templates, and - member functions for such classes. - (convert_nontype_parameter): Fix handling of pointer-to-member - constants. - (lookup_template_class): Handle local classes in templates. - (tsubst): Likewise. Don't assume that template instantiations - have external linkage; pay attention to the template declaration. - (mark_decl_instantiated): Likewise. - (begin_tree): New function. - (end_tree): Likewise. - - * decl.c (xref_basetypes): Don't call complete_type for basetypes - that involve template parameters; that can lead to infinite - recursion unnecessarily. - - * pt.c (register_specialization): Do not register specializations - that aren't ready to be registered yet. - (check_explicit_specialization): Handle explicit specialization of - constructors and destructors. - (build_template_decl): New function. - (push_template_delc): Handle out-of-class specializations of - member templates. - - * pt.c (check_explicit_specialization): Set up the template - information before registering the specialization. - (coerce_template_parms): Fix thinko. - (tsubst): Handle specializations of member templates correctly. - - * class.c (finish_struct_methods): Remove calls to - check_explicit_specialization from here. - (finish_struct): And insert them here. - * cp-tree.h (perform_qualification_conversions): New function. - (perform_array_to_pointer_conversion): Likewise. - (begin_explicit_instantiation): Likewise. - (end_explicit_instantiation): Likewise. - (determine_specialization): Renamed from - determine_explicit_specialization. - (comp_template_parms): New function. - (processing_explicit_instantiation): New variable. - * cvt.c (perform_qualification_conversions): New function. - (perform_array_to_pointer_conversion): Likewise. - * decl.c (duplicate_decls): Don't consider template functions - alike unless they have the same parameters. Refine handling of - instantiation/specialization mismatches. - (start_decl): Don't call pushdecl for template specializations, - since they don't affect overloading. - (start_function): Likewise. - (grokfndecl): Call check_explicit_specialization a little later. - Don't call duplicate_decls for memberm template specializations. - (grokdeclarator): Don't update template_count for classes that are - themselves specializations. Remove use of `2' as parameter to - grokfndecl since that value isn't used. - * lex.c (cons_up_default_function): Save and restore - processing_explicit_instantiation around calls to grokfield. - * parse.y (finish_member_template_decl): New function. - (component_decl_1): Use it. - (fn.def2): Likewise. - (template_arg_list_opt): New nonterminal. - (template_type): Use it. - (self_template_type): Likewise. - (template_id): Likewise. - (object_template_id): Likewise. - (notype_template_declarator): Likwise. - (begin_explicit_instantiation): Likewise. - (end_explicit_instantiation): Likewise. - (explicit_instantiation): Use them. - * pt.c (coerce_template_parms): Add parameters. - (processing_explicit_instantiation): New variable. - (convert_nontype_parameter): New function. - (determine_overloaded_function): Likewise. - (begin_explicit_instantiation): Likewise. - (end_explicit_instantiation): Likewise. - (retrieve_specialization): Likewise. - (register_specialization): Likewise. - (processing_explicit_specialization): Removed. - (determine_specialization): Handle specializations of member - functions of template class instantiations. - (check_explicit_specialization): Refine to conform to standard. - (comp_template_parms): New function. - (coerce_template_parms): Call convert_nontype_parameter. - (tsubst): Refine handling of member templates. Use - register_specialization. - (instantiate_template): Use retrieve_specialization. - (do_decl_instantiation): Likewise. - (instantiate_decl): Likewise. - (type_unification): Improve handling of explicit template - arguments. - * tree.c (mapcar): Return error_mark_node, rather than aborting, - on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS. - * typeck.c (build_unary_op): Call determine_specialization, rather - than determine_explicit_specialization. - -Mon Jan 19 13:18:51 1998 Jason Merrill - - * cvt.c (build_up_reference): A TARGET_EXPR has side effects. - -Fri Jan 16 11:40:50 1998 Bruno Haible - - * error.c (dump_decl): For enum tags, output the tag, not its value. - -1998-01-13 Brendan Kehoe - - * decl.c (init_decl_processing): Only call init_rtti_processing - FLAG_RTTI is set. - -Mon Jan 12 01:35:18 1998 Jason Merrill - - * init.c (build_new_1): Split out from build_new. - (build_new): Just return a NEW_EXPR. - * expr.c (cplus_expand_expr): Handle NEW_EXPR. - - * decl2.c (get_temp_regvar): Tweak. - - * cp-tree.h (TREE_CALLS_NEW): Comment out. - * class.c (resolves_to_fixed_type_p): Remove use. - * method.c (build_opfncall): Likewise. - * call.c (build_new_op): Likewise. - -Wed Jan 7 23:47:13 1998 Jason Merrill - - * exception.cc (__eh_alloc, __eh_free): New fns. - (__cp_push_exception, __cp_pop_exception): Use them. - (__uncatch_exception): Call terminate here if no exception. - * except.c (build_terminate_handler): New fn. - (expand_start_catch_block): Use it. - (expand_exception_blocks): Likewise. - (alloc_eh_object): New fn. - (expand_throw): Use it. Protect exception init with terminate. - * typeck.c (build_modify_expr): Remove code that ignores trivial - methods. - -Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi - - * call.c (add_builtin_candidate): Add default case in enumeration - switch. - (build_new_op): Likewise. - (convert_like): Likewise. - * cvt.c (build_expr_type_conversion): Likewise. - * tree.c (real_lvalue_p): Likewise. - (lvalue_p): Likewise. - (cp_tree_equal): Likewise. - * typeck.c (comptypes): Likewise. - (build_component_ref): Likewise. - (build_function_call_real): Likewise. - (build_binary_op_nodefault): Likewise. - (build_unary_op): Likewise. - (build_modify_expr): Likewise. - * typeck2.c (initializer_constant_valid_p): Likewise. - -Sun Dec 21 15:59:00 1997 Nick Clifton - - * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas. - -Thu Dec 18 14:51:50 1997 Mark Mitchell - - * pt.c (coerce_template_parms): Make sure to digest_init if - possible. - - * decl.c (duplicate_decls): Make the newdecl virtual if the - olddecl was, just as is done with other attributes of olddecl. - -Thu Dec 18 14:43:19 1997 Jason Merrill - - * typeck.c (unary_complex_lvalue): Ignore op0 when taking the - address of an OFFSET_REF. - - * cp-tree.def: Add AGGR_INIT_EXPR. - * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with - AGGR_INIT_EXPR where appropriate. - * expr.c (cplus_expand_expr): Likewise. Simplify. - - * decl2.c (finish_file): Remove call to register_exception_table. - -Wed Dec 17 17:08:52 1997 Benjamin Kosnik - - * pt.c (instantiate_class_template): Don't do injection when - processing_template_decl is true, as pollutes current_binding_level - for base classes. - -Wed Dec 17 21:17:39 1997 Peter Schmid - - * pt.c (maybe_fold_nontype_arg): Add prototype. - -Tue Dec 16 10:31:20 1997 Jason Merrill - - * tree.c (mapcar): Handle TRY_CATCH_EXPR et al. - * error.c (dump_expr): Likewise. - -Mon Dec 15 12:22:04 1997 Jason Merrill - - * typeck.c (build_function_call_real): Remove "inline called before - definition" pedwarn. - - * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg. - -Sun Dec 14 22:34:20 1997 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's. - - * pt.c (type_unification_real): Change __null to type void* with - a warning. - -Sun Dec 14 20:38:35 1997 Mark Mitchell - - * call.c (implicit_conversion): Don't call - build_user_type_conversion_1 with a NULL expr, since it will - crash. - - * pt.c (unify): Don't try to unify array bounds if either array is - unbounded. - -Fri Dec 12 16:09:14 1997 Jason Merrill - - * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at): - Replace extern decls with casts. - - * decl.c (expand_start_early_try_stmts): Don't mess with a sequence. - Update last_parm_cleanup_insn. - (store_after_parms): Remove. - * cp-tree.h: Adjust. - -Thu Dec 11 22:18:37 1997 Jason Merrill - - * decl2.c (comdat_linkage): Also set DECL_COMDAT. - (finish_file): Check DECL_COMDAT instead of weak|one_only. - (import_export_vtable): Use make_decl_one_only instead of - comdat_linkage for win32 tweak. - (import_export_decl): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - - * decl2.c (finish_file): Lose handling of templates in pending_statics. - -Thu Dec 11 21:12:09 1997 Jason Merrill - - * decl2.c (finish_file): Lose call to expand_builtin_throw. - * except.c (expand_builtin_throw): Remove. - * cp-tree.h: Remove ptr_ptr_type_node. - * decl.c: Likewise. - -Thu Dec 11 20:43:33 1997 Teemu Torma - - * decl.c (ptr_ptr_type_node): Define. - (init_decl_processing): Initialize it. - * cp-tree.h: Declare it. - * exception.cc (__cp_exception_info): Use __get_eh_info. - (__cp_push_exception): Likewise. - (__cp_pop_exception): Likewise. - - From Scott Snyder : - * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of - saved_pc. - (init_exception_processing): Removed saved_pc initialization. - -Wed Dec 10 11:04:45 1997 Jason Merrill - - * pt.c (instantiate_decl): Defer all templates but inline functions. - -Mon Dec 8 23:17:13 1997 Jason Merrill - - * init.c (expand_vec_init): Don't fold a list of parameters. - - * decl.c (copy_args_p): Handle copy elision for types with virtual - bases. - * call.c (build_over_call): Likewise. - -Sun Dec 7 22:38:12 1997 Mark Mitchell - - * pt.c (lookup_template_function): Copy the template arguments, - not just the list containing them, to the permanent obstack. - -Sun Dec 7 15:53:06 1997 Jason Merrill - - * except.c (expand_start_catch_block): suspend_momentary for the - terminate handler. - - * error.c (dump_decl): Handle LOOKUP_EXPR. - -Sun Dec 7 15:45:07 1997 Mark Mitchell - - * rtti.c (build_dynamic_cast): Copy the cast-to type to the - permanent obstack if we are processing a template decl. - * typeck.c (build_static_cast): Likewise. - (build_const_cast): Likewise. - (build_reinterpret_cast): Likewise. - - * pt.c (coerce_template_parms): Coerce some expressions, even - when processing_template_decl. - -Sun Dec 7 01:46:33 1997 Bruno Haible - - * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric - handling of pointer difference expressions. - - * typeck.c (comp_target_types): Comparison of function/method types - is independent of nptrs. - -Sun Dec 7 01:40:27 1997 Mark Mitchell - - * pt.c (tsubst): Avoid creating pointer to reference and - reference to reference types. - -Sat Dec 6 01:29:37 1997 Jason Merrill - - * parse.y (do_id): New nonterminal. - (template_id): Use it. - -Fri Dec 5 01:17:34 1997 Jason Merrill - - * parse.y (template_id): do_identifier for PFUNCNAMEs, too. - * spew.c (yylex): Don't do_identifier here. - * decl2.c (build_expr_from_tree): Revert last change. - - * decl2.c (build_expr_from_tree): Expand the name for a method call. - * parse.y (object_template_id): Don't try to take the DECL_NAME. - -Wed Dec 3 20:02:39 1997 Jason Merrill - - * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for - alloc_expr. - * call.c (build_op_delete_call): Adjust. - - * except.c (expand_end_catch_block): Lose rethrow region. - (expand_start_catch_block): Likewise. - (expand_end_catch_block): Don't expand_leftover_cleanups. - -Wed Dec 3 13:24:04 1997 Benjamin Kosnik - - * pt.c (tsubst): Remove tree_cons call (places redundant info into - DECL_TEMPLATE_INSTANTIATION). - -Wed Dec 3 11:44:52 1997 Jason Merrill - - * tree.c (is_overloaded_fn): Handle getting a fn template. - (really_overloaded_fn): Likewise. - * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better. - * pt.c (check_explicit_specialization): Tweak. - (determine_explicit_specialization): Tweak. - - * tree.c, cp-tree.h (get_target_expr): New fn. - -Wed Dec 3 08:47:27 1997 Paul Eggert - - * pt.c (check_explicit_specialization): Fix misspelling in - diagnostic: `preceeded'. - * typeck.c (get_delta_difference): Fix misspelling in diagnostic: - `conversiona'. - -1997-12-02 Mark Mitchell - - * pt.c (determine_explicit_specialization): Avoid an internal - error for bad specializations. - - * method.c (build_overload_value): Handle SCOPE_REF. - -Tue Dec 2 19:18:50 1997 Mike Stump - - * class.c (prepare_fresh_vtable): Enable even more complex MI - vtable names. - -Tue Dec 2 01:37:19 1997 Jason Merrill - - * exception.cc (__check_eh_spec): Optimize a bit. - - * exception.cc (__cp_pop_exception): Lose handler arg. - * except.c (do_pop_exception): Likewise. - (push_eh_cleanup): Let the cleanup mechanism supply the handler. - (expand_end_catch_block): Likewise. - -Fri Nov 28 01:58:14 1997 Jason Merrill - - * pt.c (check_explicit_specialization): Complain about using a - template-id for a non-specialization. - -Fri Nov 28 12:35:19 1997 Scott Christley - - * repo.c: Prototype rindex only if needed. - * xref.c: Likewise. - -Fri Nov 28 01:56:35 1997 Bruno Haible - - * error.c (dump_decl): Handle TEMPLATE_ID_EXPR. - -Thu Nov 27 00:59:46 1997 Jason Merrill - - * typeck.c (build_const_cast): Handle references here instead of - handing off to convert_to_reference. - - * except.c: Lose Unexpected, SetTerminate, SetUnexpected, - TerminateFunctionCall. - (init_exception_processing): Likewise. Terminate et al are now - the fns, not ADDR_EXPRs. - (various): Lose redundant assemble_external calls. - (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/. - - * cp-tree.h (struct lang_decl_flags): Add comdat. - (DECL_COMDAT): New macro. - * decl.c (duplicate_decls): Propagate it. - (cp_finish_decl): Handle it. - * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs. - - * class.c: Remove static pending_hard_virtuals. - (add_virtual_function): Take pointers to pending_virtuals - and pending_hard_virtuals. - (finish_struct_1): Pass them. Declare pending_hard_virtuals. - -Wed Nov 26 20:28:49 1997 Jason Merrill - - * decl2.c (import_export_vtable): If we support one_only but not - weak symbols, mark instantiated template vtables one_only. - (import_export_decl): Likewise for tinfo functions. - (finish_vtable_vardecl): Also write out vtables from explicitly - instantiated template classes. - * pt.c (mark_class_instantiated): Revert last change. - - * except.c (expand_throw): Call mark_used on the destructor. - -Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com) - - * lex.c (lang_init): Enable flag_exceptions by default if no - command line switch was specified. - -1997-11-26 Mark Mitchell - - * pt.c (unify): Handle `void' template parameters in - specializations. - -Wed Nov 26 01:11:24 1997 Jason Merrill - - * rtti.c (build_dynamic_cast): Handle template case here. - (build_dynamic_cast_1): Not here. - - * typeck2.c (digest_init): Make copies where appropriate. - - * decl2.c (delete_sanity): resolve_offset_ref. - - * except.c: Call terminate without caching so many bits. - - * except.c (expand_start_catch_block): Fix catching a reference - to pointer. - -Tue Nov 25 11:28:21 1997 Jason Merrill - - * init.c (build_new): Copy size to the saveable obstack. - - * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the - TRY_CATCH_EXPR for now. - -Mon Nov 24 12:15:55 1997 Jason Merrill - - * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL - has DECL_LANG_SPECIFIC. - - * exception.cc (struct cp_eh_info): Add handlers field. - (__cp_push_exception): Initialize it. - (__cp_pop_exception): Decrement it. Don't pop unless it's 0. - (__throw_bad_exception): Remove. - * except.c (call_eh_info): Add handlers field. - (get_eh_handlers): New fn. - (push_eh_cleanup): Increment handlers. - -Fri Nov 21 12:22:07 1997 Jason Merrill - - * except.c (expand_start_eh_spec): Use the try/catch code. - (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of - doing everything inline. - (init_exception_processing): throw_type_match now takes - const void pointers. - * exception.cc (__check_eh_spec): New fn. - * inc/exception: Neither terminate nor unexpected return. - * decl.c: Make const_ptr_type_node public. - * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly. - - * except.c (expand_start_catch_block): We only need the rethrow - region for non-sjlj exceptions. - (expand_end_catch_block): Likewise. Use outer_context_label_stack. - -Thu Nov 20 14:40:17 1997 Jason Merrill - - * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs. - (various.o): Likewise. - * inc/new: Add placement deletes. Add throw specs for default new. - * new.cc (set_new_handler): Move here from libgcc2. - * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler. - (new): Move from libgcc2. Throw bad_alloc. - * new2.cc: Move the rest of the op news and op deletes from libgcc2. - * decl.c (init_decl_processing): Update exception specs on new and - delete. - - * method.c (build_decl_overload_real): Don't mess with global - placement delete. - - * init.c (build_new): Check for null throw spec, not nothrow_t. - - * decl.c (duplicate_decls): Don't complain about different exceptions - from an internal declaration. - - * call.c (build_op_delete_call): Fix check for member fns again. - - * decl2.c (import_export_decl): Interface hackery affects - virtual synthesized methods. - -Wed Nov 19 18:24:14 1997 Jason Merrill - - * decl.c (start_decl): Don't just complain about a mismatched - scope, fix it. - - * decl.c (make_implicit_typename): Handle case where t is not - actually from context. - * tree.c (get_type_decl): Lose identifier case. - * spew.c (yylex): Lose useless call to identifier_typedecl_value. - * parse.y (nonnested_type): Just use lookup_name. - (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE. - -Wed Nov 19 11:45:07 1997 Michael Tiemann - - * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case - T was built in C language context (for example, by - output_func_start_profiler). - -Wed Nov 19 10:39:27 1997 Jason Merrill - - * decl.c (make_implicit_typename): New fn. - (lookup_name_real): Use it. Use current_class_type as the context. - -Mon Nov 17 23:42:03 1997 Bruno Haible - - * pt.c (do_poplevel): Don't prohibit jumps into this contour. - -Mon Nov 17 02:01:28 1997 Jason Merrill - - * friend.c (do_friend): Warn about non-template friends in templates. - - * call.c (build_op_delete_call): Fix handling of inherited delete. - - * search.c (dfs_record_inheritance): Ignore template type parms. - -Sat Nov 15 00:30:51 1997 Jason Merrill - - * call.c (build_new_op): Fix copy error. - (build_op_new_call): New fn. - (build_op_delete_call): New fn. - * cp-tree.h: Declare them. - * init.c (build_new): Use them. Support placement delete. - (build_x_delete): Use build_op_delete_call. - (build_delete): Likewise. - * decl2.c (delete_sanity): Likewise. - (coerce_delete_type): Don't complain about placement delete. - -Thu Nov 13 01:52:36 1997 Jason Merrill - - * call.c (build_new_function_call): Remove unused 'obj' parm. - * cp-tree.h, typeck.c: Adjust. - - * init.c (build_new): Make the cleanup last longer. - (expand_vec_init): Call do_pending_stack_adjust. - -Wed Nov 12 11:04:33 1997 Jason Merrill - - * pt.c (do_type_instantiation): Fix typo. - (mark_class_instantiated): If we support one_only but not weak - symbols, don't mark this as known. - - * init.c (build_new): Handle vec delete in EH cleanup. - -Wed Nov 12 08:11:55 1997 Benjamin Kosnik - - * call.c (build_method_call): Call complete_type before checking - for destructor. - -Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com) - - * decl.c (add_block_current_level): Delete. - * init.c (build_vec_delete_1): Delete build_block and - add_block_current_level calls. - -Wed Nov 12 00:48:16 1997 Jason Merrill - - * init.c (build_new): Handle freeing allocated memory when the - constructor throws. - - * call.c (build_new_method_call): Fix flags arg. - - * pt.c (do_type_instantiation): Don't try to instantiate - member templates. - (mark_decl_instantiated): If we support one_only but not - weak symbols, mark this one_only. - * decl2.c (import_export_vtable): Don't defer handling of vtables - if MULTIPLE_SYMBOL_SPACES. - -Tue Nov 11 12:02:12 1997 Jason Merrill - - * except.c (expand_end_catch_block): Lose call to __sjpopnthrow. - -Tue Nov 11 02:53:44 1997 Jason Merrill - - * except.c (do_pop_exception): Return a value. - -Mon Nov 10 20:25:31 1997 Jason Merrill - - * call.c (build_new_method_call): Handle getting a - TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field - if we got template parms. - * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR, - not just the args. - * decl2.c (build_expr_from_tree): Tweak last change. - * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE. - (maybe_fold_nontype_arg): Split out from tsubst_copy. - * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR. - -Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij - - * pt.c (tsubst_copy): Handle explicit template arguments in - function calls. - * typeck.c (build_x_function_call): Likewise. - * decl2.c (build_expr_from_tree): Lookup function name if it - hasn't been done. - - * pt.c (tsubst): Instantiate template functions properly when - template parameter does not appear in function arguments and return - type. - (comp_template_args): Handle member templates required by tsubst. - -Mon Nov 10 20:08:38 1997 Jason Merrill - - * decl.c (grokdeclarator): Tweak conditions for pedwarn in - previous change. - -Mon Nov 10 20:08:29 1997 Bruno Haible - - * pt.c (coerce_template_parms): Tweak error message. - - * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a - return type defaults to `int', even if there are storage-class - specifiers. - -Mon Nov 10 03:04:20 1997 Jason Merrill - - Complete nested exception support. - * except.c (do_pop_exception): Split out... - (push_eh_cleanup): From here. Handle the EH region by hand. - (expand_start_catch_block): Add a new level for the catch parm. - Move the rethrow region outside the two cleanup regions. - Protect the initializer for the catch parm with terminate. - (expand_end_catch_block): Likewise. End the region for the eh_cleanup. - * exception.cc (__cp_pop_exception): Now takes two parms. Handle - popping off the middle of the stack. - * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, - WITH_CLEANUP_EXPR, and UNSAVE_EXPR. - (build_cplus_new): Only wrap CALL_EXPRs. - * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around - the constructor call. - -Sun Nov 9 18:00:26 1997 Richard Kenner - - * Make-lang.in (c++.distdir): Make inc subdirectory. - -Fri Nov 7 11:57:28 1997 Jason Merrill - - * decl2.c (finish_file): Put back some code. - -Thu Nov 6 11:28:14 1997 Jason Merrill - - * decl2.c (finish_file): Remove redundant code. - * method.c (emit_thunk): Don't let the backend defer generic thunks. - -Wed Nov 5 23:52:50 1997 Jason Merrill - - * except.c (call_eh_info): Split out... - (push_eh_info): From here. - (expand_builtin_throw): Use it. - (expand_start_catch_block): Move region start back. - -Tue Nov 4 13:45:10 1997 Doug Evans - - * lex.c (MULTIBYTE_CHARS): #undef if cross compiling. - (real_yylex): Record wide strings using target endianness, not host. - -1997-11-03 Brendan Kehoe - - * repo.c (rindex): Add decl unconditionally. - (get_base_filename, open_repo_file): Don't cast rindex. - * xref.c (rindex): Add decl unconditionally. - (index): Remove unused decl. - (open_xref_file): Don't cast rindex. - -Sun Nov 2 15:04:12 1997 Jason Merrill - - * class.c (build_vbase_path): Propagate the result type properly. - -1997-11-01 Brendan Kehoe - - * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace - remaining use of saved_throw_type with a call to get_eh_type. - -1997-10-31 Brendan Kehoe - - * lex.c (FILE_NAME_NONDIRECTORY): Delete macro. - (file_name_nondirectory): New function, doing the same as the macro. - (set_typedecl_interface_info): Use it instead of the macro. - (check_newline): Likewise. - (handle_cp_pragma): Likewise. - - * repo.c (get_base_filename): Cast result of rindex to char*. - (open_repo_file): Likewise. - * xref.c (open_xref_file): Likewise. - * error.c (dump_char): Make its arg int, not char. - - * except.c (push_eh_info): Pass the number of fields - 1 down, not - the exact number of fields. - -Fri Oct 31 01:47:57 1997 Jason Merrill - - Support for nested exceptions. - * tinfo2.cc (__is_pointer): New fn. - * exception.cc (struct cp_eh_info): Define. - (__cp_exception_info, __uncatch_exception): New fns. - (__cp_push_exception, __cp_pop_exception): New fns. - * except.c: Lose saved_throw_{type,value,cleanup,in_catch}. - Lose empty_fndecl. - (init_exception_processing): Likewise. __eh_pc is now external. - (push_eh_info): New fn. - (get_eh_{info,value,type,caught}): New fns. - (push_eh_cleanup): Just call __cp_pop_exception. - (expand_start_catch_block): Use push_eh_info. Start the eh region - sooner. - (expand_end_eh_spec): Use push_eh_info. - (expand_throw): Call __cp_push_exception to set up the exception info. - Just pass the destructor or 0 as the cleanup. Call __uncatch_exception - when we rethrow. - (expand_builtin_throw): Don't refer to empty_fndecl. - -Thu Oct 23 02:01:30 1997 Jason Merrill - - * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl. - -1997-10-22 Brendan Kehoe - - * method.c (build_template_parm_names, build_decl_overload_real): - Add static to definitions. - * pt.c (add_to_template_args, note_template_header, - processing_explicit_specialization, type_unification_real): Likewise. - ({determine,check}_explicit_specialization): Use a single string for - error messages. - -Mon Oct 20 12:06:34 1997 Jason Merrill - - * except.c (expand_exception_blocks): Call do_pending_stack_adjust. - (expand_end_catch_block): Likewise. - (expand_end_eh_spec): Likewise. - -Mon Oct 20 11:44:20 1997 Mark Mitchell - - * decl.c (duplicate_decls): Handle template specializations - correctly. - * error.c (dump_function_name): Fix printing of specializations of - member functions that are not member templates. - * cp-tree.h (processing_specialization): Make global. - * pt.c (processing_specialization): Likewise. - * lex.c (cons_up_default_function): Save and restore - processing_specialization to avoid confusion. - -Mon Oct 20 10:52:22 1997 Jason Merrill - - * decl.c (init_decl_processing): Give null_node unknown* type. - * typeck.c (comp_target_types): Handle UNKNOWN_TYPE. - (common_type): Likewise. - * error.c (args_as_string): Recognize null_node. - -Sun Oct 19 09:13:01 1997 Richard Kenner - - * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR. - (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR. - - * decl.c (init_decl_processing): Call using_eh_for_cleanups. - - * Make-lang.in (g++): Include prefix.o. - -Thu Oct 16 15:31:09 1997 Judy Goldberg - - * pt.c (determine_explicit_specialization): Initialize "dummy" - to keep Purify quiet. - -Thu Oct 16 00:14:48 1997 Jason Merrill - - * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here. - (build_overload_int): Not here. - -Wed Oct 15 00:35:28 1997 Mike Stump - - * class.c (build_type_pathname): Remove. - (prepare_fresh_vtable): Fix problem with complex MI vtable names. - -1997-10-14 Brendan Kehoe - - * parse.y (unary_expr): Give a pedwarn if someone tries to use the - &&label GNU extension. - -Tue Oct 14 12:01:00 1997 Mark Mitchell - - * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, - so as to avoid incorrect manglings. - * method.c (build_decl_overload_real): Don't mangle return types - for constructors. - -Tue Oct 14 11:46:14 1997 Jason Merrill - - * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec, - scratch_tree_cons): Define as macros for now. - * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, - lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c, - typeck2.c: Use them and the expression_obstack variants. - -Mon Oct 13 17:41:26 1997 Benjamin Kosnik - - * decl.c (store_return_init): Allow classes with explicit ctors to - be used with the named return values extension. - -Fri Oct 10 12:21:11 1997 Jason Merrill - - * pt.c (instantiate_decl): Fix previous change. - -Thu Oct 9 12:08:21 1997 Jason Merrill - - * pt.c (tsubst): Fix thinko. - (instantiate_decl): Really use the original template. - - * call.c (build_new_method_call): Use simple constructor_name for - error messages. - -Wed Oct 8 22:44:42 1997 Jeffrey A Law - - * method.c (build_underscore_int): Don't use ANSI specific - features. - -Wed Oct 8 00:18:22 1997 Jason Merrill - - * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN - for our key method; it might have been inlined by -O3. - -Tue Oct 7 23:00:12 1997 Mark Mitchell - - * decl.c (make_typename_type): Do not try to call lookup_field for - non-aggregate types. - -Tue Oct 7 22:52:10 1997 Jason Merrill - - * typeck.c (build_reinterpret_cast): Tweak. - -Tue Oct 7 22:45:31 1997 Alexandre Oliva - - * typeck.c (build_reinterpret_cast): Converting a void pointer - to function pointer with a reinterpret_cast produces a warning - if -pedantic is issued. - -Tue Oct 7 22:43:43 1997 Bruno Haible - - * typeck.c (c_expand_return): Don't warn about returning a - reference-type variable as a reference. - -Tue Oct 7 21:11:22 1997 Jason Merrill - - * method.c (build_static_name): Fix typo. - -1997-10-07 Brendan Kehoe - - * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on - OLDDECL before we try to do DECL_USE_TEMPLATE. - -Tue Oct 7 00:48:36 1997 Jason Merrill - - * decl.c (duplicate_decls): Don't warn about template instances. - - * typeck.c (mark_addressable): Lose ancient code that unsets - DECL_EXTERNAL. - - * pt.c (do_decl_instantiation): Lose support for instantiating - non-templates. - - * call.c (build_new_function_call): Fix handling of null explicit - template args. - (build_new_method_call): Likewise. - -Mon Oct 6 23:44:34 1997 Mark Mitchell - - * method.c (build_underscore_int): Fix typo. - -1997-10-06 Brendan Kehoe - - * tree.c (print_lang_statistics): #if 0 call to - print_inline_obstack_statistics until its definition is checked in. - -Mon Oct 6 09:27:29 1997 Jason Merrill - - * decl2.c (finish_file): Move dump_tree_statistics to end. - - * pt.c (instantiate_decl): Look for the original template. - (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations - of member templates. - -Wed Oct 1 08:41:38 1997 Jason Merrill - - * Makefile.in (g++FAQ.*): New rules. - (CONFLICTS): Update. - * g++FAQ.texi: Moved from libg++. - - * parse.y (PFUNCNAME): Only specify the type once. - -1997-10-01 Brendan Kehoe - - * lex.c (real_yylex): Clean up the code to fully behave the way - the c-lex.c parser does for complex and real numbers. - -Tue Sep 30 08:51:36 1997 Jason Merrill - - * method.c (build_decl_overload_real): Reformat. - -Tue Sep 30 00:18:26 1997 Jason Merrill - - * method.c (synthesize_method): If at_eof, determine our linkage. - -1997-09-29 Paul Eggert - - * lex.c (real_yylex): Treat `$' just like `_', except issue a - diagnostic if !dollars_in_ident or if pedantic. - - * lang-specs.h (@c++): -ansi no longer implies -$. - - * decl2.c (lang_decode_option): - -traditional and -ansi now do not mess with - dollars_in_ident. - -Mon Sep 29 19:57:51 1997 H.J. Lu - - * Makefile.in (parse.o, decl.o): Also depend on - $(srcdir)/../except.h $(srcdir)/../output.h. - (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h - $(srcdir)/../except.h $(srcdir)/../output.h. - (typeck.o, init.o): Also depend on $(srcdir)/../expr.h - ../insn-codes.h. - - * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping. - - * expr.c (cplus_expand_expr): Make it static. - - * decl2.c, init.c, typeck.c: Include "expr.h". - (expand_expr): Use proper values when calling the function. - -Mon Sep 29 11:05:54 1997 Alexandre Oliva - - * lang-options.h: New -Wold-style-cast flag. - * cp-tree.h (warn_old_style_cast): New variable. - * decl2.c (warn_old_style_cast): Likewise. - (lang_decode_option): Support -Wold-style-cast. - (reparse_absdcl_as_casts): Produce old-style-cast warning. - -Mon Sep 29 09:20:53 1997 Benjamin Kosnik - - * decl.c (cp_finish_decl): Allow expand_aggr_init to set - TREE_USED, reset value based on already_used. - - * init.c (expand_member_init): Revert change. - -Mon Sep 29 08:57:53 1997 Jason Merrill - - * cp-tree.h, decl.c, decl2.c, pt.c: - Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public. - - * decl2.c (lang_decode_option): Add missing ;. - -Sat Sep 27 16:22:48 1997 Jason Merrill - - * friend.c (do_friend): Disable injection for all template-derived - decls. - * decl2.c (lang_decode_option): Handle -fguiding-decls. - * parse.y (notype_template_declarator): New nonterminal. - (direct_notype_declarator): Use it. - (complex_direct_notype_declarator): Likewise. - (object_template_id): Accept any kind of identifier after TEMPLATE. - (notype_qualified_id): Don't add template declarators here. - -Sat Sep 27 16:21:58 1997 Mark Mitchell - - * call.c (add_template_candidate): Add explicit_targs parameter. - (build_scoped_method_call): Use it. - (build_overload_call_real): Likewise. - (build_user_type_conversion_1): Likewise. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - (build_new_function_call): Handle TEMPLATE_ID_EXPR. - (build_new_method_call): Likewise. - - * class.c (finish_struct_methods): Add specialization pass to - determine which methods were specializing which other methods. - (instantiate_type): Handle TEMPLATE_ID_EXPR. - - * cp-tree.def (TEMPLATE_ID_EXPR): New tree code. - - * cp-tree.h (name_mangling_version): New variable. - (flag_guiding_decls): Likewise. - (build_template_decl_overload): New function. - (begin_specialization): Likewise. - (reset_specialization): Likewise. - (end_specialization): Likewise. - (determine_explicit_specialization): Likewise. - (check_explicit_specialization): Likewise. - (lookup_template_function): Likewise. - (fn_type_unification): Add explicit_targs parameter. - (type_unification): Likewise. - - * decl.c (duplicate_decls): Add smarts for explicit - specializations. - (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function - specializations. - (grokfndecl): Call check_explicit_specialization. - - * decl2.c (lang_decode_option): Handle -fname-mangling-version. - (build_expr_from_tree): Handle TEMPLATE_ID_EXPR. - (check_classfn): Handle specializations. - - * error.c (dump_function_name): Print specialization arguments. - - * friend.c (do_friend): Don't call pushdecl for template - instantiations. - - * init.c (build_member_call): Handle TEMPLATE_ID_EXPR. - - * lang-options.h: Add -fname-mangling-version, -fguiding-decls, - and -fno-guiding-decls. - - * lex.c (identifier_type): Return PFUNCNAME for template function - names. - - * method.c (build_decl_overload_real): New function. - (build_template_parm_names): New function. - (build_overload_identifier): Use it. - (build_underscore_int): New function. - (build_overload_int): Use it. Add levels for template - parameters. - (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs. - (build_overload_nested_names): Handle template type parameters. - (build_template_decl_overload): New function. - - * parse.y (YYSTYPE): New ntype member. - (nested_name_specifier): Use it. - (nested_name_specifier_1): Likewise. - (PFUNCNAME): New token. - (template_id, object_template_id): New non-terminals. - (template_parm_list): Note specializations. - (template_def): Likewise. - (structsp): Likewise. - (fn.def2): Handle member template specializations. - (component_decl_1): Likewise. - (direct_notype_declarator): Handle template-ids. - (component_decl_1): Likewise. - (direct_notype_declarator): Handle template-ids. - (primary): Handle TEMPLATE_ID_EXPR, and template-ids. - - * pt.c (processing_specializations): New variable. - (template_header_count): Likewise. - (type_unification_real): New function. - (processing_explicit_specialization): Likewise. - (note_template_header): Likewise. - (is_member_template): Handle specializations. - (end_template_decl): Call reset_specialization. - (push_template_decl): Handle member template specializations. - (tsubst): Likewise. - (tsubst_copy): Handle TEMPLATE_ID_EXPR. - (instantiate_template): Handle specializations. - (instantiate_decl): Likewise. - (fn_type_unification): Handle explicit_targs. - (type_unification): Likewise. Allow incomplete unification - without an error message, if allow_incomplete. - (get_bindings): Use new calling sequence for fn_type_unification. - - * spew.c (yylex): Handle PFUNCNAME. - - * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR. - (really_overloaded_fn): Likewise. - (get_first_fn): Handle function templates. - - * typeck.c (build_x_function_call): Use really_overloaded_fn. - Handle TEMPLATE_ID_EXPR. - (build_x_unary_op): Likewise. - (build_unary_op): Likewise. - (mark_addressable): Templates whose address is taken are marked - as used. - -1997-09-25 Andreas Schwab - - * decl.c (init_decl_processing): Declare __builtin_constant_p as - accepting any kind of type, not only int. - -Fri Sep 26 00:22:56 1997 Jason Merrill - - * search.c (get_matching_virtual): Notice virtual bases when sorrying - about covariant returns. - - * parse.y (member_init): Also imply typename here. Remove ancient - extension for initializing base members. - -Thu Sep 25 11:11:13 1997 Jason Merrill - - Handle multi-level typenames and implicit typename in base list. - * parse.y (typename_sub{,[0-2]}): New rules. - (structsp, rule TYPENAME_KEYWORD): Use typename_sub. - (nonnested_type): New rule. - (complete_type_name): Use it. - (base_class.1): Use typename_sub and nonnested_type. - (nested_name_specifier): Don't elide std:: here. - * decl.c (make_typename_type): Handle getting a type for NAME. - (lookup_name_real): Turn std:: into :: here. - - Rvalue conversions were removed in London. - * call.c (is_subseq): Don't consider lvalue transformations. - (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK. - (joust): Re-enable ?: kludge. - -1997-09-22 Brendan Kehoe - - * decl.c (start_function): Up warning of no return type to be a - pedwarn. - -Mon Sep 22 14:15:34 1997 Benjamin Kosnik - - * init.c (expand_member_init): Don't set TREE_USED. - * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED - set,don't clear TREE_USED wholesale. - -Sat Sep 20 15:31:00 1997 Jason Merrill - - * call.c (build_over_call): Do require_complete_type before - build_cplus_new. - -Thu Sep 18 16:47:52 1997 Jason Merrill - - * search.c (lookup_field): Call complete_type in all cases. - - * decl.c (finish_function): Just warn about flowing off the end. - -Wed Sep 17 10:31:25 1997 Jason Merrill - - * decl.c (grokparms): Don't bash a permanent list node if we're - in a function. - -1997-09-17 Brendan Kehoe - - * Makefile.in (CONFLICTS): Fix s/r conflict count to 18. - -Tue Sep 16 14:06:56 1997 Jason Merrill - - * call.c (build_new_op): Give better error for syntactically - correct, but semantically invalid, use of undeclared template. - - * call.c (compare_qual): Handle pmfs. - - * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn - after the exception spec. - -Mon Sep 15 11:52:13 1997 Jason Merrill - - * call.c (null_ptr_cst_p): Integer type, not integral type. - - * call.c (joust): Disable warnings until they can be moved to the - right place. - -Fri Sep 12 16:11:13 1997 Per Bothner - - * Makefile.in, config-lang.in: Convert to autoconf. - -Thu Sep 11 17:14:55 1997 Jason Merrill - - * decl.c (lookup_name_real): Add implicit 'typename' to types from - base classes. - - * pt.c (most_specialized_class): Fix typo. - (tsubst): Move constant folding to TREE_VEC case. - -Thu Sep 11 10:08:45 1997 Mark Mitchell - - * pt.c (do_poplevel): Don't warn about unused local variables - while processing_template_decl since we don't always know whether - or not they will need constructing/destructing. - - * pt.c (uses_template_parms): Check the values of an enumeration - type to make sure they don't depend on template parms. - - * decl.c (make_typename_type): Don't lookup the field if the - context uses template parms, even if we're not - processing_template_decl at the moment. - - * pt.c (coerce_template_parms): Avoid looking at the - TYPE_LANG_DECL portion of a typename type, since there won't be - one. - (tsubst): Do constant folding as necessary to make sure that - arguments passed to lookup_template_class really are constants. - -Wed Sep 10 11:21:55 1997 Jason Merrill - - * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO. - * decl2.c (finish_file): Only register exception tables if we - need to. - - * decl.c (init_decl_processing): Add __builtin_[fs]p. - -Tue Sep 9 19:49:38 1997 Jason Merrill - - * pt.c (unify): Just return 0 for a TYPENAME_TYPE. - -Tue Sep 9 17:57:25 1997 Mark Mitchell - - * error.c (dump_decl): Avoid crashing when presented with a - uninitialized constant, as can occur with a template parameter. - (dump_expr): Make sure that there are enough levels of - current_template_parms before we start diving through them. - -1997-09-09 Brendan Kehoe - - * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to - c-typeck.c. - -Tue Sep 9 09:36:39 1997 Benjamin Kosnik - - * except.c (expand_throw): Call build_delete for all - exception types, not just objects with destructors. - -Mon Sep 8 02:33:20 1997 Jody Goldberg - - * decl.c (current_local_enum): Remove static. - * pt.c (tsubst_enum): Save and restore value of current_local_enum - in case template is expanded in enum decl. - (instantiate_class_template): Use new tsubst_enum signature. - (tsubst_expr): Likewise. - -Mon Sep 8 01:21:43 1997 Mark Mitchell - - * pt.c (begin_member_template_processing): Take a function as - argument, not a set of template arguments. Use the template - parameters, rather than the arguments. Handle non-type parameters - correctly. Push a binding level for the parameters so that multiple - member templates using the same parameter names can be declared. - (end_member_template_processing): Pop the binding level. - (push_template_decl): Mark member templates as static when - appropriate. - - * lex.c (do_pending_inlines): Pass the function, not its template - arguments, to begin_member_template_processing. - (process_next_inline): Likewise. - (do_pending_defargs): Likewise. - - * error.c (dump_expr): Obtain the correct declaration for a - TEMPLATE_CONST_PARM. - - * call.c (add_template_conv_candidate): New function. - (build_object_call): Handle member templates, as done in the other - build_ functions. - -Sat Sep 6 10:20:27 1997 Mark Mitchell - - * decl.c (replace_defag): Undo previous change. - * lex.c (do_pending_defargs): Deal with member templates. - - * pt.c (is_member_template): Avoid crashing when passed a - non-function argument. - -Fri Sep 5 17:27:38 1997 Jason Merrill - - * class.c (grow_method): Remove check for redeclaration. - -Fri Sep 5 01:37:17 1997 Mark Mitchell - - * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro. - (DECL_INNERMOST_TEMPLATE_PARMS): Likewise. - (PRIMARY_TEMPLATE_P): Use it. - * call.c (build_overload_call_real): Use it. - * class.c (instantiate_type): Likewise. - * decl.c (decls_match): Likewise. - * method.c (build_overload_identifier): Likewise. - * pt.c (push_template_decl): Likewise. - (classtype_mangled_name): Likewise. - (lookup_template_class): Likewise. - - * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to - DECL_NTPARMS to conform to usage elsewhere. - * call.c (add_template_candidate): Likewise. - * class.c (instantiate_type): Likewise. - * pt.c (instantiate_template): Likewise. - (get_bindings): Likewise. - - * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of - is_member_template. - - * pt.c (unify): Undo changes to allow multiple levels of template - parameters. - (type_unification): Likewise. - (fn_type_unification): Likewise. - (get_class_bindings): Likewise. - * cp-tree.h (Likewise). - - * decl.c (replace_defarg): Check that the type of the default - parameter does not invlove a template type before complaining - about the initialization. - - * error.c (dump_expr): Deal with template constant parameters in - member templates correctly. - - * pt.c (is_member_template): Deal with class specializations - correctly. - (tsubst): Handle "partial instantiation" of member templates - correctly. - -Wed Sep 3 12:30:24 1997 Mark Mitchell - - * pt.c (type_unification): Change calling sequence to allow for - multiple levels of template parameters. - (tsubst_expr): Likewise. - (tsubst): Likewise. - (tsubst_copy): Likewise. - (instantiate_template): Likewise. - (unify): Likewise. - * call.c (build_overload_call_real): Use it. - (add_builtin_candidate): Use it. - (build_new_method_call): Use it. - * class.c (instantiate_type): Use it. - * decl.c (grokdeclarator): Use it. - * decl2.c (finish_file): Use it. - * method.c (build_overload_identifier): Use it. - - * call.c (add_template_candidate): Add additional parameter for - the function return type. Call fn_type_unification istead of - type_unification. - (build_user_type_conversion_1): Handle member templates. - (build_new_function_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - - * class.c (grow_method): Don't give an error message indicating - that two member templates with the same name are ambiguous. - (finish_struct): Treat member template functions just like member - functions. - - * cp-tree.h (check_member_template): Add declaration. - (begin_member_template_processing): Likewise. - (end_member_template_processing): Likewise. - (fn_type_unification): Likewise. - (is_member_template): Likewise. - (tsubst): Change prototype. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (instantiate_template): Likewise. - (get_bindings): Likewise. - - * decl.c (decls_match): Handle multiple levels of template - parameters. - (pushdecl): Handle template type params just like other type - declarations. - (push_class_level_binding): Return immediately if the - class_binding_level is NULL. - (grokfndecl): If check_classfn() returns a member_template, use - the result of the template, not the template itself. - - * decl2.c (check_member_template): New function. Check to see - that the entity declared to be a member template can be one. - (check_classfn): Allow redeclaration of member template functions - with different types; the new functions can be specializations or - explicit instantiations. - - * error.c (dump_decl): Handle multiple levels of template - parameters. - (dump_function_decl): Update to handle function templates. - - * lex.c (do_pending_inlines): Set up template parameter context - for member templates. - (process_next_inline): Likewise. - - * method.c (build_overload_identifier): Adjust for multiple levels - of template parameters. - - * parse.y (fn.def2): Add member templates. - (component_decl_1): Likewise. - - * pt.c (begin_member_template_processing): New function. - (end_member_template_processing): Likewise. - (is_member_template): Likewise. - (fn_type_unification): Likewise. - (current_template_parms): Return a vector of all the template - parms, not just the innermost level of parms. - (push_template_decl): Deal with the possibility of member - templates. - (lookup_template_class): Likewise. - (uses_template_parms): Likewise. - (tsubst): Modify processing to TEMPLATE_TYPE_PARM and - TEMPLATE_CONST_PARM to deal with multiple levels of template - arguments. Add processing of TEMPLATE_DECL to produce new - TEMPLATE_DECLs from old ones. - (do_decl_instantiation): Handle member templates. - - * search.c (lookup_fnfields_1): Handle member template conversion - operators. - - * tree.c (cp_tree_equal): Check the levels, as well as the - indices, of TEMPLATE_CONST_PARMs. - - * typeck.c (comptypes): Check the levels, as well as the indices, - fo TEMPLATE_TYPE_PARMs. - (build_x_function_call): Treat member templates like member - functions. - -Wed Sep 3 11:09:25 1997 Jason Merrill - - * typeck.c (c_expand_return): Always convert_for_initialization - before checking for returning a pointer to local. - - * pt.c (type_unification): If strict and the function parm doesn't - use template parms, just compare types. - -Wed Sep 3 10:35:49 1997 Klaus Espenlaub - - * method.c (build_overloaded_value): Replace direct call - to the floating point emulator with REAL_VALUE_TO_DECIMAL macro. - -Wed Sep 3 00:02:53 1997 Jason Merrill - - * typeck.c (convert_arguments): Don't arbitrarily choose the first - of a set of overloaded functions. - -Tue Sep 2 12:09:13 1997 Jason Merrill - - * lex.c (real_yylex): Don't elide __FUNCTION__. - - * method.c (build_overload_value): Add in_template parm. - (build_overload_int): Likewise. - (build_overload_identifier): Pass it. - - * decl.c (duplicate_decls): Don't bash a previous template - definition with a redeclaration. - - * pt.c (unify): float doesn't match double. - - * pt.c (do_type_instantiation): Handle getting a _TYPE or a - TYPE_DECL. Handle getting non-template types. - * parse.y (explicit_instantiation): Use typespec instead of - aggr template_type. - -Tue Sep 2 10:27:08 1997 Richard Henderson - - * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings. - -Mon Sep 1 13:19:04 1997 Eugene Mamchits - - * call.c (add_builtin_candidate): Add missing TREE_TYPE. - (compare_ics): Likewise. - -Mon Sep 1 13:19:04 1997 Jason Merrill - - * call.c (joust): Warn about choosing one conversion op over - another because of 'this' argument when the other return type is - better. - (source_type): New fn. - - * call.c (build_new_op): Strip leading REF_BIND from first operand - to builtin operator. - - * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we - use its RTL. - -Thu Aug 28 09:45:23 1997 Jason Merrill - - * call.c (null_ptr_cst_p): Remove support for (void*)0. - -Wed Aug 27 02:03:34 1997 Jeffrey A Law - - * typeck.c (expand_target_expr): Make definition match declaration. - - * class.c (get_basefndecls): Make definition match declaration. - -Mon Aug 25 14:30:02 1997 Jason Merrill - - * input.c (sub_getch): Eventually give up and release the input file. - - * decl.c (cp_finish_decl): If #p i/i, put inline statics in the - right place. - - * call.c (joust): Tweak message. - -Sat Aug 23 18:02:59 1997 Mark Mitchell - - * error.c (type_as_string): Put const/volatile on template type - parameters where appropriate. - -Sat Aug 23 17:47:22 1997 Jeffrey A Law - - * call.c (strictly_better): Make arguments unsigned ints. - -Thu Aug 21 18:48:44 1997 Jason Merrill - - * lex.c (real_yylex): Refer to __complex instead of complex. - -Thu Aug 21 22:25:46 1997 J"orn Rennecke - - * lex.c (real_yylex): Don't use getc directly. - -Wed Aug 20 17:25:08 1997 Jason Merrill - - * call.c (is_subseq): Don't try to be clever. - -Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * parse.y, pt.c: Include "except.h". - * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c, - error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c, - lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c, - sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish - prototyping. - -Wed Aug 20 01:34:40 1997 Jason Merrill - - * decl2.c (mark_vtable_entries): Instead of replacing pure - virtuals with a reference to __pure_virtual, copy the decl and - change the RTL. - -Tue Aug 19 02:26:07 1997 Jason Merrill - - * pt.c (lookup_nested_type_by_name): Handle typedef wierdness. - - * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com. - - * pt.c (instantiate_class_template): Call repo_template_used - before finish_prevtable_vardecl. - - * call.c (is_subseq): New fn. - (compare_ics): Use it. - - * repo.c (finish_repo): Don't crash on no args. - - * parse.y (named_complex_class_head_sans_basetype): Handle - explicit global scope. - * decl2.c (handle_class_head): New fn. - - * pt.c (unify): Add CONST_DECL case. - -Thu Aug 14 10:05:13 1997 Brendan Kehoe - - * rtti.c (permanent_obstack): Fix decl to not be a pointer. - - * cp-tree.h (report_type_mismatch): Add prototype. - * call.c (build_overload_call_real): Remove erroneous fourth - argument to report_type_mismatch. - (build_user_type_conversion_1): Remove erroneous second arg to - tourney. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - -Wed Aug 13 19:19:25 1997 Jason Merrill - - * error.c (dump_decl): Don't bother processing a function with no - DECL_LANG_SPECIFIC. - - * method.c (emit_thunk): Call init_function_start in the macro case. - -Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not - defined and used to set flag_vtable_thunks. - -Tue Aug 12 20:13:57 1997 Jason Merrill - - * parse.y: Don't clear the inlines from their obstack until they've - all been processed. - - * decl.c (duplicate_decls): Don't complain about exception - specification mismatch if flag_exceptions is off. - -Mon Aug 11 15:01:56 1997 Marc Lehmann - - * Make-lang.in (c++.distclean): Remove g++.c on make distclean. - -Sun Aug 10 12:06:09 1997 Paul Eggert - - * cp-tree.h: Replace STDIO_PROTO with PROTO in include files. - * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c: - Include before include files that formerly used STDIO_PROTO. - - * decl.c, g++spec.c, lex.c, method.c, repo.c: - Include "config.h" first, as per autoconf manual. - -Fri Aug 8 11:47:48 1997 Jason Merrill - - * decl.c (duplicate_decls): Tweak wording. - * lex.c (do_pending_defargs): Don't die if we see a default arg - that isn't a DEFAULT_ARG. - * error.c (dump_expr): Handle DEFAULT_ARG. - - * decl2.c (lang_decode_option): Handle -fhandle-exceptions. - * lang-options.h: Add -fhandle-exceptions. - - * class.c (build_vtable): Vtables are artificial. - (prepare_fresh_vtable): Likewise. - -Wed Aug 6 11:02:36 1997 Jason Merrill - - * cvt.c (ocp_convert): After converting to the target type, set - LOOKUP_NO_CONVERSION. - - * call.c (joust): Warn about potentially confusing promotion rules - with -Wsign-promo. - * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo. - -Tue Aug 5 15:15:07 1997 Michael Meissner - - * exception.cc: Declare __terminate_func with noreturn attribute. - -Fri Aug 1 03:18:15 1997 Jason Merrill - - * parse.y: Break out eat_saved_input, handle errors. - (function_try_block): Use compstmt instead of compstmt_or_error. - -Thu Jul 31 17:14:04 1997 Jason Merrill - - * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE. - -Fri Jul 4 01:45:16 1997 Andreas Schwab - - * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for - existence of cc1plus check whether $(LANGUAGES) contains C++. - -Wed Jul 30 13:04:21 1997 Andreas Schwab - - * method.c (do_build_copy_constructor): When copying an anonymous - union member loop around to handle nested anonymous unions. Use - the offset of the member relative to the outer structure, not the - union. - -Tue Jul 29 21:17:29 1997 Jason Merrill - - * call.c (resolve_args): New fn. - (build_new_function_call): Use it. - (build_object_call): Likewise. - (build_new_method_call): Likewise. - -Mon Jul 28 16:02:36 1997 Jason Merrill - - * call.c (build_over_call): tsubst all default parms from templates. - -Wed Jul 23 13:36:25 1997 Jason Merrill - - * decl.c (struct cp_function): Add static_labelno. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - -Tue Jul 22 14:43:29 1997 Jason Merrill - - * typeck.c (build_component_ref_1): Convert from reference. - -Tue Jul 22 11:06:23 1997 Brendan Kehoe - - * parse.y (current_declspecs, prefix_attributes): Initialize to - NULL_TREE. - - * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil - before we try to force it to be a TREE_LIST. - (decl): Make sure $1.t is non-nil. - -Sun Jul 20 11:53:07 1997 Jason Merrill - - * pt.c (uses_template_parms): Handle template first-parse codes. - - * decl.c (cp_finish_decl): Only warn about user-defined statics. - -Fri Jul 18 17:56:08 1997 Jason Merrill - - * pt.c (unify): Handle BOOLEAN_TYPE. - - * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE. - * pt.c (tsubst): Don't set it. - * call.c (build_over_call): Use uses_template_parms. - -Thu Jul 17 18:06:30 1997 Jason Merrill - - * method.c (build_overload_nested_name): Use static_labelno - instead of var_labelno. - (build_qualified_name): New fn. - (build_overload_name): Split out from here. - (build_static_name): Use build_qualified_name. - * decl.c (cp_finish_decl): Statics in extern inline functions - have comdat linkage. - (start_function): Initialize static_labelno. - -Thu Jul 17 11:20:17 1997 Benjamin Kosnik - - * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy - before "all member functions in class [] are private". - -Wed Jul 16 23:47:08 1997 Jason Merrill - - * lex.c (do_scoped_id): convert_from_reference. - * init.c (build_offset_ref): Likewise. - -Wed Jul 16 12:34:29 1997 Benjamin Kosnik - - * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list. - -Mon Jul 14 03:23:46 1997 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Promote index - before saving it. - -Sun Jul 13 00:11:52 1997 Jason Merrill - - * tree.c (layout_basetypes): Move non-virtual destructor warning. - * decl.c (xref_basetypes): Remove non-virtual destructor warning. - -Sat Jul 12 12:47:12 1997 Jason Merrill - - * decl.c (grokdeclarator): Call add_defarg_fn for the function - type, too. - * lex.c (add_defarg_fn): Adjust. - (do_pending_defargs): Adjust. Don't skip the first parm. - -Fri Jul 11 01:39:50 1997 Jason Merrill - - * decl.c (build_enumerator): Global enumerators are also readonly. - - * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast. - (build_dynamic_cast): Call it and convert_from_reference. - - * lex.c (add_defarg_fn): New fn. - (snarf_defarg): Don't add to defarg_types. - (do_pending_defargs): Lose defarg_types. All fns we process now - have defargs. - * decl.c (grokfndecl): Call add_defarg_fn. - - * Makefile.in (CONFLICTS): Expect 18 s/r conflicts. - * cp-tree.def: Add DEFAULT_ARG. - * spew.c (yylex): Call snarf_defarg as appropriate. - * parse.y: New tokens DEFARG and DEFARG_MARKER. - (defarg_again, pending_defargs, defarg, defarg1): New rules. - (structsp): Use pending_defargs. - (parms, full_parm): Use defarg. - * lex.c (init_lex): Initialize inline_text_firstobj. - (do_pending_inlines): Never pass the obstack to feed_input. - (process_next_inline): Call end_input instead of restore_pending_input. - (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs, - finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns. - * input.c (end_input): New fn. - (sub_getch): At the end of some fed input, just keep returning EOF - until someone calls end_input. - Remove 'obstack' field from struct input_source. - * decl.c (grokparms): Handle DEFAULT_ARG. - (replace_defarg): New fn. - * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros. - -Wed Jul 9 13:44:12 1997 Jason Merrill - - * call.c (implicit_conversion): If nothing else works, try binding - an rvalue to a reference. - -Wed Jul 9 13:04:38 1997 Geoffrey Noer - - * decl.c (init_decl_processing): Fix Jun 30 patch -- move - ifndef for Cygwin32 to include SIGSEGV. - -Thu Jul 3 01:44:05 1997 Jason Merrill - - * class.c (finish_struct_1): Only complain about pointers without - copy stuff if there are any constructors. - - * rtti.c (build_dynamic_cast): Call complete_type on the types. - - * decl.c (grokfndecl): If the function we chose doesn't actually - match, die. - - * decl2.c (grokclassfn): Don't specify 'const int' for the - artificial destructor parm. - - * pt.c (type_unification): If we are called recursively, nothing - decays. - -Mon Jun 30 17:53:21 1997 Geoffrey Noer - - * decl.c (init_decl_processing): Stop trying to catch signals - other than SIGABRT since the Cygwin32 library doesn't support - them correctly yet. This fixes a situation in which g++ causes - a hang on SIGSEGVs and other such signals in our Win32-hosted - tools. - -Mon Jun 30 14:50:01 1997 Jason Merrill - - * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data. - -Fri Jun 27 15:18:49 1997 Jason Merrill - - * typeck2.c (store_init_value): Always return the value if our - type needs constructing. - - * method.c (hack_identifier): Convert class statics from - reference, too. - -Thu Jun 26 11:44:46 1997 Jason Merrill - - * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency. - -Thu Jun 19 16:49:28 1997 Mike Stump - - * typeck.c (c_expand_return): Make sure we clean up temporaries at - the end of return x; - -Thu Jun 19 12:28:43 1997 Brendan Kehoe - - * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER. - -Tue Jun 17 18:35:57 1997 Mike Stump - - * except.c (expand_builtin_throw): Add support - -fno-sjlj-exceptions -fPIC exception handling on the SPARC. - -Mon Jun 16 01:24:37 1997 Jason Merrill - - * repo.c (extract_string): Null-terminate. - - * cp-tree.h (TI_SPEC_INFO): New macro. - (CLASSTYPE_TI_SPEC_INFO): New macro. - * pt.c (push_template_decl): Correctly determine # of template parms - for partial specs. - - * call.c (compare_ics): Really fix 'this' conversions. - - * pt.c (do_decl_instantiation): Don't crash on explicit inst of - non-template fn. - - * pt.c (push_template_decl): Complain about mismatch in # of - template parms between a class template and a member template. - -Sun Jun 15 02:38:20 1997 Jason Merrill - - * method.c (synthesize_method): You can't call - function_cannot_inline_p after finish_function. - * decl.c (finish_function): Turn on flag_inline_functions and turn - off DECL_INLINE before handing a synthesized method to the - backend. - -Thu Jun 12 17:35:28 1997 Jason Merrill - - * method.c (synthesize_method): Remove July 30 change to never set - DECL_INLINE if at_eof. - -Thu Jun 12 15:25:08 1997 Mike Stump - - * xref.c (GNU_xref_member): Ensure that the node has a - decl_lang_specific part before checking DECL_FRIEND_P. - -Thu Jun 12 12:36:05 1997 Jason Merrill - - * pt.c (instantiate_class_template): Diagnose non-class types used - as bases. - -Wed Jun 11 17:33:40 1997 Jason Merrill - - * typeck.c (build_conditional_expr): Use convert_for_initialization - instead of convert_and_check. - -Wed Jun 11 12:31:33 1997 Brendan Kehoe - - * parse.y (typespec): Don't pedwarn for typeof. - -Tue Jun 10 00:22:09 1997 Jason Merrill - - * repo.c (finish_repo): Only check changes if we would write a - repo file. - - * call.c (compare_ics): Fix handling of 'this' conversions. - - * pt.c (do_decl_instantiation): Support static data too. Rename - from do_function_instantiation. - * cp-tree.h: Adjust. - * parse.y: Adjust. - - * repo.c (extract_string): New fn. - (get_base_filename): Use it. - (init_repo): Compare old args with current args. - -Mon Jun 9 14:25:30 1997 Mike Stump - - * Makefile.in, Make-lang.in: Protect C-ls with a comment - character, idea from Paul Eggert . - -Mon Jun 9 01:52:03 1997 Jason Merrill - - * typeck.c (c_expand_return): Be more persistent in looking for - returned temps. - - * cvt.c (build_up_reference): Use NOP_EXPR for switching from - pointer to reference. - - * class.c (build_vbase_path): Don't do anything if PATH has no steps. - -Sun Jun 8 03:07:05 1997 Jason Merrill - - * init.c (build_member_call, build_offset_ref): - Use do_scoped_id instead of do_identifier. - - * cvt.c (convert): Remove bogosity. - -Sat Jun 7 20:50:17 1997 Brendan Kehoe - - * cvt.c (build_up_reference): Do checks of ARGTYPE and - TARGET_TYPE before trying to use get_binfo. - -Fri Jun 6 17:36:39 1997 Jason Merrill - - * cvt.c (build_up_reference): Call get_binfo to get access control. - - * decl2.c (import_export_decl): If we don't support weaks, leave - statics undefined. - -Fri Jun 6 15:55:49 1997 Mike Stump - - * except.c (expand_builtin_throw): Add support for machines that - cannot access globals after throw's epilogue when - -fno-sjlj-exceptions is used. - -Thu Jun 5 16:28:43 1997 Jason Merrill - - * parse.y: 'std::' becomes '::'. - * lex.c (real_yylex): Remove 'namespace' warning. - * init.c (build_member_call): Ignore 'std::'. - (build_offset_ref): Likewise. - * decl2.c (do_using_directive): Ignore 'using namespace std;'. - (do_toplevel_using_decl): Ignore 'using std::whatever'. - * decl.c (push_namespace): Just sorry. - (pop_namespace): Nop. - (init_decl_processing): Declare std namespace. - -Tue Jun 3 18:08:23 1997 Jason Merrill - - * search.c (push_class_decls): A name which ambiguously refers to - several instantiations of the same template just refers to the - template. - -Tue Jun 3 12:30:40 1997 Benjamin Kosnik - - * decl.c (build_enumerator): Fix problem with unsigned long - enumerated values being smashed to ints, causing overflow - when computing next enumerated value (for enum values around - MAX_VAL). - -Mon Jun 2 17:40:56 1997 Jason Merrill - - * typeck.c (build_component_ref): Only call mark_used on a decl. - -Thu May 29 15:54:17 1997 Brendan Kehoe - - * typeck.c (build_c_cast): Make the check for a ptr to function - more specific before possible default_conversion call. - -Thu May 29 13:02:06 1997 Mike Stump - - * except.c (expand_exception_blocks): Simplify and fix and make - sure we don't end a region in a sequence, as expand_end_bindings - doesn't like it. - -Wed May 28 17:08:03 1997 Mike Stump - - * except.c (init_exception_processing): Mark terminate as not - returning so that the optimizer can optimize better. - -Tue May 27 19:49:19 1997 Mike Stump - - * cvt.c (convert): Don't do any extra work, if we can avoid it - easily. - -Tue May 27 18:21:47 1997 Mike Stump - - * *.[chy]: Change cp_convert to ocp_convert, change convert to - cp_convert. convert is now reserved for the backend, and doesn't - have the semantics a frontend person should ever want. - -Fri May 23 10:58:31 1997 Jason Merrill - - * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled. - Lose -traditional support. - -Thu May 22 15:41:28 1997 Jason Merrill - - * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype). - - * parse.y (self_reference): Do it for templates, too. - * class.c (pushclass): Don't overload_template_name; the alias - generated by build_self_reference serves the same purpose. - - * tree.c (list_hash): Make static, take more args. - (list_hash_lookup): Likewise. - (list_hash_add): Make static. - (list_hash_canon): Lose. - (hash_tree_cons): Only build a new node if one isn't already in the - hashtable. - (hash_tree_chain): Use hash_tree_cons. - * cp-tree.h: Adjust. - * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead - of calling lookup_name. - -Wed May 21 18:24:19 1997 Jason Merrill - - * pt.c (instantiate_class_template): TYPE_VALUES for an enum - doesn't refer to the CONST_DECLs. - -Tue May 20 21:09:32 1997 Bob Manson - - * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever - is bigger. - (expand_class_desc): Convert the last argument to a sizetype. - -Tue May 20 13:55:57 1997 Brendan Kehoe - - * gxx.gperf (__complex, __complex__, __imag, __imag__, __real, - __real__): Add reswords. - * hash.h: Regenerate. - * lex.h (rid): Add RID_COMPLEX. - (RID_LAST_MODIFIER): Set to RID_COMPLEX. - * lex.c (init_lex): Add building of RID_COMPLEX. - (real_yylex): General cleanup in line with what c-lex.c also has, - sans the cruft for traditional; add handling of SPEC_IMAG, complex - types, and imaginary numeric constants. - * parse.y (REALPART, IMAGPART): Add tokens. - (unary_expr): Add REALPART and IMAGPART rules. - * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare. - * decl.c (complex_{integer,float,double,long}_type_node): Define - types. - (init_decl_processing): Set up the types. - (grokdeclarator): Add handling of RID_COMPLEX. Set and use - DEFAULTED_INT instead of EXPLICIT_INT when we default to int type. - * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases. - * cvt.c (cp_convert): Handle COMPLEX_TYPE. - * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add - COMPLEX_TYPE case. - * method.c (build_overload_name): Add handling of the different - COMPLEX_TYPEs, prefixing them with `J'. - * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE - as a template parm. - (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case. - * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases. - (mapcar): Handle COMPLEX_CST. - * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE. - (common_type): Add code for complex types. - (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases. - (convert_for_assignment): Likewise. - (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases. - -Mon May 19 12:26:27 1997 Jason Merrill - - * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to - tsubst_expr, as it might try to do overload resolution. - -Sat May 17 10:48:31 1997 Jason Merrill - - * pt.c (instantiate_class_template): Oops. - -Fri May 16 14:23:57 1997 Jason Merrill - - * cp-tree.def: Add TAG_DEFN. - * pt.c (tsubst_enum): New fn. - (instantiate_class_template): Use it. - (tsubst_expr): Support TAG_DEFN. - (tsubst): Support local enums. - (tsubst_copy): Likewise. - * decl.c (finish_enum): Likewise. - (start_enum): If this is a local enum, switch to permanent_obstack. - -Wed May 14 19:08:28 1997 Mike Stump - - * decl.c (store_parm_decls): Set last_parm_cleanup_insn here. - (finish_function): Put the base init code for constructors just - after the parm cleanup insns. - (struct cp_function): Add last_parm_cleanup_insn. - (push_cp_function_context): Likewise. - (pop_cp_function_context): Likewise. - -Tue May 13 15:51:20 1997 Jason Merrill - - * pt.c (tsubst_copy): Handle BIT_NOT_EXPR. - -Wed May 7 11:17:59 1997 Brendan Kehoe - - * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL - for THUNK_FNDECL before we switch to temporary allocation. - -Mon May 5 14:46:53 1997 Jason Merrill - - * call.c (build_new_op): Handle null arg2 for ?:. - -Thu May 1 18:26:37 1997 Mike Stump - - * except.c (expand_exception_blocks): Ensure that we flow through - the end of the exception region for the exception specification. - Move exception region for the exception specification in, so that - it doesn't protect the parm cleanup. Remove some obsolete code. - * decl.c (store_parm_decls): Likewise. - (finish_function): Likewise. - -Tue Apr 29 15:38:54 1997 Jason Merrill - - * init.c (build_new): Fix nothrow handling. - -Tue Apr 29 14:29:50 1997 Brendan Kehoe - - * init.c (emit_base_init): Don't warn about the initialization - list for an artificial member. - -Fri Apr 25 17:47:59 1997 Brendan Kehoe - - * expr.c (do_case): Handle !START case for the error msg. - -Fri Apr 25 11:55:23 1997 Jason Merrill - - * decl2.c, lang-options.h: New option -Weffc++. - * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings - to -Weffc++. - - * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS - to MULTIPLE_SYMBOL_SPACES. - -Wed Apr 23 18:06:50 1997 Jason Merrill - - * method.c (emit_thunk, generic case): Set current_function_is_thunk. - - * method.c (emit_thunk, macro case): Set up DECL_RESULT. - - * typeck.c (c_expand_return): Don't complain about returning void - to void in an artificial function. - * method.c (make_thunk): Change settings of READONLY/VOLATILE, - don't set DECL_RESULT, set DECL_ARTIFICIAL. - (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC. - -Wed Apr 23 14:43:06 1997 Mike Stump - - * init.c (init_decl_processing): Add support for setjmp/longjmp based - exception handling. - * except.c (init_exception_processing): Likewise. - (expand_end_catch_block): Likewise. - (expand_exception_blocks): Likewise. - (expand_throw): Likewise. - * exception.cc (__default_terminate): Likewise. - - * init.c (perform_member_init): Use new method of expr level - cleanups, instead of cleanups_this_call and friends. - (emit_base_init): Likewise. - (expand_aggr_vbase_init_1): Likewise. - (expand_vec_init): Likewise. - * decl.c (cp_finish_decl): Likewise. - (expand_static_init): Likewise. - (store_parm_decls): Likewise. - (cplus_expand_expr_stmt): Likewise. - * decl2.c (finish_file): Likewise. - - * Make-lang.in (exception.o): Ok to compile with -O now. - - * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as - we know it will be done later by the backend. - - * decl2.c (lang_f_options): Remove support for short temps. - * lang-options.h: Likewise. - -Wed Apr 23 04:12:06 1997 Jason Merrill - - * tree.c (varargs_function_p): New fn. - * method.c (emit_thunk): Replace broken generic code with code to - generate a heavyweight thunk function. - -Tue Apr 22 02:45:18 1997 Jason Merrill - - * pt.c (process_template_parm): pedwarn about floating-point parms. - - * decl.c (grokdeclarator): inline no longer implies static. - - * spew.c (yylex): Always return the TYPE_DECL if we got a scope. - -Mon Apr 21 15:42:27 1997 Jason Merrill - - * class.c (check_for_override): The signature of an overriding - function is not changed. - - * call.c (build_over_call): Move setting of conv into the loop. - Note: this change, along with the related changes of the 18th thru - the 20th of April, fix an infinite loop problem in conversions. - -Sun Apr 20 16:24:29 1997 Jason Merrill - - * call.c (build_user_type_conversion_1): Really ignore rvalue - conversions when looking for a REFERENCE_TYPE. - - * cvt.c (build_up_reference): Eviscerate, use build_unary_op. - * cp-tree.h (TREE_REFERENCE_EXPR): #if 0. - * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR. - (build_unary_op): Likewise. - * call.c (build_over_call): See through a CONVERT_EXPR around the - ADDR_EXPR for on a temporary. - * typeck.c (c_expand_return): See through a CONVERT_EXPR around - the ADDR_EXPR for a local variable. - -Fri Apr 18 12:11:33 1997 Jason Merrill - - * call.c (build_user_type_conversion_1): If we're trying to - convert to a REFERENCE_TYPE, only consider lvalue conversions. - (build_new_function_call): Print candidates. - (implicit_conversion): Try a temp binding if the lvalue conv is BAD. - (reference_binding): Binding a temporary of a reference-related type - is BAD. - -Thu Apr 17 14:37:22 1997 Brendan Kehoe - - * inc/typeinfo (type_info::before): Add cv-qualifier-seq. - * tinfo2.cc (type_info::before): Likewise. - -Mon Apr 14 12:38:17 1997 Jason Merrill - - * call.c (implicit_conversion): Oops. - -Fri Apr 11 02:18:30 1997 Jason Merrill - - * call.c (implicit_conversion): Try to find a reference conversion - before binding a const reference to a temporary. - -Wed Apr 2 12:51:36 1997 Mike Stump - - * exception.cc (__default_unexpected): Call terminate by default, - so that if the user overrides terminate, the correct function will - be called. - -Wed Mar 19 14:14:45 1997 Mike Stump - - * parse.y (left_curly): Avoid trying to use any fields of - error_mark_node, as there aren't any. - -Thu Mar 13 16:33:22 1997 Jason Merrill - - * lex.c (do_identifier): Avoid breaking on overloaded methods - as default arguments. - -Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson - - * call.c (add_template_candidate): Initialize the variable "dummy". - -Mon Mar 10 15:13:14 1997 Brendan Kehoe - - * decl.c (start_decl): Make sure TYPE isn't an error_mark_node - before we try to use TYPE_SIZE and TREE_CONSTANT on it. - -Fri Mar 7 13:19:36 1997 Brendan Kehoe - - * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl. - (debug_binfo): Delete decl, not needed. - - * tree.c (fnaddr_from_vtable_entry, function_arg_chain, - promotes_to_aggr_type): Delete fns. - * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY, - SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN, - PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1. - - * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars. - - * friend.c (is_friend_type): Delete fn. - * cp-tree.h (is_friend_type): Delete decl. - - * decl.c (original_result_rtx, double_ftype_double, - double_ftype_double_double, int_ftype_int, long_ftype_long, - float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static. - * typeck.c (original_result_rtx, warn_synth): Delete extern decls. - - * decl.c (push_overloaded_decl{,_top_level}): Make static, adding - fwd decls. - * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls. - - * decl.c (pushdecl_nonclass_level): #if 0, unused. - * cp-tree.h (pushdecl_nonclass_level): #if 0 decl. - - * lex.c (reinit_lang_specific): #if 0, unused. - * cp-tree.h (reinit_lang_specific): #if 0 decl. - - * decl.c (revert_static_member_fn): Make static, adding fwd decl. - * cp-tree.h (revert_static_member_fn): Delete decl. - - * class.c (root_lang_context_p): Delete fn. - * cp-tree.h (root_lang_context_p): Delete decl. - - * decl.c (set_current_level_tags_transparency): #if 0, unused. - * cp-tree.h (set_current_level_tags_transparency): #if 0 decl. - - * lex.c (set_vardecl_interface_info): Make static. - * cp-tree.h (set_vardecl_interface_info): Delete decl. - - * call.c (find_scoped_type): Make static. - * cp-tree.h (find_scoped_type): Delete decl. - - * search.c (convert_pointer_to_vbase): Make static. - * cp-tree.h (convert_pointer_to_vbase): Delete decl. - - * decl.c (const_ptr_type_node): Likewise. - * cp-tree.h (const_ptr_type_node): Delete decl. - - * typeck.c (common_base_type): Make static. - * cp-tree.h (common_base_types): Delete erroneous decl. - - * pt.c (classtype_mangled_name): Make static. - * cp-tree.h (classtype_mangled_name): Delete decl. - - * lex.c (check_newline): Make static. - * cp-tree.h (check_newline): Delete decl. - - * typeck.c (build_x_array_ref): Delete fn, same idea as - grok_array_decl. - * cp-tree.h (build_x_array_ref): Delete decl. - - * lex.c (copy_decl_lang_specific): Delete fn, same idea as - copy_lang_decl. - * cp-tree.h (copy_decl_lang_specific): #if 0 decl. - - * class.c (build_vtable_entry): Make static. - * cp-tree.h (build_vtable_entry): Delete decl. - - * class.c (build_vbase_pointer): Make static. - * cp-tree.h (build_vbase_pointer): Delete decl. - - * sig.c (build_sptr_ref): Add forward decl and make static. - * cp-tree.h (build_sptr_ref): Delete decl. - - * call.c (build_new_method_call): Add forward decl and make static. - * cp-tree.h (build_new_method_call): Delete decl. - - * call.c (build_object_call): Make static. - * class.c (check_for_override, complete_type_p, mark_overriders): - Likewise. - * decl.c (cp_function_chain): Likewise. - * lex.c (set_typedecl_interface_info, reinit_parse_for_block): - Likewise. - * pt.c (comp_template_args, get_class_bindings, push_tinst_level): - Likewise. - * tree.c (build_cplus_array_type_1): Likewise. - * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise. - (comp_target_parms): Likewise. - - * init.c (build_builtin_call): Make static. - * cp-tree.h (build_builtin_call): Delete decl. - - * typeck.c (binary_op_error): Delete decl. - * cp-tree.h (binary_op_error): Likewise. - -Thu Mar 6 16:13:52 1997 Brendan Kehoe - - * call.c (build_method_call): Compare against error_mark_node - directly, rather than the ERROR_MARK tree code. - * cvt.c (cp_convert): Likewise. - * decl.c (print_binding_level): Likewise. - (duplicate_decls): Likewise. - (grokdeclarator): Likewise. - (grokdeclarator): Likewise. - * init.c (expand_aggr_init_1): Likewise. - (decl_constant_value): Likewise. - * method.c (build_opfncall): Likewise. - (hack_identifier): Likewise. - * typeck.c (build_modify_expr): Likewise. - - * typeck.c (build_c_cast): Don't decl TYPE as register tree. - -Sun Mar 2 02:54:36 1997 Bruno Haible - - * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values. - - * pt.c (coerce_template_parms): Add new error message. - - * method.c (build_overload_value): Implement name mangling for - floating-point template arguments. - - * method.c (build_overload_int, icat, dicat): Fix mangling of template - arguments whose absolute value doesn't fit in a signed word. - -Mon Mar 3 12:14:54 1997 Brendan Kehoe - - * friend.c: New file; put all of the friend stuff in here. - * init.c: Instead of here. - * Makefile.in (CXX_OBJS): Add friend.o. - (friend.o): Add dependencies. - * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c. - -Sun Mar 2 11:04:43 1997 Jason Merrill - - * call.c (build_scoped_method_call): Complain if the scope isn't a - base. - -Wed Feb 26 11:31:06 1997 Jason Merrill - - * parse.y (left_curly): Don't crash on erroneous type. - - * init.c (build_delete): Fix type of ref. - -Tue Feb 25 12:41:48 1997 Jason Merrill - - * search.c (get_vbase_1): Renamed from get_vbase. - (get_vbase): Wrapper, now non-static. - (convert_pointer_to_vbase): Now static. - - * call.c (build_scoped_method_call): Accept a binfo for BASETYPE. - * init.c (build_delete): Pass one. - (build_partial_cleanup_for): Use build_scoped_method_call. - * decl.c (finish_function): Pass a binfo. - -Mon Feb 24 15:00:12 1997 Jason Merrill - - * call.c (build_over_call): Only synthesize non-trivial copy ctors. - - * typeck.c (build_c_cast): Lose other reference to flag. - - * call.c (build_field_call): Don't look for [cd]tor_identifier. - * decl2.c (delete_sanity): Remove meaningless use of - LOOKUP_HAS_IN_CHARGE. - * decl.c (finish_function): Use build_scoped_method_call instead - of build_delete for running vbase dtors. - * init.c (build_delete): Call overload resolution code instead of - duplicating it badly. - -Thu Feb 20 15:12:15 1997 Jason Merrill - - * call.c (build_over_call): Call mark_used before trying to elide - the call. - - * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL. - -Wed Feb 19 11:18:53 1997 Brendan Kehoe - - * typeck.c (build_modify_expr): Always pedwarn for a cast to - non-reference used as an lvalue. - -Wed Feb 19 10:35:37 1997 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly. - -Tue Feb 18 15:40:57 1997 Jason Merrill - - * parse.y (handler): Fix template typo. - -Sun Feb 16 02:12:28 1997 Jason Merrill - - * error.c (lang_decl_name): New fn. - * tree.c (lang_printable_name): Use it. - -Fri Feb 14 16:57:05 1997 Mike Stump - - * g++spec.c: Include config.h so that we can catch bzero #defines - from the config file. - -Tue Feb 11 13:50:48 1997 Mike Stump - - * new1.cc: Include a declaration for malloc, to avoid warning, and - avoid lossing on systems that require one (ones that define malloc - in xm.h). - -Mon Feb 10 22:51:13 1997 Bruno Haible - - * decl2.c (max_tinst_depth): New variable. - (lang_decode_option): Parse "-ftemplate-depth-NN" command line - option. - * pt.c (max_tinst_depth): Variable moved. - * lang-options.h: Declare "-ftemplate-depth-NN" command line option - as legal. - -Fri Feb 7 15:43:34 1997 Jason Merrill - - * decl.c (xref_basetypes): Allow a base class that depends on - template parms to be incomplete. - - * decl2.c (build_expr_from_tree): Support typeid(type). - * rtti.c (get_typeid): Support templates. - (expand_si_desc, expand_class_desc): Fix string length. - (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise. - -Tue Feb 4 11:28:24 1997 Jason Merrill - - * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal. - - * pt.c (tsubst): Put it back for -fno-ansi-overloading. - -Mon Feb 3 18:41:12 1997 Jason Merrill - - * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that - smashes together template and non-template decls of the same - signature. - -Thu Jan 30 19:18:00 1997 Jason Merrill - - * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE. - -Wed Jan 29 11:40:35 1997 Brendan Kehoe - - * decl.c (duplicate_decls): Next route, pedwarn about different - exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER. - -Tue Jan 28 20:43:29 1997 Brendan Kehoe - - * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro. - (struct lang_type): Delete has_default_implementation member. - Increase dummy to 21. - * decl.c (start_method): Delete usage. - - * cp-tree.h (build_call, null_ptr_cst_p, in_function_p, - store_after_parms, start_decl_1, auto_function): Add decls. - (get_arglist_len_in_bytes, declare_implicit_exception, - have_exceptions_p, make_type_decl, typedecl_for_tag, - store_in_parms, pop_implicit_try_blocks, push_exception_cleanup, - build_component_type_expr, cplus_exception_name, - {make,clear}_anon_parm_name, dont_see_typename): Removed decls. - * call.c (build_this): Make static. - (is_complete): Likewise. - (implicit_conversion): Likewise. - (reference_binding): Likewise. - (standard_conversion): Likewise. - (strip_top_quals): Likewise. - (non_reference): Likewise. - (build_conv): Likewise. - (user_harshness): Likewise. - (rank_for_ideal): Likewise. - * decl.c (start_decl_1): Delete forward decl. - (push_decl_level): Make static. - (resume_binding_level): Make static. - (namespace_bindings_p): Make static. - (declare_namespace_level): Make static. - (lookup_name_real): Make static. - (duplicate_decls): Make static. Take register off NEWDECL and - OLDDECL parm decls. - * decl2.c (get_sentry): Make static. - (temp_name_p): Delete fn. - * except.c (auto_function): Delete decl. - * lex.c (handle_{cp,sysv}_pragma): Make static. - (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl. - * method.c (do_build_{copy_constructor,assign_ref}): Make static. - * pt.c (tsubst_expr_values): Make static. - * rtti.c (combine_strings): Delete decl. - -Tue Jan 28 16:40:40 1997 Jason Merrill - - * pt.c (push_template_decl): Handle getting a typedef. - - * call.c (build_new_function_call): Complain about void arg. - -Tue Jan 28 15:25:09 1997 Brendan Kehoe - - * decl.c (duplicate_decls): Give pedwarn of different exceptions - if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER. - -Mon Jan 27 19:21:29 1997 Mike Stump - - * except.c (expand_throw): Don't expand the cleanup tree here, - since we are not going to write the rtl out. Fixes problem with - -g -O on SPARC. - -Mon Jan 27 16:24:35 1997 Sean McNeil - - * Make-lang.in: Add $(exeext) as necessary. - -Mon Jan 27 13:20:39 1997 Mike Stump - - * parse.y (handler_seq): Must have at least one catch clause. - -Sat Jan 25 12:00:05 1997 Jason Merrill - - * call.c (add_builtin_candidate): Restore ?: hack. - - * decl.c (grok_op_properties): More warnings. - -Sat Jan 25 08:50:03 1997 Brendan Kehoe - - * decl.c (duplicate_decls): On second thought, do it as a pedwarn - still but only if !DECL_IN_SYSTEM_HEADER (olddecl). - - * decl.c (duplicate_decls): Scale back to a warning, and only do - 'em if -pedantic. - -Fri Jan 24 17:52:54 1997 Mike Stump - - * decl.c (duplicate_decls): pedwarn mismatched exception - specifications. - -Thu Jan 23 18:18:54 1997 Mike Stump - - * call.c (build_new_method_call): Don't display the invisible - argument for controlling virtual bases. - -Thu Jan 23 16:48:10 1997 Mike Stump - - * new: Add nothrow new and delete, bad_alloc and throw specifications - for delete. - * decl.c (init_decl_processing): Add throw specification for delete. - * new.cc (nothrow): Define. - * lex.c (real_yylex): Removing warning that throw and friends are - keywords. - * new1.cc (operator new (size_t sz, const nothrow_t&)): Define. - * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define. - * Make-lang.in: Add new{1,2}.{cc,o}. - -Thu Jan 23 16:39:06 1997 Jason Merrill - - * lex.c (cons_up_default_function): Fix return type of synth op=. - - * init.c (emit_base_init): Add warnings for uninitialized members - and bases. - - * decl.c (xref_basetypes): Add warning for non-polymorphic type - with destructor used as base type. - - * decl.c (grok_op_properties): Add warning for op= returning void. - * typeck.c (c_expand_return): Add warning for op= returning anything - other than *this. - - * class.c (finish_struct_1): Add warning for class with pointers - but not copy ctor or copy op=. - - * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro. - * pt.c (add_pending_template): Use it instead of LANG_FLAG_0. - (instantiate_template): If -fexternal-templates, add this - instantiation to pending_templates. - - * decl2.c (copy_assignment_arg_p): Disable old hack to support - Booch components. - -Tue Jan 21 18:32:04 1997 Mike Stump - - * cvt.c (cp_convert): pedwarn enum to pointer conversions. - -Mon Jan 20 17:59:51 1997 Jason Merrill - - * call.c (standard_conversion): Handle getting references. Tack - on RVALUE_CONV here. Do it for non-class types, too. - (reference_binding): Pass references to standard_conversion. - (implicit_conversion): Likewise. - (add_builtin_candidate): Disable one ?: kludge. - (convert_like): Handle RVALUE_CONVs for non-class types. - (joust): Disable the other ?: kludge. - -Mon Jan 20 14:53:13 1997 Brendan Kehoe - - * decl.c (init_decl_processing): Add code to build up common - function types beforehand, to avoid creation then removal of - things already in the hash table. - -Mon Jan 20 14:43:49 1997 Jason Merrill - - * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for - the arguments. - - * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require - current_template_parms. - -Fri Jan 17 10:25:42 1997 Jason Merrill - - * search.c (lookup_field): Don't return a function, check want_type. - -Thu Jan 16 18:14:35 1997 Brendan Kehoe - - * init.c (build_new): Make sure PLACEMENT has a type. - -Thu Jan 16 17:40:28 1997 Jason Merrill - - * init.c (build_new): Support new (nothrow). - -Wed Jan 15 12:38:14 1997 Jason Merrill - - * pt.c (instantiate_decl): Also do push_to_top_level before setting - up DECL_INITIAL. - - * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro. - * pt.c (tsubst): Defer instantiation of default args. - * call.c (build_over_call): Until here. - -Wed Jan 15 10:08:10 1997 Brendan Kehoe - - * search.c (lookup_field): Make sure we have an - IDENTIFIER_CLASS_VALUE before we try to return it. - -Thu Jan 9 07:19:01 1997 Brendan Kehoe - - * call.c (build_method_call): Delete unused var PARM. - (build_overload_call_real): Likewise. - (build_object_call): Delete unused var P. - (build_new_op): Likewise. - * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static - var definitions, which are never used. - (shadow_tag): Delete unused var FN. - * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET. - * init.c (build_new): Delete unused var ALLOC_TEMP. - * method.c (hack_identifier): Delete unused var CONTEXT. - (do_build_copy_constructor): Delete unused var NAME. - (synthesize_method): Delete unused var BASE. - * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE. - * rtti.c (build_headof): Delete unused var VPTR. - (get_typeid): Delete unused var T. - * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1 - and ORIG_OP2. - (build_ptrmemfunc): Delete unused vars U and NINDEX. - * typeck2.c (build_functional_cast): Delete unused var BINFO. - -Wed Jan 8 13:09:54 1997 Jason Merrill - - * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up - things in a type being defined. - * decl.c (finish_enum): Reverse the values so that they are in - the correct order. - - * pt.c (instantiate_class_template): Don't initialize - BINFO_BASETYPES until the vector is filled out. - (unify): Don't abort on conflicting bindings, just fail. - (instantiate_decl): Do push_tinst_level before any tsubsting. - - * method.c (build_overload_value): Handle getting a - TEMPLATE_CONST_PARM for a pointer. - -Tue Jan 7 14:00:58 1997 Jason Merrill - - * init.c (expand_member_init): Don't give 'not a base' error for - templates. - - * pt.c (instantiate_decl): Call import_export_decl later. - - * pt.c (instantiate_class_template): Return a value. - - * parse.y (extension): New rule for __extension__. - (extdef, unary_expr, decl, component_decl): Use it. - -Tue Jan 7 09:20:28 1997 Mike Stump - - * class.c (base_binfo): Remove unused base_has_virtual member. - (finish_base_struct): Likewise. - (finish_struct_1): Likewise. - -Tue Dec 31 20:25:50 1996 Mike Stump - - * search.c (expand_upcast_fixups): Fix bogus code generation - problem where the generated code uses the wrong index into the - runtime built vtable on the stack. Old code could clobber random - stack values. - -Tue Dec 31 15:16:56 1996 Mike Stump - - * init.c (perform_member_init): Make sure the partial EH cleanups - live on the function_obstack. - -Fri Dec 27 10:31:40 1996 Paul Eggert - - * Make-lang.in (g++spec.o): Don't use $< with an explicit target; - this isn't portable to some versions of `make' (e.g. Solaris 2.5.1). - -Tue Dec 24 10:24:03 1996 Jeffrey A Law - - * decl.c (grokvardecl): Avoid ANSI style initialization. - -Sun Dec 22 04:22:06 1996 Jason Merrill - - * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE. - -Fri Dec 20 17:09:25 1996 Jason Merrill - - * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties. - -Fri Dec 20 12:17:12 1996 Brendan Kehoe - - * g++spec.c (lang_specific_driver): Put missing hyphen in front of - arguments we compare against. Start the count of I at 1, not 0, - since argv[0] is still the command. - -Thu Dec 19 11:53:57 1996 Stan Shebs - - * lang-specs.h: Accept .cp as an C++ extension. - -Mon Dec 16 22:43:31 1996 Brendan Kehoe - - * cp-tree.h (ptr_reasonably_similar): Add decl. - -Thu Dec 12 15:00:35 1996 Brendan Kehoe - - * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN - pointer. New local SPECBITS with the parm's value. - (grokdeclarator): Pass &specbits down. - - * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node - before we try to do C_SET_EXP_ORIGINAL_CODE on it. - - * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of - CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM. - - * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is - not an error_mark_node. - -Sat Dec 7 17:20:22 1996 Jason Merrill - - * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL. - * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate. - -Fri Dec 6 14:40:09 1996 Jason Merrill - - * decl.c (grokdeclarator): When giving an anonymous struct a name, - replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is - not affected). - - * typeck2.c (build_m_component_ref): If component is a pointer - to data member, resolve the OFFSET_REF now. - - * call.c (convert_like): Don't go into infinite recursion. - - * pt.c (coerce_template_parms): Use tsubst_expr for non-type args. - - * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr. - * tree.c (layout_basetypes): And on the vbase ptr. - -Thu Dec 5 02:11:28 1996 Jason Merrill - - * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or - CHAR_TYPE_SIZE so bool is always the same size as another type. - - * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too. - -Tue Dec 3 23:18:37 1996 Jason Merrill - - * decl2.c (grok_x_components): Remove synthesized methods from - TYPE_METHODS of an anonymous union, complain about member - functions. - * decl.c (shadow_tag): Wipe out memory of synthesized methods in - anonymous unions. - (finish_function): Just clear the DECL_RTL of our arguments. - -Fri Nov 29 21:54:17 1996 Jason Merrill - - * decl2.c (finish_file): Emit DWARF debugging info for static data - members. - - * pt.c (tsubst): If t is a stub decl, return the stub decl for type. - -Wed Nov 27 14:47:15 1996 Bob Manson - - * typeck.c (build_component_ref): Don't die if COMPONENT isn't a - IDENTIFIER_NODE. - -Wed Nov 27 16:05:19 1996 Michael Meissner - - * Make-lang.in (g++-cross$(exeext)): Fix typo. - -Wed Nov 27 08:14:00 1996 Brendan Kehoe - - Make the g++ driver now be a standalone program, rather than one - that tries to run the gcc driver after munging up the options. - * Make-lang.in (g++.c, g++spec.o): New rules. - (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER - added. - (g++$(exeext)): New rule, based on xgcc rule. - (g++-cross$(exeext)): Now just copies g++$(exeext) over. - * g++spec.c: New file. - * g++.c: Removed file. - -Tue Nov 26 19:01:09 1996 Mike Stump - - * cvt.c (build_up_reference): Arrange for any temporary values - that have been keep in registers until now to be put into memory. - -Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi - - * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so - that make -j3 bootstrap works better. - -Sun Nov 24 02:09:39 1996 Jason Merrill - - * decl.c (pushtag): Do pushdecl for anon tags. - -Thu Nov 21 16:30:24 1996 Jason Merrill - - * typeck.c (c_expand_return): Fix logic. - (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR. - -Wed Nov 20 18:47:31 1996 Bob Manson - - * g++.c (main): Make sure arglist has a final NULL entry. Add - PEXECUTE_LAST to the flags passed to pexecute, as otherwise - stdin/stdout of the invoked program are redirected to - nowheresville. - -Tue Nov 19 16:12:44 1996 Jason Merrill - - * decl.c (implicitly_declare): Set DECL_ARTIFICIAL. - -Tue Nov 19 15:48:19 1996 Mike Stump - - * init.c (resolve_offset_ref): Handle obj.vfn better. - * typeck.c (build_component_ref): Set TREE_TYPE on result from - build_vfn_ref. - -Tue Nov 19 13:14:33 1996 Mike Stump - - * typeck.c (convert_for_assignment): Also handle anachronistic - implicit conversions from (::*)() to cv void*. - * cvt.c (cp_convert_to_pointer): Likewise. - -Mon Nov 18 17:05:26 1996 Jason Merrill - - * lex.c (handle_cp_pragma): Fix bogus warning. - -Mon Nov 18 16:10:43 1996 Mike Stump - - * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE - (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P. - -Thu Nov 14 23:18:17 1996 Jason Merrill - - * class.c (finish_struct_1): Support DWARF2_DEBUG. - * search.c (dfs_debug_mark): Likewise. - * decl2.c (finish_vtable_vardecl): Likewise. - * decl.c (pushtag, finish_enum): Likewise. - * lex.c (check_newline): Use debug_* instead of calling *out - functions directly. - -Thu Nov 14 15:21:46 1996 Brendan Kehoe - - * Make-lang.in (cplib2.ready): Add else clause to avoid problems - on some picky hosts. - -Wed Nov 13 12:32:07 1996 Jason Merrill - - * class.c (finish_struct_1): A class has a non-trivial copy - constructor if it has virtual functions. - - * cvt.c (cp_convert): Always call a constructor. - - * call.c (reference_binding): Still tack on a REF_BIND - for bad conversions. - (build_user_type_conversion_1): Propagate ICS_BAD_FLAG. - - * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING. - (c_expand_return): Likewise. - * typeck2.c (digest_init): Likewise for { }. - * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling. - * cvt.c (cp_convert): Handle failure better. - -Wed Nov 13 11:51:20 1996 Brendan Kehoe - - * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation - of GCC be path-relative. - -Wed Nov 13 11:27:16 1996 Michael Meissner - - * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but - it does need choose-temp.o and pexecute.o. - -Wed Nov 13 07:53:38 1996 Brendan Kehoe - - * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time - that we still use it. - (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros. - -Wed Nov 13 02:00:26 1996 Jason Merrill - - * init.c (expand_default_init): Avoid calling constructors to - initialize reference temps. - - * cvt.c (convert_to_reference): Fix. - -Tue Nov 12 19:10:07 1996 Jason Merrill - - * cvt.c (cp_convert): Simplify for flag_ansi_overloading. - (convert_to_reference): Likewise. - * typeck.c (convert_for_initialization): Likewise. - * init.c (expand_default_init): Likewise. - (expand_aggr_init_1): Likewise. - * cp-tree.h (CONV_NONCONVERTING): Lose. - * typeck.c (build_c_cast): Lose allow_nonconverting parm. - * *.c: Adjust. - * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING. - -Tue Nov 12 16:29:04 1996 Brendan Kehoe - - * pt.c (tsubst_expr): Reverse args to expand_start_catch_block. - -Tue Nov 12 15:26:17 1996 Jason Merrill - - * init.c (expand_aggr_init_1): Don't crash on non-constructor - TARGET_EXPR. - -Tue Nov 12 14:00:50 1996 Brendan Kehoe - - * g++.c: Include gansidecl.h. - (VPROTO, PVPROTO, VA_START): Delete. - (choose_temp_base_try, choose_temp_base, perror_exec, - run_dos) [__MSDOS__]: Delete fns. - (pfatal_with_name): Delete fn. - (temp_filename): Declare like in gcc.c. - (pexecute, pwait, choose_temp_base): Declare from gcc.c. - (error_count, signal_count): Define. - (error): Delete both definitions. - (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c. - (pfatal_pexecute): Add fn from gcc.c. - (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the - code to use the pexecute stuff also used by gcc.c. - (MIN_FATAL_STATUS): Define. - * Make-lang.in (g++): Add dependency on and linking with - choose-temp.o and pexecute.o. - - * cp-tree.h: Include gansidecl.h. - (STDIO_PROTO): Delete #undef/#define. - * cvt.c (NULL): Delete #undef/#define. - * expr.c (NULL): Likewise. - * init.c (NULL): Likewise. - * rtti.c (NULL): Likewise. - * xref.c (NULL): Likewise. - - * cp-tree.h (build_user_type_conversion): Add prototype. - * call.c (build_user_type_conversion): Delete prototype. Correct - decl of FLAGS arg to be an int. - * cvt.c (build_user_type_conversion): Likewise. - -Tue Nov 12 12:16:20 1996 Jason Merrill - - * cp-tree.def: Add TRY_BLOCK and HANDLER. - * except.c (expand_start_catch_block): Support templates. - * parse.y (try_block, handler_seq): Likewise. - * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER. - -Mon Nov 11 13:57:31 1996 Jason Merrill - - * pt.c (current_template_args): New fn. - (push_template_decl): Use it. - * decl.c (grokdeclarator): Use it. - - * decl2.c (build_expr_from_tree): Dereference ref vars. - - * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in - the decl-specifier-seq. - - * decl.c (grok_op_properties): Don't force the type of a conversion - op to be complete. Don't warn about converting to the same type - for template instantiations. - - * decl2.c (finish_file): Don't call instantiate_decl on synthesized - methods. - -Mon Nov 11 13:20:34 1996 Bob Manson - - * typeck.c (get_delta_difference): Remove previous bogusness. - Don't give errors if force is set. - -Fri Nov 8 17:38:44 1996 Jason Merrill - - * decl2.c (finish_file): Don't emit debug info. - * decl.c (pushdecl): Lose obsolete code. - (grokdeclarator): Still do the long long thing after complaining. - * search.c (note_debug_info_needed): Don't do anything if we're in a - template. - * method.c (synthesize_method): For non-local classes, - push_to_top_level first. - -Fri Nov 8 11:52:28 1996 Bob Manson - - * typeck.c (get_delta_difference): Add no_error parameter. - (build_ptrmemfunc): Call get_delta_difference with no_error set; - we don't want error messages when converting unrelated - pointer-to-member functions. - -Thu Nov 7 11:16:24 1996 Mike Stump - - * error.c (dump_expr): Improve the wording on error messages that - involve pointer to member functions. - -Tue Nov 5 17:12:05 1996 Mike Stump - - * cvt.c (cp_convert_to_pointer): Move code for conversions from - (::*)() to void* or (*)() up a bit, so that we can convert from - METHOD_TYPEs as well. - -Tue Nov 5 14:54:17 1996 Jason Merrill - - * rtti.c (get_tinfo_fn): Make sure 'type' is permanent. - There are no 'member' types. - (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn. - (build_x_typeid): Handle errors. - -Mon Nov 4 17:43:12 1996 Mike Stump - - * typeck.c (convert_for_assignment): Handle anachronistic implicit - conversions from (::*)() to void* or (*)(). - * cvt.c (cp_convert_to_pointer): Likewise. - (cp_convert_to_pointer_force): Remove cp_convert_to_pointer - conversions from here. - * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions. - * lang-options.h: Likewise. - * decl2.c (warn_pmf2ptr): Define. - * cp-tree.h: Declare it. - * typeck2.c (digest_init): Allow pmfs down into - convert_for_initialization. - -Sun Nov 3 09:43:00 1996 Jason Merrill - - * typeck.c (c_expand_return): Fix for returning overloaded fn. - -Fri Nov 1 08:53:17 1996 Jason Merrill - - * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND. - * decl.c (grok_reference_init): Pass DIRECT_BIND. - * cvt.c (build_up_reference): Don't mark 'this' addressable. Use - DIRECT_BIND. - * call.c (convert_like): Don't pass INDIRECT_BIND. - * typeck.c (convert_arguments): Likewise. - * typeck.c (mark_addressable): Allow &this if flag_this_is_variable. - -Thu Oct 31 17:08:49 1996 Jason Merrill - - * typeck.c (mark_addressable): Support TARGET_EXPR, unify with - similar code in build_up_ref. - * cvt.c (build_up_reference): Drastically simplify. - -Mon Oct 28 12:45:05 1996 Jeffrey A Law - - * typeck.c (signed_or_unsigned_type): If the given type already - as the correct signedness, then just return it. - - * typeck.c ({un,}signed_type): If can't do anything, call - signed_or_unsigned_type. - -Thu Oct 24 14:21:59 1996 Bob Manson - - * decl2.c (copy_assignment_arg_p): Don't buy the farm if - current_class_type is NULL. - -Wed Oct 23 00:43:10 1996 Jason Merrill - - * class.c (finish_struct_1): Avoid empty structs by adding a field - so layout_type gets the mode right. - - * typeck.c (c_expand_return): Drastically simplify. - -Mon Oct 21 22:34:02 1996 Jason Merrill - - * typeck.c (decay_conversion): Handle overloaded methods. - -Fri Oct 18 16:03:48 1996 Jason Merrill - - * call.c (build_over_call): A TARGET_EXPR has side-effects. - -Thu Oct 17 11:31:59 1996 Mike Stump - - * cvt.c (convert_to_pointer_force): Add code to support pointer to - member function to pointer to function conversions. - * init.c (resolve_offset_ref): Add code to allow faked up objects, - ignoring them if they are not used, and giving an error, if they - are needed. - * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve - code, and so that we can give an error, if we needed an object, - and one was not provided. - (build_c_cast): Don't call default_conversion when we want to - convert to pointer to function from a METHOD_TYPE. - -Mon Oct 14 00:28:51 1996 Jason Merrill - - * Make-lang.in (cplib2.ready): Fix logic. - - * decl.c (shadow_tag): Only complain about non-artificial function - members. - - * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS. - -Fri Oct 11 16:12:40 1996 Jason Merrill - - * expr.c (cplus_expand_expr): Pre-tweak call_target like - expand_inline_function would. - - * pt.c (mark_decl_instantiated): If extern_p, call - mark_inline_for_output. - -Thu Oct 10 15:58:08 1996 Mike Stump - - * typeck.c (unary_complex_lvalue): Add code to handle intermediate - pmd conversions. - - * typeck.c (get_delta_difference): Fix wording, as we can be used - for pointer to data members. - -Tue Oct 8 12:43:51 1996 Bob Manson - - * pt.c (tsubst): If the function decl isn't a member of this - template, return a copy of the decl (including copying the - lang-specific part) so we don't hose ourselves later. - -Thu Oct 3 16:24:28 1996 Jason Merrill - - * class.c (finish_struct): Remove DWARF-specific tag handling. - * decl.c (pushtag): Likewise. - (finish_function): Always clear DECL_ARGUMENTS on function decls with - no saved RTX. - * decl2.c (finish_file): Emit DWARF debugging info for static data - members. - -Wed Oct 2 21:58:01 1996 Bob Manson - - * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC - isn't the same as the new one before we whack it. - -Mon Sep 30 13:38:24 1996 Jason Merrill - - * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h, - lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove - warn_traditional and warn_strict_prototypes; remove ancient - 'overload' code; remove references to flag_traditional. - -Mon Sep 30 12:58:40 1996 Mike Stump - - * input.c (sub_getch): Handle 8-bit characters in string literals. - -Sun Sep 29 03:12:01 1996 Jason Merrill - - * tree.c (mapcar): Handle CONSTRUCTORs. - (copy_to_permanent): Handle expression_obstack properly. - - * Make-lang.in (cplib2.txt): Also depend on the headers. - - * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE == - INT_TYPE_SIZE. - (expand_class_desc): Use USItype for offset field. - * tinfo.h (struct __class_type_info): Likewise. - - * method.c (build_overload_int): TYPE_PRECISION should be applied - to types. - -Sat Sep 28 14:44:50 1996 Jason Merrill - - * call.c (build_new_op): A COND_EXPR involving void must be a - builtin. - -Fri Sep 27 16:40:30 1996 Jason Merrill - - * typeck.c (build_x_component_ref): New fn. - (build_object_ref): Use it. - * parse.y (primary): Use it. - * decl2.c (build_expr_from_tree): Use it. - * cp-tree.h: Declare it. - - * decl.c (start_decl): Variable-sized arrays cannot be initialized. - * error.c (dump_type_suffix): Handle variable arrays. - -Fri Sep 27 13:14:05 1996 Brendan Kehoe - - * Make-lang.in (exception.o): Put back compiling it with -fPIC. - -Fri Sep 27 03:00:09 1996 Jason Merrill - - * decl.c (lookup_name_real): Don't try to look up anything in a - TYPENAME_TYPE. - - * tinfo2.cc (__throw_type_match_rtti): Oops. - -Thu Sep 26 22:11:05 1996 Brendan Kehoe - - * Make-lang.in (exception.o): Use -fno-PIC for now. - -Thu Sep 26 10:59:00 1996 Jason Merrill - - * rtti.c (build_dynamic_cast): Pass tinfo fns rather than - calling them. - (get_tinfo_fn_dynamic): Extracted from build_typeid. - * tinfo2.cc (__dynamic_cast): Adjust. - - * rtti.c (build_typeid): Use resolves_to_fixed_type_p. - (build_x_typeid): Likewise. - - * parse.y: Call build_x_typeid instead of build_typeid. - * cp-tree.def: Add TYPEID_EXPR. - * pt.c (tsubst_copy): Handle typeid. - * decl2.c (build_expr_from_tree): Likewise. - * rtti.c (build_x_typeid): Throw bad_typeid from here. - (build_typeid): Not here. - * cp-tree.h: Declare build_x_typeid. - -Wed Sep 25 17:26:16 1996 Jason Merrill - - * call.c (convert_like): Pull out constant values. - - * tree.c (mapcar): Use build_cplus_array_type, not build_array_type. - -Wed Sep 25 17:28:53 1996 Michael Meissner - - * decl.c (init_decl_processing): Create short int types before - creating size_t in case a machine description needs to use - unsigned short for size_t. - -Tue Sep 24 18:18:44 1996 Jason Merrill - - * Make-lang.in (exception.o): Turn off pic. - - * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same - type, multi-level ptr conversions. - - * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast. - (throw_bad_cast): Use it. - (throw_bad_typeid): New fn. - (build_typeid): Throw bad_typeid as needed. - Use build_call. - (synthesize_tinfo_fn): Handle functions and arrays before checking - for cv-quals. - - * Remove .h from standard C++ headers, add new.h, move into inc - subdirectory. - - * exception*: Remove pointer from object, constructors. Add - default exception::what that uses type_info::name. Add - __throw_bad_typeid. - - * init.c (build_new): Don't add a cookie to new (void *) T[2]. - -Mon Sep 23 15:21:53 1996 Jason Merrill - - * Make-lang.in: Building C++ code depends on cc1plus. - -Mon Sep 23 12:38:40 1996 Brendan Kehoe - - * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as - a HOST_WIDE_INT, not a tree. - -Mon Sep 23 12:36:02 1996 Jason Merrill - - * exception.cc: Don't include . - - * Make-lang.in (c++.clean): Remove cplib2.*. - -Mon Sep 23 09:42:19 1996 Doug Evans - - * parse.y (component_decl_1, component_costructor_declarator case): - Pass attributes/prefix_attributes in tree list. - -Mon Sep 23 01:18:50 1996 Jason Merrill - - * tinfo{,2}.cc: #include instead of . - -Sun Sep 22 05:31:22 1996 Jason Merrill - - * lex.c (do_identifier): Don't do deferred lookup in a template - header. - - * typeck2.c (store_init_value): Oops. - - * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}: - New files for C++ lang-support library. - * Make-lang.in (CXX_EXTRA_HEADERS): Define. - (CXX_LIB2FUNCS): Define. - And rules for building the C++ lang-support code. - * config-lang.in (headers): Define. - (lib2funcs): Define. - -Sat Sep 21 19:17:28 1996 Jason Merrill - - * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call - digest_init. - * pt.c (tsubst_copy): Compute type for CONSTRUCTOR. - * typeck2.c (store_init_value): Check for initializing pmf with { } - here. - (process_init_constructor): Not here. - -Thu Sep 19 16:41:07 1996 Jason Merrill - - * pt.c (begin_template_parm_list): Increment - processing_template_decl here. - (end_template_parm_list): Not here. - (process_template_parm): No need to add 1 to it now. - * *.c: Use processing_template_decl instead of current_template_parms - to check for being in a template. - - * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR. - (tsubst_copy): Handle CONSTRUCTOR. - (instantiate_decl): Set up context properly for variables. - * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR. - * class.c (finish_struct): Reverse CLASSTYPE_TAGS. - -Wed Sep 18 13:30:20 1996 Brendan Kehoe - - * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back. - -Wed Sep 18 04:24:07 1996 Jason Merrill - - * method.c (make_thunk): Call comdat_linkage before setting the - TREE_CODE. - - * decl2.c (comdat_linkage): Use make_decl_one_only. - (import_export_decl): Likewise. - * decl.c (init_decl_processing): Check supports_one_only instead of - SUPPORTS_WEAK. - -Sat Sep 14 08:34:41 1996 Jason Merrill - - * decl2.c (grokfield): Tighten checking for access decls. - - * decl.c (make_typename_type): Resolve references to - current_class_type. Set CLASSTYPE_GOT_SEMICOLON. - (lookup_name_real): Types that depend on a template parameter get - an implicit 'typename' unless they're in the current scope. - (start_decl_1): We don't care about incomplete types that depend - on a template parm. - (grokdeclarator): Resolve 'typename's in the type specifier that - refer to members of the current scope. - - * call.c (build_over_call): Remove 'inline called before - definition' diagnostic. - (build_method_call): Likewise. - * decl.c (duplicate_decls): Downgrade 'used before declared - inline' to a warning, only with -Winline. - -Fri Sep 13 17:31:40 1996 Stan Shebs - - * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile. - -Wed Sep 11 22:38:13 1996 Gerald Baumgartner - - * call.c (build_method_call): When calling a signature - default implementation, as in other cases, let instance_ptr simply - be instance. - -Wed Sep 11 22:14:44 1996 Mike Stump - - * parse.y (simple_stmt): Cleanup and use do_poplevel (). - -Wed Sep 11 22:10:48 1996 Mike Stump - - * except.c (expand_start_catch_block): Add a pushlevel so that -g - works on hppa and SPARC. - -Wed Sep 11 10:18:06 1996 Brendan Kehoe - - * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node. - -Mon Sep 9 19:51:14 1996 Gerald Baumgartner - - * call.c (build_over_call): Check first whether DECL_CONTEXT exists - before testing whether it's a signature. - -Sun Sep 8 16:06:57 1996 Gerald Baumgartner - - * call.c (build_new_method_call): Don't complain about signature - pointers and references not being an aggr type. - (build_this): If a signature pointer or reference was passed in, - just return it. - (build_new_method_call): If instance is a signature pointer, set - basetype to the signature type of instance. - * sig.c (build_signature_method_call): Deleted basetype and - instance parameters, they can be found as the DECL_CONTEXT of - function and as the first argument passed in. - * cp-tree.h: Changed declaration of build_signature_method_call. - * call.c (build_method_call): Deleted first two arguments in call - of build_signature_method_call. - (build_over_call): Added call to build_signature_method_call. - -Thu Sep 5 16:51:28 1996 Jason Merrill - - * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a - target_expr. - -Thu Sep 5 10:05:38 1996 Brendan Kehoe - - * cvt.c (convert_to_reference): Use %#T, not %#D, for error. - -Wed Sep 4 17:16:09 1996 Bob Manson - - * except.c (expand_start_try_stmts): Move to except.c in the backend. - (expand_end_try_stmts): Remove. - - * init.c (perform_member_init): Use add_partial_entry () instead - of directly manipulating lists. - (emit_base_init): Likewise. - -Wed Sep 4 12:14:36 1996 Mike Stump - - * except.c (expand_exception_blocks): Always make sure USE and - CLOBBER insns that came at the end still do, the backend relies - upon this. - -Wed Sep 4 07:44:48 1996 Jason Merrill - - * call.c (build_over_call): We can only use a TARGET_EXPR of the - right type. - -Tue Sep 3 19:26:05 1996 Jason Merrill - - * cvt.c (convert_to_reference): Revert last change, don't complain - about temp without target decl. - -Tue Sep 3 10:22:56 1996 Mike Stump - - * decl.c (grokdeclarator): Don't core dump when void() is given. - -Tue Sep 3 02:38:56 1996 Jason Merrill - - * decl.c (copy_args_p): Don't crash. - -Fri Aug 30 14:26:57 1996 Mike Stump - - * pt.c (tsubst): And support template args inside the exception - specification. - - * pt.c (tsubst): Add support for exception specifications in - template functions. - -Fri Aug 30 10:01:55 1996 Mike Stump - - * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3 - fields now. - * cp-tree.h (start_decl): Eliminate the throw spec parameter. - (start_function): Likewise. - (start_method): Likewise. - (grokfield): Likewise. - (make_call_declarator): Add throw spec parameter. - (set_quals_and_spec): Add routine. - * lex.c (set_quals_and_spec): Likewise. - * decl.h (grokdeclarator): Eliminate the throw spec parameter. - * decl.c (shadow_tag): Eliminate the throw spec parameter to - grokdeclarator. - (groktypename): Likewise. - (start_decl): Eliminate the throw spec parameter. Eliminate the - throw spec parameter to grokdeclarator. Eliminate the throw spec - field in DECL_STMT. - (cp_finish_decl): Eliminate the throw spec field in DECL_STMT. - (grokfndecl): Remove useless set of raises. - (grokdeclarator): Eliminate the throw spec parameter. Eliminate - the throw spec parameter to start_decl. Pull the throw spec out - of the call declarator. - (grokparms): Eliminate the throw spec parameter to grokdeclarator. - (start_function): Eliminate the throw spec parameter. Eliminate - the throw spec parameter to grokdeclarator. - (start_method): Likewise. - * decl2.c (grokfield): Likewise. - (grokbitfield): Eliminate the throw spec parameter to grokdeclarator. - (grokoptypename): Likewise. - (finish_file): Eliminate the throw spec parameter to - start_function. Add throw spec to make_call_declarator. - * except.c (init_exception_processing): Add throw spec to - make_call_declarator. Eliminate the throw spec parameter to - start_decl. - (expand_start_catch_block): Eliminate the throw spec parameter to - grokdeclarator. - (expand_builtin_throw): Add throw spec to make_call_declarator. - Eliminate the throw spec parameter to start_function. - (start_anon_func): Likewise. - * lex.c (make_call_declarator): Add throw spec parameter. - (set_quals_and_spec): New routine. - (cons_up_default_function): Add throw spec to make_call_declarator. - Eliminate the throw spec parameter to grokfield. - * method.c (synthesize_method): Eliminate the throw spec parameter - to start_function. - * pt.c (process_template_parm): Eliminate the throw spec parameter - to grokdeclarator. - (tsubst): Add throw spec to make_call_declarator. - (tsubst_expr): Eliminate the throw spec parameter to start_decl. - (do_function_instantiation): Eliminate the throw spec parameter to - grokdeclarator. Eliminate the throw spec parameter to - start_function. - * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter - to start_function. - * parse.y (datadef): Remove non-winning optimization. - (decl): Likewise. - (fndef): Remove ambiguous error productions uncovered by grammar - fixing. - (constructor_declarator): Add exception_specification_opt here. - (component_constructor_declarator): Likewise. - (direct_after_type_declarator): Likewise. - (complex_direct_notype_declarator): Likewise. - (direct_abstract_declarator): Likewise. - (fn.def1): Remove exception_specification_opt. - (fn.def2): Likewise. - (condition): Likewise. - (initdcl0): Likewise. - (initdcl): Likewise. - (notype_initdcl0): Likewise. - (nomods_initdcl0): Likewise. - (component_decl_1): Likewise. - (component_declarator): Likewise. - (after_type_component_declarator0): Likewise. - (after_type_component_declarator): Likewise. - (notype_component_declarator): Likewise. - -Wed Aug 28 01:40:30 1996 Jason Merrill - - * call.c (build_over_call): Also use an INIT_EXPR when - initializing anything from an rvalue. - - * call.c (build_over_call): Call stabilize_reference when building - an INIT_EXPR instead of calling the copy ctor. - - * call.c (joust): Extend the previous change to all comparisons. - - * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and - NO_LINKAGE_HEURISTICS. - - * decl2.c (finish_file): Emit any statics that weren't already. - - * typeck.c (build_static_cast): Implement. - * tree.c (build_cplus_new): Handle getting a TARGET_EXPR. - * decl.c (grokparms): Use can_convert_arg instead of - implicit_conversion directly. - (copy_args_p): New fn. - * cvt.c (convert_to_reference): Don't complain about temp with - static_cast. - (build_up_reference): Handle TARGET_EXPRs. - * call.c (build_over_call): Elide unnecessary temps. - (can_convert*): Use new overloading code. - -Tue Aug 27 13:12:21 1996 Jason Merrill - - * call.c: Move TYPE_PTR*_MACROS ... - * cp-tree.h: To here. - * typeck.c (build_reinterpret_cast): Implement. - - * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of - ptr_complete_ob. - (joust): If we're comparing a function to a builtin and the worst - conversion for the builtin is worse than the worst conversion for the - function, take the function. - - * typeck.c (build_const_cast): Implement. - (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast. - (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast. - -Tue Aug 27 13:14:58 1996 Bob Manson - - * rtti.c (build_dynamic_cast): Don't try to dereference exprtype - too early. Make sure we explode if exprtype turns out to be a - NULL_TREE when it shouldn't be. - -Tue Aug 27 10:56:21 1996 Mike Stump - - * cp-tree.h: New routine make_call_declarator. - * lex.c (make_call_declarator): Define it. - * except.c (init_exception_processing): Use it. - (expand_builtin_throw): Likewise. - (start_anon_func): Likewise. - * decl2.c (finish_file): Likewise. - * lex.c (cons_up_default_function): Likewise. - * parse.y: Likewise. - * pt.c (tsubst): Likewise. - -Mon Aug 26 17:40:03 1996 Mike Stump - - * decl2.c (groktypefield): Remove unused code. - -Mon Aug 26 17:00:33 1996 Mike Stump - - * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER. - * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier. - Change type_quals into cv_qualifiers. Change nonempty_type_quals into - nonempty_cv_qualifiers. - * hash.h: Rebuild. - - * lex.c (make_pointer_declarator): Change type_quals into - cv_qualifiers. - (make_reference_declarator): Likewise. - -Thu Aug 22 01:09:22 1996 Jason Merrill - - * decl.c (start_function): Only check interface_* for templates - with flag_alt_external_templates. - - * call.c (build_new_op): Check for comparison of different enum types. - (build_over_call): Fix arg # output. - - * typeck.c (build_component_ref): Handle pre-found TYPE_DECL. - -Wed Aug 21 00:13:15 1996 Jason Merrill - - * call.c (build_new_op): Check for erroneous args. - - * call.c (build_new_method_call): Add missing args to cp_error. - - * tree.c (error_type): Don't print reference-to-array. - - * typeck.c (convert_for_assignment): Don't say contravariance for - removing const. - -Tue Aug 20 13:23:00 1996 Jason Merrill - - * call.c (build_over_call): Diagnose bad convs for `this'. - - * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL - on _ctor_arg. - - * call.c (convert_like): Handle bad convs. - (build_over_call): Handle bad convs better. - - * decl2.c: -fansi-overloading is now the default. - - * call.c (build_new_method_call): Check for erroneous args. - - * pt.c (instantiate_class_template): Propagate - TYPE_USES_MULTIPLE_INHERITANCE. - -Tue Aug 20 13:09:57 1996 Mike Stump - - * call.c (enforce_access): Add static to routine. - -Sun Aug 18 14:35:54 1996 Jason Merrill - - * call.c (build_user_type_conversion_1): Fix bad handling. - (compare_ics): Likewise. - -Sat Aug 17 21:54:11 1996 Jason Merrill - - * call.c (standard_conversion): Oops. - -Sat Aug 17 16:28:11 1996 Geoffrey Noer - - * g++.c: Update test for win32 (&& ! cygwin32). - -Sat Aug 17 03:45:31 1996 Jason Merrill - - * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly. - (ptr_reasonably_similar): New fn. - * call.c (BAD_RANK): New rank. - (ICS_BAD_FLAG): New macro. - (standard_conversion): Handle almost-right pointer conversions. - (reference_binding): Handle bad rvalue bindings. - (add_*_candidate): Stuff. - (build_over_call): Pass bad conversions to convert_for_initialization. - (compare_ics): Handle bad convs. - (joust): Likewise. - -Fri Aug 16 15:02:19 1996 Bob Manson - - * init.c (expand_vec_init): Use ptrdiff_type_node instead of - integer_type_node when computing pointer offsets. - -Fri Aug 16 01:28:32 1996 Jason Merrill - - * tree.c (lvalue_type): New fn. - (error_type): New fn. - * call.c (op_error): Use error_type. - (add_conv_candidate): Use lvalue_type. - (add_builtin_candidates): Likewise. - * error.c (args_as_string): Use error_type. - -Thu Aug 15 17:27:13 1996 Jason Merrill - - * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here. - (tsubst): Not here. - - * decl.c (init_decl_processing): With -ansi, __null's type is the - signed integral type with the same number of bits as a pointer. - Introduce a new variable null_node for it. - * cp-tree.h: Adjust. - * call.c (null_ptr_cst_p): Adjust. - -Thu Aug 15 17:09:54 1996 Mike Stump - - * except.c (do_unwind): Mark %i7 as used on the SPARC so we can - optimize. - -Thu Aug 15 01:36:49 1996 Jason Merrill - - * decl2.c (import_export_decl): Ignore #pragma interface for tinfo - fns of classes without virtual functions. - - * call.c (add_function_candidate): Handle `this' specially. - (compare_ics): Likewise. - -Tue Aug 13 12:16:10 1996 Jason Merrill - - * typeck.c (build_conditional_expr): Fix handling of __null. - - * decl2.c (comdat_linkage): New fn. - (import_export_vtable): Use it. - (import_export_decl): Use it. - * method.c (make_thunk): Use it. - -Mon Aug 12 00:09:18 1996 Jason Merrill - - * pt.c (end_template_decl): If we don't actually have parms, return. - * parse.y (template_header): Accept 'template <>'. - - * errfn.c: Allow 5 args. - -Sun Aug 11 15:20:58 1996 Jason Merrill - - * tree.c (make_temp_vec): New fn. - * pt.c (push_template_decl): Handle partial specs. - (instantiate_class_template): Likewise. - (more_specialized): Use get_bindings. - (more_specialized_class): New fn. - (get_class_bindings): New fn. - (most_specialized_class): New fn. - (do_function_instantiation): List candidates for ambiguous case. - * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS. - (shadow_tag): Call push_template_decl for partial specializations. - * parse.y: Likewise. - * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces - DECL_TEMPLATE_MEMBERS. - * call.c (print_z_candidates): Reduce duplication. - -Fri Aug 9 14:36:08 1996 Jason Merrill - - * decl2.c (lang_decode_option): Allow -fansi-overloading. - -Thu Aug 8 17:04:18 1996 Jason Merrill - - * pt.c (get_bindings): New fn. - (most_specialized): Likewise. - (do_function_instantiation): Use them. - (add_maybe_template): New fn. - * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro. - * call.c (build_new_op): Handle guiding decls. - (build_new_function_call): Likewise. - * decl2.c (finish_file): Likewise. - - * decl2.c (mark_used): Do synthesis here. - * call.c (build_method_call): Not here. - (build_over_call): Or here. - * typeck.c (build_function_call_real): Or here. - * tree.c (bot_manip): Call mark_used on functions used in default - args. - -Thu Aug 8 17:48:16 1996 Michael Meissner - - * decl2.c (import_export_vtable): Delete code that disabled vtable - heuristic on systems with ASM_OUTPUT_EXTERNAL. - -Wed Aug 7 12:44:11 1996 Jason Merrill - - * typeck.c (build_x_function_call): Handle static call context - better. - - * decl.c (finish_function): Set the DECL_CONTEXT of the result to - the function, not its outer block. - - * call.c (build_field_call): Pass fields on to build_opfncall - regardless of TYPE_OVERLOADS_CALL_EXPR. - (build_method_call): Pass on to build_new_method_call sooner. - - * typeck.c (build_ptrmemfunc): Just return what instantiate_type - gives us. - * class.c (instantiate_type): Don't put a POINTER_TYPE to - METHOD_TYPE on an expression. Also make a copy of rhs instead of - modifying it. - -Tue Aug 6 12:58:46 1996 Jason Merrill - - * call.c (compare_ics): Handle qual_conv after lvalue_conv. - (add_builtin_candidate): Don't take enums for ++. - (build_new_method_call): Handle non-aggregates and field calls. - Move new overloading code from... - * cvt.c: Here. - - * decl.c (grokparms): Don't check default args in templates. - -Mon Aug 5 17:17:06 1996 Jason Merrill - - * cvt.c (build_new_op): Fix args to build_unary_op. - (add_builtin_candidates): Don't call type_promotes_to on float. - - * decl.c (grokparms): Check the type of the default arg. - - * cvt.c (build_new_op): Pass non-overloaded cases on rather than - returning NULL_TREE. - - * typeck.c (build_x_binary_op): Avoid doing extra work. - (build_x_unary_op): Likewise. - (build_x_conditional_expr): Likewise. - * cvt.c (build_over_call): Return. - (add_builtin_candidate): Fix MEMBER_REF. - (build_new_op): Likewise. - -Mon Aug 5 17:07:47 1996 Mike Stump - - * method.c (build_overload_name): Put bug fix into code but leave - disabled for now so we can be bug compatible with older releases - that do repeats incorrectly. In the future, we can enable it. - -Mon Aug 5 13:46:28 1996 Jason Merrill - - * cvt.c (convert_like): Don't call build_cplus_new twice. - - * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c: - Control new overloading code with -fansi-overloading. - -Sun Aug 4 15:29:11 1996 Jason Merrill - - * cvt.c (build_over_call): Call build_cplus_new. - * call.c (build_method_call): Likewise. - * typeck.c (build_function_call_real): Likewise. - (build_conditional_expr): If both operands are TARGET_EXPRs, wrap - the COND_EXPR in a TARGET_EXPR so they use the same slot. - - * cvt.c (build_up_reference): Propagate INDIRECT_BIND to - recursive calls. - * typeck.c (complete_type): Propagate - TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}. - -Sat Aug 3 14:05:07 1996 Jason Merrill - - * cvt.c (joust): More ?: kludging. Sigh. - (build_over_call): Don't try to synthesize global fns. - - * search.c (lookup_conversions): Use binfo marking. - -Sat Aug 3 12:33:42 1996 Bob Manson - - * search.c (build_mi_matrix): Use the correct value of cid - when determining the new mi_size. - -Sat Aug 3 01:27:41 1996 Jason Merrill - - * cvt.c (add_builtin_candidates): Do consider type conversion ops - for the first parms of += et al. - (strip_top_quals): New fn. - (reference_binding): Use it instead of TYPE_MAIN_VARIANT. - (implicit_conversion): Likewise. - (add_builtin_candidates): Be careful about arrays. - (build_new_method_call): Handle vtable optimization. - -Fri Aug 2 01:26:59 1996 Jason Merrill - - * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag. - * cvt.c (reference_binding): Use it. - (implicit_conversion): Use it. - (add_builtin_candidate, COND_EXPR): Use it. - - * cvt.c (build_new_function_call): Check for error args. - - * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY. - - * gxx.gperf: Add __null. - * hash.h: Regenerate. - * lex.h: Add RID_NULL. - * lex.c (init_lex): Create null_pointer_node here, stick it in - RID_NULL. - * decl.c (init_decl_processing): Still set its type here. - * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node. - (convert_to_pointer_force): Likewise. - (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0 - if (! pedantic). - * call.c (convert_harshness): Use null_ptr_cst_p. - * typeck.c (convert_for_assignment): Likewise. Don't produce - null_pointer_node. - - * error.c (args_as_string): Handle lists of actual args, too. - * cvt.c (null_ptr_cst): Support (void*)0 for now. - (build_user_type_conversion_1): Improve diagnostics. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_method_call): Likewise. Move call before def diagnostic... - (build_over_call): Here. - - * cvt.c (build_new_method_call): Don't complain about no match if - LOOKUP_SPECULATIVELY. - (build_over_call): Fix 'this' for virtual fn. - (build_new_method_call): Add diagnostic. - -Thu Aug 1 16:45:09 1996 Jason Merrill - - * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for - constructors to be passed in. - (build_over_call): Likewise. - (build_user_type_conversion_1): Pass them in. - (convert_like): Likewise. - (build_object_call): Handle overloaded conversions. - (build_over_call): Pass the right args to build_vfn_ref. - (standard_conversion): Fix pmf convs. - (joust): Handle comparing statics and non-statics. - (build_new_method_call): New fn. - * call.c (build_method_call): Call it if NEW_OVER. - -Thu Aug 1 16:06:14 1996 Mike Stump - - * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use - %D instead. - -Thu Aug 1 15:24:02 1996 Mike Stump - - * except.c (expand_throw): Use maybe_build_cleanup_and_delete - instead of just maybe_build_cleanup so that we deallocate the - thrown object. - -Thu Aug 1 15:18:00 1996 Brendan Kehoe - - * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use. - * cp-tree.h (finish_prevtable_vardecl): Add decl. - -Thu Aug 1 11:53:51 1996 Bob Manson - - * pt.c (instantiate_class_template): Call complete_type. Also, if - we're at the end of the file and we just instantiated a template - class with a vtable, call finish_prevtable_vardecl. - - * error.c (dump_decl): Don't explode (or explode more gracefully - as appropriate) if the object being dumped has a null type. - (dump_expr): Likewise. - - * search.c (build_mi_matrix): Ensure that mi_size is large enough, - by counting the number of nodes that we'll need before allocating - the array. - (lookup_fnfields): Fix comment. - (breadth_first_search): Fix comment. - -Wed Jul 31 09:57:05 1996 Jason Merrill - - * pt.c (instantiate_class_template): Propagate TYPE_PACKED and - TYPE_ALIGN. - * class.c (finish_struct): Call cplus_decl_attributes here. - (finish_struct_1): Not here. - * cp-tree.h: Adjust. - - * pt.c (type_unification): New parameter STRICT. - (unify): If STRICT, don't allow cv addition or base deduction. - * call.c, class.c, cvt.c, cp-tree.h: Adjust. - -Tue Jul 30 13:06:13 1996 Jason Merrill - - * search.c (get_template_base{_recursive}): New fns. - * pt.c (more_specialized): New fn. - (do_function_instantiation): Use it. - (unify): Handle base deduction. - * cvt.c (joust): Use more_specialized. - Don't arbitrarily choose between non-builtin candidates. - (build_over_call): Call require_complete_type. - - * decl.c (start_function): Statics are static even in a #pragma - interface file. - - * decl2.c (import_export_vtable): Disable vtable heuristic on - systems with ASM_OUTPUT_EXTERNAL. - - * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV. - (standard_conversion): No std conv to enum type. - - * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P - for ptm's. - - * cvt.c (reference_binding): Bind directly to a base subobject of - a class rvalue. - - * cvt.c (build_new_op): Enforce access control. - -Tue Jul 30 09:22:53 1996 Bob Manson - - * typeck2.c (process_init_constructor): When scanning the - union for a named field, skip things that aren't FIELD_DECLs. - - * method.c (synthesize_method): Don't scan fndecl's rtl if - we're at the end of the file; just assume the function can't - be inlined. - -Mon Jul 29 15:48:30 1996 Jason Merrill - - * cvt.c (build_builtin_candidate): Stick a dummy conversion in if - it failed. - - * cvt.c (build_user_type_conversion_1): Handle overloaded - conversion ops. - - * cvt.c (add_builtin_candidates): Don't consider type conversion - operators for the first parameter of operator=. - -Mon Jul 29 15:33:55 1996 Bob Manson - - * typeck.c (complete_type): Only call layout_type if we're not - expanding a template. - -Mon Jul 29 14:40:38 1996 Jason Merrill - - * cvt.c (compare_ics): Oops. - - * cvt.c (op_error): Oops. - - * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV. - * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p. - (build_conv): Use them. - (implicit_conversion): Use them. - (convert_like): Handle them. - (build_new_op): Handle builtin COND_EXPR again. - (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums - in lists of types for COND_EXPR. - (add_builtin_candidate): Add enum candidates for COND_EXPR. - -Mon Jul 29 12:05:40 1996 Bob Manson - - * typeck.c (build_modify_expr): Always attempt to build a call to - the assignment operator, even if we're using a default one. - (convert_for_initialization): Call complete_type. - -Mon Jul 29 11:25:08 1996 Jason Merrill - - * cvt.c (reference_binding): A REF_BIND gets the reference type. - (implicit_conversion): Likewise. - (convert_like): Likewise. - (compare_ics): Likewise. - (compare_qual): Likewise. - (print_z_candidates): Handle no candidates. - (build_new_op): Don't handle builtin COND_EXPR for now. - -Sat Jul 27 11:27:47 1996 Stan Shebs - - * cvt.c (build_builtin_candidate): Init local var in an ANSI way. - -Fri Jul 26 01:07:22 1996 Jason Merrill - - * cvt.c (joust): If the candidates are the same, arbitrarily pick one. - - * cvt.c (build_builtin_candidate): Oops. - (build_new_op): Oops. - - * method.c (build_opfncall): Pass COND_EXPR on. - * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR. - (add_builtin_candidate{,s}): Likewise. - (add_builtin_candidates): Likewise. - (print_z_candidates, op_error, build_new_op): Likewise. - (type_decays_to): New fn. - * lex.c (init_lex): Just say ?: for COND_EXPR. - -Thu Jul 25 09:33:33 1996 Jason Merrill - - * typeck.c (complete_type): Call layout_type rather than building - a new array type. - - * cvt.c (add_builtin_candidate): Pointer arithmetic candidates - only use ptrdiff_t. - -Wed Jul 24 12:45:08 1996 Jason Merrill - - * cvt.c: Always compile the new overloading code (but don't use it). - (implicit_conversion): Add a BASE_CONV when converting to - the same class type. - (convert_like): Handle BASE_CONV. - -Tue Jul 23 12:46:30 1996 Jason Merrill - - * cvt.c (build_new_op): Support {MAX,MIN}_EXPR. - (add_builtin_candidate): Likewise. - - NEW_OVER changes: - * typeck.c (build_x_function_call): Try an operator function - whenever we call an object of class type. - * method.c (build_opfncall): Pass CALL_EXPRs through. - * cvt.c (implicit_conversion): Do const-ref case first. - (add_conv_candidate, build_object_call, op_error): New fns. - (ptr_complete_ob, TYPE_PTROB_P): void is not an object type. - ({add,build}_builtin_candidate{,s}, print_z_candidates): Display - builtin candidates. - (build_new_op): Handle CALL_EXPR. Don't try to decay void. - Fall back on preincrement handling. Use op_error. - Handle warn_synth. - (convert_like): Pass INDIRECT_BIND. Don't try to do anything with - an error_mark_node. - (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions - properly. - -Mon Jul 22 16:21:55 1996 Bob Manson - - * pt.c (tsubst_expr): Handle CONTINUE_STMT. - -Mon Jul 22 15:38:58 1996 Mike Stump - - * typeck.c (build_component_ref_1): Use build_component_ref - instead of open coding it here. - -Mon Jul 22 12:18:54 1996 Jason Merrill - - * g++.c (main): Don't link with -lg++. - - NEW_OVER changes: - * cvt.c (convert_to_reference): Don't use convert_from_reference on - result of build_type_conversion. - (cp_convert): Only call build_method_call for ctors if - build_type_conversion failed. - (ptr_complete_ob): New function. - (TYPE_PTR{,OB,MEM}_P): New macros. - ({add,build}_builtin_candidate{,s}): New functions. - (print_z_candidates): Handle builtins. - (build_user_type_conversion_1): Don't use conversion fns for - converting to a base type. - (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs. - (build_user_type_conversion): Use convert_from_reference. - (build_new_op): New function. - (build_over_call): Fix handling of methods. - (compare_ics): Handle AMBIG_CONV properly. - * typeck2.c: Increment abort count. - * method.c (build_opfncall): Forward most requests to build_new_op. - * cp-tree.h (IS_OVERLOAD_TYPE): Tweak. - -Fri Jul 19 17:59:29 1996 Brendan Kehoe - - * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out - invalid second argument to dump_expr_list. - -Fri Jul 19 14:04:05 1996 Mike Stump - - * decl.c (lookup_name_real): Make sure we do obj->X::i correctly. - -Thu Jul 18 14:48:23 1996 Bob Manson - - * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not - ASSEMBLE_EXTERNAL. - -Mon Jul 15 17:48:43 1996 Mike Stump - - * typeck2.c (process_init_constructor): New pedwarn for using { } - to initialize a pointer to member function. - * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that - we can avoid the new error. - -Mon Jul 15 15:42:03 1996 Mike Stump - - * typeck.c (build_ptrmemfunc1): New function to hide details of - pointer to member functions better. - -Mon Jul 15 14:23:02 1996 Mike Stump - - * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are - methods into the actual method, as we know the implied object is - not used. - -Mon Jul 15 13:08:29 1996 Brendan Kehoe - - * parse.y (maybecomma_warn): Only emit the pedwarn if we're not - inside a system header. - -Fri Jul 12 16:30:05 1996 Bob Manson - - * call.c (build_method_call): Call complete_type on the - instance type. - -Thu Jul 11 17:16:40 1996 Mike Stump - - * typeck.c (build_component_ref): Always build up an OFFSET_REF - for obj_ptr->func so that we can know which object to use in a - method call. - -Wed Jul 10 19:36:37 1996 Mike Stump - - * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast - around things. Also improve maintainability. - -Wed Jul 10 18:20:11 1996 Bob Manson - - * decl.c (grokdeclarator): Check for overflow when evaluating an - array dimension. - -Wed Jul 10 17:26:19 1996 Jason Merrill - - * cvt.c (cp_convert): Don't check for ambiguity with constructor - if NEW_OVER. - - * typeck.c (build_x_function_call): Pass function overload - questions to new overloading code if NEW_OVER. - * init.c (expand_aggr_init_1): Only check for type conversion ops - if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING). - Don't check for ambiguity with constructor if NEW_OVER. - * cvt.c (convert_to_reference): Dereference the result of a type - conversion operator. - (build_conv): Propagate ICS_USER_FLAG. - (implicit_conversion): Call instantiate_type. - Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL. - (add_function_candidate): Fix cv-quals on argtype. - (print_z_candidates): New function. - (build_new_function_call): Call it. - (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't - consider non-converting constructors. - Call print_z_candidates. - Return an AMBIG_CONV for an ambiguous conversion. - (build_user_type_conversion): Handle AMBIG_CONV. - (convert_like): Fix test for building TARGET_EXPR. - Call instantiate_type. - Handle AMBIG_CONV and LVALUE_CONV. - (build_over_call): Handle 0 args and ellipsis. - * cp-tree.def: Add AMBIG_CONV. - -Tue Jul 9 17:48:48 1996 Mike Stump - - * decl.c (lookup_name_real): If we find mem in obj when parsing - `obj->mem', make sure we return the right value. - -Tue Jul 9 16:11:28 1996 Bob Manson - - * search.c (get_base_distance): Call complete_type. - -Tue Jul 9 12:46:34 1996 Mike Stump - - * decl.c (store_bindings): Make static. - -Mon Jul 8 16:42:31 1996 Jason Merrill - - * init.c (expand_aggr_init_1): Don't check type conversions if - NEW_OVER. - - * cvt.c (z_candidate): Put back template field. - (add_function_candidate): Set it. - (add_template_candidate): Likewise. - (joust): Use it. - (compare_qual): Handle references and pointers to members. - (compare_ics): Handle reference bindings. - - * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY. - -Mon Jul 8 16:18:56 1996 Bob Manson - - * call.c (compute_conversion_costs): Call complete_type. - - * tree.c (vec_binfo_member): Use comptypes instead of comparing - pointers, so we can handle template parameters. - -Fri Jul 5 16:51:53 1996 Bob Manson - - * cvt.c (cp_convert_to_pointer): We have to call complete_type - here; let's make it explicit instead of a side effect of an - error check. - -Wed Jul 3 16:29:51 1996 Jason Merrill - - * cvt.c (z_candidate): Remove template field. - (reference_binding): Handle binding to temporary. - (implicit_conversion): Likewise. - (add_function_candidate): Handle artificial constructor parms. - Handle functions with too few parms. - (add_template_candidate): New function. - (build_user_type_conversion_1): Handle constructors. - (convert_like): Likewise. - (build_over_call): Likewise. - (build_new_function_call): Support templates. - (compare_ics): Fix reference, inheritance handling. - -Mon Jul 1 22:58:18 1996 Bob Manson - - * decl.c: Add signed_size_zero_node. - (init_decl_processing): Build it. - * class.c (prepare_fresh_vtable): Use it instead of size_zero_node - when we're trying to make a negative delta. - -Mon Jul 1 17:56:19 1996 Brendan Kehoe - - Stop doing this damn index==strchr variable name confusion. - * class.c (add_virtual_function): Change local var INDEX to be - named IDX. - (add_method): Likewise. - * lex.c (print_parse_statistics): Likewise. - * search.c (make_memoized_table_entry): Likewise. - (lookup_fnfields_here): Likewise. - (lookup_field): Likewise. - (lookup_fnfields): Likewise. - (get_baselinks): Likewise. - * sig.c (build_signature_table_constructor): Likewise. - (build_signature_method_call): Likewise. - * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX. - (get_member_function_from_ptrfunc): Likewise. - (build_ptrmemfunc): Change local var INDEX to be IDX. - (c_expand_start_case): Likewise. - -Sat Jun 29 14:05:46 1996 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Move user-defined type conversion - handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE. - (convert_to_reference): Use build_type_conversion to convert to - the reference type directly. - (standard_conversion): Fix void* case, non-conversions. - (reference_binding): Fix expr == 0 case, non-conversions. - (convert_like): Support REF_BIND. - (compare_qual): Split out from compare_ics. - (compare_ics): Use it, handle icses with only a qual_conv. - - * init.c (expand_vec_init): Don't crash if decl is NULL. - -Fri Jun 28 11:52:51 1996 Stan Shebs - - * mpw-config.in: New file, configury for Mac MPW. - * mpw-make.sed: New file, makefile editing for MPW. - -Thu Jun 27 15:18:30 1996 Jason Merrill - - * pt.c (instantiate_class_template): Call repo_template_used. - - * search.c (lookup_conversions): Only lookup conversions in - complete types. - -Thu Jun 27 12:59:53 1996 Brendan Kehoe - - * cp-tree.def: Renamed from tree.def, to avoid confusion with - gcc's tree.def. - * cp-tree.h, lex.c: Include cp-tree.def. - * Makefile.in (CXX_TREE_H): Reference cp-tree.def. - -Wed Jun 26 18:29:47 1996 Bob Manson - - * init.c (build_vec_delete_1): Call complete_type. - -Mon Jun 24 17:17:32 1996 Mike Stump - - * except.c (start_anon_func): Make sure anonymous functions are - never external. - -Fri Jun 21 15:10:58 1996 Jason Merrill - - * decl.c (finish_function): If function_depth > 1, set nested. - - * decl2.c (grokbitfield): Revert Bob's change. - * class.c (finish_struct_1): Fix handling of named bitfield widths. - -Thu Jun 20 23:35:38 1996 Jason Merrill - - * pt.c (add_pending_template): Handle types. - (lookup_template_class): With -fexternal-templates, just add the class - to pending_templates instead of instantiating it now. - * decl2.c (finish_file): Handle types in pending_templates. - -Thu Jun 20 14:08:40 1996 Bob Manson - - * decl2.c (grokbitfield): Handle constant decls appropriately. - Give an appropriate error message now instead of spewing core - later. - -Thu Jun 20 13:01:51 1996 Jason Merrill - - * decl2.c: Don't turn on thunks by default for now. - -Wed Jun 19 11:37:04 1996 Jason Merrill - - * typeck.c (complete_type): Handle error_mark_node. - (common_type, OFFSET_TYPE): Handle template_type_parms. - -Tue Jun 18 10:02:15 1996 Jason Merrill - - * pt.c (instantiate_decl): If at_eof, call import_export_decl - regardless of DECL_INLINE. - - * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs. - - * class.c (finish_struct_bits): Copy TYPE_SIZE. - - * rtti.c (build_dynamic_cast): Support templates. - * tree.def: Support DYNAMIC_CAST_EXPR. - * pt.c (tsubst_copy): Likewise. - * decl2.c (build_expr_from_tree): Likewise. - -Mon Jun 17 15:23:36 1996 Jason Merrill - - * typeck.c (build_static_cast): Support templates. - (build_const_cast): Likewise. - * tree.def: Support CONST/STATIC_CAST_EXPR. - * pt.c (tsubst_copy): Likewise. - * decl2.c (build_expr_from_tree): Likewise. - -Sun Jun 16 12:33:57 1996 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Don't trust - TREE_SYMBOL_REFERENCED for vtables of local classes. - -Fri Jun 14 18:13:36 1996 Jason Merrill - - * pt.c (tsubst_copy): Handle operator T. - -Wed Jun 12 17:52:40 1996 Brendan Kehoe - - * init.c (build_delete): Move creation of PARMS inside test of - TYPE_HAS_DESTRUCTOR, since it's never used outside of that block. - -Tue Jun 11 15:09:18 1996 Bob Manson - - * typeck.c (build_conditional_expr): Don't assume that - the arguments to ?: are always pointers or records. - -Tue Jun 11 13:56:23 1996 Jason Merrill - - * decl2.c (import_export_decl): Still emit static/weak/comdat - copies of inline template functions with -fno-implicit-templates. - -Tue Jun 11 11:42:13 1996 Bob Manson - - * init.c (build_delete): Determine the complete basetype - path to the destructor we're calling. - -Fri Jun 7 15:30:10 1996 Bob Manson - - * decl.c (build_enumerator): Always copy the INTEGER_CST used to - initialize the enum, because we really and truly don't know where - it came from. - (start_enum): Don't copy integer_zero_node because - build_enumerator will do it. - -Fri Jun 7 11:11:09 1996 Jason Merrill - - * decl.c (finish_function): Do access control on base destructors. - - * pt.c (tsubst, case FUNCTION_DECL): Set up - IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't - hose us. - -Fri Jun 7 10:37:33 1996 Mike Stump - - * cvt.c (build_up_reference): If we have already extended the - lifetime of the temporary, don't try it again. - * typeck.c (c_expand_return): Don't try and convert the return - value twice when we want a reference, once is enough. - -Tue Jun 4 15:41:45 1996 Jason Merrill - - * pt.c (tsubst_expr, case DECL_STMT): Don't pass - LOOKUP_ONLYCONVERTING at all for now. - - * search.c (add_conversions): Put the conversion function in - TREE_VALUE, the basetype in TREE_PURPOSE. - * cvt.c (build_type_conversion): Adjust. - * cvt.c (build_expr_type_conversion): Adjust. - * call.c (user_harshness): Adjust. - -Mon Jun 3 15:30:52 1996 Jason Merrill - - * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the - backend's benefit. - -Mon Jun 10 18:58:19 1996 Mike Stump - - * except.c (expand_start_catch_block): Add a dummy region, if we - get an error, so that we can avoid core dumping later. - -Fri May 31 14:56:13 1996 Mike Stump - - * cp-tree.h (OFFSET_REF): Remove. - * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF. - * expr.c (cplus_expand_expr): Cleanup callers of expand_expr. - * init.c (expand_aggr_init_1): Likewise. - (build_new): Likewise. - * typeck.c (expand_target_expr): Likewise. - -Fri May 31 14:22:08 1996 Jason Merrill - - * typeck.c (build_modify_expr): Don't use TREE_VALUE on a - TARGET_EXPR. - -Wed May 29 17:04:33 1996 Mike Stump - - * cvt.c (build_up_reference): Redo how and when temporaries are - created. - * decl.c (grok_reference_init): Don't try and be smart about - running cleanups. - -Wed May 29 16:02:08 1996 Mike Stump - - * cvt.c (build_up_reference): Add NULL_TREE to all calls to build - (TARGET_EXPR...), now that it has 4 arguments. - * tree.c (build_cplus_new): Likewise. - -Thu May 23 16:40:30 1996 Jason Merrill - - * error.c (dump_expr, case CAST_EXPR): Handle T() properly. - - * pt.c (instantiate_decl): Don't call push/pop_cp_function_context. - * decl.c (struct saved_scope): Remove named_labels, - {base,member}_init_list. - (maybe_push_to_top_level): Don't set them. Call - push_cp_function_context if appropriate. - (pop_from_top_level): Likewise. - - * method.c (do_build_assign_ref): Remove obsolete check of - TYPE_HAS_ASSIGN_REF (basetype). - - * decl.c (grokfndecl): Diagnose user definition of - implicitly-declared methods. - -Thu May 23 12:13:08 1996 Bob Manson - - * method.c (do_build_copy_constructor): Add code to give - meaningful error messages instead of crashing. - (do_build_assign_ref): Don't synthesize assignment operators for - classes containing reference or const members. - - * class.c (struct base_info): Remove cant_synth_copy_ctor - and cant_synth_asn_ref. - (finish_base_struct): Remove the code that tries to conditionalize - synthesis of copy constructors & assignment operators based on - access permissions. Instead, let it fail when it tries to - synthesize the copy constructor. This will give meaningful error - messages instead of silently generating code to perform a bitcopy. - -Wed May 22 11:45:19 1996 Bob Manson - - * lex.c (real_yylex): Remove old-n-crufty #if 0 code for - determining types for constant values. - - * decl.c (struct named_label_list): Use instead of stuffing - random items into a TREE_LIST node. - (named_label_uses): Use the new struct. - (poplevel): Likewise. - (lookup_label): Likewise. - (define_label): Add an error message to tell the user the line - where the goto is located in addition to the destination of the - goto. - (init_decl_processing): Use NULL instead of NULL_TREE to initialize - named_label_uses. - (finish_function): Likewise. - - (start_decl): Complain about defining a static data member - in a different type from which it was declared. - -Wed May 22 09:33:23 1996 Jason Merrill - - * cvt.c (build_expr_type_conversion): Adjust. - -Tue May 21 11:21:56 1996 Jason Merrill - - * call.c (build_method_call): Always convert 'this' to the - appropriate type. - - * search.c (add_conversions): Put the conversion function in - TREE_VALUE, the type in TREE_PURPOSE. - * cvt.c (build_type_conversion): Adjust. - * call.c (user_harshness): Adjust. - - * method.c (emit_thunk): Call temporary_allocation and - permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too. - - * tree.c (build_cplus_array_type): Handle tweaking of - TYPE_MAIN_VARIANT here. - * typeck.c (common_type): Not here. - - * typeck.c (complete_type): Only try to complete an array type if - it has a domain. - -Mon May 20 14:55:59 1996 Jason Merrill - - * decl.c (grokvardecl): Call complete_type. - (grokdeclarator): Call complete_type for PARM_DECLs. - -Fri May 17 16:41:17 1996 Jason Merrill - - * pt.c (instantiate_class_template): Re-set - CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1. - -Fri May 17 14:56:55 1996 Mike Stump - - * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now - smart enough to do it right. - * tree.c (cp_expand_decl_cleanup): Likewise. - * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of - cp_expand_decl_cleanup. - (store_parm_decls): Likewise. - (hack_incomplete_structures): Likewise. - * except.c (push_eh_cleanup): Likewise. - -Fri May 17 13:13:51 1996 Mike Stump - - * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++ - frontend to the backend where it belongs. - * tree.c (unsave_expr): Likewise. - (unsave_expr_now): Likewise. - * tree.def (UNSAVE_EXPR): Likewise. - * cp-tree.h (unsave_expr): Likewise. - (unsave_expr_now): Likewise. - -Fri May 17 11:02:41 1996 Mike Stump - - * init.c (emit_base_init): Make sure the partial EH cleanups live - on the function_obstack. - -Thu May 16 15:29:33 1996 Bob Manson - - * expr.c (do_case): Don't try to dereference null TREE_TYPEs - when checking for pointer types. - -Thu May 16 13:38:58 1996 Jason Merrill - - * pt.c (instantiate_class_template): Remove obsolete check for - access declarations. - -Thu May 16 13:34:15 1996 Mike Stump - - * call.c (build_overload_call): Simplify calls to - build_overload_call by removing last parameter. - (build_method_call): Likewise. - * cp-tree.h: Likewise. - * method.c (build_opfncall): Likewise. - * typeck.c (build_x_function_call): Likewise. - -Thu May 16 13:15:43 1996 Mike Stump - - * call.c (default_parm_conversions): Factor out common code. - (build_method_call): Use it. - (build_overload_call_real): Use it. - -Wed May 15 14:46:14 1996 Mike Stump - - * call.c (build_method_call): Allow implicit & on METHOD_TYPEs, - but pedwarn as the code is bogus. - * typeck.c (decay_conversion): Likewise. - (build_function_call_real): Use build_addr_func instead of - default_conversion. Don't allow pointer-to-method functions down - here. - (build_unary_op): Use real pointer-to-member functions instead of - fake ones. - (build_ptrmemfunc): Use build_addr_func instead of build_unary_op. - (convert_for_assignment): Removed some obsolete code. - * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to - build_x_function_call instead of current_class_ptr. Only call - digest_init once on an initializer, we do this just checking - TREE_TYPE. - (build_expr_from_tree): Pass current_class_ref to - build_x_function_call instead of current_class_ptr. - * init.c (build_member_call): Likewise. - * pase.y: Likewise. - * error.c (dump_expr): Handle OFFSET_REFs better. - * pt.c (unify): Handle pointer-to-member functions better. - * decl.c (finish_function): Clear out current_class_ref just like - we do for current_class_ptr. - - * typeck.c (get_delta_difference): Handle virtual bases better. - -Tue May 14 16:37:37 1996 Jason Merrill - - * sig.c (build_signature_table_constructor): Use the delta for - the original basetype for this virtual function with thunks. - (build_signature_method_call): We still need to adjust 'this' - with thunks. - -Tue May 14 16:27:25 1996 Mike Stump - - * call.c (build_addr_func): New routine. Used to get the `real' - address of a function or a method. Needed to avoid getting a - pointer-to-member function. - (build_call): New routine to build CALL_EXPRs. - (build_method_call): Use it. - * cvt.c (convert_to_aggr): Likewise. - * typeck.c (build_function_call_real): Likewise. - * sig.c (build_signature_table_constructor): Use build_addr_func. - * cp-tree.h (build_call, build_addr_func): Declare them. - -Tue May 14 12:47:47 1996 Mike Stump - - * cp-tree.h (LOOKUP_AGGR): Remove, unused. - * parse.y: Remove uses of LOOKUP_AGGR. - -Tue May 14 12:07:51 1996 Mike Stump - - * *.[chy]: Rename current_class_decl to current_class_ptr, and - C_C_D to current_class_ref. - -Mon May 13 16:55:23 1996 Jason Merrill - - * call.c (convert_harshness): Tighten up pointer conversions. - -Sat May 11 04:33:50 1996 Doug Evans - - * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef. - (finish_file): Likewise. - -Fri May 10 11:09:57 1996 Jason Merrill - - * cvt.c (convert_fn_ptr): We don't use thunks for pmfs. - - * method.c (emit_thunk): Set flag_omit_frame_pointer in default - code. - -Thu May 9 18:18:30 1996 Jason Merrill - - * decl2.c: Turn on thunks by default where supported. - -Tue May 7 20:39:57 1996 Mike Stump - - * cp-tree.h (build_overload_call_maybe): Removed. - * call.c (build_overload_call_real): Invert meaning of last arg to - be require_complete. - (build_overload_call): Likewise. - * typeck.c (build_x_function_call): Use build_overload_call_real - instead of build_overload_call_maybe. - -Mon May 6 01:23:32 1996 Jason Merrill - - * decl2.c (finish_file): Don't try to emit functions that haven't - been compiled. - -Fri May 3 09:30:13 1996 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Oops. - - * decl.c (maybe_push_to_top_level): Do save previous_class_*. - Also store the bindings from previous_class_values. - (pop_from_top_level): Restore them. - -Thu May 2 21:56:49 1996 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Only write out vtable if its - symbol has been referenced. - (finish_file): Re-join synthesis/vtable loop with inline emission - loop, disable inlining when an inline is output. - -Thu May 2 17:20:02 1996 Mike Stump - - * except.c (init_exception_processing): Setup saved_in_catch. - (push_eh_cleanup): Reset __eh_in_catch. - (expand_start_catch_block): Set __eh_in_catch. - -Thu May 2 16:21:17 1996 Mike Stump - - * except.c (push_eh_cleanup): Add tracking for whether or not we - have an active exception object. - (expand_builtin_throw): Use it to make sure a rethrow without an - exception object is caught. - -Thu May 2 11:26:41 1996 Jason Merrill - - * decl.c (maybe_push_to_top_level): Clear out class-level bindings - cache. - -Wed May 1 11:26:52 1996 Jason Merrill - - * decl2.c (finish_file): Also use sentries for vars with - DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be - created). - - * lex.c (handle_cp_pragma): Disable #pragma - interface/implementation if SUPPORTS_ONE_ONLY > 1. - -Tue Apr 30 11:25:46 1996 Jason Merrill - - * method.c (emit_thunk): Wrap default case in - temporary/permanent_allocation. - - * method.c (make_thunk): Use DECL_ONE_ONLY. - (emit_thunk): Call assemble_end_function. - -Mon Apr 29 15:38:29 1996 Jason Merrill - - * decl2.c (import_export_vtable): Use DECL_ONE_ONLY. - (import_export_decl): Likewise. - (finish_prevtable_vardecl): Disable vtable hack if - SUPPORTS_ONE_ONLY > 1. - -Mon Apr 29 14:32:47 1996 Mike Stump - - * typeck.c (build_modify_expr): PREINCREMENT_EXPR and - PREDECREMENT_EXPRs take two arguments, not one. - -Mon Apr 29 00:27:53 1996 Jason Merrill - - * class.c (build_vtable_entry): Don't build thunks for abstract - virtuals. - - * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C - frontend. - -Sat Apr 27 16:45:35 1996 Jason Merrill - - * class.c (set_rtti_entry): Use size_zero_node. - (build_vtable): Likewise. - -Sat Apr 27 14:48:57 1996 Jason Merrill - - * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry. - (prepare_fresh_vtable): Likewise. - -Fri Apr 26 13:14:14 1996 Jason Merrill - - * method.c (emit_thunk): Call mark_used on the target function. - - * call.c (build_method_call): Don't warn about pending templates. - -Thu Apr 25 14:55:44 1996 Jason Merrill - - * decl2.c (finish_file): Fix list walking logic. - - * typeck2.c (check_for_new_type): Only warn if -pedantic. - -Wed Apr 24 15:41:15 1996 Bob Manson - - * class.c (finish_struct_1): Remove old code for - dont_allow_type_definitions. - * cp-tree.h: Likewise. - * spew.c: Make sure cp-tree.h is included before parse.h, so the - definition of flagged_type_tree is found before it is used. - * lex.c: Likewise. - * parse.y: Added the ftype member to the type union, and changed a - number of rules to use it instead of ttype. Added calls to - check_for_new_type() as appropriate. - * typeck2.c (check_for_new_type): New function for checking - if a newly defined type appears in the specified tree. - * cp-tree.h: Add new type flagged_type_tree. Add a prototype - for check_for_new_type(). - -Wed Apr 24 00:36:21 1996 Jason Merrill - - * decl2.c (finish_file): Only use a sentry if the decl is public. - - * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer, - don't pass LOOKUP_ONLYCONVERTING. - -Tue Apr 23 17:18:47 1996 Bob Manson - - * typeck.c (common_type): Fix the ARRAY_TYPE case so it - properly keeps track of const and volatile type modifiers. - -Tue Apr 23 10:52:56 1996 Jason Merrill - - * tree.c (cp_tree_equal): C++ version of simple_cst_equal. - * pt.c (comp_template_args): Use it. - - * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call - assemble_external for artificial function decls. - - * decl.c (cp_finish_decl): Oops. - -Mon Apr 22 17:28:27 1996 Jason Merrill - - * decl2.c (import_export_decl): Put static data member templates - into common storage, or make them weak, depending on whether they - are dynamically or statically initialized. - (get_sentry): New function. - (finish_file): Do import_export_decl for static data members before - building the init/fini functions. Don't init/fini a variable that's - EXTERNAL. Use a sentry for variables in common. Fix mismatching - push/pop_temp_slots. - * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the - expand_static_init thang. - * method.c (get_id_2): New function. - -Mon Apr 22 15:32:45 1996 Bob Manson - - * parse.y (empty_parms): Make sure we use C++-style prototypes - when we're declaring member functions. - -Sun Apr 21 10:08:22 1996 Jason Merrill - - * Makefile.in (CONFLICTS): 16 s/r conflicts. - * parse.y (self_template_type): New nonterminal. - -Thu Apr 18 08:56:54 1996 Jason Merrill - - * decl.c (make_typename_type): Handle getting a TYPE_DECL for a - name. - * parse.y (base_class.1): Allow 'typename foo::bar'. - - * lex.c (check_newline): Remove #pragma code that plays with the - input stream, since we now deal with tokens. Clear nextchar when - we're done. - (handle_cp_pragma): Use real_yylex. - (handle_sysv_pragma): Don't do skipline here. Only call real_yylex - in one place. - - * lex.c (check_for_missing_semicolon): Handle SELFNAME. - - * lex.c (handle_cp_pragma): Fix "#pragma implementation". - -Wed Apr 17 16:51:33 1996 Jason Merrill - - * parse.y: New token SELFNAME for potential constructor. - * spew.c (yylex): Handle it. - * lex.c (identifier_type): Produce it. - - * parse.y (complete_type_name): In :: case, don't push class binding. - (complex_type_name): Likewise. - -Wed Apr 17 15:02:40 1996 Mike Stump - - * typeck.c (build_reinterpret_cast): Handle pointer to member - functions. - -Wed Apr 17 12:28:26 1996 Brendan Kehoe - - * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus - pragmas. - (check_newline): Put the vtable/unit/implementation/interface pragma - code into handle_cp_pragma, replacing it with a call. - (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN - args. Get the next token after handling the pragma token. - -Wed Apr 17 10:28:34 1996 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs. - (convert_to_pointer_force): Likewise. - - * init.c (build_new): Fix array new without -fcheck-new. - -Tue Apr 16 13:44:58 1996 Jason Merrill - - * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c, - tree.c: Lose TYPE_NESTED_NAME. - - * parse.y (nested_name_specifier_1): Don't treat non-identifiers - as identifiers. - - * tree.def: Add VEC_INIT_EXPR. - * expr.c (cplus_expand_expr): Handle it. - * init.c (build_new): Use it instead of the RTL_EXPR nastiness and - the extra file-scope symbol nastiness. - -Mon Apr 15 16:21:29 1996 Jason Merrill - - * method.c (make_thunk): Thunks are static. - (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined. - - * decl2.c (mark_vtable_entries): Emit thunks as needed. - (finish_file): Don't emit them here. - -Sun Apr 14 11:34:39 1996 Jason Merrill - - * rtti.c (build_dynamic_cast): Handle null pointers. - (ifnonnull): New function. - -Fri Apr 12 09:08:27 1996 Bob Manson - - * call.c (build_method_call): Remember the original basetype we - were called with. Give an error message instead of trying - (incorrectly) to call a non-static member function through a - non-inherited class. - - * search.c (expand_upcast_fixups): Mark the new fixup as - DECL_ARTIFICIAL. - -Thu Apr 11 03:57:09 1996 Jason Merrill - - * init.c (build_new): Use a TARGET_EXPR for alloc_expr. - - * class.c (set_rtti_entry): Fix for thunks. - - * decl2.c (import_export_decl): Still emit typeinfo fns for - cv-variants of builtin types. - - * rtti.c (expand_class_desc): Set up base_info_type_node here. - (init_rtti_processing): Instead of here. - -Wed Apr 10 14:17:13 1996 Jason Merrill - - * rtti.c (init_rtti_processing): Do init regardless of -frtti. - (build_typeid): Only complain about taking dynamic typeid without - -frtti. - - * decl2.c: flag_rtti defaults to 1. - - * rtti.c (get_tinfo_var): The general class case is now smaller. - (init_rtti_processing): Pack the latter three fields of base_info - into 32 bits. - -Wed Apr 10 13:50:14 1996 Mike Stump - - * init.c (expand_member_init): Don't dump if name is NULL_TREE. - -Wed Apr 10 12:56:02 1996 Mike Stump - - * search.c (make_memoized_table_entry): Undefer the pop, if necessary. - (push_memoized_context): Split out code to undefer pop_type_level to - (clear_memoized_cache): here. - (pop_memoized_context): We can only handle one layer of deferral of - pop_type_level so clear the cache, if there was a previous level. - -Tue Apr 9 23:06:09 1996 Jason Merrill - - * rtti.c (init_rtti_processing): Build up base_info_type_node. - (expand_class_desc): Use one pointer to an array of base_info - structs, passed using a CONSTRUCTOR. - -Tue Apr 9 14:20:57 1996 Mike Stump - - * class.c (build_vbase_path): Remove block extern for - flag_assume_nonnull_objects here. - (build_vfn_ref): Split out functionality into build_vtbl_ref. - (build_vtbl_ref): New routine. - (build_vtable): Set up rtti info here. - (add_virtual_function): Note in CLASSTYPE_RTTI the best - place where we can get the rtti pointers from to avoid having to - search around for a place. - (finish_base_struct): Likewise. - (finish_struct_1): Likewise. Never create totally new vtables - with totally new vtable pointers for rtti. Disable code to layout - vtable pointers better until we want to break binary - compatibility. - * rtti.c (build_headof_sub): New routine to convert down to a - sub-object that has an rtti pointer in the vtable. - (build_headof): Use it. Also, use build_vtbl_ref now to be more - maintainable. - (build_dynamic_cast): Make sure we have saved it, if we need to. - * search.c (dfs_init_vbase_pointers): Disable code that deals with - a more efficient vtable layout, enable later. - * call.c (flag_assume_nonnull_objects): Moved declaration to - * cp-tree.h: here. Declare build_vtbl_ref. - * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in - function calls that want a tree. - -Tue Apr 9 12:10:26 1996 Jason Merrill - - * rtti.c (build_dynamic_cast): Handle downcasting to X* given - other X subobjects in the most derived type. Ack. - - * rtti.c (build_dynamic_cast): No need to strip cv-quals here, - get_typeid will do it for us. - (get_typeid_1): Break out call-building for expand_*_desc to use. - (get_typeid): Call it. - (expand_*_desc): Likewise. - * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char * - and void *. - (init_decl_processing): Lose builtin_type_tdescs lossage. - * decl2.c (finish_vtable_vardecl): Remove obsolete code. - -Mon Apr 8 17:23:23 1996 Bob Manson - - * pt.c (tsubst): When calling set_nested_typename, use - TYPE_NESTED_NAME (current_class_type) instead of - current_class_name. - - * decl.c (pushdecl): Likewise. - (pushdecl_class_level): Likewise. - (grokdeclarator): Use NULL_TREE instead of 0 in the call to - set_nested_typename. - -Sun Apr 7 10:44:31 1996 Jason Merrill - - * rtti.c (synthesize_tinfo_fn): Handle arrays. - - * cp-tree.h (DECL_REALLY_EXTERN): New macro. - -Sat Apr 6 13:56:27 1996 Jason Merrill - - * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast. - (init_rtti_processing): Lose bad_cast_type. - (build_dynamic_cast): Use throw_bad_cast. - - * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs. - - * decl2.c (finish_file): Don't synthesize artificial functions - that are external and not inline. - - * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl. - - * decl2.c (finish_file): Handle having new inlines added to - saved_inlines by synthesis. - - * rtti.c (get_bad_cast_node): Don't require . - -Fri Apr 5 17:02:09 1996 Jason Merrill - - RTTI rewrite to initialize nodes as needed, not require that - users #include , complete functionality and reduce wasted - space. - * rtti.c (init_rtti_processing): New fn. - (build_typeid): The vtable entry is now a function. - (get_tinfo_var): New fn. - (get_tinfo_fn): Likewise. - (get_typeid): Use it. - (build_dynamic_cast): Declare and use entry point __dynamic_cast. - (build_*_desc): Rename to expand_*_desc and rewrite to use entry - points __rtti_*. - (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose. - (synthesize_tinfo_fn): New fn. - * method.c (build_t_desc_overload): Lose. - (build_overload_with_type): More generic. - * decl.c (init_decl_processing): Call init_rtti_processing. - * class.c (set_rtti_entry): Use get_tinfo_fn. - * decl2.c (mark_vtable_entries): Mark the rtti function. - (finish_prevtable_vardecl): Don't build_t_desc. - (import_export_decl): Handle tinfo functions. - (finish_file): Likewise. - * typeck.c (inline_conversion): New fn. - (build_function_call_real): Use it. - * cp-tree.h: Add decls. - - * method.c (hack_identifier): Also convert component_refs from - references. - - * lex.c (cons_up_default_function): Use the type, not the name, in - declspecs. - - * decl2.c (import_export_vtable): Fix weak vtables. - -Fri Apr 5 13:30:17 1996 Bob Manson - - * search.c (get_base_distance_recursive): Fix access checks for - protected bases. - -Fri Apr 5 11:02:06 1996 Brendan Kehoe - - * call.c (unary_complex_lvalue): Delete unneeded decl, it's in - cp-tree.h. - (convert_harshness): Add prototypes wrapped by PROTO. - * decl2.c (grok_function_init): Likewise. - (do_toplevel_using_decl): Change to void return type. - * class.c (build_vtable_entry): Remove decl of make_thunk. - (merge_overrides): Fix order of arg definitions. - (finish_vtbls): Likewise. - (fixup_vtable_deltas): Likewise. - (modify_all_direct_vtables): Likewise. - (modify_all_indirect_vtables): Likewise. - * search.c (get_base_distance_recursive): Likewise. - (get_abstract_virtuals_1): Likewise. - (fixup_virtual_upcast_offsets): Likewise. - (lookup_fnfields_1): Add prototypes wrapped by PROTO. - * init.c (perform_member_init): Fix order of arg definitions. - (expand_aggr_init_1): Add prototypes wrapped by PROTO. - * cp-tree.h (make_thunk): Add decl. - (overload_template_name, push_template_decl): Add decls. - (do_toplevel_using_decl): Change to void return type. - (vec_binfo_member): Add decl. - -Thu Apr 4 13:33:10 1996 Brendan Kehoe - - * typeck.c (mark_addressable, convert_for_assignment, - convert_for_initialization, pointer_int_sum, pointer_diff, - unary_complex_lvalue): Add prototypes wrapped by PROTO. - (convert_sequence): #if 0 fn decl, since definition also is. - -Thu Apr 4 11:00:53 1996 Mike Stump - - * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on - cast to pointer types for type searching. - -Wed Apr 3 17:10:57 1996 Brendan Kehoe - - * typeck.c (get_delta_difference): Use cp_error, not error, in the - case where BINFO == 0. - -Wed Apr 3 12:01:02 1996 Mike Stump - - * call.c (build_method_call): Fix wording of error messages so - constructors come out right. - -Tue Apr 2 16:06:59 1996 Bob Manson - - * decl.c (push_overloaded_decl): Don't warn about hidden - constructors when both the type and the function are declared - in a system header file. - -Mon Apr 1 09:03:13 1996 Bob Manson - - * class.c (finish_struct_1): Propagate the TYPE_PACKED - flag for the type to the type's fields. - -Sat Mar 30 12:14:33 1996 Brendan Kehoe - - * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning. - -Fri Mar 29 15:51:36 1996 Bob Manson - - * class.c (base_info, finish_base_struct): Replace - needs_virtual_dtor with base_has_virtual. - - (finish_struct_1): Remove the old code that tried to make default - destructors virtual. Use base_has_virtual when checking if we need - to add a vtable entry for the rtti code. - -Fri Mar 29 14:02:36 1996 Jason Merrill - - * pt.c (push_template_decl): Complain about template decl with - inappropriate declaration. - -Fri Mar 29 12:15:35 1996 Bob Manson - - * typeck.c (build_x_unary_op): Remove bogus check for taking - the address of a member function. - -Fri Mar 29 11:56:02 1996 Jason Merrill - - * parse.y (constructor_declarator): Only push the class if - we are not already in the class. - -Fri Mar 29 09:41:02 1996 Jeffrey A. Law - - * method.c (emit_thunk): Remove current_call_is_indirect nonsense. - Add additional argument to INIT_CUMULATIVE_ARGS. - -Thu Mar 28 16:41:39 1996 Jason Merrill - - * decl.c (shadow_tag): Fix error about anon union with methods. - - * parse.y (self_reference): Only generate a self-reference if this - is a non-template class. - (opt.component_decl_list): Only use it if it was generated. - - * parse.y (component_decl_1): Use constructor_declarator. - (fn.def2): Likewise. - (notype_component_declarator0): Likewise. - -Thu Mar 28 15:11:35 1996 Bob Manson - - * typeck.c (build_x_unary_op): Add checks for taking the address - of a TARGET_EXPR or of a member function, and give appropriate - warnings. - -Thu Mar 28 14:49:26 1996 Jason Merrill - - * pt.c (process_template_parm): Allow template type parms to be - used as types for template const parms. - -Wed Mar 27 15:51:19 1996 Mike Stump - - * init.c (expand_vec_init): Ensure the eh cleanups are on the - function_obstack. - -Wed Mar 27 10:14:30 1996 Jason Merrill - - * decl.c (lookup_name_real): Be even more picky about the - ambiguous lookup warning. - (grokdeclarator): Tweak SCOPE_REF constructor declarators here. - * parse.y (constructor_declarator): Rather than here. - - * parse.y (constructor_declarator): New nonterminal. - (fn.def1): Use it. - (explicit_instantiation): Likewise. - -Tue Mar 26 13:41:33 1996 Jason Merrill - - Add implicit declaration of class name at class scope. - * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup. - * parse.y (self_reference): New nonterminal. - (opt.component_decl_list): Use it. - (fn.def1): Add nested_name_specifier type_name cases. - * class.c (build_self_reference): New function. - (finish_struct): Handle access_default later, move self-reference - decl to the end. - * pt.c (lookup_template_class): Handle getting a TYPE_DECL. - * cp-tree.h: Adjust. - - * pt.c (do_function_instantiation): Separate handling of member - functions and non-member functions properly. - -Mon Mar 25 14:23:22 1996 Jason Merrill - - * pt.c (process_template_parm): Improve error for 'volatile class K'. - - * class.c (finish_struct_1): Check the right slot for destructors. - - * decl.c (start_enum): Complain about enum templates. - -Mon Mar 25 13:25:31 1996 Mike Stump - - * init.c (resolve_offset_ref): Offset pointers to member data by one. - * typeck.c (unary_complex_lvalue): Likewise. - -Mon Mar 25 13:30:42 1996 Bob Manson - - * typeck.c (c_expand_return): Check for a returned local - array name, similar to the check for an ADDR_EXPR. - -Mon Mar 25 13:07:19 1996 Jason Merrill - - * decl.c (cp_finish_decl): Don't build cleanups for static - variables here. - -Fri Mar 22 17:57:55 1996 Mike Stump - - * typeck.c (build_modify_expr): Fix error messages to be more - accurate. - * cp-tree.h (assop_as_string): Parallel to op_as_string, but for - assignment operators. - * error.c (assop_as_string): Likewise. Add support for `%Q' for - assignment operators. - -Fri Mar 22 13:48:29 1996 Jason Merrill - - * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also - give an error if initialized. pedwarn about nested type with the - same name as its enclosing class. - - * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT. - - * typeck.c (require_complete_type): Be sure to instantiate the - MAIN_VARIANT of the type. - - * decl2.c (finish_file): Instantiate pending templates before - processing static constructors and destructors. - - * pt.c (instantiate_decl): Don't instantiate functions at toplevel - unless at_eof. - -Fri Mar 22 09:30:17 1996 Bob Manson - - * decl2.c (delete_sanity): If error_mark_node is passed - in as an expression, quit while we're ahead. - - * decl.c (grokdeclarator): Give an error message if `friend' - is combined with any storage class specifiers. - -Wed Mar 20 14:51:55 1996 Jason Merrill - - * parse.y (named_complex_class_head_sans_basetype): Don't crash on - definition of nonexistent nested type. - - * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or - not to say 'typedef'. - -Wed Mar 20 00:11:47 1996 Brendan Kehoe - - * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*. - * search.c (dfs_walk, dfs_init_vbase_pointers, - expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT. - (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init. - -Tue Mar 19 17:56:03 1996 Jason Merrill - - * except.c (build_throw): Support minimal parse. - * pt.c (tsubst_copy): Support THROW_EXPR. - * decl2.c (build_expr_from_tree): Likewise. - - * pt.c (mangle_class_name_for_template): Always allocate - scratch_firstobj. - -Tue Mar 19 16:34:31 1996 Bob Manson - - * cvt.c (cp_convert_to_pointer): Give an appropriate error - when trying to cast from an incomplete type. - -Tue Mar 19 16:00:33 1996 Jason Merrill - - * pt.c (instantiate_class_template): Don't bother setting up - CLASSTYPE_TAGS explicitly, as the nested types will add - themselves. - -Tue Mar 19 15:48:43 1996 Bob Manson - - * decl.c (shadow_tag): Remove old error check for usage of - an enum without a previous declaration. - (xref_tag): Add error message about usage of enums without a - previous declaration. - -Tue Mar 19 09:21:35 1996 Jason Merrill - - * lex.c (do_identifier): Only do name consistency check if we're - parsing. - - * pt.c (push_template_decl): Don't crash if we get a member defn - that doesn't match. - - * decl.c (xref_tag_from_type): New function to do an xref without - always having to figure out code_type_node. - * cp-tree.h: Declare it. - * pt.c (instantiate_class_template): Use it for friend classes. - (lookup_template_class): Use it. - - * typeck2.c (build_functional_cast): Pull out a single parm before - passing it to build_c_cast. - -Tue Mar 19 09:07:15 1996 Bob Manson - - * expr.c (do_case): Give an error message if a pointer is - given as a case value. - -Mon Mar 18 21:57:54 1996 Jason Merrill - - * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of - an overload list. - - * lex.c (cons_up_default_function): Really, now, interface hackery - does not apply to synthesized methods. - -Mon Mar 18 18:20:57 1996 Mike Stump - - * call.c (build_method_call): Ctors and dtors now have special names - with respect to lookups. - * class.c (add_method): Likewise. - (grow_method): Likewise. - (finish_struct_methods): Likewise. - (warn_hidden): Likewise. - (finish_struct_1): Likewise. - * cvt.c (convert_to_reference): Likewise. - (convert_to_aggr): Likewise. - (cp_convert): Likewise. - * decl2.c (check_classfn): Likewise. - * init.c (expand_member_init): Likewise. - (expand_default_init): Likewise. - (expand_aggr_init_1): Likewise. - (build_offset_ref): Likewise. - (build_new): Likewise. - (build_delete): Likewise. - * lex.c (do_inline_function_hair): Likewise. - * search.c (lookup_field_1): Likewise. - (lookup_fnfields_here): Likewise. - (lookup_field): Likewise. - (lookup_fnfields): Likewise. - (get_virtual_destructor): Likewise. - (dfs_debug_mark): Likewise. - (dfs_pushdecls): Likewise. - (dfs_compress_decls): Likewise. - * tree.c (layout_basetypes): Likewise. - * typeck.c (build_component_ref): Likewise. - (build_x_function_call): Likewise. - (build_modify_expr): Likewise. - (convert_for_initialization): Likewise. - (build_functional_cast): Likewise. - * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise. - (CTOR_NAME): New. - (DTOR_NAME): New. - * decl.c (ctor_identifier): New. - (dtor_identifier): New. - (init_decl_processing): Set them. - -Mon Mar 18 18:00:51 1996 Mike Stump - - * typeck.c (build_component_ref): Don't get confused by fields whose - context has no type name, like pointer to member functions. - -Mon Mar 18 13:19:03 1996 Jason Merrill - - * decl.c (grokdeclarator): Handle typedef without declarator. - - * pt.c (tsubst): Handle SCOPE_REF in declarator. - - * parse.y (bad_parm): Catch another case of missing `typename'. - - * lex.c (yyprint): Handle TYPE_DECLs. - - * decl.c (start_function): Don't try to be clever. - - * lex.c: Lose compiler_error_with_decl. - * typeck2.c: Lose error_with_aggr_type. - (incomplete_type_error): Use cp_* instead of old functions. - (readonly_error): Likewise. - * typeck.c (convert_arguments): Likewise. - * search.c (lookup_nested_field): Likewise. - * method.c (make_thunk): Likewise. - * decl.c (grokparms): Likewise. - * cp-tree.h: Update. - - * tree.c (min_tree_cons): Call copy_to_permanent for the purpose - and value. - -Mon Mar 18 11:25:52 1996 Bob Manson - - * method.c (build_opfncall): When deleting a pointer to an - array, build a new pointer to the tree past any ARRAY_TYPE - nodes. - -Mon Mar 18 10:11:46 1996 Brendan Kehoe - - * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE. - -Fri Mar 15 11:03:57 1996 Jason Merrill - - * pt.c (instantiate_decl): Only call import_export_decl if at_eof - and ! DECL_INLINE. - - * decl.c (finish_function): Don't set nested based on - hack_decl_function_context. - * parse.y (function_try_block): Check for nested function. - (pending_inlines): Likewise. - - * decl2.c (build_expr_from_tree): If a unary op already has a - type, just return it. - - * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE. - - * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does. - (finish_file): Check the return value of walk_vtables. - (finish_prevtable_vardecl): Return int. - (finish_vtable_vardecl): Likewise. - (prune_vtable_vardecl): Likewise. - * lex.c (set_vardecl_interface_info): Likewise. - * cp-tree.h: Adjust return types. - - * class.c (delete_duplicate_fields_1): Don't complain about - duplicate nested types if they're the same type. - (finish_struct): Remove check for duplicate. - * decl2.c (grokfield): Don't check for typedef of anonymous type. - -Thu Mar 14 10:00:19 1996 Jason Merrill - - * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF. - - * decl.c (grokdeclarator): Lose special handling of class-level - typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set - SIGNATURE_HAS_OPAQUE_TYPEDECLS later. - - * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion. - - * pt.c (tsubst_copy): Strip cv-quals from destructor name types. - - * search.c (compute_access): Fix handling of anonymous union - members. - * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED} - from anonymous unions to their members. - - * typeck.c (build_x_function_call): For static member functions, - hand off to build_member_call. - -Wed Mar 13 14:03:34 1996 Jason Merrill - - * typeck.c (build_component_ref): Handle OFFSET_REFs. - - * init.c (expand_vec_init): Fix init == 0 case. - -Tue Mar 12 14:36:02 1996 Jason Merrill - - * init.c (build_new): pedwarn about init and array new. - (expand_vec_init): Handle lists, use convert_for_initialization. - - * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION - when converting to an aggregate type. - * cvt.c (cp_convert): Pass it through. - - * typeck.c (build_conditional_expr): Handle user-defined - conversions to slightly different types. - - * decl.c (grokdeclarator): Force an array type in a parm to be - permanent. - - * decl2.c (do_using_directive): Sorry. - (do_namespace_alias): Likewise. - * lex.c (real_yylex): Warn about using the `namespace' keyword. - -Sun Mar 10 22:26:09 1996 Jason Merrill - - * parse.y (datadef): Move call to note_list_got_semicolon up. - -Fri Mar 8 11:47:26 1996 Mike Stump - - * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs. - -Fri Mar 8 11:29:06 1996 Mike Stump - - * decl.c (cp_finish_decl): The exception regions have to be - nested, not overlapping. We start the exception region for a - decl, after it has been fully built, and all temporaries for it - have been cleaned up. - -Thu Mar 7 17:46:06 1996 Mike Stump - - * tree.c (vec_binfo_member): Don't core dump if we have no bases. - -Thu Mar 7 14:11:49 1996 Jason Merrill - - * tree.def: Add RETURN_INIT. - * pt.c (instantiate_decl): Handle RETURN_INIT. - * decl.c (store_return_init): Handle minimal_parse_mode. - - * tree.c (cp_build_type_variant): Just return an error_mark_node. - * decl.c (make_typename_type): Don't try to get the file and line - of an identifier. - * typeck.c (comptypes): Handle TYPENAME_TYPE. - -Wed Mar 6 18:47:50 1996 Per Bothner - - * decl.c (poplevel): Make sure we clear out and restore old local - non-VAR_DECL values by default when they go out of scope. - -Wed Mar 6 09:57:36 1996 Jason Merrill - - * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in - referring to addresses of variables and functions. - - * error.c (dump_expr): Support SIZEOF_EXPR. - - * init.c (do_friend): Use the return value of check_classfn. - - * typeck.c (convert_arguments): Call complete_type. - - * method.c (hack_identifier): After giving an error, set value to - error_mark_node. - -Tue Mar 5 16:00:15 1996 Jason Merrill - - * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT - lossage for local classes. - * cp-tree.h: Declare it. - * decl.c (lookup_name_real): Evil, painful hack for local classes. - (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here. - Use hack_decl_function_context. - (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here. - (start_function): Use hack_decl_function_context. - (finish_function): Likewise. - * method.c (synthesize_method): Likewise. - * lex.c (process_next_inline): Likewise. - (do_pending_inlines): Likewise. - * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're - done with it. - -Mon Mar 4 22:38:39 1996 Gerald Baumgartner - - * sig.c (build_signature_pointer_or_reference_type): Align - signature pointers/references on 8-byte boundaries so they can be - grabbed 2 words at a time on a SPARC. - -Tue Mar 5 10:21:01 1996 Jason Merrill - - * method.c (hack_identifier): Requiring a static chain is now a - hard error. - * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested - functions. - -Mon Mar 4 20:03:33 1996 Jason Merrill - - * init.c (build_offset_ref): Call complete_type. - - * decl.c (pop_from_top_level): Always pop previous_class_type. - - * parse.y: Handle multiple decls in a for-init-statement. - * pt.c (tsubst_expr): Likewise. - - * pt.c (tsubst): Use tsubst_expr for the second operand of an - ARRAY_REF. - - * decl.c (maybe_push_to_top_level): Don't save previous_class_type. - (poplevel_class): Set it here. - (pop_from_top_level): Pop it here if we're returning to class scope. - * class.c (pushclass): Don't set it here. - - * decl.c (maybe_push_to_top_level): Save current_template_parms, - and clear it if !pseudo. - (pop_from_top_level): Restore it. - - * decl2.c (finish_file): Push the dummy each time we walk the list - of vtables. - - * error.c (dump_expr): Support LOOKUP_EXPR and actually do - something for CAST_EXPR. - -Mon Feb 19 14:49:18 1996 Rusty Russell - - * cvt.c (cp_convert): Warn about implicit conversion of the - address of a function to bool, as it is always true. - -Fri Feb 23 23:06:01 1996 Rusty Russell - - * typeck.c (c_expand_return): Fix warning for local externs returned. - -Mon Mar 4 15:03:11 1996 Jason Merrill - - * tree.c (mapcar): Propagate const and volatile properly. - - * typeck.c (complete_type): Be sure to instantiate the - MAIN_VARIANT of the type. - - * method.c (synthesize_method): Class interface hackery does not - apply to synthesized methods. - -Mon Mar 4 14:05:23 1996 Jason Merrill - - * pt.c (comp_template_args): Use comptypes rather than just - checking for TEMPLATE_TYPE_PARM equivalence. - - * typeck.c (build_x_function_call): Call complete_type before - checking TYPE_OVERLOADS_CALL_EXPR. - -Mon Mar 4 18:48:30 1996 Manfred Hollstein - - * g++.c (main): Check also for new define ALT_LIBM. - -Fri Mar 1 13:09:33 1996 Jason Merrill - - * pt.c (instantiate_class_template): If we don't have a pattern - yet, that's OK. - (coerce_template_parms): If we see a local class, bail. - - * decl.c (grok_reference_init): Make sure there's a type before - checking its code. - - * pt.c (do_function_instantiation): Avoid crashing on invalid decls. - (push_template_decl): Likewise. - - * parse.y (named_class_head): Set - CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes. - - * decl.c (xref_tag): Diagnose redeclaration of template - type-parameter name. - - * error.c (dump_type): Handle anonymous template type parms. - - * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of - TYPE_STUB_DECL. - (coerce_template_parms): Likewise. - -Thu Feb 29 16:26:01 1996 Mike Stump - - * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF, - case ADDR_EXPR): Don't modify rhs if a subinstantiation fails. - -Thu Feb 29 08:20:25 1996 Jason Merrill - - * pt.c (instantiate_template): Take the MAIN_VARIANT of the type - before trying to get its STUB_DECL. - (coerce_template_parms): Likewise. - - * parse.y (template_type_parm): If they didn't use 'class', - pretend they did after giving an error. - - * pt.c (coerce_template_parms): Diagnose use of local class. - - * decl.c (grok_reference_init): Use instantiate_type. - - * error.c (dump_expr): Handle TEMPLATE_DECLs. - - * parse.y (named_class_head): Diagnose mismatching types and tags. - - * decl.c (pushdecl): Type decls and class templates clash with - artificial type decls, not hide them. - - * decl.c (redeclaration_error_message): Diagnose redefinition of - templates properly. - (duplicate_decls): Diagnose disallowed overloads for template - functions, too. - - * decl.c (start_decl): Call complete_type before checking for a - destructor. - - * pt.c (tsubst): Use tsubst_expr on the elts of a VEC. - - * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match. - -Wed Feb 28 09:28:44 1996 Jason Merrill - - * decl.c (grok_op_properties): Don't check for operator++(int) in - a template. - - * tree.c (perm_manip): Return a copy of variable and function - decls with external linkage. - - * tree.def: Change some of the min tree codes to type "1". - * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs. - * method.c (build_overload_int): Emit something arbitrary for - anything but an INTEGER_CST if we're in a template. - - * decl.c (cp_finish_decl): Call complete_type before deciding - whether or not to lay out the decl. - - * lex.c (do_identifier): Check for DECL_INITIAL before using it. - -Tue Feb 27 16:35:32 1996 Jason Merrill - - * typeck2.c (build_x_arrow): Call complete_type. - - * pt.c (add_pending_template): Broken out. - (lookup_template_class): If -fexternal-templates, call it for all - the methods of implemented types. - (instantiate_class_template): Instead of instantiating them here. - (instantiate_decl): Handle -fexternal-templates earlier. - -Tue Feb 27 15:51:32 1996 Brendan Kehoe - - * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the - memoized lookup stuff inside GATHER_STATISTICS. - -Tue Feb 27 10:38:08 1996 Jason Merrill - - * decl.c (start_decl): Complain about array of incomplete type - here. - (grokdeclarator): Not here. - - * parse.y (template_parm): Expand full_parm inline so we can set - the rule's precedence. - - * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy. - (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs. - * decl2.c (grokbitfield): Don't check for integer constant here. - * class.c (finish_struct_1): Check here. - - * decl.c (define_label): Make the min decl go on permanent_obstack. - - * pt.c (unify): Don't handle CONST_DECLs. - (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL. - (tsubst_copy): Likewise. - - * lex.c (do_identifier): Do pull the DECL_INITIAL out of a - CONST_DECL for a template parm. - -Mon Feb 26 12:48:18 1996 Jason Merrill - - * decl.c (grokdeclarator): Complain about array of incomplete type - here. - (start_decl_1): Not here. - - * pt.c (tsubst): Handle pointer-to-function declarators. - - * method.c (hack_identifier): If pedantic, diagnose local class - methods that require a static chain. - - * decl.c (grok_op_properties): No longer static. - * cp-tree.h: Declare it. - * pt.c (tsubst): Call it for operators. - Use tsubst_copy for TREE_VECs. - - * parse.y (template_arg): The expr has precedence like '>'. - -Fri Feb 23 14:51:52 1996 Jason Merrill - - * pt.c (coerce_template_parms): Don't coerce an expression using - template parms. - (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs. - (tsubst): Don't use build_index_2_type if the max_value uses template - parms. - * method.c (build_overload_int): Emit something arbitrary for an - expression using template parms. - - * parse.y (template_close_bracket): New non-terminal to catch use - of '>>' instead of '> >' in template class names. - (template_type): Use it. - * Makefile.in (CONFLICTS): Causes one more r/r conflict. - - * tree.def: Add CAST_EXPR. - * typeck2.c (build_functional_cast): Use CAST_EXPR instead of - CONVERT_EXPR for minimal_parse_mode. - * typeck.c (build_c_cast): Likewise. - * pt.c (tsubst_copy): Likewise. - * decl2.c (build_expr_from_tree): Likewise. - * error.c (dump_expr): Likewise. - -Fri Feb 23 10:36:46 1996 Brendan Kehoe - - * except.c (SetTerminate, SetUnexpected): Put back global vars. - (init_exception_processing): Put back decl/init of - set_unexpected_fndecl and set_terminate_fndecl, needed to get the - fns from libstdc++. - - * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield. - (declare_uninstantiated_type_level, uninstantiated_type_level_p): - Delete unused fns. - * cp-tree.h (declare_uninstantiated_type_level, - uninstantiated_type_level_p): Delete prototypes. - -Thu Feb 22 19:36:15 1996 Jason Merrill - - * pt.c (tsubst_expr): Add default return. - -Thu Feb 22 16:47:24 1996 Brendan Kehoe - - * error.c (fndecl_as_string): Delete unused arg CNAME. - * sig.c (build_signature_table_constructor, - build_signature_method_call): Fix calls. - - * class.c (the_null_vtable_entry): Delete var definition. - (init_class_processing): Delete tree the_null_vtable_entry init. - * decl.c (no_print_{functions, builtins}): Declare as static. - (__tp_desc_type_node): #if 0 var definition. - (init_type_desc): #if 0 init of __tp_desc_type_node. - (vb_off_identifier): Move var decl into init_decl_processing. - (current_function_assigns_this): Declare as static. - (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls. - (init_decl_processing): Delete init of void_ftype_ptr_ptr_int. - Move decls of string_ftype_ptr_ptr and int_ftype_string_string here. - * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE. - * init.c (BI_header_type, BI_header_size): Declare as static. - * pt.c (template_classes): Delete unused var. - (add_pending_template): Delete decl for non-existent fn. - (lookup_template_class): Delete vars CODE and TAG_CODE. - (instantiate_template): Delete unused var TARGS. - * cp-tree.h (vb_off_identifier, current_function_assigns_this): - Delete decls. - (__tp_desc_type_node): #if 0 var decl. - (fndecl_as_string): Fix prototype. - -Thu Feb 22 15:56:19 1996 Jason Merrill - - * tree.def: Add GOTO_STMT. - * pt.c (tsubst_expr): Support goto and labels. - * decl.c (define_label): Support minimal parsing. - * parse.y (simple_stmt): Likewise. - -Thu Feb 22 15:30:12 1996 Brendan Kehoe - - * xref.c (GNU_xref_member): Only define/set var I if - XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually - used. - (GNU_xref_end_scope): Delete unused fifth arg TRNS. - (GNU_xref_end): Fix call. - * decl.c (poplevel, poplevel_class, finish_method): Fix calls. - * cp-tree.h (GNU_xref_end_scope): Fix prototype. - - * tree.c (build_exception_variant): Delete unused vars I, A, T, - T2, and CNAME. - (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE. - (mapcar): Delete unused var CODE. - (build_cplus_new): Delete unused arg WITH_CLEANUP_P. - (break_out_cleanups): Fix call. - (bot_manip): Likewise. - * call.c (build_method_call): Likewise. - * cvt.c (build_up_reference, convert_to_reference, cp_convert): - Likewise. - * typeck.c (unary_complex_lvalue, build_modify_expr, - convert_for_initialization): Likewise. - * typeck2.c (build_functional_cast): Likewise. - * cp-tree.h (build_cplus_new): Fix prototype. - - * repo.c (open_repo_file): Delete unused var Q. - (repo_compile_flags, repo_template_declared, - repo_template_defined, repo_class_defined, repo_inline_used, - repo_vtable_used, repo_tinfo_used): #if 0 unused fns. - (repo_get_id, repo_vtable_used): Declare as static. - * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add - prototypes. - -Thu Feb 22 14:53:35 1996 Jason Merrill - - * parse.y (pending_inlines): Add function_try_block case. - - * pt.c (unify): Fix for template const parms. - -Thu Feb 22 13:24:15 1996 Brendan Kehoe - - * lex.c (extract_interface_info): Delete forward decl. - (default_copy_constructor_body, default_assign_ref_body): Delete - decls for non-existent functions. - (synth_firstobj, inline_text_firstobjs): Delete unused vars. - (init_lex): Delete setting them. - (cons_up_default_function): Delete unused vars FUNC_BUF, - FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old - #if 0'd synth code. - (toplevel, expression_obstack): Delete unused extern decls. - (tree_node_kind): Delete unused enum. - (tree_node_counts, tree_node_sizes): Wrap with #ifdef - GATHER_STATISTICS. - (tree_node_kind_names): Delete unused extern decl. - (synth_obstack): Delete unused var. - (init_lex): Don't set it. - (init_parse): Add decl before use. - (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH. - (current_unit_{name, language}): Delete unused vars. - (check_newline): Don't bother setting them, just accept the #pragma. - * cp-tree.h (init_repo, peek_yylex): Add prototypes. - (current_unit_{name, language}): Delete decls. - - * search.c: Wrap all of the memoized functions, macros, and - variables inside #ifdef GATHER_STATISTICS. - (lookup_field, lookup_fnfields): Likewise. - (init_search_processing): Likewise. - (reinit_search_statistics): Wrap whole function. - * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics. - - * decl.c (finish_function): Only call pop_memoized_context if - GATHER_STATISTICS is defined. - (start_function): Likewise for push_memoized_context. - * class.c (pushclass, popclass): Likewise. - - * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here... - * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here. - - * cvt.c (cp_convert): Delete unused local var FORM. - * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add - prototypes. - -Thu Feb 22 13:19:44 1996 Jason Merrill - - * pt.c (do_poplevel): Oops; really return what we get from - poplevel this time. - -Thu Feb 22 11:41:44 1996 Brendan Kehoe - - * cp-tree.h (is_aggr_type): Add prototype. - - * cp-tree.h ({push,pop}_cp_function_context): Add decls. - * method.c ({push,pop}_cp_function_context): Delete decls. - * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void. - (SetUnexpected, SetTerminate): Delete unused vars. - (init_exception_processing): Don't set SetUnexpected or - SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL. - (output_exception_table_entry): Delete unused array LABEL. - (expand_internal_throw): Delete unused var PARAMS. - (expand_start_catch_block): Delete unused var CLEANUP. - (emit_exception_table): Delete unused var EH_NODE_DECL. - (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and - GOTO_UNWIND_AND_THROW. Don't set them. - (end_eh_unwinder): Add top decl. - (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK. - (exception_section, push_rtl_perm, do_function_call, - lang_interim_eh, push_eh_cleanup, eh_outer_context, - expand_end_eh_spec, end_eh_unwinder): Declare as static. - (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup, - throw_used): Likewise. - * cp-tree.h (expand_end_eh_spec): Delete prototype. - - * search.c (dfs_mark, dfs_mark_vtable_path, - dfs_unmark_vtable_path, dfs_mark_new_vtable, - dfs_unmark_new_vtable, dfs_clear_search_slot, - dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp, - bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp, - bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused - functions. - (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1, - n_calls_lookup_fnfields, n_calls_lookup_fnfields_1, - n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved): - Only define #ifdef GATHER_STATISTICS. - (reinit_search_statistics): Only init some vars if GATHER_STATISTICS - is defined. - (vbase_decl): Delete var definition. - (init_search): Delete old decl. - (init_vbase_pointers): Delete building of VBASE_DECL, since it's - never actually used. - (expand_indirect_vtbls_init): Delete init of VBASE_DECL. - (get_base_distance_recursive): Delete unused fourth arg - BASETYPE_PATH. Fix call . - (get_base_distance): Fix call. - (push_class_decls): Delete unused var ID. - (make_memoized_table_entry): Declare as static. - (breadth_first_search): Declare as static. - (tree_has_any_destructor_p): Declare as static. - (pop_class_decls): Delete unused arg pop_class_decls. - * class.c (popclass): Fix call to pop_class_decls. - * cp-tree.h (make_memoized_table_entry, breadth_first_search, - tree_has_any_destructor_p): Delete prototypes. - - * rtti.c (build_ptmf_desc): Delete unused arg TYPE. - (build_t_desc): Fix call. Delete unused vars ELEMS and TT. - (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL. - (build_user_desc): Delete unused var T. - (build_class_desc): Delete unused vars T and OFF. - (build_t_desc): Delete unused var NAME_STRING. - (build_headof): Make static. - (get_bad_cast_node): Likewise. - (get_def_to_follow): Likewise. - * cp-tree.h (init_type_desc): Add prototype. - (build_headof): Remove prototype. - -Thu Feb 22 00:54:22 1996 Jason Merrill - - * pt.c (tsubst): Only look for matching decls at file scope for - non-member functions. - - * call.c (build_scoped_method_call): Handle scoped destructor - calls in templates. - - * decl.c (*_top_level): Also save previous_class_values. - - * pt.c (tsubst_expr): Support do {} while loops. - * parse.y (simple_stmt): Likewise. - * tree.def: Likewise. - - * method.c (build_overload_identifier): For a class nested in a - template class, don't mangle in the template parms from our - context. - - * lex.c, cp-tree.h: Remove support for template instantiations in - the pending_inlines code. - * pt.c: Remove dead functions and unused arguments. - (uses_template_parms): TYPENAME_TYPEs always use template parms. - * parse.y: Stop passing anything to end_template_decl. - * tree.c (print_lang_statistics): Only print tinst info #ifdef - GATHER_STATISTICS. - -Wed Feb 21 16:57:33 1996 Brendan Kehoe - - * init.c (expand_recursive_init{,_1}): Delete decls. - (sort_member_init): Delete unused var INIT. - (emit_base_init): Delete unused var X. - (build_offset_ref): Delete unused var CNAME. - (sort_member_init): Delete unused var FIELDS_TO_UNMARK. - (emit_base_init): Delete unused local var BASE. Delete extern - decl of IN_CHARGE_IDENTIFIER. - (build_delete): Delete unused local var VIRTUAL_SIZE. - - * init.c (build_vec_delete): Delete unused third arg ELT_SIZE. - (build_delete): Fix call. - * decl2.c (delete_sanity): Likewise. - * cp-tree.h (build_vec_delete): Update prototype. - - * typeck.c (common_base_type): Delete unused var TMP. - (build_binary_op): Delete local var ARGS_SAVE. - (build_array_ref): Delete unused var ITYPE. - (c_expand_return): Delete unused var USE_TEMP. - - * typeck.c (compexcepttypes): Delete unused arg STRICT. - (comptypes): Fix calls. - * decl.c (duplicate_decls): Likewise. - * cp-tree.h (compexcepttypes): Delete extra arg. - - * decl2.c (check_classfn): Delete unused second arg CNAME. - * decl.c (start_decl, grokfndecl): Fix calls. - * init.c (do_friend): Likewise. - * cp-tree.h (check_classfn): Update prototype. - - * cp-tree.h (signature_error, import_export_vtable, - append_signature_fields, id_in_current_class, mark_used, - copy_assignment_arg_p): Add decls. - * decl2.c (mark_used): Delete decl. - - * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS. - - * class.c (get_vtable_entry): Disable unused function. - (doing_hard_virtuals): Delete unused static global var. - (finish_struct_1): Don't init DOING_HARD_VIRTUALS. - (prepare_fresh_vtable): Delete unused vars PATH and RESULT. - (overrides): Delete unused vars RETTYPE and BASE_RETTYPE. - (modify_one_vtable): Delete unused var OLD_RTTI. - (finish_struct_anon): Delete unused vars OFFSET and X. - (finish_struct_bits): Delete unused var METHOD_VEC. - (get_basefndecls): Delete unused var PURPOSE. Delete unused - for-scope local variable METHODS. - - * call.c (user_harshness): Delete unused/unneeded arg PARM. - (ideal_candidate): Delete unused args BASETYPE and PARMS. - (build_method_call): Delete unused args passed into ideal_candidate. - (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME. - * cp-tree.h (synthesize_method): Add decl. - - * decl.c (note_level_for_for): Give void return type. - (pushdecl_nonclass_level): Likewise. - (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS. - (poplevel): Delete unused var IMPLICIT_TRY_BLOCK. - (suspend_binding_level): Delete unused var LEVEL. - (duplicate_decls): Delete unused var CTYPE. - (duplicate_decls): Delete unused var PREVIOUS_C_DECL. - (init_decl_processing): Delete unused vars FLOAT_ENDLINK and - PTR_ENDLINK. - (grokdeclarator): Delete unused var C. - (grokdeclarator): Delete unused var SIZE_VARIES. - (grokparms): Delete unused var SAW_VOID. - (start_function): Delete unused var OLDDECL. - (cplus_expand_expr_stmt): Delete unused var - REMOVE_IMPLICIT_IMMEDIATELY. - - * cp-tree.h (pushdecl_nonclass_level): Fix prototype. - - * Makefile.in (CONFLICTS): Update to 12 shift/reduce. - -Wed Feb 21 00:06:17 1996 Jason Merrill - - * tree.c (build_min): Set TREE_COMPLEXITY to lineno. - (build_min_nt): Likewise. - * pt.c (do_pushlevel): Emit line note. - (do_poplevel): Return what we get from poplevel. - (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes. - * parse.y: Use do_pushlevel and do_poplevel. - * cp-tree.h: Declare do_poplevel. - - * cp-tree.h: Declare at_eof. - * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation. - * decl2.c (import_export_decl): Renamed from import_export_inline. - (finish_file): Call it to do interface handling for statics. - * pt.c (tsubst_copy): Call mark_used on variables and functions - used here. - - * decl2.c (finish_file): Don't emit statics we can't generate. - * pt.c (instantiate_decl): Don't set interface on instantiations - we can't generate. - - * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'. - * tree.c (print_lang_statistics): Print max template depth. - * pt.c (push_tinst_level): Dump entire instantiation context. - (instantiate_class_template): Use it and pop_tinst_level. - (instantiate_decl): Likewise. - - * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c - pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE. - -Tue Feb 20 18:21:51 1996 Jason Merrill - - * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c - init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c - tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for - the new template implementation. - -Tue Feb 20 17:14:29 1996 Brendan Kehoe - - * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS. - -Thu Feb 15 18:44:42 1996 Mike Stump - - * decl.c (cp_finish_decl): Delay emitting the debug information for - a typedef that has been installed as the canonical typedef, if the - type has not yet been defined. - -Thu Feb 15 09:39:08 1996 Jason Merrill - - * decl2.c (grokfield): Still call pop_nested_class for access decls. - -Wed Feb 14 17:30:04 1996 Brendan Kehoe - - * decl.c (lookup_label): Call label_rtx. - - * decl.c (make_binding_level): New function. - (pushlevel, pushlevel_class): Call it instead of explicit - duplicate calls to xmalloc. - - * decl.c (init_decl_processing): Delete useless build_pointer_type - call. - - * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions. - (sizet_ftype_string): Delete variable. - (init_decl_processing): Add built-in functions fabsf, fabsl, - sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local - variable strlen_ftype, used for strlen. - -Wed Feb 14 16:21:25 1996 Jason Merrill - - * decl.c (push_to_top_level): Start from current_binding_level - again for now; the stl hacks depend on g++ being broken in this - way, and it'll be fixed in the template rewrite. - - * tree.def: Add USING_DECL. - * decl2.c (do_class_using_decl): Implement. - (grokfield): Pass access decls off to do_class_using_decl instead of - grokdeclarator. - * error.c (dump_decl): Handle USING_DECLs. - * decl.c (grokdeclarator): Remove code for handling access decls. - * class.c (finish_struct_1): Adjust accordingly, treat using-decls - as access decls for now. - (finish_struct): Don't check USING_DECLs for other uses of the name. - - * search.c (get_matching_virtual): Use cp_error_at. - -Wed Feb 14 10:36:58 1996 Brendan Kehoe - - * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to - match c-typeck.c. - (self_promoting_args_p): Move the check that TYPE is non-nil - before trying to look at its main variant. - (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes. - - * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS): - Delete macros. - * init.c (xref_friend, embrace_waiting_friends): Delete functions. - (do_friend): Delete call to xref_friend. - * class.c (finish_struct_1): Delete call to embrace_waiting_friends. - - * typeck.c (convert_sequence): #if 0 unused function. - - * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to - be in decl_in_memory_p. - (decl_in_memory_p): Delete decl. - * expr.c (decl_in_memory_p): Delete fn. - * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P. - - * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P. - -Tue Feb 13 12:51:21 1996 Jason Merrill - - * class.c (finish_struct_1): Check for a pure-specifier on a - non-virtual function here. - - * decl2.c (grok_function_init): Don't check whether the function - is virtual here. - (grokfield): Don't call check_for_override here. - - * decl.c (push_to_top_level): Start from inner_binding_level, - check class_shadowed in class levels. - -Mon Feb 12 17:46:59 1996 Mike Stump - - * decl.c (resume_level): Ignore things that don't have names, instead - of core dumping. - -Mon Feb 12 15:47:44 1996 Brendan Kehoe - - * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs. - -Sat Feb 10 17:59:45 1996 Jason Merrill - - * class.c (finish_struct_1): Set DECL_VINDEX properly on a - synthesized dtor. - - * parse.y (complete_type_name): Bind global_scope earlier. - (complex_type_name): Likewise. - (qualified_type_name): Remove. - -Thu Feb 8 15:15:14 1996 Jason Merrill - - * decl.c (grokfndecl): Move code that looks for virtuals in base - classes... - * class.c (check_for_override): ... to a new function. - (finish_struct_1): Call it. - - * cp-tree.h: Declare warn_sign_compare. - - * typeck.c (build_binary_op_nodefault): Check warn_sign_compare - rather than extra_warnings to decide whether to warn about - comparison of signed and unsigned. - - * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall - implies -Wsign-compare. -Wall doesn't imply -W. - -Wed Feb 7 15:27:57 1996 Mike Stump - - * typeck.c (build_component_ref): Fix to handle anon unions in base - classes as well. - -Wed Feb 7 14:29:12 1996 Brendan Kehoe - - * class.c (resolves_to_fixed_type_p): Delete code dealing with - a WITH_CLEANUP_EXPR, since we don't generate them any more. - * cvt.c (build_up_reference): Likewise. - * decl.c (grok_reference_init): Likewise. - (cp_finish_decl): Likewise. - * error.c (dump_expr): Likewise. - * tree.c (real_lvalue_p): Likewise. - (lvalue_p): Likewise. - (build_cplus_new): Likewise. - (unsave_expr_now): Likewise. - * typeck.c (unary_complex_lvalue, build_modify_expr, - c_expand_return): Likewise. - -Tue Feb 6 13:39:22 1996 Brendan Kehoe - - Make the C++ front-end pay attention to attributes for structures. - * class.c (finish_struct): New argument ATTRIBUTES, passed down into - finish_struct_1. - (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes. - Take out old round_up_size use and setting the DECL_ALIGN possibly - using it. Take out setting of TYPE_ALIGN to round_up_size, which - can override what the attribute set. - * cp-tree.h (finish_struct): Update prototype. - * parse.y (template_instantiate_once): Pass a NULL_TREE for the - attributes to finish_struct. - (structsp): For a CLASS decl, add maybe_attribute to rule and pass that - value down into finish_struct. - * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts. - -Tue Feb 6 13:12:15 1996 Per Bothner - - * decl.c (poplevel): Re-word dead for local handling. - (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test. - (cp_finish_decl): If is_for_scope, check for duplicates so - we can disable is_for_scope. Otherwise, preserve_temp_slots. - - * lex.c (do_identifier): Use global binding in preference of - dead for local variable. - -Mon Feb 5 17:46:46 1996 Mike Stump - - * init.c (initializing_context): Handle anon union changes, the - context where fields of anon unions can be initialized now has to be - found by walking up the TYPE_CONTEXT chain. - -Fri Feb 2 14:54:04 1996 Doug Evans - - * decl.c (start_decl): #ifdef out code to set DECL_COMMON - if ASM_OUTPUT{,_ALIGNED}_BSS is defined. - (obscure_complex_init): If bss is supported, always set - DECL_INITIAL to error_mark_node. - -Thu Feb 1 16:19:56 1996 Brendan Kehoe - - * init.c (is_friend): Make sure there's a context before we see if - it's an aggr type. - -Thu Feb 1 15:44:53 1996 Mike Stump - - * init.c (is_friend): Classes are not friendly with nested classes. - -Thu Feb 1 15:27:37 1996 Doug Evans - - * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA, - and record its result. - -Thu Feb 1 09:27:01 1996 Mike Stump - - * class.c (finish_struct_anon): Switch around code to not move anon - union elements around, nor mess up their contexts, nor offsets, - instead we now build up the right number of COMPONENT_REFs for all - the anon unions that may be present at build_component_ref time. - * typeck.c (lookup_anon_field): New routine to handle field lookup - on fields without names. We find them, based upon their unique type - instead. - * typeck.c (build_component_ref): Allow FIELD_DECL components. - Handle finding components in anonymous unions, and ensure that a - COMPONENT_REF is built for each level as necessary. - -Tue Jan 30 18:18:23 1996 Mike Stump - - * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after - code that ensures that copy ctors are used if appropriate. - -Tue Jan 30 17:35:14 1996 Brendan Kehoe - - * init.c (build_vec_delete): Only give an error if base isn't an - error_mark_node. - -Mon Jan 29 17:09:06 1996 Mike Stump - - * spew.c (do_aggr): `new struct S;' isn't a forward declaration. - (yylex): If we see `new', keep slurping. - -Thu Jan 25 18:31:36 1996 Mike Stump - - * class.c (finish_struct_1): Move code for handling anon unions... - (finish_struct_anon): to here. Fixup so that we do the offset - calculations right, and so that the fields are physically moved to - the containers's chain. - -Thu Jan 25 18:27:37 1996 Brendan Kehoe - - * decl.c (grokdeclarator): Avoid trying to get an operand off an - identifier node. - -Wed Jan 24 11:25:30 1996 Jim Wilson - - * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not - POINTER_SIZE to agree with expr.c. - -Thu Jan 25 13:01:23 1996 Mike Stump - - * search.c (lookup_field): Don't report ambiguities if protect is 0, - instead return NULL_TREE. - -Wed Jan 24 13:01:26 1996 Mike Stump - - * class.c (finish_struct_1): Call warn_hidden if we want warnings - about overloaded virtual functions. - (warn_hidden): New routine to warn of virtual functions that are - hidden by other virtual functions, that are not overridden. - (get_basefndecls): New routine, used by warn_hidden. - (mark_overriders): New routine, used by warn_hidden. - * search.c (get_matching_virtual): Remove old warning that just - isn't very useful. - -Tue Jan 23 12:26:10 1996 Brendan Kehoe - - * decl.c (output_builtin_tdesc_entries): #if 0 the function definition. - - * typeck.c (null_ptr_cst_p): Delete unused fn. - (build_function_call_maybe): Delete unused fn. - - * expr.c (extract_init): #if 0 the code after unconditional return 0 - for now. - - Delete old cadillac code. - * edsel.c: Remove file. - * Make-lang.in (CXX_SRCS): Take edsel.c off the list. - * Makefile.in (CXX_OBJS): Delete edsel.o. - (edsel.o): Delete rule. - * cp-tree.h (flag_cadillac): Delete var decl. - * lang-options.h: Delete "-fcadillac" and "-fno-cadillac". - * decl2.c (flag_cadillac): Delete var definition. - (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac. - (grokfield): Delete code depending on flag_cadillac. - (finish_anon_union): Likewise. - * class.c (finish_struct_1): Likewise. - (pushclass): Likewise. - (popclass): Likewise. - (push_lang_context): Likewise. - (pop_lang_context): Likewise. - * decl.c (init_decl_processing): Likewise. - (start_decl): Likewise. - (cp_finish_decl): Likewise. - (xref_tag): Likewise. - (finish_enum): Likewise. - (start_function): Likewise. - (finish_function): Likewise. - (finish_stmt): Likewise. - * lex.c (lang_init): Likewise. - (check_newline): Likewise. - - * lex.c (do_pending_inlines): Delete synthesized method kludge. - - Delete defunct, ancient garbage collection implementation. - * rtti.c: New file with the RTTI stuff from gc.c. - * gc.c: Removed file (moved the remaining stuff into rtti.c). - * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o. - (rtti.o): New rule, replacing gc.o. - * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c. - * cp-tree.h: Delete gc-related fn decls. - (DECL_GC_OFFSET): Delete macro. - (flag_gc): Delete extern decl. - * decl.c (current_function_obstack_index): Delete var decl. - (current_function_obstack_usage): Delete var decl. - (start_function): Delete clearing of current_function_obstack_index - and current_function_obstack_usage. - (init_decl_processing): Delete code relying on -fgc. - Delete call to init_gc_processing. - (cp_finish_decl): Delete calls to build_static_gc_entry and - type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET. - (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup - and to expand_expr of a __gc_main call. - (maybe_gc_cleanup): Delete var decl. - (finish_function): Delete call to expand_gc_prologue_and_epilogue. - * decl2.c (flag_gc): Delete var decl. - (lang_f_options): Delete offering of -fgc. - (lang_decode_option): Delete -fgc and -fno-gc handling. - (get_temp_regvar): Delete gc code. - * init.c (build_new): Delete gc code. - * lex.c (init_lex): Delete checking of flag_gc. - - * typeck.c (convert_arguments): Delete gc code. - (build_component_addr): Delete -fgc warning. - (build_modify_expr): Delete gc code. - - * decl2.c (build_push_scope): Delete fn. - * cp-tree.h (build_push_scope): Delete decl. - - * search.c (clear_search_slots): Delete fn. - * cp-tree.h (clear_search_slots): Delete decl. - - * search.c (tree_needs_constructor_p): Delete fn. - * cp-tree.h (tree_needs_constructor_p): Delete decl. - - * tree.c (id_cmp): Delete fn. - - * tree.c (set_fnaddr_from_vtable_entry): Delete fn. - * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl. - - * tree.c (decl_value_member): Delete fn. - * cp-tree.h (decl_value_member): Delete decl. - - * tree.c (list_hash_lookup_or_cons): Delete fn. - * cp-tree.h (list_hash_lookup_or_cons): Delete decl. - - * method.c (cplus_exception_name): Delete fn. - (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros. - - * spew.c (shift_tokens): Delete fn. - -Mon Jan 22 17:49:33 1996 Jason Merrill - - * except.c (init_exception_processing): Pass 1 to needs_pop in calls - to cp_finish_decl. - * parse.y: Likewise. - -Mon Jan 22 17:34:29 1996 Brendan Kehoe - - * tree.c (build_cplus_staticfn_type): Delete function definition; - never used. - * cp-tree.h (build_cplus_staticfn_type): Delete decl. - - * tree.c (virtual_member): Delete function definition; never used. - * cp-tree.h (virtual_member): Delete decl. - -Fri Jan 19 18:03:14 1996 Mike Stump - - * typeck.c (build_component_ref): Handle getting vbase pointers - out of complex multiple inheritance better. - -Fri Jan 19 16:27:40 1996 Mike Stump - - * typeck.c (build_object_ref): Make sure we use the real type, not - any reference type. - -Fri Jan 19 16:01:47 1996 Mike Stump - - * tree.c (build_exception_variant): Don't create new types if we - don't have to, also build new types on the right obstack. - -Fri Jan 19 14:09:44 1996 Jason Merrill - - * decl.c (store_bindings): Split out from push_to_top_level. - (push_to_top_level): Call it for b->type_shadowed on class binding - levels. - -Fri Jan 19 13:53:14 1996 Mike Stump - - * search.c (expand_upcast_fixups): Fix so that offsets stored in - vbase_offsets are always right. Fixes a problem where virtual base - upcasting and downcasting could be wrong during conversions on this - during virtual function dispatch at ctor/dtor time when dynamic - vtable fixups for deltas are needed. This only sounds easier than - it is. :-) - (fixup_virtual_upcast_offsets): Change to reflect new calling - convention for expand_upcast_fixups. - -Fri Jan 19 12:23:08 1996 Brendan Kehoe - - * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we - check that it's usable as the bitfield width. - -Wed Jan 17 21:22:40 1996 Brendan Kehoe - - * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist. - Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's - only ever used for functions in it. - -Wed Jan 17 12:10:38 1996 Jason Merrill - - * parse.y (qualified_type_name): Use the TYPE_DECL, not the type. - (nested_type): Likewise. - (nested_name_specifier): Use lastiddecl. - - * decl.c (grokdeclarator): Adjust accordingly. - * init.c (expand_member_init): Likewise. - * parse.y (base_class): Likewise. - * typeck2.c (build_functional_cast): Likewise. - - * typeck2.c (build_functional_cast): Fill in name after we've - checked for non-aggr type. - -Wed Jan 17 10:18:01 1996 Mike Stump - - * decl2.c (warn_pointer_arith): Default to on. - -Tue Jan 16 12:45:38 1996 Jason Merrill - - * lex.c (is_rid): New function. - * decl.c (grokdeclarator): Diagnose reserved words used as - declarator-ids. - -Tue Jan 16 11:39:40 1996 Jason Merrill - - * tree.c (get_decl_list): Don't lose cv-quals. - - * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose - typespecs used as declarator-ids. - -Tue Jan 16 11:09:42 1996 Mike Stump - - * decl.c (poplevel): When popping a level, don't give a warning for - any subblocks that already exist. - -Tue Jan 16 00:25:33 1996 Jason Merrill - - * typeck.c (build_object_ref): Finish what I started. - - * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN. - - * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs. - - * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a - scope. - -Mon Jan 15 16:19:32 1996 Jason Merrill - - * decl.c (xref_tag): Handle passing a type in directly. - - * parse.y (qualified_type_name): Pull out the type. - (nested_type): Likewise. - Take types directly instead of as identifiers. - * call.c (build_scoped_method_call): Take types directly instead of - as identifiers. - * decl.c (xref_basetypes): Likewise. - * init.c (expand_member_init): Likewise. - (build_member_call): Likewise. - (build_offset_ref): Likewise. - * typeck2.c (build_scoped_ref): Likewise, remove bogus code. - * method.c (do_build_assign_ref): Likewise. - * decl.c (grokdeclarator): Handle a type appearing as the - declarator-id for constructors. - * method.c (do_build_copy_constructor): current_base_init_list now - uses the types directly, not their names. - * init.c (sort_base_init): Likewise. - (expand_member_init): Likewise. - * init.c (is_aggr_type): New function, like is_aggr_typedef. - -Mon Jan 15 08:45:01 1996 Jeffrey A Law - - * tree.c (layout_basetypes): Call build_lang_field_decl instead - of build_lang_decl if first arg is a FIELD_DECL. - -Thu Jan 11 14:55:07 1996 Brendan Kehoe - - * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is - non-empty. - * except.c (expand_start_catch_block): Set TREE_USED to avoid - warnings about the catch handler. - -Mon Jan 8 17:35:12 1996 Jason Merrill - - * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of - expand_target_expr. - -Thu Jan 4 12:30:32 1996 Brendan Kehoe - - Fix access control to use trees rather than integers. - * class.c (access_{default, public, protected, private, - default_virtual, public_virtual, private_virtual}_node): Add - definitions. - (init_class_processing): Do creation of those nodes. - * cp-tree.h (access_type): Delete enum decl. - (access_{default, public, protected, private, default_virtual, - public_virtual, private_virtual}_node): Add decls. - (compute_access): Change return type. - * search.c (compute_access): Have tree return type, instead of enum. - (lookup_field): Declare THIS_V and NEW_V to be tree nodes. - * lex.c (real_yylex): Use yylval.ttype for giving the value of the - access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}. - * parse.y (VISSPEC): Make ttype rather than itype. - (base_class_access_list): Likewise. - * *.[cy]: Change all refs of `access_public' to `access_public_node', - etc. - * call.c (build_method_call): Make ACCESS be a tree. - * class.c (alter_access, finish_struct_1, filter_struct): Likewise. - * cvt.c (convert_to_aggr): Likewise. - * init.c (build_offset_ref, resolve_offset_ref, build_delete): - Likewise. - * method.c (hack_identifier): Likewise. - * typeck.c (build_component_ref_1, build_component_ref): ): Likewise. - -Thu Jan 4 11:02:20 1996 Mike Stump - - * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C - frontend, and make it more consistent with respect to - warn_pointer_arith. - -Tue Jan 2 00:13:38 1996 Rusty Russell - - * decl.c (pushdecl): Check for duplicate parameter names. - -Wed Jan 3 09:25:48 1996 Mike Stump - - * decl.c (expand_static_init): Call assemble_external for atexit. - -Wed Jan 3 07:55:19 1996 Mike Stump - - * except.c (do_unwind): Remove some generated dead code. - (eh_outer_context): New routine, factor out some common code from - expand_builtin_throw and end_eh_unwinder. Add code to do return - address masking for the PA. - (expand_builtin_throw): Use eh_outer_context instead of open coding - it here. - (end_eh_unwinder): Likewise. - -Tue Jan 2 17:00:56 1996 Mike Stump - - * except.c (expand_throw): Call assemble_external for __empty, if we - use it. - -Thu Dec 28 11:13:15 1995 Mike Stump - - * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of - NORMAL_RETURN_ADDR_OFFSET. - (end_eh_unwinder): Likewise. - -Wed Dec 27 22:18:16 1995 Mike Stump - - * gc.c (build_dynamic_cast): Make sure we don't cast away const - when dealing with references, and make sure we handle dynamic - casting to a cv qualified reference. - -Thu Dec 21 23:50:35 1995 Mike Stump - - * except.c (struct eh_context): New structure top hold eh context - information. - (push_eh_context): New routine. - (pop_eh_context): Likewise. - * decl.c (push_cp_function_context): Use them. - (pop_cp_function_context): Likewise. - -Wed Dec 20 12:42:51 1995 Jason Merrill - - * decl2.c (finish_file): Also prune uninteresting functions in the - inline emission loop. - -Wed Dec 20 02:32:07 1995 Jeffrey A Law - - * sig.c (build_signature_table_constructor): Mark functions - in the signature as referenced. - -Tue Dec 19 22:36:56 1995 Jason Merrill - - * decl2.c (finish_file): Do all the vtable/synthesis stuff before - the inline emission stuff. - -Mon Dec 18 15:51:33 1995 Jason Merrill - - * cp-tree.h, decl2.c (flag_weak): New flag to control the use of - weak symbols. - * lang-options.h: Add -f{no-,}weak. - * decl.c (init_decl_processing): If the target does not support weak - symbols, don't use them. - * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/. - -Sun Dec 17 21:13:23 1995 Rusty Russell - - * init.c (expand_member_init): warning for base init after members. - -Fri Dec 15 15:32:18 1995 Jason Merrill - - * cvt.c (build_expr_type_conversion): Don't convert to a reference - type. - -Thu Dec 14 16:05:58 1995 Mike Stump - - * method.c (report_type_mismatch): Improve wording for volatile - mismatches. - -Thu Dec 14 14:16:26 1995 Mike Stump - - * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of - expand_assignment, as the later doesn't handle things that have - copy constructors well. The compiler would do bitwise copying, - instead of ctor calling in some cases. - -Wed Dec 13 17:05:54 1995 Paul Eggert - - * g++.c (my_strerror): Return "cannot access" if errno is 0. - (pfatal_with_name, perror_exec): Don't assume that - the returned value from my_strerror contains no '%'s. - (concat): Remove. - (sys_nerror): Declare only if HAVE_STRERROR is not defined. - -Wed Dec 13 16:22:38 1995 Jason Merrill - - Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make - TYPE_METHODS/TREE_CHAIN mean what they used to. - * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC - instead of TYPE_METHODS. - * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD. - * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise. - * cp-tree.h (CLASSTYPE_METHODS): Lose. - (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of - TYPE_METHODS. - (struct lang_decl): Lose next_method field. - (DECL_NEXT_METHOD): Lose. - * class.c (finish_struct_methods): Don't mess with TYPE_METHODS. - (finish_struct): Just use TYPE_METHODS; we don't need fn_fields - anymore. - (finish_struct_methods): Don't mess with the TREE_CHAINs in - fn_fields. - - * search.c (add_conversions): Don't use TREE_CHAIN to traverse method - vector. - - * call.c (build_method_call): Synthesize here even when not inlining. - * typeck.c (build_function_call_real): Likewise. - -Wed Dec 13 15:02:39 1995 Ian Lance Taylor - - * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols - == DBX_DEBUG, call dbxout_start_new_source_file and - dbxout_resume_previous_source_file when appropriate. - -Tue Dec 12 20:38:55 1995 Mike Stump - - * except.c (start_anon_func): Push to the top level. - (end_anon_func): Pop from the top level. - -Mon Dec 11 18:56:14 1995 Mike Stump - - * cp-tree.h (build_cleanup): New routine to build cleanups. - * decl.c (expand_static_init): Use build_cleanup to build a cleanup - call at ctor time and use atexit to run it later. - * decl2.c (build_cleanup): New routine, taken from finish_file. - (finish_file): Use build_cleanup instead, and don't put function - local statics in global dtor list. - -Wed Dec 6 14:34:29 1995 Mike Stump - - * except.c (expand_throw): Ensure that we have cleanups, if we try - and expand cleanups. - -Wed Dec 6 11:48:21 1995 Mike Stump - - * except.c (expand_throw): Add logic to manage dynamic cleanups for - the EH object. - (expand_end_catch_block): Use the magic of expand_goto, instead of - emit_jump so that we get the cleanup for any catch clause parameter - and the cleanup for the exception object. Update to reflect label - changes. - (push_eh_cleanup): New routine to register a cleanup for an - exception object. - (empty_fndecl): Used to default cleanup actions to - nothing. - (init_exception_processing): Setup empty_fndecl. Setup - saved_cleanup. - (expand_start_catch_block): Update to reflect label changes. Call - push_eh_object to register the cleanup for the EH object. - (start_anon_func): New routine to start building lambda expressions - from trees. - (end_anon_func): New routine to end them. - (struct labelNode): Change so that we can use tree labels, or rtx - labels. - (saved_cleanup): Object to check for dynamic cleanups for the - exception handling object. - (push_label_entry): Change so that we can use tree labels, or rtx - labels. - (pop_label_entry): Likewise. - (top_label_entry): Likewise. - (expand_start_all_catch): Use tree label instead of rtx label, so - that we can get the magic of expand_goto. - (expand_end_all_catch): Update to reflect label changes. - - * class.c (build_vfn_ref): Remove building_cleanup logic, as we now - use UNSAVE_EXPRs. - * typeck.c (get_member_function_from_ptrfunc): Remove remnants of - building_cleanup logic, as we now use UNSAVE_EXPRs. - * cp-tree.h (unsave_expr): Declare it. - * decl.c (building_cleanup): Remove. - (maybe_build_cleanup): Remove building_cleanup logic, and use - UNSAVE_EXPR instead. - -Sun Dec 3 01:34:58 1995 Mike Stump - - * gc.c (build_t_desc): Update error message to say . - -Thu Nov 30 12:30:05 1995 Brendan Kehoe - - * decl.c (pushdecl): Only warn about shadowing a local variable if - warn_shadow is true. - -Sun Nov 26 16:06:55 1995 Rusty Russell - - * typeck.c (build_binary_op_nodefault): Added warning about - comparisons between different enum types with -Wall, unless - -fenum-int-equiv set. - -Wed Nov 22 15:44:02 1995 Mike Stump - - * class.c (finish_struct_1): Skip down to the inner type in - multidimensional arrays. Ensures ctors will be made for types that - need constructing. - -Wed Nov 22 14:19:22 1995 Mike Stump - - * decl.c (last_dtor_insn): New to track the last compiler generated - insn in a dtor. - (store_parm_decls): Set it. - (finish_function): Use it to see if the dtor is empty. Avoid doing - vtable setup all the time, if we can. - (struct cp_function): Add last_dtor_insn. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - -Wed Nov 22 11:52:19 1995 Paul Russell - - * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid - warnings. - -Tue Nov 21 17:15:23 1995 Mike Stump - - * typeck.c (expand_target_expr): Make sure targets get put into the - current temp_slot_level, so that the free_temp_slots call will reuse - them. - -Tue Nov 21 13:32:03 1995 Mike Stump - - * class.c (finish_struct_1): Delay delta fixups for virtual bases - until after we have done the hard virtuals, to avoid a bogus `every - virtual function must have a unique final overrider' for virtual - functions that are only overridden by hard virtuals. - -Thu Nov 9 13:35:30 1995 Jason Merrill - - * pt.c (do_function_instantiation): Don't try to find a file-scope - template for a member function. - -Tue Nov 14 06:20:35 1995 Mike Stump - - * g++.c (main): Add handling of -nodefaultlibs. - -Mon Nov 13 15:45:34 1995 Mike Stump - - * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to - distinguish between direct bindings of reference variables, and - indirect bindings of reference variables. - * cvt.c (build_up_reference): Use it. - * typeck.c (convert_arguments): Use it to indicate this is an - indirect binding. - * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast - as they are unused. - (expand_static_init): Likewise. - (cplus_expand_expr_stmt): Likewise. - * decl2.c (finish_file): Likewise. - * init.c (perform_member_init): Likewise. - (emit_base_init): Likewise. - (expand_aggr_vbase_init_1): Likewise. - -Fri Nov 10 09:18:09 1995 Brendan Kehoe - - * decl.c (push_namespace): Rewrite to use build_lang_decl, so we - get a DECL_LANG_SPECIFIC node. - * cp-tree.h (lang_decl_flags): Add new member `level'. - (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the - decl_flags level member. - -Mon Nov 6 18:36:13 1995 Brendan Kehoe - - * call.c (build_method_call): Make sure instance has a - TYPE_LANG_SPECIFIC node before we dive into it. - -Sat Nov 4 20:01:52 1995 Jason Molenda - - * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code. - -Thu Nov 2 17:56:57 1995 Mike Stump - - * decl.c (duplicate_decls): When smashing decls, smash staticness in - the usual way. - -Thu Nov 2 16:44:02 1995 Mike Stump - - * decl.c (poplevel): Handle the merging of subblocks of cleanups - when finishing blocks that have already been created (usually due to - the fixup goto code). Fixes bad debugging information. - -Wed Nov 1 12:33:53 1995 Jason Merrill - - * method.c (hack_identifier): Don't abort when we get a TREE_LIST - that's not a list of overloaded functions. - -Wed Nov 1 11:38:58 1995 Brendan Kehoe - - * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn - before trying to use DECL_ABSTRACT_VIRTUAL_P. - -Tue Oct 31 11:56:55 1995 Jason Merrill - - * decl2.c (mark_used): New function for hooking into setting of - TREE_USED on decls. - * call.c (build_method_call): Use it. - * class.c (instantiate_type): Likewise. - * init.c (build_offset_ref): Likewise. Don't call assemble_external - for all like-named functions. - * method.c (hack_identifier): Likewise. - (emit_thunk): Don't call assemble_external. - (make_thunk): Create thunk as a FUNCTION_DECL so that it - gets the right mode and ENCODE_SECTION_INFO works. - - * parse.y: Use mark_used. Pass operator names to do_identifier. - * lex.c (do_identifier): Handle operator names. - - * decl2.c (grokclassfn): Tweak __in_chrg attributes. - -Thu Oct 26 16:45:58 1995 Brendan Kehoe - - * errfn.c: Include stdio.h. - (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*. - -Wed Oct 25 18:58:41 1995 Mike Stump - - * typeck2.c (digest_init): Always convert initializers to the - right type. - -Wed Oct 25 13:25:24 1995 Mike Stump - - * init.c (member_init_ok_or_else): Don't allow member initializers - for indirect members, as it is invalid. - -Wed Oct 25 11:35:28 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow `friend signed ()'. - -Fri Oct 20 10:30:59 1995 Mike Stump - - * parse.y (for.init.statement): Catch compound statements inside for - initializations, if we're being pedantic. - -Fri Oct 20 10:03:42 1995 Mike Stump - - * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are - looking for. - -Thu Oct 19 14:26:10 1995 Mike Stump - - * error.c (dump_expr): Don't core dump when a boolean expression is - used as a default argument. - -Thu Oct 19 10:36:30 1995 Jason Merrill - - * class.c (finish_struct_bits): Check aggregate_value_p instead of - RETURN_IN_MEMORY. - -Wed Oct 18 18:12:32 1995 Jason Merrill - - * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a - BLKmode type that would otherwise be returned in registers. - -Mon Oct 16 12:32:19 1995 Brendan Kehoe - - * g++.c (WITHLIBC): New macro. - (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set - saw_libc and pass it at the end if it was set. - -Wed Oct 11 16:30:34 1995 Brendan Kehoe - - * parse.y (fn.def1): Call split_specs_attrs in - declmods notype_declarator case. - -See ChangeLog.1 for earlier changes. diff --git a/gcc/cp/ChangeLog.3 b/gcc/cp/ChangeLog.3 deleted file mode 100644 index 57e96f3..0000000 --- a/gcc/cp/ChangeLog.3 +++ /dev/null @@ -1,22648 +0,0 @@ -2003-12-30 Nathan Sidwell - - PR c++/13507 - * decl.c (duplicate_decls): Use build_type_attribute_variant to - merge attributes. - - PR c++/13494 - * tree.c (build_cplus_array_type_1): Only build a minimal array - type for dependent types or domains. - -2003-12-29 Nathan Sidwell - - PR c++/12774 - * typeck.c (comp_array_types): Fold non-dependent domains for - ABI-1. - -2003-12-29 Kriang Lerdsuwanakij - - PR c++/13289 - * semantics.c (finish_id_expression): Only check if the type of - a template argument is integral or enumeration when it is not - dependent. - -2003-12-29 Kriang Lerdsuwanakij - - PR c++/12403 - * parser.c (cp_parser_template_declaration_after_export): Set up - template specialization scope in case of explicit specialization. - -2003-12-28 Mark Mitchell - - PR c++/13081 - * decl.c (duplicate_decls): Preserve inline-ness when redeclaring - a function template. - - PR c++/12613 - * decl.c (reshape_init): Reject GNU colon-style designated - initializers in arrays. - - PR c++/13009 - * call.c (build_special_member_call): Do not assume that we have a - pointer to the complete object in an assignment operator. - -2003-12-28 Roger Sayle - - PR c++/13070 - * decl.c (duplicate_decls): When setting the type of an anticipated - declaration, merge the existing type attributes. - -2003-12-25 Andrew Pinski - - PR c++/13268, c++/13339 - * class.c (add_method): Return early when method is error_mark_node. - * pt.c (tsubst_friend_function): Return early when new_friend is - error_mark_node. - -2003-12-23 Mark Mitchell - - * cp-lang.c (cp_expr_size): Return zero for empty classes. - - * cp-tree.h (warn_if_uknown_interface): Remove unused function. - * decl2.c (warn_if_unknown_interface): Likewise. - -2003-12-23 Nathan Sidwell - - PR c++/13387 - * cp-lang.c (cxx_get_alias_set): Correct logic for a base type. - -2003-12-22 Mark Mitchell - - * decl.c (start_function): Do not check - flag_alt_external_templates or flag_external_templates. - * decl2.c (warn_if_unknown_interface): Likewise. - * lex.c (extract_interface_info): Likewise. - * pt.c (lookup_template_class): Likewise. - - PR c++/12862 - * name-lookup.c (pushdecl): Look up all namespace-scope entities - in their corresponding namespace. - - PR c++/12397 - * typeck.c (finish_class_member_access_expr): Don't tree - IDENTIFIER_NODEs as non-dependent expressions. - -2003-12-22 Andrew Pinski - - PR c++/5050 - * tree.c (cp_start_inlining): Remove. - (cp_end_inlining): Remove. - * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define. - (LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define. - * cp-tree.h (cp_start_inlining): Do not declare. - (cp_end_inlining): Do not declare. - -2003-12-22 Mark Mitchell - - PR c++/12479 - * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;" - pedwarn when not in a system header. - -2003-12-21 Mark Mitchell - - * cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE, - CPTI_UNION_TYPE, CPTI_ENUM_TYPE. - (record_type_node): Remove. - (union_type_node): Likewise. - (enum_type_node): Likewise. - * decl.c: Remove mention of above tree nodes in comment. - * lex.c (cxx_init): Do not assign to record_type_node, - union_type_node, or enum_type_node. Simplify handling of - class_type_node. - - PR c++/11554 - * init.c (sort_mem_initializers): Add warning. - -2003-12-21 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * cxx-pretty-print.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * error.c: Likewise. - * except.c: Likewise. - * init.c: Likewise. - * name-lookup.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * semantics.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2003-12-19 Kazu Hirata - - * cvt.c: Remove uses of "register" specifier in - declarations of arguments and local variables. - * decl.c: Likewise. - * decl2.c: Likewise. - * expr.c: Likewise. - * friend.c: Likewise. - * lex.c: Likewise. - * name-lookup.c: Likewise. - * repo.c: Likewise. - * search.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2003-12-19 Mark Mitchell - - PR c++/12795 - * name-lookup.c (pushdecl): Do not treated any functions as being - "nested" in C++. - -2003-12-19 Jason Merrill - - PR c++/13371 - * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing. - * cvt.c (convert_to_void): Don't warn about the RHS of a comma - being useless if TREE_NO_UNUSED_WARNING is set. - -2003-12-18 Richard Henderson - - * cp-tree.h (struct lang_type_header): Remove __extension__. - -2003-12-18 Jason Merrill - - PR c++/12253 - * init.c (build_vec_init): Initialization of an element from - an initializer list is also a full-expression. - - * parser.c, pt.c, semantics.c: Rename constant_expression_p - to integral_constant_expression_p. - -2003-12-18 Kriang Lerdsuwanakij - - PR c++/13262 - * pt.c (instantiate_decl): Wrap push_nested_class and - pop_nested_class around cp_finish_decl call for static member - variable. - -2003-12-18 Giovanni Bajo - - PR c++/9154 - * parser.c (cp_parser_template_argument): A type-id followed by '>>' - is just an user typo, and should be accepted as last resort if any - other parsing fails. - (cp_parser_enclosed_template_argument_list): If the argument list is - parsed correctly, but the next token is '>>', emit a diagnostic. - (cp_parser_next_token_ends_template_argument): Accept '>>' as - delimiter of template argument, it will be later detected as a typo. - -2003-12-17 Kelley Cook - - * Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1. - -2003-12-17 Mark Mitchell - - PR c++/10603 - PR c++/12827 - * parser.c (cp_parser_error): Help c_parse_error print good - messages if the next token is a keyword. - (cp_parser_parameter_declaration_list): When resynchronizing after - a bad parameter declaration, stop if a comma is found. - (cp_parser_parameter_declaration): Avoid backtracking. - -2003-12-16 Mark Mitchell - - PR c++/12696 - * decl.c (reshape_init): Recover quickly from errors. - -2003-12-16 Nathan Sidwell - - PR c++/9043 - C++ ABI change: Mangling array indices in templates. - * decl.c (compute_array_index_type): Reorganize for earlier - template errors. Use value_dependent_expression_p for abi-2. - * mangle.c (write_array_type): Check broken mangling for - expression indices on abi-1 - -2003-12-16 Mark Mitchell - - PR c++/12696 - * decl.c (reshape_init): Recover quickly from errors. - - PR c++/13275 - * lex.c (reswords): Add "__offsetof" and "__offsetof__". - * parser.c (cp_parser): Add in_offsetof_p. - (cp_parser_new): Initialize it. - (cp_parser_primary_expression): Handle __offsetof__ (...). - (cp_parser_postfix_expression): Allow casts to pointer type and - uses of "->" in a constant expression if implementing offsetof. - (cp_parser_unary_expression): Allow the use of "&" in a constant - expression if implementing offsetof. - -2003-12-16 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD - if the declaration comes from an using declaration. - -2003-12-16 Giovanni Bajo - - * semantics.c (finish_id_expression): Refactor the code to handle - template parameters, and emit a more informative error message - when they are used within an integral constant expression. - -2003-12-16 Nathan Sidwell - - PR c++/13387 - * class.c (finish_struct_1): Compute mode and alias set for - CLASSTYPE_AS_BASE. - * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial - assignment of a class, as necessary. - * cp-lang.c (cxx_get_alias_set): The alias set as a base is the - same as for the complete type. - - PR c++/13242 - C++ ABI change. Mangling template parameters of reference type - * mangle.c (write_template_args): Remove unreachable code. - (write_template_arg): Look through an argument of reference type. - -2003-12-16 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD - if the declaration comes from an using declaration. - -2003-12-15 Mark Mitchell - - PR c++/10926 - * decl2.c (grokfield): Robustify. - - PR c++/11116 - * parser.c (cp_parser_throw_expression): Determine whether or not - an assignment-expression is present by doing one-token lookahead. - - PR c++/13269 - * parser.c (cp_parser_function_definition_after_declarator): Stop - scanning tokens when reaching EOF. - - PR c++/12989 - * typeck.c (cxx_sizeof_or_alignof_expr): Robustify. - - PR c++/13310 - * pt.c (dependent_template_p): Handle OVERLOADs. - -2003-12-15 Mark Mitchell - - PR c++/13243 - PR c++/12573 - * parser.c (cp_parser_postfix_expression): Tighten handling of - integral constant expressions. - (cp_parser_unary_expression): Likewise. - * pt.c (value_dependent_expression_p): Remove handling for - COMPONENT_REFs. - -2003-12-15 Nathan Sidwell - - * class.c (add_method): Disallow destructor for java classes. - * decl.c (xref_basetypes): Check java class inheritance. - * decl2.c (check_java_method): Skip artificial params. - - PR c++/13241 - C++ ABI change. Mangling of symbols in expressions. - * mangle.c (write_mangled_name): Add top_level flag. Rework for - nested and unnested mangling. Deal with abi version 1 and version - 2 differences. - (write_expression): Adjust write_mangled_name call. - (mangle_decl_string): Use write_mangled_name for all non-type decls. - -2003-12-14 Mark Mitchell - - PR c++/10779 - PR c++/12160 - * parser.c (struct cp_parser): Add in_template_argument_list_p. - (cp_parser_error): Use c_parse_error. - (cp_parser_name_lookup_error): New function. - (cp_parser_new): Initialize it. - (cp_parser_declarator): Add parenthesized_p parameter. - (cp_parser_nested_name_specifier_opt): Use - cp_parser_name_lookup_error. - (cp_parser_parenthesized_expression_list): Improve comments. - (cp_parser_condition): Adjust call to cp_parser_declarator. - (cp_parser_template_parameter): Adjust call to - cp_parser_parameter_declaration. - (cp_parser_template_argument_list): Set - in_template_argument_list_p. - (cp_parser_explicit_instantiation): Adjust call to - cp_parser_declarator. - (cp_parser_simple_type_specifier): Remove unncessary code. - (cp_parser_using_declaration): Use cp_parser_name_lookup_error. - (cp_parser_init_declarator): Handle member function definitions. - (cp_parser_direct_declarator): Adjust call to - cp_parser_declarator. - (cp_parser_type_id): Adjust call to cp_parser_declarator. - (cp_parser_parameter_declaration_list): Avoid backtracking where - possible. - (cp_parser_parameter_declaration): Add parenthesized_p parameter. - (cp_parser_function_definition): Remove. - (cp_parser_member_declaration): Do not backtrack to look for - function definitions. - (cp_parser_exception_declaration): Adjust call to - cp_parser_declarator. - (cp_parser_single_declaration): Handle function definitions via - cp_parser_init_declarator. - (cp_parser_save_member_function_body): New function. - -2003-12-14 Kriang Lerdsuwanakij - - PR c++/13106 - * decl.c (finish_function): Check if return type is dependent before - issuing no return statement warning. - -2003-12-12 Nathan Sidwell - - PR c++/13118 - * cp-tree.h (lang_decl_u): Add thunk_alias member. - (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL. - (THUNK_ALIAS_P): Remove. - (THUNK_ALIAS): Adjust. - * class.c (update_vtable_entry_for_fn): Get the vbase within the - overriding function's return type. - (dump_thunk): Adjust THUNK_ALIAS printing. - (build_vtbl_initializer): Adjust THUNK_ALIAS use. - * method.c (make_thunk): Revert 12881 test change. Clear - THUNK_ALIAS. - (finish_thunk): Adjust THUNK_ALIAS setting. - (use_thunk): Adjust THUNK_ALIAS use. - * semantics.c (emit_associated_thunks): Likewise. - - PR c++/13114, c++/13115 - * class.c (layout_empty_base): Propagate the move of an empty base - to offset zero. - - PR c++/12881 - * method.c (make_thunk): Deal with thunk aliases when searching - for a thunk. Robustify assertion. - -2003-12-11 Nathan Sidwell - - * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only. - (hash_type): Use TYPE_UID of the identifier's type. - (compare_type): Adjust. - (mangle_conv_op_name_for_type): Store identifier nodes only, use - TYPE_UID has hash value. - -2003-12-10 Mark Mitchell - - * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL. - -2003-12-08 Matt Austern - - PR c/13134 - * decl.c (duplicate_decls): Copy visibility flag when appropriate. - -2003-12-09 Giovanni Bajo - - * init.c (build_new_1): Deal with an OVERLOAD set when - looking up for _Jv_AllocObject. - * except.c (build_throw): Likewise for _Jv_Throw. - -2003-12-08 Jason Merrill - - PR c++/11971 - * tree.c (build_local_temp): Split out from build_cplus_new. - (force_target_expr): New fn. - * call.c (call_builtin_trap): Call it. Take a type parm. - (convert_arg_to_ellipsis): Pass it. - (build_x_va_arg): Use call_builtin_trap. - - PR c++/11929 - * call.c (magic_varargs_p): New fn. - (build_over_call): Do no ellipsis conversions for arguments to - functions with magic varargs. - - * name-lookup.c, init.c, except.c: Revert Giovanni's patch from - yesterday. - - Give the anonymous namespace a null DECL_NAME. - * cp-tree.h: Don't declare anonymous_namespace_name. - * decl.c: Don't define it. - * dump.c (cp_dump_tree): Don't check for it. - * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise. - * error.c (dump_decl): Likewise. - * name-lookup.c: Define it here. - (push_namespace): Put it in DECL_ASSEMBLER_NAME instead. - * mangle.c (write_unqualified_name): Adjust. - -2003-12-07 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): Always construct an - OVERLOAD unless the declaration is a built-in. - (set_namespace_binding): While binding OVERLOADs with only one - declaration, we still need to call supplement_binding. - * init.c (build_new_1): Deal with an OVERLOAD set when - looking up for _Jv_AllocObject. - * except.c (build_throw): Likewise for _Jv_Throw. - -2003-12-06 Mark Mitchell - - PR c++/13323 - * class.c (same_signature_p): Handle conversion operators - correctly. - (check_for_override): Likewise. - -2003-12-06 Kelley Cook - - * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete. - (c++.install_common, cp/g++.1, c++.install-man): Adjust for above. - (c++.uninstall): Likewise. - -2003-12-05 Danny Smith - Mark Mitchell - - PR c++/13305 - * parser.c (cp_parser_elaborated_type_specifier): Accept - attributes. - -2003-12-05 Mark Mitchell - - PR c++/13314 - * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope - calls. - (cp_parser_class_head): Likewise. - -2003-12-05 Kriang Lerdsuwanakij - - PR c++/13166 - * parser.c (cp_parser_late_parsing_default_args): Make sure the - context is a class before calling push_nested_class and - pop_nested_class. - -2003-12-03 James E Wilson - - * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS - support. - -2003-12-03 Mark Mitchell - - PR c++/9127 - * cp-tree.h (at_namespace_scope_p): New function. - * parser.c (cp_parser_class_head): Handle invalid explicit - specializations. - * search.c (at_namespace_scope_p): New function. - - PR c++/13179 - * semantics.c (finish_handler_parms): Do not call eh_type_info for - types used in templates. - - PR c++/10771 - * parser.c (cp_parser_check_for_invalid_template_id): New - function. - (cp_parser_simple_type_specifier): Use it. - (cp_parser_elaborated_type_specifier): Likewise. - (cp_parser_class_head): Likewise. - -2003-12-02 Giovanni Bajo - - PR c++/10126 - * pt.c (convert_nontype_argument): Handle default conversions - while converting a pointer to member function. - -2003-12-02 Giovanni Bajo - - PR c++/12573 - * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by - looking into them recursively. - -2003-12-02 Richard Henderson - - * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD. - * parser.c (struct cp_token): Likewise. - (struct cp_parser_token_tree_map_node): Likewise. - * lex.c (struct resword): Move const after ENUM_BITFIELD. - -2003-11-30 Mark Mitchell - - PR c++/9849 - * parser.c (cp_lexer_prev_token): New function. - (cp_parser_skip_to_closing_parenthesis): Add consume_paren - parameter. - (cp_parser_nested_name_specifier_opt): Add is_declaration - parameter. - (cp_parser_nested_name_specifier): Likewise. - (cp_parser_class_or_namespace_name): Likewise. - (cp_parser_class_name): Likewise. - (cp_parser_template_id): Likewise. - (cp_parser_template_name): Likewise. - (cp_parser_id_expression): Adjust calls to - cp_parser_nested_name_specifier_op, cp_parser_template_id, - cp_parser_class_name. - (cp_parser_unqualified_id): Likewise. - (cp_parser_postfix_expression): Likewise. - (cp_parser_pseudo_destructor_name): Likewise. - (cp_parser_cast_expression): Likewise. - (cp_parser_mem_initializer_id): Likewise. - (cp_parser_simple_type_specifier): Likewise. - (cp_parser_type_name): Likewise. - (cp_parser_elaborated_type_specifier): Likewise. - (cp_parser_qualified_namespace_specifier): Likewise. - (cp_parser_using_declaration): Likewise. - (cp_parser_using_directive): Likewise. - (cp_parser_ptr_operator): Likewise. - (cp_parser_declarator_id): Likewise. - (cp_parser_class_head): Likewise. - (cp_parser_base_specifier): Likewise. - (cp_parser_constructor_declarator_p): Likewise. - (cp_parser_direct_declarator): Fix typo in comment. - (cp_parser_parenthesized_expression_list): Adjust call to - cp_parser_skip_to_closing_parenthesis. - (cp_parser_selection_statement): Likewise. - -2003-11-23 Kriang Lerdsuwanakij - - PR c++/12924 - * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR - with OVERLOAD and DECL nodes as the first operand. - -2003-11-22 Kriang Lerdsuwanakij - - * pt.c (tsubst) : Remove erroneous argument to build_nt. - -2003-11-22 Kriang Lerdsuwanakij - - PR c++/5369 - * friend.c (is_friend): Handle member function of a class - template as template friend. - (do_friend): Likewise. - * decl2.c (check_classfn): Add template_header_p parameter. - * decl.c (start_decl): Adjust check_classfn call. - (grokfndecl): Likewise. - * pt.c (is_specialization_of_friend): New function. - (uses_template_parms_level): Likewise. - (push_template_decl_real): Use uses_template_parms_level. - (tsubst_friend_function): Adjust check_classfn call. - * cp-tree.h (check_classfn): Adjust declaration. - (uses_template_parms_level): Add declaration. - (is_specialization_of_friend): Likewise. - -2003-11-21 Mark Mitchell - - PR c++/12515 - * pt.c (build_non_dependent_expr): Handle GNU extension to ?: - operator. - -2003-11-21 Jan Hubicka - - * parser.c (cp_parser_postfix_expression): Initialize 's' to - NULL_TREE. - -2003-11-20 Joseph S. Myers - - * Make-lang.in (c++.extraclean): Delete. - -2003-11-20 Joseph S. Myers - - * Make-lang.in (check-g++, lang_checks): Add. - -2003-11-18 Kriang Lerdsuwanakij - - PR c++/12932 - * class.c (currently_open_derived_class): Check if - current_class_type is NULL_TREE. - * semantics.c (finish_call_expr): Check if - currently_open_derived_class returns NULL_TREE. - * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT - parameter. - -2003-11-17 Jason Merrill - - * init.c (build_new_1): Preevaluate placement args. - * call.c (build_op_delete_call): Don't expose placement args to - overload resolution. - -2003-11-16 Jason Merrill - - * Make-lang.in (c++.tags): Create TAGS.sub files in each directory - and TAGS files that include them for each front end. - -2003-11-15 Bernardo Innocenti - - PR c++/2294 - * name-lookup.c: Revert previous patch for PR c++/2294 to prevent - build failure on libjava. - -2003-11-14 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD - unless the declaration is a built-in. - (set_namespace_binding): While binding OVERLOADs with only one - declaration, we still need to call supplement_binding. - -2003-11-14 Mark Mitchell - - PR c++/12762 - * parser.c (cp_parser_enclosed_template_argument_list): New - function. - (cp_parser_template_id): Use it. - (cp_parser_simple_type_specifier): Recognize invalid template - syntax. - -2003-11-14 Giovanni Bajo - - PR c++/2094 - * pt.c (unify): Add support for PTRMEM_CST and - FIELD_DECL unification. - -2003-11-13 Richard Earnshaw - - * decl.c (grokfndecl): Change OK to type tree. - -2003-11-12 Mark Mitchell - - * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like - CONSTRUCTOR. - - * decl.c (cp_make_fname_decl): When creating a top-level - __FUNCTION__-like symbol, do register it with pushdecl. - - * decl.c (finish_case_label): Do not check that we are within a - switch statement here. - * parser.c (struct cp_parser): Add in_iteration_statement_p and - in_switch_statement_p. - (cp_parser_new): Initialize them. - (cp_parser_labeled_statement): Check validity of case labels - here. - (cp_parser_selection_statement): Set in_switch_statement_p. - (cp_parser_iteration_statement): Set in_iteration_statement_p. - (cp_parser_jump_statement): Check validity of break/continue - statements here. - - PR c++/12735 - * cp-tree.h (duplicate_decls): Return a tree. - * decl.c (duplicate_decls): Clarify documentation. Return - error_mark_node to indicate a failed redeclaration. - * friend.c (do_friend): Handle that case. - * name-lookup.c (pushdecl): Likewise. - -2003-11-11 Jason Merrill - - * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro. - * name-lookup.c (parse_using_directive): New fn. - (is_associated_namespace): New fn. - (arg_assoc_namespace): Also check associated namespaces. - * name-lookup.h: Declare new fns. - * pt.c (maybe_process_partial_specialization): Allow - specialization in associated namespace. - * parser.c (cp_parser_using_directive): Accept attributes. Use - parse_using_directive. - -2003-11-10 Richard Henderson - - * cvt.c (convert_to_void): Use void_zero_node after overload failure. - -2003-11-10 Gabriel Dos Reis - - PR c++/12832 - * name-lookup.c (supplement_binding): Gracefully handle names - used at non-class scope prior declaration. - -2003-11-06 Matt Austern - - * decl.c (duplicate_decls): copy DECL_VISIBILITY field. - * method.c (use_thunk): give thunk same visibility as function. - * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field. - -2003-11-05 Kriang Lerdsuwanakij - - PR c++/11616 - * pt.c (instantiate_pending_templates): Save and restore - input_location. - -2003-11-05 Kriang Lerdsuwanakij - - PR c++/2019 - * friend.c (add_friend): Don't display previous declaration in - case of duplicate friend warning. - -2003-11-02 Kriang Lerdsuwanakij - - PR c++/9810 - * call.c (build_over_call): Check access using primary template - if FN is a member function template. - -2003-11-01 Kriang Lerdsuwanakij - - PR c++/12796 - * class.c (handle_using_decl): Set input_location before calling - error_not_base_type. - -2003-10-26 Kriang Lerdsuwanakij - - PR c++/10371 - * semantics.c (finish_non_static_data_member): Handle when - both processing_template_decl and qualifying_scope are true. - -2003-10-24 Kriang Lerdsuwanakij - - PR c++/11076 - * class.c (handle_using_decl): Swap arguments of error_not_base_type. - * parser.c (cp_parser_direct_declarator): Only resolve typename for - namespace scope declarations. - -2003-10-24 Nathan Sidwell - - PR c++/12698, c++/12699, c++/12700, c++/12566 - * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New. - (debug_class, debug_thunks): New. - * class.c (dump_class_hierarchy_1): New break out from ... - (dump_class_hierarchy): ... here. - (dump_thunk, debug_thunks, debug_class): New. - (update_vtable_entry_for_fn): Add ssizetype casts. Correct - continued search for primary binfo via virtual. - (build_vtbl_initializer): Follow covariant thunk alias. - * method.c (make_thunk): Clear DECL_THUNKS of the thunk. - (finish_thunk): Look for an alias of the covariant thunk and point - to it. - (use_thunk): We should never use an alias. - * semantics.c (emit_associated_thunks): Do not emit aliases. - - PR c++/12566 - * cp-tree.h (cp_fname_init): Add TYPE pointer param. - * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't - create an ad-hoc ERROR_MARK. - (cp_make_fname_decl): Adjust. - * pt.c (tsubst_expr): Adjust. - -2003-10-23 Jason Merrill - - PR c++/12726 - * tree.c (build_target_expr_with_type): Don't call force_rvalue - for CONSTRUCTORs. - -2003-10-22 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cxx-pretty-print.c: Likewise. - * init.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * semantics.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2003-10-21 Mark Mitchell - - PR c++/11962 - * typeck.c (build_x_conditional_expr): Handle missing middle - operands in templates. - * mangle.c (write_expression): Issue errors about attempts to - mangle a non-existant middle operator to the ?: operator. - -2003-10-21 Robert Bowdidge - * decl.c (cp_finish_decl): Remove clause intended for asm directives - in struct or class fields: this code is never executed. - -2003-10-22 Kriang Lerdsuwanakij - - * decl.c (start_decl): Exit if push_template_decl returns - error_mark_node. - -2003-10-20 Kazu Hirata - - * ChangeLog: Fix typos. - * call.c: Fix comment typos. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * cxx-pretty-print.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * init.c: Likewise. - * mangle.c: Likewise. - * name-lookup.c: Likewise. - * parser.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2003-10-20 Jan Hubicka - - * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer - the expansion. - -2003-10-20 Mark Mitchell - - * Make-lang.in (c++.install-info): Remove. - -2003-10-20 Jason Merrill - - * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding - field. - -2003-10-20 Kriang Lerdsuwanakij - - PR c++/9781, c++/10583, c++/11862 - * decl.c (cp_finish_decl): Exit immediately if decl is an - error_mark_node. - * pt.c (push_template_decl_real): Return error_mark_node for - invalid template declaration of variable. - -2003-10-18 Kriang Lerdsuwanakij - - PR c++/12495 - * pt.c (lookup_template_class): Handle when current_class_type - is a local class. - -2003-10-17 Kriang Lerdsuwanakij - - PR c++/2513 - * decl.c (make_typename_type): Use dependent_type_p. - (make_unbound_class_template): Likewise. - * pt.c (instantiate_class_template): Increment - processing_template_decl during substitution of template friend - function. Preincrement processing_template_decl rather than - postincrement. - (get_mostly_instantiated_function_type): Increment - processing_template_decl during partial substitution of function - type. - -2003-10-15 Jan Hubicka - - PR c++/12574 - * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink. - -2003-10-14 Jason Merrill - - PR c++/11878 - * tree.c (build_target_expr_with_type): Call force_rvalue for - classes with non-trivial copy ctors. - - PR c++/11063 - * typeck.c (build_modify_expr): Call convert rather than abort. - -2003-10-14 Gabriel Dos Reis - - Breack out decl.c (3/n) - * name-lookup.c: Include flags.h - (lookup_name_current_level): Make static. - (add_decl_to_level): Likewise. - (push_local_binding): Likewise. - (push_overloaded_decl): Likewise. - (lookup_using_namespace): Likewise. - (qualified_lookup_using_namespace): Likewise. - (lookup_type_current_level): Likewise. - (unqualified_namespace_lookup): Likewise. - (namespace_ancestor): Likewise. - (push_using_directive): Likewise. - * decl.c (pushdecl): Move to name-lookup.c. - (pushdecl_top_level_1): Likewise. - (pushdecl_top_level): Likewise. - (pushdecl_top_level_and_finish): Likewise. - (maybe_push_decl): Likewise. - (push_using_decl): Likewise. - (push_overloaded_decl): Likewise. - (make_anon_name): Likewise. - (anon_cnt): Likewise. - (clear_anon_tags): Likewise. - (maybe_inject_for_scope_var): Likewise. - (check_for_out_of_scope_variable): Likewise. - * Make-lang.in (cp/name-lookup.o): Depend on flags.h. - * decl.c (warn_extern_redeclared_static): Export. - * cp-tree.h (warn_extern_redeclared_static): Declare. - -2003-10-14 Nathanael Nerode - - * Make-lang.in: Replace uses of $(target_alias) with - $(target_noncanonical). - -2003-10-13 Volker Reichelt - - * ChangeLog: Add PR number to patch for PR c++/12370. - -2003-10-13 Gabriel Dos Reis - - * name-lookup.h (cxx_scope_find_binding_for_name): Don't export. - (binding_for_name): Likewise. - (cxx_binding_clear): Move to name-lookup.c. - * name-lookup.c (cxx_scope_find_binding_for_name): Now static. - (binding_for_name): Likewise. - * decl2.c (is_ancestor): Move to name-lookup.c - (namespace_ancestor): Likewise. - (add_using_namespace): Likewise. - (ambiguous_decl): Likewise. - (lookup_using_namespace): Likewise. - (qualified_lookup_using_namespace): Likewise. - (set_decl_namespace): Likewise. - (decl_namespace): Likewise. - (current_decl_namespace): Likewise. - (push_decl_namespace): Likewise. - (pop_decl_namespace): Likewise. - (push_scope): Likewise. - (pop_scope): Likewise. - (struct arg_lookup): Likewise. - (arg_assoc): Likewise. - (arg_assoc_args): Likewise. - (arg_assoc_type): Likewise. - (add_function): Likewise. - (arg_assoc_namespace): Likewise. - (arg_assoc_class): Likewise. - (arg_assoc_template_arg): Likewise. - (do_namespace_alias): Likewise. - (validate_nonmember_using_decl): Likewise. - (do_nonmember_using_decl): Likewise. - (do_toplevel_using_decl): Likewise. - (do_local_using_decl): Likewise. - (do_class_using_decl): Likewise. - (do_using_directive): Likewise. - (constructor_name_full): Likewise. - (constructor_name): Likewise. - (constructor_name_p): Likewise. - -2003-10-13 Gabriel Dos Reis - - Break out decl.c (2/n) - * name-lookup.c: Include diagnostic.h - (cxx_binding_free): Make static. - (cxx_binding_make): Likewise. - (binding_table_new): Likewise - (binding_table_free): Likewise. - (binding_table_insert): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - (supplement_binding): Likewise. - * name-lookup.h (global_scope_name): Declare extern. - (global_type_node): Likewise. - (cxx_binding_free): Don't export. - (cxx_binding_make): Likewise. - (binding_table_new): Likewise. - (binding_table_free): Likewise. - (binding_table_insert): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H) - * decl.c (lookup_namespace_name): Move to name-lookup.c - (select_decl): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_qualified_name): Likewise. - (lookup_name_real): Likewise. - (lookup_name_nonclass): Likewise. - (lookup_function_nonclass): Likewise. - (lookup_name): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (lookup_flags): Likewise. - (qualify_lookup): Likewise. - (lookup_tag): Likewise. - (lookup_tag_reverse): Likewise. - (getdecls): Likewise. - (storedecls): Remove. - (cxx_remember_type_decls): Move to name-lookup.c. - (global_bindings_p): Likewise. - (innermost_nonclass_level): Likewise. - (toplevel_bindings_p): Likewise. - (namespace_bindings_p): Likewise. - (kept_level_p): Likewise. - (innermost_scope_kind): Likewise. - (template_parm_scope_p): Likewise. - (push_binding): Likewise. - (push_local_binding): Likewise. - (add_decl_to_level): Likewise. Make extern. - (push_class_binding): Move to name-lookup.c. - (resume_level): Likewise. Rename to resume_scope. - (begin_scope): Move to name-lookup.c. - (indent): Likewise. - (binding_depth): Likewise. - (is_class_level): Likewise. - (cxx_scope_descriptor): Likewise. - (cxx_scope_debug): Likewise. - (namespace_scope_ht_size): Likewise. - (leave_scope): Likewise. - (pushlevel_class): Likewise. - (poplevel_class): Likewise. - (clear_identifier_class_values): Likewise. - (pushdecl_with_scope): Likewise. - (pushdecl_namespace_level): Likewise. - (pushdecl_class_level): Likewise. - (push_class_level_binding): Likewise. - (push_using_directive): Likewise. - (identifier_global_value): Likewise. - (keep_next_level_flag): Likewise. - (keep_next_level): Likewise. - (free_binding_level): Likewise. - (set_class_shadows): Likewise. - (maybe_push_cleanup_level): Likewise. - (cp_namespace_decls): Likewise. - (bt_print_entry): Likewise. - (print_binding_level): Likewise. - (print_other_binding_stack): Likewise. - (print_binding_stack): Likewise. - (push_namespace): Likewise. - (pop_namespace): Likewise. - (push_nested_namespace): Likewise. - (pop_nested_namespace): Likewise. - (cxx_saved_binding_make): Likewise. - (struct cxx_saved_binding_make): Likewise. - (store_bindings): Likewise. - (maybe_push_to_top_level): Likewise. - (push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (identifier_type_value): Likewise. - (set_identifier_type_value): Likewise. - (set_identifier_type_value_with_scope): Likewise. - (pop_everything): Likewise. - (pushtag): Likewise. - (follow_tag_typedef): Likewise. - (maybe_process_template_type_declaration): Likewise. - (pop_binding): Likewise. - * cp-tree.h: Move corresponding declarations to name-lookup.h - -2003-10-12 Steven Bosscher - - * cvt.c (ocp_convert): Move warning to C common code. - -2003-10-09 Jason Merrill - - PR c++/6392 - * tree.c (build_cplus_array_type): Handle all quals the same. - (cp_build_qualified_type_real): Look through arrays first. - - * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL. - (build_target_expr_with_type): Likewise. - - * pt.c (instantiate_class_template): Sanity check that our - enclosing class has been instantiated. - -2003-10-08 Giovanni Bajo - - * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS. - * error.c (dump_function_decl): Use it to skip the dump of the - arguments. - (dump_expr): When dumping a declaration found within an - expression, always set TFF_NO_FUNCTION_ARGUMENTS - in the flags. - -2003-10-08 Giovanni Bajo - - PR c++/11097 - * pt.c (tsubst_decl): Substitute also the DECL_NAME node of - USING_DECL. - -2003-10-06 Mark Mitchell - - PR c++/10147 - * call.c (initialize_reference): Tweak error message. - * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove - pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope. - * cxx-pretty-print.c (pp_cxx_id_expression): Always display - qualified entities using qualified names. - - PR c++/12337 - * init.c (build_new_1): Make sure that the expression returned is - not an lvalue. - - PR c++/12344, c++/12236, c++/8656 - * decl.c (start_function): Do not ignore attributes embedded in a - function declarator. - -2003-10-06 Mark Mitchell - - * Make-lang.in (c++.info): Remove. - (c++.dvi): Remove. - (c++.generated-manpages): Replace with ... - (generated-manpages): ... this. - -2003-10-03 Gabriel Dos Reis - - * decl.c (struct cp_binding_level): Move to name-lookup.h - (current_binding_level): Likewise. - (class_binding_level): Likewise. - * cp-tree.h (enum scope_kind): Likewise. - -2003-10-03 Gabriel Dos Reis - - * name-lookup.c (binding_entry_free): Nullify name and type - fields. - -2003-10-02 Mark Mitchell - - PR c++/12486 - * typeck.c (finish_class_member_access_expr): Issue diagnostic - on erroneous use of qualified name. - -2003-09-30 Richard Henderson - - PR c++/12370 - * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too. - -2003-09-30 Kelley Cook - - * g++spec.c: Convert to ISO C90 prototypes. - * parser.c: Likewise. - -2003-09-30 Gabriel Dos Reis - - * decl.c (pop_binding): Don't mess with nullifying binding->scope - here. - * name-lookup.c: Re-format. - (cxx_binding_free): Nullify binding->scope. - -2003-09-29 Jan Hubicka - - PR C++/12047 - * except.c (build_eh_type_type): Call mark_used on the type. - -2003-09-28 Richard Henderson - - * typeck.c (c_expand_asm_operands): Take location_t, instead of - individual file and line. - -2003-09-28 Andreas Jaeger - - * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function - definition. - * init.c (push_base_cleanups): Likewise. - * decl2.c (finish_file): Likewise. - * mangle.c (init_mangle): Likewise. - (dump_substitution_candidates): Likewise. - * search.c: Likewise. - -2003-09-27 Gabriel Dos Reis - - * name-lookup.h (get_global_value_if_present): New function. - (is_typename_at_global_scope): Likewise. - * except.c (do_begin_catch): Use get_global_value_if_present. - (do_end_catch): Likewise. - (do_allocate_exception): Likewise. - (do_free_exception): Likewise. - (build_throw): Likewise. - * parser.c (cp_parser_member_declaration): Likewise. - * rtti.c (throw_bad_cast): Likewise. - (throw_bad_typeid): Likewise. - * decl.c (check_tag_decl): Use is_typename_at_global_scope. - (grokdeclarator): Likewise. - * cp-tree.h (global_namespace): Move to name-lookup.h - * call.c (call_builtin_trap): Tidy. - -2003-09-27 Kriang Lerdsuwanakij - - PR c++/11415 - * parser.c (cp_parser_nested_name_specifier_opt): Issue correct - error message when parser->scope is global_namespace. - -2003-09-27 Gabriel Dos Reis - - * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to - macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE. - -2003-09-26 Gabriel Dos Reis - - * decl.c (pop_binding_level, suspend_binding_level, - find_class_binding_level): Merge into leave_scope. Remove. - (leave_scope): New function. - (poplevel): Update. - (poplevel_class): Likewise. - (pop_namespace): Likewise. - -2003-09-25 Kriang Lerdsuwanakij - - PR c++/5655 - * parser.c (cp_parser_check_access_in_redeclaration): New function. - (cp_parser_member_declaration): Use it. - (cp_parser_template_declaration_after_export): Likewise. - -2003-09-22 Gabriel Dos Reis - - * cp-tree.h (scope_kind): Add new enumerator. - (keep_next_level): Change parameter type to bool. - (begin_scope): Change prototype. - (pushlevel): Remove declaration. - * decl.c (push_binding_level): Fold in begin_scope. Remove. - (struct cp_binding_level): Remove tag_tranparent field. Make keep - of bitsize one. - (keep_next_level_flag): Make a bool. - (cxx_scope_descriptor): Update scope names table - (make_cxx_scope): Fold in begin_scope. Remove.. - (namespace_scope_ht_size): New function. - (begin_scope): Change prototype. Return a scope. Tidy. - (kept_level_p): Update. - (pushlevel): Remove. - (maybe_push_cleanup_level): Simplify. - (poplevel): Update for sk_cleanup and keep change. - (print_binding_level): Likewise. - (initial_push_namespace_scope): Fold in begin_scope. Remove. - (push_namespace): Update. - (pushtag): Likewise. - (lookup_tag): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (cxx_init_decl_processing): Likewise. - (start_function): Likewise. - (begin_function_body): Likewise. - (start_method): Likewise. - * pt.c (push_inline_template_parms_recursive): Likewise. - (begin_template_parm_list): Likewise. - (begin_specialization): Likewise. - * semantics.c (do_pushlevel): Likewise. - (begin_compound_stmt): Likewise. - (begin_stmt_expr): Likewise. - -2003-09-21 Richard Henderson - - * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, - method.c, optimize.c, pt.c, semantics.c, tree.c: Revert. - -2003-09-21 Richard Henderson - - * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, - method.c, optimize.c, pt.c, semantics.c, tree.c: Update for - DECL_SOURCE_LOCATION rename and change to const. - -2003-09-20 Richard Henderson - - * decl.c, decl2.c, pt.c: Use %J in diagnostics. - -2003-09-20 Kriang Lerdsuwanakij - - PR c++/157 - * parser.c (cp_parser_direct_declarator): Clear - parser->num_template_parameter_lists when parsing function - parameters. - (cp_parser_constructor_declarator_p): Likewise. - -2003-09-19 Kriang Lerdsuwanakij - - PR c++/495 - * pt.c (tsubst_friend_class): Only use innermost template - arguments for the injected friend class template. - -2003-09-19 Nathan Sidwell - - PR c++/12332 - * pt.c (instantiate_class_template): Increment - processing_template_decl around the tsubst of a template member - function. - -2003-09-19 Gabriel Dos Reis - - * decl.c (cxx_scope_descriptor): Fix thinko. - (struct cp_binding_level): Adjust type of binding_depth field. - -2003-09-18 Danny Smith - - PR c++/12320 - * call.c (type_passed_as): Check for incomplete type. - (convert_for_arg_passing): Likewise. - -2003-09-18 Nathan Sidwell - - PR c++/9848 - * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters - here. - * semantics.c (expand_body): Set it here on the remaining clones. - -2003-09-18 Roger Sayle - - * lex.c (init_operators): Remove operator_name_info for FFS_EXPR. - * class.c (instantiate_type): Remove FFS_EXPR case. - -2003-09-18 Volker Reichelt - - * ChangeLog: Fix recent commit. - -2003-09-18 Volker Reichelt - - * ChangeLog: Add PR number to patch for PR c++/12316. - -2003-09-18 Gabriel Dos Reis - - * error.c (dump_type): Simplify. Use pp_type_specifier_seq for - "C" types. - * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko. - -2003-09-17 Richard Henderson - - * semantics.c (expand_body): Don't save/restore input_location. - -2003-09-17 Mark Mitchell - - PR c++/12266 - * cp-tree.h (tsubst_flags_t): Add tf_conv. - * class.c (standard_conversion): Pass tf_conv to - instantiate_type. - (resolve_address_of_overloaded_function): Do not call mark_used - when just checking conversions. - - PR debug/12066 - * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define. - * cp-tree.h (cxx_builtin_type_decls): Declare. - * decl.c (builtin_type_decls): New variables. - (cxx_builtin_type_decls): New function. - (record_builtin_type): Add to builtin_type_decls. - -2003-09-17 Richard Henderson - - PR c++/12316 - * semantics.c (expand_or_defer_fn): Inc/dec function_depth. - -2003-09-16 Kriang Lerdsuwanakij - - PR c++/7939 - * typeck.c (comptypes): Don't ICE when its first argument is - error_mark_node. - (compparms): Reverse the arguments of same_type_p. - -2003-09-15 Nathan Sidwell - - PR c++/12184 - * typeck.c (convert_arguments): Return error_mark_node for an - incomplete parameter. Make error message more informative. - -2003-09-12 Mark Mitchell - - PR c++/3907 - * class.c (maybe_note_name_used_in_class): Refine test for whether - or not we are in a class scope. - - * cp-tree.h (language_function): Remove x_expanding_p. - (expanding_p): Remove. - (doing_semantic_analysis_p): Remove. - (scope_kind): Add sk_function_parms, sk_class, - sk_namespace. - (innermost_scope_kind): New method. - * call.c (cxx_type_promotes_to): Use type_decays_to. - * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine. - (LANG_HOOKS_POPLEVEL): Likewise. - * decl.c (cp_binding_level): Remove parm_flag, template_parms_p, - template_spec_p, namespace_p, is_for_scope, is_try_scope, and - is_catch_scope. Add kind and explicit_spec_p. - (cxx_scope_descriptor): Use a lookup table. - (find_class_binding_level): Use "kind" field in binding_level, not - the various flags. - (pop_binding_level): Likewise. - (innermost_nonclass_level): Likewise. - (toplevel_bindings_p): Likewise. - (namespace_bindings_p): Likewise. - (template_parm_scope_p): Likewise. - (innermost_scope_kind): New method. - (current_tmpl_spec_kind): Use "kind" field in binding_level, not - the various flags. - (pushlevel): Remove check for doing_semantic_analysis_p. - (begin_scope): Simplify. - (add_decl_to_level): Use "kind" field in binding_level, not - the various flags. - (push_local_binding): Likewise. - (pop_label): Remove check for doing_semantic_analysis_p. - (poplevel): Use "kind" field in binding_level, not - the various flags. - (set_block): Remove check for doing_semantic_analysis_p. - (pushlevel_class): Use "kind" field in binding_level, not - the various flags. - (poplevel_class): Likewise. - (initial_push_namespace_scope): Likewise. - (maybe_push_to_top_level): Likewise. - (set_identifier_type_value_with_scope): Likewise. - (pop_everything): Likewise. - (maybe_process_template_type_declaration): Likewise. - (pushtag): Likewise. - (pushdecl): Likewise. - (pushdecl_with_scope): Likewise. - (check_previous_goto_1): Likewise. - (define_label): Likewise. - (finish_case_label): Likewise. - (lookup_tag): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_name_real): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (record_builtin_type): Likewise. - (cp_make_fname_decl): Likewise. - (maybe_inject_for_scope_var): Likewise. - (cp_finish_decl): Remove check for doing_semantic_analysis_p. - (start_function): Use begin_scope, not pushlevel. - (finish_function): Use "kind" field in binding_level, not - the various flags. - (start_method): Use begin_scope, not pushlevel. - (make_label_decl): Do not check expanding_p. - (save_function-data): Do not set expanding_p. - (cxx_push_function_context): Do not clear expanding_p. - * semantics.c (cxx_expand_function_start): Do not set expanding_p. - -2003-09-14 Mark Mitchell - - * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for - an bit-field whose width exceeds that of its type. - -2003-09-14 Geoffrey Keating - - * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls. - -2003-09-14 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * parser.c: Likewise. - -2003-09-13 Richard Henderson - - * decl2.c (finish_file): Check cgraph_assemble_pending_functions - during relaxation loop. - -2003-09-11 David Edelsohn - - * decl2.c (var_finalized_p): Swap arms of conditional. - -2003-09-10 Nathan Sidwell - - PR c++/11788 - * typeck.c (build_address): If it is a function, mark it used. - (build_unary_op): Do not lose object's side-effects when taking - address of static member function. - * class.c (resolve_address_of_overloaded_function): Use - tsubst_flags_t parameter. Only expect overload sets. Adjust. - (instantiate_type): Adjust flags passing. Do not lose object's - side-effects when taking address of static member function. - -2003-09-11 Richard Henderson - - * semantics.c (expand_or_defer_fn): Update for new - cgraph_finalize_function argument. - -2003-09-10 Richard Henderson - - * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused. - -2003-09-10 Jan Hubicka - - * decl2.c (var_finalized_p): New. - (maybe_emit_vtables, write_out_vars, finish_file): Use it. - -2003-09-10 Richard Henderson - - * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of - mark_member_pointers. - (lower_function): Remove. - * cp-tree.h: Update to match. - * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New. - (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove. - -2003-09-09 Richard Henderson - - * semantics.c (expand_or_defer_fn): Update call to - cgraph_finalize_function. - - * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function - always. - - * decl2.c (finish_file): Avoid out-of-bounds array reference - during memmove. - -2003-09-09 Richard Henderson - - * decl2.c (mark_member_pointers): Rename from - mark_member_pointers_and_eh_handlers and don't check eh handlers. - -2003-09-09 Christian Ehrhardt - - PR bootstrap/12168 - * method.c (use_thunk): Clear DECL_RTL of copied nodes. - -2003-09-08 Mark Mitchell - - * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to - c_register_builtin_type. - - PR c++/11786 - * decl2.c (add_function): Do not complain about seeing the same - non-function twice. - * semantics.c (perform_koenig_lookup): Improve documentation. - - PR c++/5296 - * pt.c (try_one_overload): Add addr_p parameter. - (resolve_overloaded_unification): Pass it. - -2003-09-08 Richard Henderson - - * optimize.c (maybe_clone_body): Inc/dec function_depth. - -2003-09-08 Richard Henderson - - * decl.c (finish_function): Clear current_function_decl. - * decl2.c (mark_used): Don't push/pop gc context. - * optimize.c (optimize_function): Likewise. - * tree.c (cp_cannot_inline_tree_fn): Likewise. - * pt.c (instantiate_decl): Inc/dec function_depth instead. - * semantics.c (expand_body): Update for tree_rest_of_compilation - nested argument. - -2003-09-07 Gabriel Dos Reis - - PR c++/11762 - * error.c (dump_decl): Handle namespace-alias-definition. - * decl.c (warn_extern_redeclared_static): There is no point in - checking changes in storage class specifier for a namespace - declaration. - (duplicate_decls): Tidy diagnostic message. - * cxx-pretty-print.c (pp_cxx_left_brace): New macro. - (pp_cxx_right_brace): Likewise. - (pp_cxx_original_namespace_definition): New function. - (pp_cxx_namespace_alias_definition): Likewise. - (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs. - -2003-09-07 Jan Hubicka - - * decl2.c (maybe_emit_vtables, write_out_vars, finish_file): - Avoid re-emitting variables in unit-at-a-time mode. - -2003-09-06 Mark Mitchell - - PR c++/11867 - * call.c (standard_conversion): Improve comments. - (perform_direct_initialization): Make sure we return an expression - of the correct type. - * typeck.c (build_static_cast): Check for ambiguity and - accessibility when performing conversions. - -2003-09-06 Gabriel Dos Reis - - * cp-tree.h (add_binding): Remove declaration. - * name-lookup.h (supplement_binding): Declare. - * decl.c (add_binding): Move to name-lookup.c. - (push_local_binding): Adjust. - (push_class_binding): Likewise. - (set_identifier_type_value_with_scope): Likewise. - * name-lookup.c (supplement_binding): Rename from add_binding. - Return a bool. Improve documentation. - (set_namespace_binding): Adjust. - * Make-lang.in (cp/name-lookup.o): Depend on toplev.h - -2003-09-06 Nathan Sidwell - - PR c++/11794 - * class.c (pushclass): Push dependent using decls for nested - classes of templates too. - -2003-09-06 Roger Sayle - - PR c++/11409 - * class.c (resolve_address_of_overloaded_function): When building - list of matching non-template function decls, ignore anticipated - declarations of undeclared or shadowed GCC builtins. - -2003-09-06 Steven Bosscher - - PR c++/11595 - * decl.c (define_label): Remove unreachable timevar pop. - Always return the decl, even if the definition is invalid. - -2003-09-06 Nathan Sidwell - - PR c++/12167 - * parser.c (cp_parser_late_parsing_default_args): Push & pop the - unparsed functions queue. - -2003-09-05 Mark Mitchell - - PR c++/12163 - * call.c (perform_direct_initialization): Correct logic for - direct-initialization of a class type. - - PR c++/12146 - * pt.c (lookup_template_function): Robustify. - -2003-09-05 Nathan Sidwell - - PR c++/11922 - * pt.c (tsubst_qualified_id): Make sure we get a non-type. - (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as - is_type_p to lookup_qualified_name. - - * semantics.c (finish_call_expr): Refactor some code. - - PR c++/12037 - * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New. - (build_min_non_dep): Declare. - * tree.c (build_min): Propagate TREE_SIDE_EFFECTS. - (build_min_non_dep): New. - * cvt.c (convert_to_void): Don't explicitly copy - TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING. - * call.c (build_new_method_call): Use build_min_non_dep. - * decl2.c (grok_array_decl): Likewise. - (build_offset_ref_call_from_tree): Likewise. - * typeck.c (finish_class_member_access_expr, - build_x_indirect_ref, build_x_binary_op, build_x_unary_op, - build_x_conditional_expr, build_x_compound_expr): Likewise. - (build_static_cast, build_reinterpret_cast, - build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template. - * typeck2.c (build_x_arrow): Use build_min_non_dep. - (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a - template. - * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE. - (build_dynamic_cast): Set TREE_SIDE_EFFECTS. - * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED. - -2003-09-04 Richard Henderson - - * decl2.c (mark_member_pointers_and_eh_handlers): Update for - change in cgraph_mark_needed_node arguments. - -2003-09-02 Geoffrey Keating - - PR 12161 - * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context. - * tree.c (cp_cannot_inline_tree_fn): Likewise. - -2003-09-04 Nathan Sidwell - - * cp-tree.h (finish_sizeof, finish_alignof): Remove. - (expr_sizeof): Replace with ... - (cxx_sizeof_or_alignof_expr): ... here. - (cxx_sizeof_or_alignof_type): Make complain parameter a bool. - * parser.c (cp_parser_unary_expression): Commonize alignof and - sizeof handling. - * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof - substitution. - * semantics.c (finish_sizeof, finish_alignof): Remove. - * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter - becomes bool. Set TREE_READONLY. - (expr_sizeof): Replace with ... - (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS. - -2003-09-04 Mark Mitchell - - Remove cast-as-lvalue extension. - * call.c (build_conditional_expr): Correct formatting. - (convert_like_real): Use lvalue_p, not non_cast_lvalue_p. - (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p. - * cp-tree.h (non_cast_lvalue_p): Remove. - (real_non_cast_lvalue_p): Remove. - (non_cast_lvalue_or_else): Remove. - * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter. - (real_lvalue_p): Adjust call to lvalue_p_1. - (non_cast_lvalue_p): Remove. - (non_cast_lvalue_or_else): Remove. - (lvalue_p): Adjust call to lvalue_p_1. - (lvalue_or_else): Simplify. - * typeck.c (build_unary_op): Use lvalue_or_else, not - non_cast_lvalue_or_else. - (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p. - -2003-09-03 DJ Delorie - - * decl.c (finish_function): Pass fndecl to aggregate_value_p. - -2003-09-03 Mark Mitchell - - PR c++/12053 - * class.c (include_empty_classes): Correct logic for ABI version 1. - -2003-09-03 Richard Henderson - - * optimize.c (optimize_function): Push/pop ggc context around - the call to optimize_inline_calls. - -2003-09-02 Scott Brumbaugh - - PR c++/11553 - * parser.c (cp_parser_decl_specifier_seq): Add check for a - duplicate friend decl-specifier. - -2003-09-02 Mark Mitchell - - PR c++/11847 - * pt.c (convert_nontype_argument): Correct representation of - REFERENCE_TYPE expressions. - - PR c++/11808 - * cp-tree.h (KOENIG_LOOKUP_P): New macro. - (finish_call_expr): Change prototype. - * parser.c (cp_parser_postfix_expression): Adjust call to - finish_call_expr. - * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P. - * semantics.c (finish_call_expr): Add koenig_p parameter. - -2003-09-01 Mark Mitchell - - PR c++/12114 - * cp-tree.h (initialize_reference): Change prototype. - * call.c (initialize_reference): Add cleanup parameter. - * decl.c (grok_reference_init): Likewise. - (check_initializer): Likewise. - (cp_finish_decl): Insert a CLEANUP_STMT if necessary. - (duplicate_decls): When replacing an anticipated builtin, do not - honor TREE_NOTHROW. - * typeck.c (convert_for_initialization): Correct call to - initialize_reference. - - PR c++/11972 - * pt.c (dependent_type_p_r): Pass only the innermost template - arguments to any_dependent_template_arguments_p. - -2003-09-01 Josef Zlomek - - * error.c (dump_expr): Kill BIT_ANDTC_EXPR. - * lex.c (init_operators): Kill BIT_ANDTC_EXPR. - * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR. - * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR. - (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR. - -2003-08-29 Mark Mitchell - - PR c++/12093 - * pt.c (build_non_dependent_expr): Do not build a - NON_DEPENDENT_EXPR for a STRING_CST. - - PR c++/11928 - * search.c (add_conversions): Avoid adding two conversion - operators for the same type. - -2003-08-29 Mark Mitchell - - PR c++/6196 - * pt.c (tsubst_copy_and_build): Correct handling of - address-of-label extension. - * semantics.c (finish_goto_stmt): The address of a label must go - through the lvalue-to-rvalue conversion. - -2003-08-29 Richard Henderson - Jason Merrill - - * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New. - (LANG_HOOKS_RTL_EXPAND_STMT): New. - * cp-tree.h (cxx_expand_function_start): Declare. - * decl.c (start_function): Use allocate_struct_function. - Move stmts_are_full_exprs_p assertion from expand_body. - Do not free_after_parsing or free_after_compilation. - (cxx_push_function_context): Move code to set struct function - data from genrtl_start_function. - * optimize.c (optimize_function): Don't inc/dec function_depth. - * semantics.c (expand_body): Use tree_rest_of_compilation. - (cxx_expand_function_start): Rename from genrtl_start_function, - omit bits done by tree_rest_of_compilation. - (genrtl_finish_function): Remove. - (clear_decl_rtl): Move to ../tree-optimize.c. - -2003-08-29 Gabriel Dos Reis - - PR c++/11811 - * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New - function. - * cxx-pretty-print.h: Declare. - * error.c (dump_template_parameter): Use it. - (dump_type): Likewise. - -2003-08-28 Mark Mitchell - - * init.c (decl_constant_value): Deal with COND_EXPR specially. - * call.c (build_conditional_expr): Revert previous patch. - - PR optimization/5079 - * call.c (build_conditional_expr): Use decl_constant_value to - simplify the arguments. - -2003-08-26 Dan Nicolaescu - - * parser.c (struct cp_token): Use enum bitfields. - (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a - 512B allocation unit. - (cp_parser_token_tree_map_node): Use enum bitfields. - -2003-08-26 Nathan Sidwell - - PR c++/11871 - * decl.c (push_class_level_binding): Correct old_decl value from - my 2003-07-29 reorganization. - - * call.c (build_call): Don't set TREE_SIDE_EFFECTS here. - (build_new_method_call): Add goto finish. - * semantics.c (simplify_aggr_init_exprs_r): Don't set - TREE_SIDE_EFFECTS on a call. - -2003-08-25 Richard Henderson - - * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function. - -2003-08-25 Gabriel Dos Reis - - * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag. - (cxx_pretty_printer): Adjust base type. - (pp_cxx_function_specifier): Declare. - * cxx-pretty-print.c (pp_cxx_whitespace): New macro. - (pp_cxx_left_paren): Likewise. - (pp_cxx_right_paren): Likewise. - (pp_cxx_dot): Likewise. - (pp_cxx_arrow): Likewise. - (pp_cxx_semicolon): Likewise. - (pp_cxx_identifier): Likewise. - (pp_cxx_cv_qualifier_seq): Likewise. - (pp_cxx_storage_class_specifier): Likewise. - (pp_cxx_expression_list): Likewise. - (pp_cxx_space_for_pointer_operator): Likewise. - (pp_cxx_init_declarator): Likewise. - (pp_cxx_call_argument_list): Likewise. - (pp_cxx_nonconsecutive_character): Tidy. - (pp_cxx_conversion_function_id): New function. - (pp_cxx_template_id): Likewise. - (pp_cxx_template_keyword_if_needed): Likewise. - (pp_cxx_nested_name_specifier): Likewise. - (pp_cxx_unqualified_id): Tidy - (pp_cxx_qualified_id): Handle more nodes. - (pp_cxx_primary_expression): Tidy. - (pp_cxx_postfix_expression): Likewise. - (pp_cxx_new_expression): Tidy. - (pp_cxx_delete_expression): Likewise. - (pp_cxx_cast_expression): New function. - (pp_cxx_pm_expression): Tidy. - (pp_cxx_conditional_expression): Likewise. - (pp_cxx_assignment_operator): New function. - (pp_cxx_assignment_expression): Tidy. - (pp_cxx_expression): New function. - (pp_cxx_function_specifier): Likewise. - (pp_cxx_decl_specifier_seq): Likewise. - (pp_cxx_simple_type_specifier): Tidy. - (pp_cxx_type_specifier_seq): Likewise. - (pp_cxx_ptr_operator): New function. - (pp_cxx_implicit_parameter_type): Likewise. - (pp_cxx_parameter_declaration): Tidy. - (pp_cxx_parameter_declaration_clause): New function. - (pp_cxx_exception_specification): Likewise. - (pp_cxx_direct_declarator): Tidy. - (pp_cxx_declarator): Likewise. - (pp_cxx_ctor_initializer): New function. - (pp_cxx_function_definition): Likewise. - (pp_cxx_abstract_declarator): Tidy. - (pp_cxx_direct_abstract_declarator): Likewise. - (pp_cxx_type_id): Likewise. - (pp_cxx_exception_declaration): New function. - (pp_cxx_statement): Likewise. - (pp_cxx_simple_declaration): Likewise. - (pp_cxx_template_parameter_list): Likewise. - (pp_cxx_template_parameter): Likewise. - (pp_cxx_template_declaration): Likewise. - (pp_cxx_explicit_specialization): Likewise. - (pp_cxx_explicit_instantiation): Likewise. - (pp_cxx_declaration): Tidy. - (pp_cxx_pretty_printer_init): Initialize more fields. - -2003-08-25 Mark Mitchell - - PR c++/8795 - * cp-tree.h (build_cplus_method_type): Remove. - * call.c (standard_conversion): Use build_method_type_directly - instead of build_cplus_method_type. - * class.c (build_clone): Likewise. - (adjust_clone_args): Likewise. - * decl.c (build_ptrmem_type): Likewise. - (grokdeclarator): Likewise. - (check_function_type): Likewise. - * decl2.c (grok_method_quals): Likewise. - (maybe_retrofit_in_chrg): Likewise. - * pt.c (copy_default_args_to_explicit_spec): Likewise. - (tsubst_function_type): Likewise. - (tsubst): Likewise. - * tree.c (build_cplus_method_type): Remove. - * typeck.c (merge_types): Use build_method_type_directly. - -2003-08-23 Kriang Lerdsuwanakij - - PR c++/3765 - * search.c (dfs_access_in_type): Fix typo in comment. - (dfs_accessible_queue_p): Likewise. - (dfs_accessible_p): Only terminate when a friend is found. - (accessible_p): Return immediately if access_in_type allows - access. - -2003-08-23 Kriang Lerdsuwanakij - - PR c++/641, c++/11876 - * friend.c (add_friend): Add complain parameter. - (make_friend_class): Likewise. - (do_friend): Adjust add_friend call. - * decl.c (grokdeclarator): Adjust make_friend_class call. - * parser.c (cp_parser_member_declaration): Likewise. - (cp_parser_template_declaration_after_export): Likewise. - * pt.c (instantiate_class_template): Adjust make_friend_class - and add_friend call. - * cp-tree.h (make_friend_class): Adjust declaration. - (add_friend): Likewise. - -2003-08-21 Jason Merrill - - PR c++/11283 - * call.c (build_conditional_expr): Ignore cv-qual differences for - non-class types. - -2003-08-21 Mark Mitchell - - PR c++/11551 - * parser.c (cp_parser_id_expression): Add declarator_p parameter. - (cp_parser_primary_expression): Adjust call to - cp_parser_id_expression. - (cp_parser_unqualified_id): Complain about the use of - typedef-names in a destructor declarator. - (cp_parser_postfix_expression): Adjust call to - cp_parser_id_expression. - (cp_parser_type_parameter): Likewise. - (cp_parser_template_argument): Likewise. - (cp_parser_declarator_id): Likewise. - - PR c++/11919 - * call.c (standard_conversion): Use same_type_p, not pointer - equality, to compare types. - - PR c++/10762 - * parser.c (cp_parser_using_declaration): Check for invalid uses - of template-ids here... - * decl2.c (do_class_using_decl): ... rather than here. - -2003-08-20 Mark Mitchell - - PR c++/11834 - * pt.c (more_specialized): Bump processing_template_decl. - -2003-08-21 Jason Merrill - - PR c++/11614 - * decl.c (grokdeclarator): Recognize a flexible array based on the - type, not the form of the declarator. - -2003-08-20 Jason Merrill - - * semantics.c (simplify_aggr_init_expr): Split out from - simplify_aggr_init_exprs_r. Convert slot address to match - the return type. - * cp-tree.h: Declare it. - * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the - DECL_NAME of a user variable. - -2003-08-20 Nathan Sidwell - - PR c++/11945 - * pt.c (build_non_dependent_expr): Look inside COND_EXPR and - COMPOUND_EXPR. - * semantics.c (finish_expr_stmt): Always convert to void. - * typeck.c (build_x_compound_exp): Always convert to void. - -2003-08-19 Mark Mitchell - - PR c++/11684 - * cp-tree.h (grok_op_properties): Change prototype. - * decl.c (grok_op_properties): Add complain parameter. - (grokfndecl): Pass it. - * pt.c (tsubst_decl): Adjust accordingly. - - PR c++/10926 - * decl.c (start_method): Return immediately if push_template_decl - does not like the declaration. - * pt.c (push_template_decl_real): Disallow member template - destructors. - - PR c++/11036 - * cp-tree.h (add_binding): Add prototype. - * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate. - (maybe_warn_about_overly_private_class): Use - CLASSTYPE_DESTRUCTORS. - (pushclass): Adjust call to set_identifier_type_value. - * decl.c (add_binding): Give it external linkage. - (push_local_binding): Adjust call to add_binding. - (push_class_binding): Likewise. - (set_identifier_type_value_with_scope): Change prototype. Use - add_binding for global bindings. - (set_identifier_type_value): Adjust accordingly. - (pushtag): Likewise. - (pushdecl): Use set_identifier_type_value, not - set_identifier_type_value_with_scope. - (pushdecl_namespace_level): Adjust calls to - SET_IDENTIFIER_TYPE_VALUE to pass a DECL. - (pushdecl_class_level): Likewise. - (lookup_tag): Use select_decl. - (select_decl): Improve comment. - (record_builtin_type): Do not call pushdecl. - (cxx_init_decl_processing): Do not call xref_tag for bad_alloc. - (cp_finish_decl): Adjust call to set_identifier_type_value. - (check_elaborated_type_specifier): Improve checks for invalid uses - of typedefs. - (xref_tag): Adjust call to check_elaborated_type_specifier. - * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR. - * name-lookup.c (set_namespace_binding): Use add_binding. - * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL, - rather than an IDENTIFIER_NODE, to represent built-in types, if - requested by the caller. - (cp_parser_postfix_expression): Adjust call. - (cp_parser_type_specifier): Likewise. - (cp_parser_elaborated_type_specifier): Adjust call to - check_elaborated_type_specifier. - * typeck2.c (build_functional_cast): Do not perform name lookups. - - PR c++/10717 - * decl.c (expand_static_init): Remove unnecessary code. - -2003-08-19 Andrew Pinski - - PR c++/10538, PR c/5582 - * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define. - -2003-08-19 Kriang Lerdsuwanakij - - PR c++/11174 - * init.c (build_offset_ref): Perform access checking for - pointer to member correctly. - -2003-08-19 Gabriel Dos Reis - - * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling. - -2003-08-18 Nathan Sidwell - - PR c++/11957 - * cp-tree.h (finish_stmt_expr): Add bool parameter. - * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't - adjust the stmt_expr here. - (build_vec_init): Use finish_stmt_expr_expr, convert result to - array type. - * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr - call. - * pt.c (tsubst_copy): Likewise. - * semantics.c (finish_stmt_expr): Add parameter. - - * pt.c (instantiate_class_template): Push to class's scope before - tsubsting base. - -2003-08-17 Jan Hubicka - - PR C++/11702 - * semantics.c (finish_id_expression): Mark all functions as used. - -2003-08-16 Nathan Sidwell - - PR c++/11512 - * cvt.c (convert_to_void): Indicate which side of conditional has - no effects, and rhs of comma operator. Test for no sideeffect - expressions here and always build a convert expr. - * init.c (expand_default_init): Convert the init to void. - * typeck.c (build_x_compound_expr): Do not check for side effects - here. - (build_compound_expr): Do not convert lhs when building a - template. - -2003-08-15 Nathan Sidwell - - * cp-tree.def (NON_DEPENDENT_EXPR): Add operand. - * decl2.c (build_offset_ref_call_from_tree): Use - build_non_dependent_expr. - * error.c (dump_expr) : Dump the operand. - * pt.c (build_non_dependent_expr): Set operand. - -2003-08-14 Jan Hubicka - - * decl2.c (mark_member_pointers): Rename to... - (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos - (lower_function): Update call. - * except.c (eh_type_info): Break out from ... - (build_eh_type): ... here; tinfo is already used. - (finish_eh_spec_block): Mark tinfos as used. - * semantics.c (finish_handler_params): Mark tinfo as used. - * cp-tree.h (eh_type_info): Declare. - -2003-08-15 Nathan Sidwell - - * pt.c (instantiate_class_template): Set location before - substuting bases. - - * decl.c (make_typename_type): Use my_friendly_assert. - * pt.c (tsubst_aggr_type): Rearrange context substitution. - -2003-08-14 Jan Hubicka - - * method.c (use_thunk): Expand body directly. - -2003-08-12 Mark Mitchell - - PR c++/11703 - * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to - determine whether or not to promote types. - (convert_for_arg_passing): Likewise. - * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in - templates. - * pt.c (tsubst_decl): Do not expect it to be set. - - PR c++/9512 - PR c++/10923 - * cp-tree.h (check_elaborated_type_specifier): Declare. - (handle_class_head): Remove. - (note_got_semicolon): Likewise. - (note_list_got_semicolon): Likewise. - (finish_class_definition): Likewise. - * decl.c (check_elaborated_type_specifier): Make it public. - Robustify. - (handle_class_head): Remove. - * parser.c (cp_parser_elaborated_type_specifier): Use - check_elaborated_type_specifier. - (cp_parser_class_specifier): Do not call finish_class_definition. - (cp_parser_class_head): Or handle_class_head. Check for - over-qualified names. - * semantics.c (finish_class_definition): Remove. - - * parser.c (cp_parser_check_for_definition_in_return_type): New - function. - (cp_parser_simple_declaration): Adjust call to - cp_parser_init_declarator. - (cp_parser_decl_specifier_seq): Change type of - declares_class_or_enum parameter. - (cp_parser_explicit_instantiation): Adjust accordingly. - (cp_parser_type_specifier): Change type of - declares_class_or_enum parameter. - (cp_parser_init_declarator): Add declares_class_or_enum - parameter. - (cp_parser_parameter_declaration): Adjust call to - cp_parser_decl_specifier_seq. - (cp_parser_function_definition): Likewise. - (cp_parser_member_declaration): Likewise. - (cp_parser_single_declaration): Likewise. - - * cp-tree.h (lang_type_class): Remove has_call_overloaded, - has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon. - (TYPE_OVERLOADS_CALL_EXPR): Remove. - (TYPE_OVERLOADS_ARRAY_REF): Likewise. - (TYPE_OVERLOADS_ARROW): Likewise. - (CLASSTYPE_GOT_SEMICOLON): Likewise. - * class.c (check_bases): Do not set them. - (finish_struct_1): Likewise. - * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON. - (build_ptrmemfunc_type): Likewise. - (grok_op_properties): Do not set TYPE_OVERLOADS_*. - (start_function): Do not check CLASSTYPE_GOT_SEMICOLON. - * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON. - * lex.c (note_got_semicolon): Remove. - (note_list_got_semicolon): Likewise. - * parser.c (cp_parser_simple_declaration): Do not call - note_list_got_semicolon. - * pt.c (list_eq): Remove. - (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON. - (instantiate_class_template): Do not set TYPE_OVERLOADS*. - (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON. - * ptree.c (cxx_print_type): Do not print them. - * semantics.c (finish_member_class_template): Do not call - note_list_got_semicolon. - -2003-08-11 Aldy Hernandez - - * call.c (standard_conversion): Opaque pointers interconvert. - - * testsuite/g++.dg/other/opaque-3.C: New. - -2003-08-11 Mark Mitchell - - * typeck.c (merge_types): Handle cv-qualified pointer-to-member - types correctly. - -2003-08-10 Mark Mitchell - - PR c++/11789 - * cp-tree.h (get_vbase): Remove. - (get_vbase_types): Remove. - * init.c (expand_member_init): Correct logic for looking up base - classes. - -2003-08-10 Gabriel Dos Reis - - * error.c (dump_expr): Tidy. - * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New. - (pp_cxx_begin_template_argument_list): Likewise. - (pp_cxx_end_template_argument_list): Likewise. - (is_destructor_name): Likewise. - (pp_cxx_unqualified_id): Likewise. - (pp_cxx_qualified_id): Likewise. - (pp_cxx_id_expression): Likewise. - (pp_cxx_new_expression): Likewise. - (pp_cxx_delete_expression): Likewise. - (pp_cxx_pm_expression): Likewise. - (pp_cxx_type_specifier): Rework. - (pp_cxx_type_id): Likewise. - (pp_cxx_primary_expression): Likewise. - (pp_cxx_postfix_expression): Likewise. - (pp_cxx_unary_expression): Likewise. - (pp_cxx_multiplicative_expression): Likewise. - (pp_cxx_conditional_expression): Likewise. - (pp_cxx_assignment_expression): Likewise. - (pp_cxx_pretty_printer_init): Tidy. - -2003-08-10 Nathan Sidwell - - * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL - NODE is always a TREE_VEC of nonzero size. - (NUM_TMPL_ARGS): NODE is always a TREE_VEC. - * decl2.c (arg_assoc): Template args will be a vec. - * error.c (dump_decl) : Call - dump_template_argument_list. - (dump_template_parms): Args will be a vec. - * parser.c (cp_parser_template_argument_list): Produce a - vector, not a list. - * pt.c (coerce_template_parms): Args are always vectors. - (mangle_class_name_for_template): Likewise. - (lookup_template_function): Likewise. - (lookup_template_class): Likewise. - (tsubst_template_args): Likewise. - (tsubst_baselink): Use tsubst_template_args. - (tsubst_qualified_id): Likewise. - (tsubst_copy) : Likewise. - (tsubst_copy_and_build) : Likewise. - (any_dependent_template_args_p): Args are always vectors. - * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case. - - PR c++/11670 - * call.c (convert_like_real): Add rvalue binding error message. - * error.c (dump_expr) : Detect when the no expr is - really a cast. - - PR c++/10530 - * pt.c (dependent_type_p_r): A dependent template-id is a class - type with dependent template arguments, or a bound template - template parameter. - (type_dependent_expression_p): A template function decl cannot - have a dependent context. - -2003-08-07 Kriang Lerdsuwanakij - - PR c++/5767 - * parser.c (cp_parser_class_name): Return immediately when scope - is error_mark_node. - -2003-08-07 Aldy Hernandez - - * cp/Make-lang.in (cp/call.o): Add dependency for target.h. - - * cp/call.c (standard_conversion): Support opaque types. - Include target.h. - (strip_top_quals): Use cp_build_qualified_type instead of - TYPE_MAIN_VARIANT. - - * cp/typeck.c (convert_for_assignment): Support opaque types. - - * testsuite/g++.dg/other/opaque-1.C: New. - - * testsuite/g++.dg/other/opaque-2.C: New. - -2003-08-06 Aldy Hernandez - - * decl.c (grokparms): Use cp_build_qualified_type instead - TYPE_MAIN_VARIANT. - -2003-08-05 Gabriel Dos Reis - - * cxx-pretty-print.h: New file. - * cxx-pretty-print.c: Likewise. - * error.c (scratch_pretty_printer): Change type. - (init_error): Tidy. - (dump_aggr_type): Likewise. - (dump_global_iord): Likewise. - (dump_expr): Likewise. - (dump_char): Remove. - * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. - (cxx_initialize_diagnostics): New function. - * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o - (CXX_PRETTY_PRINT_H): New variable. - (cp/cxx-pretty-print.o): New rule. - (cp/cp-lang.o): Update dependence. - (cp/error.o): Likewise. - -2003-08-05 Steven Bosscher - - * cp-tree.h (struct lang_decl): Don't include c_lang_decl. - (DECL_DECLARED_INLINE_P): Remove. - * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P - if decl is a FUNCTION_DECL. This never made sense, but now it is - required to avoid a tree check failure. - * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC. - * optimize.c (maybe_clone_body): Likewise. - -2003-08-04 Roger Sayle - - * decl.c (cxx_insert_default_attributes): Delete. - * cp-tree.h (cxx_insert_default_attributes): Don't prototype. - * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. - -2003-08-03 Nathan Sidwell - - PR c++/11704 - * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with - unknown type. - - PR c++/11766 - * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to - member functions. - -2003-08-02 Nathan Sidwell - - PR c++/9447 - * cp-tree.def (USING_DECL): Document its type. - * class.c (pushclass): If we're entering a template, push any - dependent using decls it has. - * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is - a dependent scope. - * pt.c (tsubst_decl) : Set type. - (tsubst): Remove USING_DECL checks. - (type_dependent_expression_p): Remove USING_DECL case. - * semantics.c (finish_member_declaration): A USING_DECL's type - indicates whether it is dependent. - -2003-08-02 Nathan Sidwell - - * cp-tree.h (pushclass): Remove unneeded parameter. - * class.c (pushclass): Remove unneeded MODIFY parm. Adjust. - (push_nested_class): Adjust pushclass call. - * pt.c (instantiate_class_template): Likewise. - * semantics.c (begin_class_definition): Likewise. - -2003-08-01 Nathanael Nerode - - * typeck2.c (add_exception_specifier): Use 'bool' where appropriate. - -2003-08-01 Mark Mitchell - - PR c++/11697 - * decl.c (decls_match): Don't ignore the types of template - classes. - - PR c++/11744 - * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic. - -2003-08-01 Kriang Lerdsuwanakij - - PR c++/8442, c++/8806 - * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are - preferred. - (check_elaborated_type_specifier): Add allow_template_p - parameter. Check tag mismatch and class template. - (xref_tag): Add template_header_p parameter. Add assertion - that name is an IDENTIFIER_NODE. Remove implicit typename - warning. Simplify lookup process if globalize is true. - (cxx_init_decl_processing): Adjust call to xref_tag. - (xref_tag_from_type): Likewise. - * decl2.c (handle_class_head): Likewise. - * parser.c (cp_parser_elaborated_type_specifier, - cp_parser_class_head): Likewise. - * rtti.c (init_rtti_processing, build_dynamic_cast1, - tinfo_base_init, emit_support_tinfos): Likewise. - * class.c (is_base_of_enclosing_class): Remove. - * pt.c (convert_template_argument): Don't accept RECORD_TYPE as - template template argument. - * cp-tree.h (xref_tag): Adjust declaration. - (is_base_of_enclosing_class): Remove. - * NEWS: Document template template argument change. - -2003-08-01 Nathan Sidwell - - * parser.c (cp_parser_init_declarator, - cp_paser_member_declaration): Reformat. - * pt.c (lookup_template_class, type_unification_real, unify, - type_dependent_expression_p): Reformat. - - PR c++/11295 - * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd, - tf_stmt_expr_body. - (finish_stmt_expr_expr): Declare. - * parser.c (cp_parser_primary_expression): Tell - cp_parser_compount_statement that it is a statement expression. - (cp_parser_statement, cp_parser_labeled_statement, - cp_parser_compound_statement, cp_parser_statement_seq_opt): Add - in_statement_expr_p parameter. - (cp_parser_expression_statement): Likewise. Call - finish_stmt_expr_expr for final expression of a statement - expression. - (cp_parser_for_init_statement, - cp_parser_implicitly_scoped_statement, - cp_parser_already_scoped_statement, cp_parser_function_definition, - cp_parser_try_block, cp_parser_handled): Adjust. - * pt.c (tsubst_copy) : Pass tf_stmt_expr. - (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags. - (tsubst_expr) : Check tf_stmt_exprs flag. - * semantics.c (finish_expr_stmt): Do not deal with statement - expressions. - (begin_stmt_expr): Clear last_expr_type. - (finish_stmt_expr_expr): New. - (finish_stmt_expr): Process the value expression. - - * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the - compound expr inside the target's initializer. - - PR c++/11525 - * parser.c (cp_parser_primary_expression): Do not set - non-constant-p merely because it is a dependent scope. - - PR c++/9447 - * decl2.c (do_class_using_decl): Set type to NULL_TREE. - * semantics.c (finish_expr_stmt): Do not convert to void in a - template. - -2003-07-31 Nathan Sidwell - - * pt.c (coerce_template_parms): Refactor. - (fn_type_unification): Increment processing_template_decl when - tsubsting an incomplete set of explicit args. - - PR c++/11347 - * pt.c (instantiate_class_template): Increment - processing_template_decl around the tsubst of a template member - class. - (tsubst_qualified_id): Assert we do not have a dependent scope. - - * pt.c (coerce_template_template_parms, lookup_template_class, - can_complete_type_without_circularity, instantiate_class_template, - tsubst_decl, unify): Reformat. - -2003-07-31 Jan Hubicka - - * decl2.c (maybe_make_one_only): Use mark_referenced. - * method.c (use_thunk): Likewsie. - -2003-07-30 Jan Hubicka - - * class.c (build_vtable_entry_ref): Kill. - (build_vtbl_ref_1): Do not call build_vtable_entry_ref. - (build_vfn_ref): Do not call build_vtable_entry_ref. - * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill. - * cp-tree.h (prepare_assemble_variable): Kill. - * cp-decl.c (prepare_assemble_variable): Kill. - -2003-07-29 Geoffrey Keating - - * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead - of setting valid_pch by hand. - -2003-07-29 Rainer Orth - - * decl.c (finish_enum): Initialize underlying_type. - -2003-07-29 Nathan Sidwell - - PR c++/9447 - * decl.c (add_binding): Add bval local variable. - (push_class_level_binding): Likewise. Allow a USING_DECL to be - pushed. - * decl2.c (do_class_using_decl): The type of a using decl is - unknown. - * parser.c (cp_parser_postfix_expression): Refactor unqualified-id - function call lookup code. - * pt.c (tsubst): A USING_DECL will have unknown type. - (tsubst_copy_and_build): Allow a using decl. - (type_dependent_expression_p): A USING_DECL will make it - dependent. - * semantics.c (finish_member_declaration): Push a dependent using - declaration. - -2003-07-28 Mark Mitchell - - PR c++/11530 - * parser.c (cp_parser_postfix_expression): Do not call mark_used. - * semantics.c (finish_id_expression): Call mark_used for all - declarations. - -2003-07-28 Mark Mitchell - - PR c++/11667 - * call.c (standard_conversion): Allow all integral->enumeral - conversions, after marking them as bad. - * decl.c (finish_enum): Make sure that all enumerators are - properly converted to the underlying type. - (build_enumerator): Set DECL_CONTEXT for namespace-scope - enumeration types. - * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly. - (tsubst_enum): Tidy. - - * Make-lang.in (typeck.o): Depend on convert.h. - (class.o): Likewise. - (rtti.o): Likewise. - * call.c: Include convert.h. - (convert_arg_to_ellipsis): Use convert_to_real. - * class.c: Include convert.h. - (build_base_path): Use convert_to_integer. - * rtti.c: Include convert.h. - (build_headof): Use convert_to_integer. - * typeck.c: Include convert.h. - (decay_conversion): Use convert_to_integer. - (build_unary_op): Use build_nop. - (get_delta_difference): Use convert_to_integer. - (build_ptrmemfunc): Avoid unnecessary conversions. - -2003-07-28 Jan Hubicka - - * decl2.c (mark_member_pointers): Verify that member pointer points to - the function. - -2003-07-28 Nathan Sidwell - - * cp-tree.h (begin_compound_stmt): No scope arg is a bool. - (finish_compound_stmt): Remove no scope arg. - * decl.c (register_dtor_fn): Adjust begin_compound_stmt and - end_compound_stmt calls. - (expand_static_init, begin_destructor_body, begin_function_body, - finish_function_body): Likewise. - * decl2.c (start_objects, finish_objects, - start_static_storage_duration_function, - finish_static_storage_duration_function): Likewise. - * init.c (begin_init_stmts, finish_init_stmts, - construct_virtual_base, build_vec_init): Likewise. - * method.c (do_build_assign_ref, synthesize_method): Likewise. - * parser.c (cp_parser_compound_statement, - cp_parser_implicitly_scoped_statement, - cp_parser_already_scoped_statement): Likewise. - * pt.c (tsubst_expr): Likewise. - * semantics.c (begin_compound_stmt): No scope arg is a bool. - (finish_compound_stmt): Remove no scope arg. - - * error.c (dump_expr) : A compound expr is - always dyadic. - -2003-07-27 Mark Mitchell - - * call.c (standard_conversion): Tweak handling of - pointer-to-member types. - * pt.c (tsubst): Correctly qualify pointers-to-data member types. - * typeck.c (comp_ptr_ttypes_real): Check qualifiers on - pointer-to-data member types. - -2003-07-27 Nathan Sidwell - - * parser.c (cp_parser_type_parameter): Reformat. - (cp_parser_parameter_declaration): Deprecate default args where - not allowed. - -2003-07-26 Nathan Sidwell - - * cfns.h: Rebuilt. - - * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove. - (begin_global_stmt_expr, finish_global_stmt_expr): Remove. - * init.c (begin_init_stmts): Make static. Return is_global - value. Always call begin_stmt_expr. - (finish_init_stmts): Make static. Add is_global parm. Always - building a stmt tree. - (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls. - (build_vec_init): Likewise. Always building a stmt tree. - (expand_default_init): Always building a stmt tree. - (get_temp_regvar): Likewise. - * semantics.c (begin_global_stmt_expr, - finish_global_stmt_expr): Remove. - -2003-07-25 Nathan Sidwell - - * cp-tree.h (build_compound_expr): Take LHS & RHS args. - (build_x_compound_expr_from_list): Declare. - * typeck.c (build_x_compound_expr_from_list): New. - (build_x_compound_expr): Adjust. - (build_compound_expr): Remove unreachable code. Take two - parameters, adjust. - * decl.c (grok_reference_init): Use - build_x_compound_expr_from_list. - (expand_static_init): Adjust build_compound_expr call. - (cxx_maybe_build_cleanup): Likewise. - * init.c (perform_member_init): Use - build_x_compound_expr_from_list. - (build_new_1): Likewise. - (build_vec_delete): Adjust build_compound_expr calls. - (build_vbase_delete): Likewise. - * typeck2.c (store_init_value): Use - build_x_compound_expr_from_list. - (build_functional_cast): Likewise. - -2003-07-25 Nathan Sidwell - - * cp-tree.h (enum tsubst_flags_t): Add tf_user. - * decl.c (make_typename_type): Pass it. - * pt.c (lookup_template_class): Use it. - (resolve_typename_type): Pass it. - * semantics.c (finish_template_type): Pass it. - -2003-07-25 Nathan Sidwell - - PR c++/11617 - * cp-tree.h (qualified_name_lookup_error): Declare. - * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for - errors. - (tsubst_expr) : Likewise. - (tsubst_copy_and_build) : Likewise. - * semantics.c (qualified_name_lookup_error): New, broken out of ... - (finish_id_expression): ... here. Use it. - -2003-07-25 Falk Hueffner - - * cfns.gperf: Add '%%' delimiter to placate gperf 3.0. - -2003-07-25 Nathan Sidwell - - PR c++/11596 - * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove. - (tsubst_template_arg): New. - (tsubst_template_arg_vector): Rename to ... - (tsubst_template_args): ... this. Accept a TREE_LIST form. Use - tsubst_template_arg. - (coerce_template_parms): Use tsubst_template_arg for default - value. - (tsubst_template_parms): Likewise. - (tsubst_aggr_type): Adjust. - (tsubst_decl): Likewise. - (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust. - (tsubst_copy) : Use tsubst_template_args. - -2003-07-25 Gabriel Dos Reis - - * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H. - * error.c: Use the new pretty-printer framework. - -2003-07-24 Per Bothner - - * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc - which causes errors messages to incorrectly mention included files. - -2003-07-24 Mark Mitchell - - * cp-tree.h (convert_to_base_statically): Declare. - * call.c (build_special_member_call): Convert INSTANCE to the base - type. - * class.c (convert_to_base_statically): New method. - * init.c (construct_virtual_base): Use it. - * method.c (do_build_assign_ref): Fix typo in comment. - -2003-07-24 Jason Merrill - - * decl.c: Just set truthvalue_* to boolean_*. - -2003-07-24 Nathan Sidwell - - * decl.c (reshape_init): Remove unreachable code. - -2003-07-24 Kriang Lerdsuwanakij - - PR c++/11513 - * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope. - -2003-07-23 Mark Mitchell - - PR c++/11645 - * cp-tree.h (accessible_base_p): Declare. - * call.c (build_over_call): Use it. - * search.c (accessible_base_p): New function, split out from ... - (lookup_base): ... here. - - PR c++/11517 - * call.c (build_conditional_expr): Use perform_implicit_conversion - and error_operand_p. Robustify. - * typeck.c (build_unary_op): Use perform_implicit_conversion. - -2003-07-23 Nathan Sidwell - - PR c++/10953 - * parser.c (cp_parser_nested_name_specifier): Reset scope on - failure. - (cp_parser_elaborated_type_specifier): Likewise. - -2003-07-22 Mark Mitchell - - Eliminate use of POINTER_TYPE for pointers-to-members. - * call.c (standard_conversion): Rework pointer-to-member handling. - Add comments. - (add_builtin_candidate): Likewise. - (resolve_scoped_fn_name): Remove. - (build_conditional_expr): Rework pointer-to-member handling. - (compare_ics): Likewise. - * class.c (check_field_decls): Use TYPE_PTR_P. - * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member - handling. - * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P. - (TYPE_PTRMEM_P): Add comment. - (TYPE_PTR_P): Simplify. - (TYPE_PTROB_P): Correct definition. - (TYPE_PTR_TO_MEMBER_P): New macro. - (TYPE_PTRMEM_CLASS_TYPE): Adjust. - (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. - (resolved_scoped_fn_name): Remove declaration. - (build_offset_ref): Change prototype. - (resolve_offset_ref): Remove. - (comp_target_types): Remove. - * cvt.c (cp_convert_to_pointer): Rework pointer-to-member - handling. - (convert_to_reference): Use can_convert. - (ocp_convert): Improve error handling. Rework pointer-to-member - handling. - (perform_qualification_conversions): Rework pointer-to-member - handling. - * decl.c (build_ptrmem_type): Handle functions too. - (create_array_type_for_decl): Remove OFFSET_TYPE error message. - (grokdeclarator): Use OFFSET_TYPE for pointers to data members. - (grokparms): Remove OFFSET_TYPE error message. - * dump.c (cp_dump_tree): Rework pointer-to-member handling. - * error.c (dump_type_prefix): Likewise. - * expr.c (cplus_expand_constant): Use build_nop. - * init.c (build_offset_ref): Add address_p parameter. Fold in - necessary bits from resolve_offset_ref. - (resolve_offset_ref): Remove. - * parser.c (cp_parser_postfix_expression): Remove special case - code for OFFSET_TYPE. - * pt.c (convert_nontype_argument): Rework pointer-to-member - handling. - (convert_template_argument): Likewise. - (unify): Likewise. - (invalid_nontype_parm_type_p): Likewise. - (dependent_type_p_r): Likewise. - * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case. - (target_incomplete_p_): Rework pointer-to-member - handling. - (get_pseudo_ti_init): Likewise. - (get_pseudo_ti_desc): Likewise. - * semantics.c (finish_qualified_id_expr): Adjust call to - build_offset_ref. Remove use of resolve_offset_ref. - * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P. - * typeck.c (target_type): Use TYPE_PTRMEM_P. - (type_unknown_p): Remove obsolete code about the time before - non-dependent expressions were handled correctly. - (qualify_type_recursive): Remove. - (composite_pointer_type_r): New function. - (composite_pointer_type): Use it. - (merge_types): Remove dead comments. - (comp_cv_target_types): Remove. - (comp_target_types): Likewise. - (comp_target_parms): Likewise. - (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error. - (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P. - (build_binary_op): Do not use of comp_target_types. - (pointer_diff): Remove OFFSET_TYPE case. - (build_unary_op): Adjust pointer-to-member handling. - (unary_complex_lvalue): Likewise. - (check_for_casting_away_constness): Add description parameter. - (build_static_cast): Pass it. - (build_reinterpret_cast): Use check_for_casting_away_constness. - (build_const_cast): Adjust pointer-to-member handling. - (build_c_cast): Likewise. - (convert_for_assignment): Remove OFFSET_TYPE error message. - (comp_ptr_ttypes_real): Adjust pointer-to-member handling. - (comp_ptr_ttypes_reinterpret): Remove. - (casts_away_constness_r): Adjust pointer-to-member handling. - (casts_away_constness): Liekwise. - (strip_all_pointer_quals): Remove. - * typeck2.c (digest_init): Adjust pointer-to-member handling. - (build_m_component_ref): Likewise. - -2003-07-22 Wolfgang Bangerth - - * lex.c (unqualified_fn_lookup_error): Mention that the error - message needs to be kept in synch with the manual. - -2003-07-22 Nathan Sidwell - - PR c++/11614 - * decl.c (grokdeclarator): An array member is only a flexible - array member if the field itself is the array. - -2003-07-22 Kriang Lerdsuwanakij - - PR c++/10793 - * decl.c (xref_basetypes): Handle error_mark_node. - -2003-07-22 Nathan Sidwell - - * cp-tree.h (enum cp_lvalue_kind): Add clk_packed. - * tree.c (lvalue_p_1): Set it. - * class.c (check_field): Don't allow non-packed non-POD fields to - be packed. - * call.c (reference_binding): Need a temporary for all bitfield - and packed fields. - (convert_like_real): Check it is ok to make a temporary here. - -2003-07-21 Nathan Sidwell - - * cp-tree.h (hack_identifier): Remove. - * method.c (hack_identifier): Remove. - * semantics.c (finish_id_expression): Expand hack_identifier - here. Simplify. - -2003-07-19 Kaveh R. Ghazi - - * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c - semantics.c typeck.c: Remove unnecessary casts. - -2003-07-18 Nathan Sidwell - - * cp-tree.h (hack_identifier): Remove. - * method.c (hack_identifier): Remove. - * semantics.c (finish_id_expression): Expand hack_identifier - here. Simplify. - -2003-07-18 Nathan Sidwell - - * cp-tree.h (finish_non_static_data_member): Add object param. - * method.c (hack_identifier): Adjust. - * pt.c (tsubst_copy_and_build) : Don't search - again for a FIELD_DECL. - * semantics.c (finish_non_static_data_member): Add object - parameter. Always save the DECL in the COMPONENT_REF. - * call.c (resolve_scoped_fn_name): Adjust. - -2003-07-17 Zack Weinberg - - * pt.c (get_bindings): Make definition consistent with - forward declaration. - -2003-07-17 Kriang Lerdsuwanakij - - PR c++/7809 - * friend.c (add_friend): Check access for member functions - and templates. - -2003-07-17 Gabriel Dos Reis - - PR c++/10668 - * typeck.c (build_class_member_access_expr): Improve diagnostic. - -2003-07-16 Mark Mitchell - - PR c++/11547 - * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New - macro. - (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK. - * decl.c (duplicate_decls): Merge - DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. - * parser.c (cp_parser_postfix_expression): Adjust call to - cp_parser_initializer_list and - cp_parser_parenthesized_expression_list. - (cp_parser_parenthesized_expression_list): Add non_constant_p. - (cp_parser_new_placement): Adjust call to - cp_parser_parenthesized_expression_list. - (cp_parser_direct_new_declarator): Likewise. - (cp_parser_conditional_expression): Remove. - (cp_parser_constant_expression): Parse an assignment-expression, - not a conditional-expression. - (cp_parser_simple_declaration): Resolve expression/declaration - ambiguity more quickly. - (cp_parser_mem_initializer): Adjust call to - cp_parser_parenthesized_expression_list. - (cp_parser_init_declarator): Keep track of whether or not the - initializer is a constant-expression. - (cp_parser_initializer): Add non_constant_p parameter. - (cp_parser_initializer_clause): Likewise. - (cp_parser_initializer_list): Likewise. - (cp_parser_attribute_list): Adjust call to - cp_parser_parenthesized_expression_list. - (cp_parser_functional_cast): Likewise. - * pt.c (tsubst_decl): Copy - DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. - (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P. - * semantics.c (finish_id_expression): Use - DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. - -2003-07-16 Neil Booth - - * lang-options.h: Remove. - -2003-07-16 Andrew Pinski - - PR c/10962 - * class.c (field_decl_cmp): Remove. - (resort_field_decl_cmp): Remove. - (resort_sorted_fields): Remove. - (add_fields_to_vec): Rename to ... - (add_fields_to_record_type): this. - (finish_struct_1): Change to be using - sorted_fields_type's fields. - * cp-tree.h (lang_decl): In lang_decl_u3 - change sorted_fields to be a pointer to - sorted_fields_type. - (resort_sorted_fields): Remove prototype. - * search.c (lookup_field_1): Change to be using - sorted_fields_type's fields. - -2003-07-16 Kriang Lerdsuwanakij - - PR c++/5421 - * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend - is a member of other class. - * friend.c (do_friend): Don't build TEMPLATE_DECL if friend - is a specialization of function template. - -2003-07-16 Gabriel Dos Reis - - PR c++/10903 - * pt.c (convert_nontype_argument): Fix thinko in diagnostic. - Improve. - -2003-07-15 Mark Mitchell - - * cp-tree.def (LOOKUP_EXPR): Remove. - * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT. - (LOOKUP_EXPR_GLOBAL): Remove. - (get_bindings): Remove. - (is_aggr_type_2): Remove. - * call.c (resolved_scoped_fn_name): Remove support for - LOOKUP_EXPR. - * decl.c (grokfndecl): Likewise. - (grokdeclarator): Likewise. - * error.c (dump_decl): Likewise. - (dump_expr): Likewise. - * friend.c (do_friend): Likewise. - * init.c (build_offset_ref): Likewise. - * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create - LOOKUP_EXPRs - * mangle.c (write_expression): Remove support for LOOKUP_EXPR. - * parser.c (cp_parser_postfix_expression): Modify Koenig lookup - test. - * pt.c (get_bindings): Give it internal linkage. - (check_explicit_specialization): Remove support for LOOKUP_EXPR. - (lookup_template_function): Likewise. - (for_each_tempalte_parm_r): Likewise. - (tsubst_decl): Likewise. - (tsubst_qualified_id): Handle template template parameters. - (tsubst_copy): Remove support for LOOKUP_EXPR. - (tsubst_copy_and_build): Likewise. - (most_general_template): Likewise. - (value_dependent_expression_p): Likewise. - (type_dependent_expression_p): Note that IDENTIFIER_NODEs are - always dependent. - * semantics.c (perform_koenig_lookup): Do not create - IDENTIFIER_NODEs. - (finish_fname): Likewise. - (finish_id_expression): Likewise. - * tree.c (is_aggr_type_2): Remove. - -2003-07-16 Gabriel Dos Reis - - PR c++/11531 - * typeck.c (check_return_expr): Fix thinko in diagnostic. - -2003-07-15 Kriang Lerdsuwanakij - - PR c++/10108 - * pt.c (tsubst_decl) : Add a check for - error_mark_node. - -2003-07-14 Mark Mitchell - - PR c++/11509 - * pt.c (dependent_scope_ref_p): New function. - (value_dependent_expression_p): Use it. - (type_dependent_expression_p): Likewise. - - * pt.c (tsubst_friend_function): Use reregister_specialization. - - PR c++/7019 - * cp-tree.h (lookup_qualified_name): Adjust prototype. - * decl.c (lookup_qualified_name): Add complain parameter. Adjust - call to is_aggr_type. - * parser.c (cp_parser_lookup_name): Adjust call to - lookup_qualified_name. - * pt.c (tsubst_qualified_id): Likewise. - (tsubst_copy_and_build): Likewise. - * semantics.c (finish_qualified_id_expr): Deal with erroneous - expressions. - -2003-07-14 Gabriel Dos Reis - - PR c++/11510 - * call.c (op_error): Properly format REALPART_EXPR and - IMAGPART_EXPR. - * error.c (dump_expr): Likewise. - -2003-07-14 Gabriel Dos Reis - - * error.c (dump_expr): Handle EMPTY_CLASS_EXPR. - -2003-07-14 Gabriel Dos Reis - - PR c++/5293 - * call.c (initialize_reference): Improve diagnostic. - -2003-07-14 Kriang Lerdsuwanakij - - PR c++/11154 - * pt.c (more_specialized_class): Add full_args parameter. - (most_specialized_class): Adjust calls to more_specialized_class. - * cp-tree.h (more_specialized_class): Adjust declaration. - -2003-07-14 Dan Nicolaescu - - * lex.c (enum tree_node_kind): Delete. - -2003-07-13 Mark Mitchell - - PR c++/11503 - * cp-tree.h (DECL_SELF_REFERENCE_P): New macro. - (SET_DECL_SELF_REFERENCE_P): Likewise. - * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P. - * pt.c (tsubst_decl): Copy it. - * search.c (lookup_base): Use DECL_SELF_REFERENCE_P. - - * pt.c (reregister_specialization): Fix thinko in previous change. - - * cp-tree.h (cp_id_kind): New type. - (unqualified_name_lookup_error): Change prototype. - (unqualified_fn_lookup_error): New function. - (do_identifier): Remove. - (do_scoped_id): Likewise. - (tsubst_copy_and_build): Change prototype. - (reregister_specialization): New function. - (perform_koenig_lookup): Likewise. - (finish_id_expression): Likewise. - * call.c (build_method_call): Adjust call to - unqualified_name_lookup_error. - * decl.c (duplicate_decls): Use reregister_specialization. - * lex.c (is_global): Remove. - (unqualified_name_lookup_error): Return a value. - (do_identifier): Remove. - (do_scoped_id): Likewise. - (identifier_typedecl_value): Remove. - (unqualified_fn_lookup_error): New function. - * parser.c (cp_parser_id_kind): Remove. - (cp_parser_non_constant_id_expression): Remove. - (cp_parser_primary_expression): Use finish_id_expression. - (cp_parser_class_or_namespace_name): Use cp_id_kind, not - cp_parser_id_kind. - (cp_parser_postfix_expression): Use perform_koenig_lookup. - (cp_parser_template_argument): Use cp_id_kind. - (cp_parser_fold_non_dependent_expr): Adjust call to - tsubst_copy_and_build. - * pt.c (unregister_specialization): Rename to ... - (reregister_specialization): This. - (tsubst_friend_function): Use it. - (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build. - (tsubst_qualified_id): Likewise. - (tsubst_expr): Likewise. - (tsubst_copy_and_build): Add function_p parameter. Use - finish_id_expression. Introduce RECUR macro. - (tsubst_non_call_postfix_expression): New function. - (regenerate_decl_from_template): Use reregister_specialization. - * semantics.c (perform_koenig_lookup): New function. - (finish_id_expression): Likewise. - -2003-07-13 Kriang Lerdsuwanakij - - * pt.c (push_access_scope_real): Remove. - (push_access_scope): Move code from push_access_scope_real. - (pop_access_scope): Don't check for TEMPLATE_DECL. - (instantiate_template): Defer access checking during template - substitution. - (regenerate_decl_from_template): Tidy. - -2003-07-11 Nathanael Nerode - - PR c++/11437 - * operators.def: Add definitions for __imag__, __real__. - -2003-07-11 Nathan Sidwell - - PR c++/11050 - * parser.c (cp_parser_expression_list): Rename to ... - (cp_parser_parenthesized_expression_list): ... here. Add attribute - parameter, parse the surounding parentheses. - (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma - parameters. Return int. - (cp_parser_skip_to_closing_parenthesis or comma): Remove. - (cp_parser_postfix_expression): Adjust function call parsing. - (cp_parser_new_placement): Adjust. - (cp_parser_new_initializer): Likewise. - (cp_parser_cast_expression): Likewise. - (cp_parser_selection_statement): Likewise. - (cp_parser_mem_initializer): Likewise. - (cp_parser_asm_definition): Likewise. - (cp_parser_init_declarator): Likewise. - (cp_parser_declarator): Make - cdtor_or_conv_p an int ptr. - (cp_parser_direct_declarator): Likewise. Check for a parameter - list on cdtors & conv functions. - (cp_parser_initializer): Adjust. - (cp_parser_member_declaration): Adjust. - (cp_parser_attribute_list): Move code into - cp_parser_parens_expression_list. - (cp_parser_functional_cast): Adjust. - * pt.c (type_dependent_expression_p): Erroneous expressions are - non-dependent. - -2003-07-11 Geoffrey Keating - - * decl.c (cp_finish_decl): Handle 'used' attribute. - - * cp-lang.c (c_reset_state): New dummy routine. - * cp-tree.h (finish_file): Move prototype to c-common.h. - * parser.c (c_parse_file): Rename from yyparse; don't call finish_file. - -2003-07-11 Mark Mitchell - - PR c++/8327 - * pt.c (tsubst_qualified_id): Implement suggested resolution for - Core Issue 2. - (type_dependent_expression_p): Likewise. - -2003-07-10 Mark Mitchell - - * typeck.c (build_binary_op): Do not warn about signed - vs. unsigned comparisons in the bodies of templates. - - PR c++/9411 - * parser.c (cp_parser_postfix_expression): Check dependency of - functions. - -2003-07-09 Mark Mitchell - - PR c++/10032 - * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are - still errors. - - PR c++/10527 - * error.c (decl_to_string): Do not print default argument - expressions. - - * cp-tree.h (break_out_calls): Remove declaration. - * tree.c (break_out_calls): Remove. - * typeck.c (build_modify_expr): Avoid invalid sharing of trees. - -2003-07-09 Nathan Sidwell - - PR c++ 9483 - * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p. - * decl2.c (constructor_name_p): Avoid repeated constructor_name - calls. - * decl.c (grokdeclarator): Refactor ctor/dtor detection. - -2003-07-09 Mark Mitchell - - * typeck.c (build_x_unary_op): Take note of the fact that - PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on - trees. - - * parser.c (cp_parser_primary_expression): Preserve the form of - qualified expressions in templates, even if they are not - dependent. - * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs. - (tsubst_qualified_id): Likewise. - * search.c (accessible_p): Treat everything in the body of a - template as accessible. - -2003-07-08 Mark Mitchell - - * cp-tree.def (NON_DEPENDENT_EXPR): New node. - * cp-tree.h (build_call_from_tree): Remove. - (build_member_call): Likewise. - (dependent_template_arg_p): Remove. - (any_dependent_template_arguments_p): New function. - (dependent_template_id_p): Likewise. - (any_type_dependent_arguments_p): Likewise. - (build_non_dependent_expr): Likewise. - (build_non_dependent_args): Likewise. - (build_x_compound_expr): Adjust prototype. - * call.c (build_new_method_call): Handle non-dependent expressions - correctly. - * decl2.c (grok_array_decl): Likewise. - (build_offset_ref_call_from_tree): Likewise. - (build_call_from_tree): Remove. - * error.c (dump_decl): Handle NON_DEPENDENT_EXPR. - (dump_expr): Likewise. - * init.c (build_member_call): Remove. - * mangle.c (write_expression): Update handling for template-ids. - * parser.c (cp_parser_primary_expression): Use - any_dependent_template_arguments_p. Update constant-expression - handling. - (cp_parser_postfix_expression): Use - any_type_dependent_arguments_p. Simplify call processing. - (cp_parser_unary_expression): Simplify. - (cp_parser_expression): Adjust for changes to - build_x_compound_expr. - (cp_parser_template_argument): Implement standard-conforming - parsing of non-type template arguments. - (cp_parser_direct_declarator): Use - cp_parser_fold_non_dependent_expr. - (cp_parser_fold_non_dependent_expr): New function. - (cp_parser_next_token_ends_template_argument_p): Likewise. - * pt.c (convert_template_argument): Do not call - maybe_fold_nontype_arg. - (tsubst_baselink): Likewise. - (tsubst_copy_and_build): Share common code. Make sizeof/alignof - processing work correctly for non-dependent expressions. Adjust - handling of COMPOUND_EXPR. Simplify call processing. - (value_dependent_expression_p): Deal with functional casts and - sizeof/alignof correctly. - (type_dependent_expression_p): Handle overloaded functions. - (any_type_dependent_arguments_p): New function. - (any_dependent_template_arguments_p): Likewise. - (dependent_template_p): Treat SCOPE_REFs as dependent. - (dependent_template_id_p): Simplify. - (build_non_dependent_expr): New function. - (build_non_dependent_args): Likewise. - * semantics.c (finish_stmt_expr): Don't make dependent - statement-expresions have void type. - (finish_call_expr): Handle non-dependent expressions - correctly. - * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues. - * typeck.c (cxx_sizeof_or_alignof_type): Give the expression - type size_t, even in templates. - (expr_sizeof): Likewise. - (finish_class_member_access_expr): Handle non-dependent expressions - correctly. - (build_x_indirect_ref): Likewise. - (build_x_binary_op): Likewise. - (build_x_unary_op): Likewise. - (build_x_conditional_expr): Likewise. - (build_x_compound_expr): Likewise. - * typeck2.c (build_x_arrow): Likewise. - -2003-07-09 Jan Hubicka - - * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. - * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS. - (start_function): Use DECL_ESTIMATED_INSNS. - * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS. - - * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in - unit-at-a-time - -2003-07-08 Kriang Lerdsuwanakij - - PR c++/11030 - * pt.c (instantiate_class_template): Don't call xref_tag to - inject name when the friend class is a specialization. - -2003-07-07 Mark Mitchell - - * cp-tree.h (build_scoped_method_call): Remove. - (lookup_qualified_name): Remove parameter. - (tsubst_copy_and_build): Declare. - (finish_qualified_object_call_expr): Remove. - (check_accessibility_of_qualified_id): New function. - (finish_qualified_id_expr): Likewise. - (non_reference): Likewise. - (build_expr_from-tree): Remove. - * call.c (non_reference): Remove. - (build_scoped_method_call): Likewise. - (build_method_call): Use error_operand_p. Assert that we are not - processing a template. - (standard_conversion): Use non_reference. - * class.c (build_vtbl_entry_ref): Likewise. - (build_vtbl_ref_1): Likewise. - * cvt.c (build_expr_type_conversion): Use non_reference. - * decl.c (lookup_qualified_name): Remove flags parameter. - (grok_op_properties): Use non_reference. - * decl2.c (grok_array_decl): Likewise. - (build_expr_from_tree): Remove. - (build_offset_ref_call_from_tree): Update comment. - * error.c (parm_to_string): Call reinit_global_formatting_buffer. - * except.c (prepare_eh_types): Use non_reference. - (can_convert_eh): Likewise. - * init.c (build_dtor_call): Avoid using build_method_call. - * mangle.c (write_template_param): Remove misleading comment. - * method.c (locate_copy): Use non_reference. - * parser.c (cp_parser_scope_through_which_access_occurs): Remove. - (cp_parser_primary_expression): Do not create SCOPE_REFs is - non-dependent contexts. - (cp_parser_postfix_expression): Use finish_qualified_id_expr. - (cp_parser_direct_declarator): Use tsubst_copy_and_build, not - build_expr_from_tree. - (cp_parser_lookup_name): Adjust call to lookup_qualified_name. - Use check_accessibility_of_qualified_id. - * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not - build_expr_from_tree. - (tsubst_baselink): New function. - (tsubst_qualified_id): Likewise. - (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR. - (tsubst_expr): Adjust call to lookup_qualified_name. - (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust - handling of CALL_EXPRs. - (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P. - * rtti.c (get_tinfo_decl_dynamic): Use non_reference. - * search.c (check_final_overrider): Likewise. - * semantics.c (check_accessibility_of_qualified_id): New function. - (finish_qualified_object_call_expr): Remove. - * typeck.c (target_type): Use non_reference. - (cxx_sizeof_or_alignof_type): Likewise. - (dubious_conversion_warnings): Likewise. - (convert_for_initialization): Likewise. - (non_reference): New function. - -2003-07-07 Kaveh R. Ghazi - - * decl.c (print_binding_level, print_other_binding_stack, - print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent - stdio calls. - * ptree.c (cxx_print_decl, cxx_print_binding): Likewise. - -2003-07-07 Andreas Jaeger - - * friend.c: Convert to ISO C90 prototypes. - - * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output - language. - * cfns.h: Regenerate. - - * typeck.c: Convert remaining prototypes to ISO C90. - * search.c: Likewise. - - * decl2.c (build_expr_from_tree): Convert prototype to ISO C90. - * semantics.c (expand_or_defer_fn): Likewise - * mangle.c (discriminator_for_string_literal): Likewise. - * g++spec.c (lang_specific_driver): Likewise. - - * search.c (lookup_base_r): Remove unused variable. - -2003-07-07 Nathan Sidwell - - * semantics.c: (genrtl_try_block) Adjust emit_line_note - calls. - -2003-07-07 Andreas Jaeger - - * search.c (lookup_base_r): Remove unused variable. - -2003-07-06 Michael Chastain - - PR debug/10055 - * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than - assigning to input_filename directly. - -2003-07-06 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cp-tree.h: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * error.c: Likewise. - * method.c: Likewise. - * name-lookup.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * typeck.c: Likewise. - -2003-07-06 Mark Mitchell - - PR c++/11345 - * search.c (lookup_base_r): Remove is_non_public and - within_current_scope parameters. Remove other dead code. - (lookup_base): Adjust call to lookup_base_r. - (adjust_result_of_qualified_name_lookup): Improve comment. - * semantics.c (finish_call_expr): Use maybe_dummy_object. - -2003-07-06 Neil Booth - - * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME, - LANG_HOOKS_MISSING_ARGUMENT): Override. - -2003-07-05 Mark Mitchell - - PR c++/11431 - * typeck.c (build_static_cast): Check for reference conversions - earlier. - -2003-07-04 Mark Mitchell - - * cp-tree.h (perform_integral_promotions): Declare. - * call.c (build_addr_func): Use decay_conversion. - (convert_arg_to_ellipsis): Likewise. Remove misleading comment. - (convert_for_arg_passing): Use perform_integral_promotions. - * cvt.c (build_expr_type_conversion): Use decay_conversion. - (type_promotes_to): Do not return a cv-qualified type. - * decl.c (grok_reference_init): Fix formatting. - (get_atexit_node): Use decay_conversion. - (build_enumerator): Use perform_integral_promotions. - * init.c (build_vec_init): Use decay_conversion. - * semantics.c (finish_expr_stmt): Likewise. - (finish_switch_cond): Use perform_integral_promotions. - * typeck.c (default_conversion): Likewise. - (perform_integral_promotions): New function. - (build_indirect_ref): Use decay_conversion. - (build_array_ref): Use perform_integral_promotions. - (convert_arguments): Use decay_conversion. - (build_unary_op): Use perform_integral_promotions. - (build_c_cast): Use decay_conversion. - (build_modify_expr): Likewise. - (convert_for_initialization): Likewise. - * typeck2.c (build_x_arrow): Likewise. - -2003-07-04 Kazu Hirata - - * call.c: Fix comment typos. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * decl2.c: Likewise. - * decl.c: Likewise. - * init.c: Likewise. - * mangle.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2003-07-04 Zack Weinberg - - * parser.c (cp_lexer_read_token): No need to handle string - constant concatenation. - -2003-07-03 Kaveh R. Ghazi - - * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define. - (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with - ATTRIBUTE_GCC_CXXDIAG. - -2003-07-03 Mark Mitchell - - * call.c (build_addr_func): Handle bound pointers-to-members. - (build_method_call): Do not call resolve_offset_ref. - (implicit_conversion): Likewise. - (resolve_scoped_fn_name): Use finish_non_static_data_member, not - resolve_offset_ref. - (resolve_args): Do not call resolve_offset_ref. - (build_conditional_expr): Likewise. - (build_new_method_call): Likewise. - * cp-tree.def (OFFSET_REF): Update documentation. - * cvt.c (cp_convert_to_pointer): Update handling of conversions from - pointers to members to pointers. - (ocp_convert): Do not call resolve_offset_ref. - (convert_to_void): Likewise. - (build_expr_type_conversion): Likewise. - * decl2.c (delete_sanity): Likewise. - * init.c (resolve_offset_ref): Simplify greatly. - (build_vec_delete): Do not call resolve_offset_ref. - * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref - if appropriate. - (cp_parser_unary_expression): Use - cp_parser_simple_cast_expression. - (cp_parser_delete_expression): Likewise. - (cp_parser_cast_expression): Likewise. - (cp_parser_pm_expression): Use cp_parser_binary_op. - (cp_parser_simple_cast_expression): New function. - * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref. - * semantics.c (finish_increment_expr): Likewise. - (finish_typeof): Likewise. - * tree.c (lvalue_p_1): Do not handle OFFSET_REF. - * typeck.c (require_complete_type): Do not handle OFFSET_REFs. - (decay_conversion): Do not call resolve_offset_ref. - (finish_class_member_access_expr): Likewise. - (convert_arguments): Likewise. - (build_x_binary_op): Handle DOTSTAR_EXPR. - (condition_conversion): Do not call resolve_offset_ref. - (unary_complex_lvalue): Likewise. - (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (build_c_cast): Likewise. - (build_modify_expr): Likewise. - (convert_for_assignment): Likewise. - (convert_for_initialization): Likewise. - * typeck2.c (build_x_arrow): Likewise. - (build_m_component_ref): Simplify. - - * call.c (build_scoped_method_call): Use convert_to_void. - (build_method_call): Likewise. - * class.c (check_field_decls): Remove dead code. - * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling. - * decl2.c (grok_array_decl): Remove dead code. - (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE - as pointer-to-member representation. - * init.c (build_offset_ref): Tidy. - (build_vec_delete_1): Use convert_to_void. - * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE - as pointer-to-member representation. - -2003-07-03 Nathan Sidwell - - PR c++/9162 - * decl.c (grokdeclarator): Return friend decls, not - void_type_node. - * decl2.c (grokfield): Alter friend decl check. - * parser.c (struct cp_parser): Document default_arg chain on - unparsed_functions_queue. - (cp_parser_save_default_args): New. - (cp_parser_init_declarator, cp_parser_function_definition, - cp_parser_member_declaration): Call it. - (cp_parser_class_specifier): Remove unused variable. Alter - processing of unparsed_functions_queue. - -2003-07-03 Kaveh R. Ghazi - - * class.c (add_method, check_field_decl): Fix format specifier. - * decl.c (duplicate_decls, pushdecl, check_goto, - fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator, - start_enum): Likewise. - * decl2.c (ambiguous_decl): Likewise. - * pt.c (redeclare_class_template): Likewise. - -2003-07-02 Nathan Sidwell - - PR c++/10219 - * pt.c (type_unification_real): Don't unify exprs of error type. - * tree.c (error_type): Don't die on error_type. - - PR c++/9779 - * decl2.c (arg_assoc_class): Don't die on NULL type. - * typeck.c (type_unknown_p): Don't die on untyped expressions. - -2003-07-01 Mark Mitchell - - PR c++/6949 - * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local - classes. - -2003-07-01 Kaveh R. Ghazi - - * error.c (locate_error): %P takes an `int', not a `tree'. - -2003-07-02 Jan Hubicka - - * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT. - (finish-file): Do not process function with DECL_DEFER_OUTPUT clear; - clear DECL_DEFER_OUTPUT once function is processed; avoid flags - massaging. - - * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time - (expand_or_defer_fn): Declare. - (lower_function): Declare. - * decl.c (start_cleanup_fn): Use expand_or_defer_fn. - * decl2.c: Include cgraph.h and varpool.h - (maybe_emit_vtables): Make explicit instantations as needed. - (mark_member_pointers, lower_function): New functions. - (finish_file): Do unit-at-a-time. - * method.c (synthesize_method): Use expand_or_defer_fn. - * optimize.c (maybe_clone_body): Use expand_or_defer_fn. - * parser.c (cp_parser_function_definition_after_decl): Use - expand_or_defer_fn. - * pt.c (instantiate_decl): Likewise. - * semantics.c: Include cgraph.h - (expand_or_defer_fn): Break out from ... - (expand_body): ... here; deal with unit-at-a-time. - * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, - LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define. - -2003-07-01 Mark Mitchell - - * call.c (resolve_scoped_fn_name): Return error_mark_node for - erroneous cases. - -2003-07-01 Mark Mitchell - - PR c++/11149 - * call.c (resolve_scoped_fn_name): Check that the qualifying scope - is a class type. - -2003-07-01 Giovanni Bajo - - PR c++/8046 - * error.c (dump_decl): Handle BIT_NOT_EXPR as - pseudo destructor calls. - -2003-07-01 Nathan Sidwell - - * cp-tree.h (define_label): Replace filename and lineno - arguments with a location_t. - * decl.c (pop_label): Adjust define_label call. - (define_label): Replace filename and lineno arguments with a - location_t. - * semantics.c (finish_label): Adjust define_label call. - -2003-07-01 Mark Mitchell - - PR c++/9559 - * decl2.c (grokfield): Do not build NOP_EXPRs around the - error_mark_node. - -2003-06-30 Neil Booth - - * Make-lang.in: Update. - * cp-lang.c (c_language): Define. - (LANG_HOOKS_INIT_OPTIONS): Use common hook. - * cp-tree.h (cxx_init_options): Remove. - * lex.c: Don't include diagnostic.h. - (cxx_init_options): Remove. - -2003-06-30 Giovanni Bajo - - PR c++/4933 - * error.c (dump_expr): Support correctly the COMPOUND_EXPR - tree generated within a template. Use dump_expr to dump an - expression sizeof. - -2003-06-30 Giovanni Bajo - - * mangle.c (write_expression): Exit gracefully when trying to - mangle a CALL_EXPR. - -2003-06-30 Giovanni Bajo - - PR c++/10750 - * parser.c (cp_parser_primary_expression): A VAR_DECL with a - (value- or type-) dependent expression as DECL_INITIAL is a - valid constant-expression (at parser time). - -2003-06-30 Giovanni Bajo - - PR c++/11106 - * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a - USING_DECL, instead of print_tree_identifier. - -2003-06-29 Gabriel Dos Reis - - * cp-tree.h (language_to_string): Adjust declaration. - * dump.c (cp_dump_tree): Adjust usage. - * error.c (dump_char): Use output_formatted_scalar. Tidy. - (parm_to_string): Lose unused parameter. Tidy. - (expr_to_string): Likewise. - (code_to_string): Likewise. - (language_to_string): Likewise. - (op_to_string): Likewise. - (assop_to_string): Likewise. - (digit_buffer): Remove. - (dump_type): Format builtin vector type as __vector__. - -2003-06-29 Gabriel Dos Reis - - * error.c (print_integer): Remove. - (dump_type_suffix): Adjust. - (dump_expr): Likewise. - -2003-06-28 Nathan Sidwell - - * error.c (print_instantiation_partial_context): Take a - location_t. - (print_instantiation_full_context): Adjust. - (print_instantiation_context): Adjust. - - * cp-tree.h (cp_line_of, cp_file_of): Remove. - * error.c (cp_line_of, cp_file_of): Merge into ... - (location_of): ... here. Make static, return a location_t. - (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust. - -2003-06-28 Nathan Sidwell - - PR c++/10784 - * call.c (joust): Move warn_conversion check outwards. - -2003-06-27 Zack Weinberg - - * decl.c (build_typename_type) - * mangle.c (write_template_template_arg) - * parser.c (cp_parser_scope_through_which_access_occurs) - * pt.c (push_access_scope_real, push_access_scope, pop_access_scope) - * repo.c (get_base_filename) - * semantics.c (maybe_convert_cond): - Mark the definition static, matching the forward declaration. - -2003-06-27 Mark Mitchell - - PR c++/10468 - * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly. - -2003-06-27 Mark Mitchell - - PR c++/10796 - * decl.c (finish_enum): Implement DR377. - - * decl.c (cp_finish_decl): Don't make variables with reference - type readonly while they are being initialized. - -2003-06-26 Mark Mitchell - - PR c++/11332 - * typeck.c (build_static_cast): Avoid returning expressions with - reference type. - -2003-06-26 Nathan Sidwell - - * call.c (build_op_delete_call): Use strip_array_call. Correct - error message to say 'delete' or 'delete[]'. - -2003-06-26 Giovanni Bajo - - PR c++/8266 - * pt.c (check_explicit_specialization): When looking up a - template function from an identifier outside class-scope, bind - it to CP_DECL_CONTEXT. - -2003-06-25 Mark Mitchell - - PR c++/10990 - * search.c (lookup_base_r): Rely on accessible_p, rather than - trying to emulate that logic here. - - PR c++/10931 - * call.c (convert_like): Pass issue_conversion_warnings. - (convert_like_with_context): Likewise. - (convert_like_real): Add issue_conversion_warnings parameter. - (perform_direct_initialization_if_possible): New function. - * cp-tree.h (perform_direct_initialization_if_possible): Declare it. - * typeck.c (check_for_casting_away_constness): New function. - (build_static_cast): Rewrite. - -2003-06-24 Nathan Sidwell - - * call.c (enforce_access): Assert we get a binfo. - (build_op_delete_call): Pass a binfo to - perform_or_defer_access_check. - * class.c (alter_access): Likewise. - * decl.c (make_typename_type): Likewise. - (make_unbound_class_template): Likewise. - * lex.c (do_identifier): Likewise. - * method.c (hack_identifier): Likewise. - * parser.c (cp_parser_lookup_name): Likewise. - * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE - test. - * semantics.c (finish_non_static_data_member): Likewise. - (perform_or_defer_access_check): Expect a binfo. - * typeck.c (comptypes): Expect types. - - * mangle.c (find_substitution): Don't pass a non-type to same_type_p - * friend.c (make_friend_class): Likewise. - * pt.c (check_default_tmpl_args): Likewise. - (lookup_template_class): Likewise. - -2003-06-24 Jan Hubicka - - * method.c (thunk_labelno): Move outside ifdef block to make garbage - collector happy. - -2003-06-24 Jan Hubicka - - * class.c (build_vtable): Make vtables. - * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro. - * decl2.c (output_vtable_inherit): Rename to ... - (prepare_assemble_variable): ... this one; change interface. - (maybe_emit_vtables): Do not call output_vtable_inherit. - * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define. - * cp-tree.h (prepare_assemble_variable): New. - -2003-06-23 Andrew Pinski - - * method.c: add prototype for make_alias_for_thunk. - (thunk_labelno, make_alias_for_thunk): only define - if ASM_OUTPUT_DEF is defined. - -2003-06-23 Jakub Jelinek - - * method.c (thunk_labelno): New variable. - (make_alias_for_thunk): New function. - (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk - into the same section as the function it is calling. - Include gt-cp-method.h. - * Make-lang.in (gt-cp-method.h): Depend on s-gtype. - (cp/method.o): Depend on gt-cp-method.h. - * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c. - -2003-06-23 Jan Hubicka - - * decl.c (register_dtor_fn): Mark cleanup as used. - * decl2.c (mark_vtable_entries): Skip nops. - * rtti.c (get_tinfo_ptr): Mark tinfo as used. - (build_dynamic_cast_1): Likewise. - (tinfo_base_init): Likewise. - (emit_tinfo_decl): Likewise. - -2003-06-23 Jakub Jelinek - - * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer - to it. - -2003-06-21 Gabriel Dos Reis - - PR c++/10784 - * call.c (joust): Warn about choosing conversion sequence only if - -Wconversion. - -2003-06-21 Gabriel Dos Reis - - PR c++/10864 - * call.c (op_error): Tidy. - * error.c (dump_expr): Properly format 'T()' when T is an - aggregate type. - -2003-06-21 Gabriel Dos Reis - - PR c++/10915 - * decl.c (grok_op_properties): Warn possible confusing conversion - only if -Wconversion. - -2003-06-20 Mark Mitchell - - PR c++/10749 - * parser.c (cp_parser_class_head): See through dependent names - when parsing a class-head. - - PR c++/10845 - * pt.c (try_class_unification): Correct handling of member class - templates. - -2003-06-20 Nathan Sidwell - - * semantics.c (genrtl_finish_function): Adjust - expand_function_end call. - -2003-06-19 Mark Mitchell - - PR c++/10939 - * pt.c (tsubst_decl): Do not try to substitute into non-dependent - functions. - (value_dependent_expression_p): Correct logic for FUNCTION_DECLs. - - PR c++/9649 - * cp-tree.h (pushdecl_class_level): Change prototype. - (push_class_level_binding): Likewise. - * decl.c (add_binding): Reject duplicate static data members. - (pushdecl_class_level): Return a value indicating whether or not - the binding was valid. - (push_class_level_binding): Likewise. - * semantics.c (finish_member_declaration): Don't keep invalid - declarations. - - PR c++/11041 - * call.c (initialize_reference): Do not use cp_finish_decl to emit - temporary variables. - * cp-tree.h (static_aggregates): Declare. - (pushdecl_top_level_and_finish): Likewise. - * decl.c (pushdecl_top_level_1): New function. - (pushdecl_top_level): Use it. - (pushdecl_top_level_and_finish): New function. - (initialize_local_var): Remove redundant code. - (cp_finish_decl): Remove support for RESULT_DECLs. Don't check - building_stmt_tree. - * decl.h (static_aggregates): Remove. - * decl2.c (get_guard): Use pushdecl_top_level_and_finish. - * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish. - (tinfo_base_init): Likewise. - -2003-06-19 Matt Austern - - PR c++/11228 - * init.c (build_zero_init): Assert that number of array elements - is an integer constant. - (build_default_init) Don't use build_zero_init for arrays with - variable number of elements. - -2003-06-19 Andreas Jaeger - - * cp-tree.h: Remove duplicated declarations. - -2003-06-18 Nathanael Nerode - - * pt.c: Convert to ISO C. - * semantics.c: Convert to ISO C. - -2003-06-18 Nathan Sidwell - - * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p, - at_least_as_qualified_p, more_qualified_p): Return bool. - * typeck.c: ANSIFY function definitions. - (comp_array_types): Take redeclaration bool parameter. - (comptypes): Rearrange STRICT handling. - (at_least_as_qualified_p, more_qualified_p, - comp_cv_qualification): Cache cv quals. - (compparms): Rearrange loop. - -2003-06-18 Nathan Sidwell - - * cp-tree.h (COMPARE_RELAXED): Rename to ... - (COMPARE_DERIVED): ... here. Adjust comment. - (resolve_typename_type_in_current_instantiation): Remove. - (cp_tree_equal, comptypes): Return a bool. - * cvt.c (convert_to_reference): Adjust comptypes call. - * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call. - (resolve_typename_type_in_current_instantiation): Remove. - * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and - IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive - calls. Refactor code. - * typeck.c (comp_array_types): Return bool. Lose callback. - parameter. Adjust cp_tree_equal calls. - (comptypes): Return bool. Adjust strict handling. Remove relaxed - enumeration and java type handling. Deal with typename types here. - Adjust recursive and cp_tree_equals calls. Adjust base and derived - checking. - (comp_target_types): Remove unreachable code. Adjust - same_or_base_type_p calls. - (ptr_reasonably_similar): Adjust base and derived check. - - * typeck.c (maybe_warn_about_returning_address_of_local): Remove - unused calculation. - (check_return_expr): Adjust error messages. - * cp-tree.def (SCOPE_REF): Correct comment. - -2003-06-17 Mark Mitchell - - * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format - string again. - -2003-06-17 Robert Abeles - - * optimize.c (dump_function): Form complete flag name by - prefixing 'fdump-' to string returned by dump_flag_name(). - -2003-06-17 Mark Mitchell - - * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format - string. - -2003-06-17 Jason Merrill - - PR c++/10929 - * decl.c (grokfndecl): Don't mark a function inline for - -finline-functions if it isn't defined. - -2003-06-17 Mark Mitchell - - PR c++/10712 - * class.c (handle_using_decl): Robustify. - - PR c++/11105 - * cp-tree.h (DECL_CONV_FN_TYPE): New method. - * mangle.c (struct globals): Remove internal_mangling_p. - (write_unqualified_name): Use DECL_CONV_FN_TYPE. - (write_template_parm): Don't write out the level number. - (conv_type_names): New variable. - (hash_type): New function. - (compare_type): Likewise. - (mangle_conv_op_name_for_type): Don't try to mangle conversion - operator names. - * search.c (lookup_conversion_operator): New function. - (lookup_fnfields_1): Use it. - -2003-06-17 Andreas Jaeger - - * except.c: Remove duplicate declaration of push_eh_cleanup. - - * call.c: Remove extra declaration of inhibit_warnings. - -2003-06-16 Nathanael Nerode - - 2003-06-16 Jens-Michael Hoffmann - * mangle.c: Convert to ISO C. - -2003-06-16 Kaveh R. Ghazi - - * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR - macro. - -2003-06-16 Nathanael Nerode - - * tree.c: Convert to ISO C. - -2003-06-16 Kazu Hirata - - * cp-tree.h: Follow spelling conventions. - * mangle.c: Likewise. - * method.c: Likewise. - * parser.c: Likewise. - -2003-06-14 Nathan Sidwell - - * decl.c (start_function): Adjust init_function_start call. - * method.c (use_thunk): Likewise. - * semantics.c (genrtl_start_function): Likewise. - -2003-06-14 Neil Booth - - * Make-lang.in: Remove c-options.o. - -2003-06-13 Nathanael Nerode - - * lex.c: Convert to ISO C. - - 2003-05-19 Jens-Michael Hoffmann - * init.c: removes use of PARAMS macro. Use ISO style function - declarations. (Not copyright-significant change.) - - * rtti.c: Remove PARAMS. - - * typeck2.c: Convert to ISO C. - -2003-06-12 Mark Mitchell - - PR c++/10635 - * typeck.c (build_c_cast): Check that the destination type is - complete. - -2003-06-11 Mark Mitchell - - PR c++/10432 - * cp-tree.h (finish_declarator): Remove. - * decl.c (cp_finish_decl): Make sure to pop_nested_class even for - erroneous declarations. - * semantics.c (finish_declarator): Remove. - -2003-06-11 Roger Sayle - - * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a - global static constructor/destructor if it will be empty, i.e. - either doesn't call any ctors/dtors or only calls pure or const - ctors/dtors. - -2003-06-11 Mark Mitchell - - * mangle.c (tm_p.h): Include it. - * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H). - - PR c++/11131 - * tree.c (cp_cannot_inline_fn): Check for "inline" before - instantiation. - -2003-06-10 Jason Merrill - - PR c++/10968 - * pt.c (mark_decl_instantiated): Clear DECL_COMDAT. - -2003-06-10 Andrew Pinski - - * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY. - (start_cleanup_cnt): New. - -2003-06-10 Mark Mitchell - - PR c++/11131 - * cp-tree.h (template_for_substitution): Declare. - * decl2.c (mark_used): Use it when figuring out whether or not a - function is inline. - * pt.c (template_for_substitution): Give it external linkage. - * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as - possible. - -2003-06-09 Zack Weinberg - - PR 8861 - * mangle.c (write_real_cst): New function. Implement - ABI-compliant mangling of floating-point literals when - -fabi-version>=2; provide backward compatibility with 3.3 when - -fabi-version=1 (with warning). Clarify commentary. - (write_template_arg_literal): Use write_real_cst. - -2003-06-07 Andreas Jaeger - - * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES. - -2003-06-07 Neil Booth - - * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. - (LANG_HOOKS_HANDLE_OPTION): Override. - * cp-tree.h (cxx_init_options): Update. - * lex.c (cxx_init_options): Update. - -2003-06-05 Jan Hubicka - - * Make-lang.in: Add support for stageprofile and stagefeedback - -2003-06-04 J"orn Rennecke - - * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out. - -2003-06-04 Andreas Jaeger - - * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage. - -2003-06-03 Jason Merrill - - * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors. - - * cp/decl.c (reshape_init): Handle vectors. - - * testsuite/g++.dg/init/array10.C: New. - -2003-06-03 Kriang Lerdsuwanakij - - PR c++/10940 - * pt.c (check_explicit_specialization): Check for 'static' - earlier. - -2003-05-31 Diego Novillo - - * class.c (dump_array): Call CONSTRUCTOR_ELTS to access - the operand of a CONSTRUCTOR node. - -2003-05-31 Gabriel Dos Reis - - * decl.c (cp_binding_level::this_entity): Rename from this_class. - (cxx_scope_descriptor): New function. - (cxx_scope_debug): Likewise. - (push_binding_level): Use it. - (pop_binding_level): Likewise. - (suspend_binding_level): Likewise. - (resume_binding_level): Likewise. - (pushlevel_class): Adjust use of this_class. - (pushtag): Likewise. - (lookup_name_real): Likewise. - (global_scope_name): New variable. - (initialize_predefined_identifiers): Initialize it. - (push_namespace): Use it. - (make_cxx_scope): New function. - (pushlevel): Use it. - (pushlevel_class): Likewise. - (push_binding_level): Simplify. Loose the last two arguments. - (make_binding_level): Remove. - (initial_push__namespace_scope): New function. - (push_namespace): Use it. Simplify. - (cxx_init_decl_processing): Likewise. - (declare_namespace_level): Remove. - -2003-05-31 Kriang Lerdsuwanakij - - PR c++/10956 - * pt.c (instantiate_decl): Don't use full template arguments if - we are dealing with specializations. - -2003-05-29 Gabriel Dos Reis - - * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS. - (binding_depth): Unconditionally define. - (is_class_level): Likewise. - (indent): Likewise. Take an indenting parameter. - (push_binding_level): Remove conditional definittion. - (pop_binding_level): Likewise. - (suspend_binding_level): Likewise. - (resume_binding_level): Likewise. - (pushlevel): Likewise. - (pushlevel_class): Likewise. - (poplevel_class): Likewise. - (pop_everything): Likewise. - -2003-05-27 Gabriel Dos Reis - - * name-lookup.h (global_scope_p): New macro. - * decl.c (pop_binding_level): Use it. Don't refer directly to - global_binding_level. - (suspend_binding_level): Likewise. - (global_bindings_p): Likewise. - (print_other_binding_stack): Likewise. - (print_binding_stack): Likewise. - (maybe_push_to_top_level): Likewise. - (pushdecl_namespace_level): Likewise. - (cxx_init_decl_processing): Likewise. - (start_decl): Likewise. - (cp_finish_decl): Likewise. - (start_function): Likewise. - (global_binding_level): Remove. - -2003-05-25 Kriang Lerdsuwanakij - - * parser.c (cp_parser_explicit_instantiation): Restore old - access before template instantiation. - -2003-05-23 Geoffrey Keating - - * lang-specs.h: Use -o to specify preprocessor's output file. - Make -no-integrated-cpp work when building PCH files. - -2003-05-23 Kriang Lerdsuwanakij - - PR c++/10682 - * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to - check for implicitly created typedef to an enum. - -2003-05-21 Jason Merrill - - * init.c (build_vec_delete): Copy the address into a temporary - variable before calling build_vec_delete_1. - * decl2.c (delete_sanity): Don't call stabilize_reference. - -2003-05-21 Nathan Sidwell - - * pt.c (register_specialization): Update the decl's location, - if necessary. - (check_explicit_specialization): Likewise. - -2003-05-20 Kaveh R. Ghazi - - * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX. - -2003-05-21 Danny Smith - - PR c++/9738 - * decl.c (duplicate_decls): Re-invoke make_decl_rtl - if the old decl had instantiated DECL_RTL. - (Base on Richard Henderson 2003-05-13 patch to c-decl.c). - -2003-05-19 Matt Austern - - * lang-options.h: Document -Wno-invalid-offsetof - * typeck.c (build_class_member_access_expr): Don't complain about - (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero. - -2003-05-18 Andrew Pinski - - * name-lookup.c (free_binding_entry): fix where the GTY markers are. - (binding_entry_make): Make entry->chain NULL after getting an entry. - fix the spelling of chain in a comment. - (binding_table_free): speed up by having temporary variable. - (binding_table_new): set table->chain to be NULL after allocating - a table. - (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set - binding->previous to NULL after getting an binding for speed. - -2003-05-18 Gabriel Dos Reis - - * cp-tree.h (struct lang_type_class): Replace data member tags - with hash-table nested_udts. - (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS. - * class.c (unreverse_member_declarations): Don't touch - CLASSTYPE_TAGS. - (pushclass): Use cxx_remember_type_decls. - * decl.c (struct cp_binding_level): Replace data member tags with - hash-table type_decls. - (pop_binding_level): Handle level->type_decls. - (kept_level_p): Adjust. - (poplevel): Remove unused local variable. - (bt_print_entry): New function. - (print_binding_level): Use it. - (push_namespace): Build current_binding_level->type_decls. - (maybe_process_template_type_declaration): Adjust. - (pushtag): Likewise. - (clear_anon_tags): Use binding_table_remove_anonymous_types. - (gettags): Remove. - (cxx_remember_type_decls): Rename from storetags. Adjust. - (lookup_tag): Use binding_table_find_anon_type. Tidy. - (lookup_tag_reverse): Use binding_table_reverse_maybe_remap. - (cxx_init_decl_processing): Build global_binding_level->type_decls. - (store_parm_decls): Remove pointless code. - * name-lookup.c (free_binding_entry): New variable. - (ENTRY_INDEX): New macro. - (struct binding_table_s): New datatype. - (binding_entry_make): New function. - (binding_entry_free): Likewise. - (binding_table_construct): Likewise. - (binding_table_free): Likewise. - (binding_table_new): Likewise. - (binding_table_expand): Likewise. - (binding_table_insert): Likewise. - (binding_table_find): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - (binding_table_remove_anonymous_types): Likewise. - (binding_table_foreach): Likewise. - * name-lookup.h (binding_table): New type. - (binding_entry): Likewise. - (bt_foreach_proc): Likewise. - (struct binding_entry_s): New datatype. - (SCOPE_DEFAULT_HT_SIZE): New macro. - (CLASS_SCOPE_HT_SIZE): Likewise. - (NAMESPACE_ORDINARY_HT_SIZE): Likewise. - (NAMESPACE_STD_HT_SIZE): Likewise. - (GLOBAL_SCOPE_HT_SIZE): Likewise. - (binding_table_new): Declare. - (binding_table_free): Likewise. - (binding_table_insert): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - (binding_table_remove_anonymous_types): Likewise. - (binding_table_foreach): Likewise. - (binding_table_find): Likewise. - (cxx_remember_type_decls): Likewise. - * pt.c (bt_instantiate_type_proc): New function. - (do_type_instantiation): Use it. - * search.c (lookup_field_r): Use binding_table_find. - -2003-05-18 Kriang Lerdsuwanakij - - * semantics.c (perform_deferred_access_checks): Don't discard - checked access. - -2003-05-17 Kaveh R. Ghazi - - * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate - libiberty VA_ macros, always use stdarg. - * rtti.c (create_pseudo_type_info): Likewise. - * tree.c (build_min_nt, build_min): Likewise. - -2003-05-16 Kaveh R. Ghazi - - * ptree.c (cxx_print_type, cxx_print_xnode): Use string - concatentation on HOST_WIDE_INT_PRINT_* format specifier to - collapse multiple function calls into one. - * tree.c (debug_binfo): Likewise. - -2003-05-15 Jason Merrill - - PR c++/5388 - * call.c (conditional_conversion): Don't consider implicit - conversions if T2 is a base of T1. - * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean. - (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise. - - * parser.c (cp_parser_primary_expression): Convert a static data - member from reference. - -2003-05-15 Mark Mitchell - - * call.c (build_op_delete_call): Avoid creating unnecessary types. - * class.c (instantiate_type): Remove tests for tf_no_attributes. - * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes. - (COMPARE_NO_ATTRIBUTES): Remove. - * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES. - - PR c++/8385 - * semantics.c (finish_typeof): Refine type-dependency check. - -2003-05-13 Jason Merrill - - * typeck.c (build_modify_expr): Don't always stabilize the lhs and - rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs. - -2003-05-11 Kriang Lerdsuwanakij - - * method.c (synthesize_method): Call push/pop_deferring_access_checks. - -2003-05-11 Kriang Lerdsuwanakij - - PR c++/10230, c++/10481 - * semantics.c (finish_non_static_data_member): Handle when the - non-static member is not from a base of the current class type. - -2003-05-11 Kriang Lerdsuwanakij - - PR c++/10552 - * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class - template and has dependent context. - -2003-05-10 Kriang Lerdsuwanakij - - * pt.c (instantiate_decl): Call push/pop_deferring_access_checks. - -2003-05-10 Kriang Lerdsuwanakij - - PR c++/9252 - * cp-tree.h (saved_scope): Remove check_access field. - (tsubst_flags_t): Remove tf_parsing. - * decl.c (maybe_push_to_top_level): Don't initialize - scope_chain->check_access. - (make_typename_type, make_unbound_class_template): Don't use - tf_parsing. - (register_dtor_fn): Use push/pop_deferring_access_checks - instead of scope_chain->check_access. - * method.c (use_thunk): Likewise. - * parser.c (cp_parser_explicit_instantiation - (cp_parser_constructor_declarator_p): Don't call - push/pop_deferring_access_checks here. - (cp_parser_template_argument, cp_parser_class_name): Don't use - tf_parsing. - (yyparse): Check flag_access_control. - * pt.c (instantiate_class_template): Call - push/pop_deferring_access_checks. - * semantics.c (push_deferring_access_checks): Propagate - dk_no_check. - (perform_or_defer_access_check): Make sure basetype_path is - a type before comparison. - * call.c (build_op_delete_call, build_over_call): Use - perform_or_defer_access_check. - * class.c (alter_access): Likewise. - * init.c (build_offset_ref): Likewise. - * lex.c (do_identifier): Likewise. - * method.c (hack_identifier): Likewise. - * search.c (lookup_member): Likewise. - * semantics.c (finish_non_static_data_member): Likewise. - (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks - instead of flag_access_control. - -2003-05-10 Kriang Lerdsuwanakij - - PR c++/9554 - * parser.c (cp_parser_class_name): Remove check_access parameter. - All caller adjusted. Update declaration. - (cp_parser_lookup_name): Likewise. - * semantics.c (push_deferring_access_checks): Change parameter type - to enum deferring_kind. All caller adjusted. - (resume_deferring_access_checks): Adjust to use new enum. - (stop_deferring_access_checks): Likewise. - (perform_or_defer_access_check): Likewise. - * cp-tree.h (deferring_kind): New enum. - (deferred_access): Adjust field type. - (push_deferring_access_checks): Update declaration. - -2003-05-09 Kriang Lerdsuwanakij - - PR c++/10555, c++/10576 - * pt.c (lookup_template_class): Handle class template with - multiple levels of parameters when one of the levels contain - errors. - -2003-05-08 Jason Merrill - - * init.c (build_new_1): Don't reuse a TARGET_EXPR in an - expression. Undo some of the recent reorg. - -2003-05-07 Richard Henderson - - PR c++/10570 - * cfns.gperf: Comment out POSIX thread cancellation points, - plus abort and raise. - * cfns.h: Regenerate. - -2003-05-07 Jason Merrill - - * call.c (build_conditional_expr): Don't assume that the folded - expression has result_type. - -2003-05-06 Kriang Lerdsuwanakij - - * typeck.c (build_unary_op): Deal with const qualifier in - invalid pointer-to-member earlier. - -2003-05-05 Jason Merrill - - PR c++/9537 - * call.c (conditional_conversion): Build an RVALUE_CONV if - we're just changing the cv-quals. - (build_conditional_expr): Don't call convert to change - cv-quals. - -2003-05-05 Kriang Lerdsuwanakij - - PR c++/10496 - * typeck.c (build_unary_op): Don't output const qualifier when - output invalid pointer-to-member diagnostics. - -2003-05-05 Kriang Lerdsuwanakij - - * decl.c: Fix typos. - -2003-05-05 Kriang Lerdsuwanakij - - PR c++/4494 - * decl.c (start_function): Use same_type_p to check return type - of main. - -2003-05-03 Zack Weinberg - - PR c/10604 - * cp/typeck.c (build_x_compound_expr): No need to check - extra_warnings as well as warn_unused_value. - -2003-05-03 Kriang Lerdsuwanakij - - PR c++/9364, c++/10553, c++/10586 - * decl.c (make_typename_type): Don't crash on illegal code. - -2003-05-03 Nathan Sidwell - - * class.c (finish_struct): Use location_t and input_location - directly. - * decl.c (make_label_decl): Likewise. - (use_label): Likewise. - * decl2.c (warn_if_unknown_interface): Likewise. - (start_static_initialization_or_destruction): Likewise. - (generate_ctor_or_dtor_function): Likewise. - (finish_file): Likewise. - * error.c (print_instantiation_full_context): Likewise. - * init.c (create_temporary_var): Likewise. - * method.c (synthesize_method): Likewise. - * parser.c (cp_token): Likewise. - (cp_lexer_set_source_position_from_token): Likewise. - (cp_lexer_get_preprocessor_token): Likewise. - (cp_parser_statement): Likewise. - * pt.c (tsubst_friend_function): Likewise. - (instantiate_class_template): Likewise. - (tsubst_decl): Likewise. - (tsubst): Likewise. - (instantiate_decl): Likewise. - * semantics.c (begin_class_definition): Likewise. - (expand_body): Likewise. - -2003-05-01 Nathan Sidwell - - * class.c (finish_struct): Rename lineno to input_line. - * decl.c (push_binding_level, pop_binding_level, - suspend_binding_level, resume_binding_level, make_label_decl, - use_label, start_function): Likewise. - * decl2.c (warn_if_unknown_interface, - start_static_initialization_or_destruction, - generate_ctor_or_dtor_function, finish_file): Likewise. - * error.c (cp_line_of, print_instantiation_full_context, - print_instantiation_context): Likewise. - * except.c (check_handlers_1, check_handlers): Likewise. - * init.c (create_temporary_var): Likewise. - * method.c (use_thunk, synthesize_method): Likewise. - * parser.c (cp_lexer_set_source_position_from_token, - cp_lexer_get_preprocessor_token): Likewise. - * pt.c (push_tinst_level, pop_tinst_level, - tsubst_friend_function, instantiate_class_template, tsubst_decl, - tsubst, tsubst_expr, instantiate_decl): Likewise. - * semantics.c (genrtl_try_block, finish_label_stmt, - begin_class_definition, expand_body, - genrtl_finish_function): Likewise. - * tree.c (build_min_nt, build_min): Likewise. - -2003-05-01 Mark Mitchell - - * decl2.c (comdat_linkage): Don't externalize explicit - instantiations. - -2003-05-01 Kriang Lerdsuwanakij - - PR c++/10554 - * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF - is not NULL. - -2003-05-01 Steven Bosscher - - * cp-tree.h (struct lang_id2): Remove. Move fields from here... - (struct lang_identifier): ... to here. - (LANG_ID_FIELD): Remove. - (SET_LANG_ID): Remove. - (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier. - (SET_IDENTIFIER_LABEL_VALUE): Likewise. - (IDENTIFIER_IMPLICIT_DECL): Likewise. - (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise. - (IDENTIFIER_ERROR_LOCUS): Likewise. - (SET_IDENTIFIER_ERROR_LOCUS): Likewise. - -2003-05-01 Kriang Lerdsuwanakij - - PR c++/8772 - * pt.c (convert_template_argument): Correct diagnostic. - -2003-04-30 Kriang Lerdsuwanakij - - PR c++/9432, c++/9528 - * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF. - -2003-04-30 Garbiel Dos Reis - - * decl.c (check_previous_goto_1): Adjust prototype. - (check_previous_goto): Adjust use. - (check_switch_goto): Likewise. - (use_label): Adjust. - (check_previous_goto_1): Don't use pedwarn_with_file_and_line. - (struct named_label_use_list): Use location_t datatype. - -2003-04-29 Mark Mitchell - - PR c++/10551 - * pt.c (mark_decl_instantiated): Defer all explicit instantiations - that have not yet been written out. - -2003-04-29 Mark Mitchell - - PR c++/10549 - * class.c (layout_class_type): Mark overlong bitfields as having - the maximum size permitted by their type, after layout. - - PR c++/10527 - * error.c (dump_expr): Correctly handling of NEW_EXPR.4 - -2003-04-29 Kriang Lerdsuwanakij - - * call.c (build_operator_new_call): Fix typo. - * lang-options.h: Likewise. - -2003-04-29 Mark Mitchell - - PR c++/10515 - * cp-tree.h (lookup_field_1): Declare it. - * search.c (lookup_field_1): Make it public. - * decl.c (reshape_init): Handle designated initializers. - - * decl.c (maybe_commonize_var): Further tweak support for systems - without weak symbols. - -2003-04-27 Mark Mitchell - - * decl.c (maybe_commonize_var): Fix thinko in last patch. - -2003-04-27 Mark Mitchell - - PR c++/10506 - * method.c (use_thunk): Decrement immediate_size_expand. - - PR c++/10503 - * cp-tree.h (DECL_VAR_MARKED_P): New macro. - (DECL_MAYBE_TEMPLATE): Remove. - * class.c (fixed_type_or_null): Avoid infinite recursion. - - * decl.c (maybe_commonize_var): Make the code match the comments. - * pt.c (instantiate_decl): Move call to import_export_decl. - -2003-04-26 Mark Mitchell - - * decl2.c (finish_file): Fix merge botch. - -2003-04-25 Mark Mitchell - - * decl2.c (finish_file): Don't call import_export_decl for - functions that are not defined. - (handle_class_head): Robustify. - * pt.c (instantiate_decl): Do not call cp_finish_decl for - variables that are not defined. - -2003-04-24 Sylvain Pion - - * call.c (print_z_candidates): Fix off by one error. - -2003-04-24 Nathan Sidwell - - PR c++/10337 - * call.c (joust): Don't warn about conversion ops that are exact - or cv-conversions. Rearrange to avoid multiple type comparisons. - -2003-04-23 Mark Mitchell - - PR c++/10471 - * call.c (build_cxx_call): Robustify. - -2003-04-23 Neil Booth - - * Make-lang.in (lex.o): Remove mbchar.h. - * lex.c (MULTIBYTE_CHARS): Lose. - * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled - in c-lex.c. - -2003-04-23 Mark Mitchell - - PR c++/9847 - * cp-tree.h (duplicate_tag_error): Remove. - * class.c (duplicate_tag_error): Remove. - * semantics.c (begin_class_definition): Return immediately for a - duplicate class definition. - - PR c++/10451 - * decl.c (grokdeclarator): Correct logic for "mutable" errors. - -2003-04-22 Mark Mitchell - - PR c++/10446 - * search.c (lookup_fnfields_1): Handle empty slots in the method - vector. - - PR c++/10428 - * decl.c (check_elaborated_type_specifier): New function, split - out from ... - (xref_tag): ... here. Use the new function in more places. - - * rtti.c (throw_bad_typeid): Use build_cxx_call. - -2003-04-21 Mark Mitchell - - * call.c (build_over_call): Use build_cxx_call. - (build_cxx_call): New method, split out of build_over_call. - * cp-tree.h (language_function): Add can_throw. - (build_cxx_call): Declare it. - * decl.c (finish_function): If a function does not contain any - calls to functions that can throw an exception, indicate that - fact. - * decl2.c (mark_used): Do not defer the instantiation of - functions, if the current function does not throw. - * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones. - * pt.c (instantiate_decl): Make sure import_export_decl is called - before emitting things. - * rtti.c (throw_bad_cast): Use build_cxx_call. - (build_dynamic_cast_1): Likewise. - * typeck.c (build_function_call): Likewise. - -2003-04-21 Nathan Sidwell - - PR c++/9881 - * typeck.c (build_unary_op): Fold all COMPONENT_REF addr - expressions. Reverts my 2002-08-08 patch. - - * typeck.c (comp_ptr_ttypes_real): Swap final && operands for - cheaper early exit. - -2003-04-20 Nathan Sidwell - - * cp/decl2.c (start_static_storage_duration_function): Take count - arg, don't check if it wraps round. - (generate_ctor_or_dtor_function): Add locus arg, use it. - (generate_ctor_and_dtor_functions_for_priority): Data arg is a - locus. - (finish_file): Set line numbers to past EOF for synthesized - functions. - -2003-04-20 Nathan Sidwell - - PR c++/10405 - * search.c (lookup_field_1): Final scan goes backwards for - types, forwards for non-types. - -2003-04-17 Roger Sayle - - PR c/10375 - * decl.c (duplicate_decls): Preserve "const", "noreturn" and - "nothrow" function attributes. - -2003-04-17 Kriang Lerdsuwanakij - - PR c++/10347 - * pt.c (type_dependent_expression_p): Handle array new. - -2003-04-15 Mark Mitchell - - PR c++/10381 - * parser.c (cp_parser_primary_expression): Reorganize logic for - dealing with name lookup failures. - -2003-04-15 Jason Merrill - - * decl2.c (mark_used): Don't instantiate anything if - skip_evaluation. - -2003-04-14 Ziemowit Laski - - * tree.c (build_cplus_array_type_1): Do not call - uses_template_parms() on a NULL index_type. - -2003-04-13 Roger Sayle - - * decl.c (duplicate_decls): Preserve pure and malloc attributes. - -2003-04-12 Mark Mitchell - - PR c++/10300 - * init.c (build_new_1): Reorganize. - -2003-04-12 Zack Weinberg - - * class.c (initialize_array) - * decl.c (reshape_init) - * decl2.c (build_expr_from_tree) - * init.c (build_zero_init) - * pt.c (tsubst_copy, tsubst_copy_and_build) - * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer) - (ptm_initializer, class_initializer, get_pseudo_ti_init) - * semantics.c (finish_compound_literal) - * typeck.c (build_ptrmemfunc1) - * typeck2.c (store_init_value, process_init_constructor) - (build_functional_cast): Use build_constructor. - -2003-04-12 Zack Weinberg - - * call.c (print_z_candidates): Use gcc_gettext_width, not - strlen, to determine how much padding to use. - -2003-04-10 Zack Weinberg - - * decl.c: Update all calls to shadow_warning. - -2003-04-10 Mark Mitchell - - * class.c (layout_class_type): Correct handling for overlong - bit-fields whose width is the same as an integer type. - -2003-04-06 Zack Weinberg - - * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero. - * cp-lang.c (cp_tree_size): New function. - (LANG_HOOKS_TREE_SIZE): Override. - - * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct - tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill. - (union lang_tree_node): Remove common and srcloc members. - (build_srcloc_here): Don't prototype. - * decl.c (cp_tree_node_structure): Kill SRCLOC case. - * pt.c (pending_templates): Correct comment. - * tree.c (build_srcloc, build_srcloc_here): Kill. - -2003-04-06 Zack Weinberg - - * call.c: Include intl.h. - (print_z_candidate): Always use inform; get rid of errfn - argument. Reorganize so that all the strings get picked up - by xgettext. Note obligation of caller to pass first argument - through gettext. - (print_z_candidates): Update to match. Indent second and - successive candidates by strlen() of translated message. - (joust): Restructure ambiguous-conversion pedwarn so that - translators see a complete sentence. Update calls to - print_z_candidate. - - * Make-lang.in (cp/call.o): Update dependencies. - -2003-04-05 Kaveh R. Ghazi - - * decl.c (set_current_binding_level): Delete, revert last change. - (current_binding_level): Modify to allow it as as lvalue. - -2003-04-04 Kaveh R. Ghazi - - * name-lookup.c (find_binding): Pass appropriate pointer type to - POP_TIMEVAR_AND_RETURN. - -2003-04-03 Kaveh R. Ghazi - - * Make-lang.in (cp-warn): Add $(STRICT_WARN). - * cp-tree.h: Don't insist on having GNUC. - -2003-04-03 Jason Merrill - - * cvt.c (ocp_convert): Only abort if we try to convert an object - of TREE_ADDRESSABLE type. - - * class.c (build_vtable): Set DECL_ALIGN here. - (get_vtable_decl): Not here. - (layout_vtable_decl): Or here. - (create_vtable_ptr): Or here. - (layout_class_type): Or here. - (check_bitfield_decl): Don't mess with field alignment. - -2003-04-03 Kaveh R. Ghazi - - * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR, - DEF_ASSN_OPERATOR): Delete spurious semi-colon. - * rtti.c (dfs_class_hint_mark): Likewise. - - * decl.c (push_local_name, push_class_level_binding, - maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in - functions returning void. - * decl2.c (add_using_namespace): Likewise. - - * decl.c (print_binding_level, print_other_binding_stack, - print_binding_stack): Cast argument of %p specifier to void*. - * ptree.c (cxx_print_decl): Likewise. - - * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK, - VAR_FUNCTION_OR_PARM_DECL_CHECK, - VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK, - BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK, - LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__. - - * decl.c (set_current_binding_level): New macro. Use throughout - when setting the current binding level. - - * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma - in enum. - * method.c (mangling_flags): Likewise. - - * cp-tree.h (lang_type_header): Add __extension__ and use - CHAR_BITFIELD for members. - -2003-04-02 Geoffrey Keating - - PR other/9274 - * mangle.c: Include gt-cp-mangle.h. - (subst_identifiers): Mark with GTY. - * config-lang.in (gtfiles): Add cp/mangle.c. - * Make-lang.in: (gt-cp-mangle.h): New rule. - (cp/mangle.o): Depends on gt-cp-mangle.h. - -2003-04-01 Andrew Pinski - - * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c - after \$(srcdir)/cp/name-lookup.h. - * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead - of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file. - * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype. - (cp/name-lookup.o): Depends on gt-cp-name-lookup.h. - -2003-03-31 Jason Merrill - - PR java/10145 - * class.c (check_field_decl): Don't set DECL_ALIGN. - -2003-03-30 Mark Mitchell - - PR c++/7647 - * decl.c (grokdeclarator): Tidy, slightly. - * search.c (lookup_field_1): Add want_type parameter. - (lookup_field_r): Adjust call to lookup_field_1. - -2003-03-30 Gabriel Dos Reis - - * Make-lang.in (cp/name-lookup.o): Add more dependencies. - -2003-03-30 Gabriel Dos Reis - - * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust - prototype. - (cxx_scope_find_binding_for_name): Likewise. - * decl.c (find_binding: Move to name-lookup.c. - (binding_for_name): Likewise. - (cxx_scope_find_binding_for_name): Likewise. - (BINDING_LEVEL): Remove. - (push_binding): Tidy. - (push_class_binding): Likewise. - (pop_binding): Likewise. - (poplevel): Likewise. - (poplevel_class): Likewise. - (set_identifier_type_value_with_scope): Likewise. - (push_overloaded_decl): Likewise. - (lookup_tag): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_name_current_level): Likewise. - (maybe_inject_for_scope_var): Likewise. - (namespace_binding): Move to name-lookup.c. - (set_namespace_binding): Likewise. - * decl2.c (lookup_using_namespace): Tidy. - (qualified_lookup_using_namespace): Likewise. - (do_toplevel_using_decl): Likewise. - * name-lookup.c: Include "timevar.h" - * name-lookup.h (cxx_scope): Declare. - (struct cxx_binding): Lose member "has_level". Adjust "scope" - member declaration. - (BINDING_SCOPE): Adjust definition. - (BINDING_HAS_LEVEL_P): Remove. - -2003-03-30 Gabriel Dos Reis - - * name-lookup.c: New file. - * name-lookup.h: Likewise.. - * decl.c (push_binding): Adjust use cxx_binding_make. - (free_bindings): Move to name-lookup.c - (pop_binding): Use cxx_binding_free. - (binding_for_name): Tidy. - * cp-tree.h: Include "name-lookup.h" - (cxx_binding_make): Move to name-lookup.h - (cxx_binding_clear): Likewise. - (struct cxx_binding): Likewise. - (LOCAL_BINDING_P): Likewise. - (INHERITED_VALUE_BINDING_P): Likewise. - (BINDING_SCOPE): Likewise. - (BINDING_HAS_LEVEL_P): Likewise. - (BINDING_VALUE): Likewise. - (BINDING_TYPE): Likewise. - * config-lang.in (gtfiles): Add cp/name-lookup.h - * Make-lang.in (cp/name-lookup.o): New rule. - (CXX_OBJS): Add cp/name-lookup.o - (CXX_TREE_H): Add cp/name-lookup.h - -2003-03-28 Jason Merrill - - PR c++/10245 - * cvt.c (force_rvalue): New fn. - * call.c (build_conditional_expr): Use it. - * cp-tree.h: Declare it. - -2003-03-28 Mike Stump - - * error.c (dump_expr): Add 0x to printed hex numbers to make - output match source code better. - -2003-03-28 Mark Mitchell - - PR c++/10218 - * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class - definitions. - - * decl2.c (generate_ctor_or_dtor_function): Tolerate a - non-existant ssdf_decls array. - (finish_file): Call generator_ctor_or_dtor_function when there are - static constructors or destructors and no other static - initializations. - -2003-03-28 Nathan Sidwell - - PR c++/10047 - * decl2.c (finish_file): Don't warn about explicitly instantiated - inline decls. - -2003-03-27 Nathan Sidwell - - PR c++/10224 - * pt.c (lookup_template_class): Only check instantiated args if - they do not contain template parameters. - -2003-03-27 Nathan Sidwell - - PR c++/10158 - * parser.c (cp_parser_function_definition): Set - DECL_INITIALIZED_IN_CLASS for members. - * pt.c (instantiate_decl): Only reduce the template args for - friends that are not defined in class. - -2003-03-25 Jason Merrill - - * call.c (print_z_candidate): Change name of first arg to msgid. - (joust): Add comment for translators. - -2003-03-24 Nathan Sidwell - - PR c++/9898, PR c++/383, DR 322 - * pt.c (maybe_adjust_types_for_deduction) : Look - through reference types on both PARM and ARG. - -2003-03-24 Nathan Sidwell - - PR c++/10119 - * error.c (dump_expr) : Use dump_expr. - * pt.c (maybe_fold_nontype_args): New function. - (tsubst_copy) : Subst any template_id args. - : Break out folding code, call it. - (tsubst_copy_and_build) : Call - maybe_fold_nontype_args. - -2003-03-24 Nathan Sidwell - - PR c++/10026 - * decl2.c (arg_assoc_type) : Don't die. - -2003-03-23 Mark Mitchell - - PR c++/7086 - * typeck.c (cxx_mark_addressable): Adjust call to - gen_mem_addressof or put_var_into_stack. - -2003-03-22 Nathan Sidwell - - PR c++/9978, c++/9708 - * cp-tree.h (instantiate_template): Add tsubst_flags parameter. - * call.c (add_template_candidate_real): Adjust - instantiate_template call. - * class.c (resolve_address_of_overloaded_function): Likewise. - * decl.c (build_enumerator): Set TREE_CONSTANT. - * pt.c (check_instantiated_args): New. - (push_inline_template_parms_recursive): Set TREE_CONSTANT, - TREE_READONLY. - (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY. - (reduce_template_parm_level): Likewise. - (process_template_parm): Likewise. - (check_explicit_specialization): Adjust instantiate_template call. - (convert_template_argument): Don't check non-type argument here. - (lookup_template_class): Check them here. - (tsubst_friend_function): Adjust instantiate_template call. - (instantiate_template): Add tsubst_flags parameter, use it. Check - instantiated args. - -2003-03-21 Zack Weinberg - - * decl.c: Update calls to shadow_warning. - -2003-03-21 Nathan Sidwell - - PR c++/9898 - * error.c (dump_decl) [CONST_DECL]: Print ''. - (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call. - -2003-03-20 Mark Mitchell - - * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope - friends. - * cp/pt.c (instantiate_class_template): Fix formatting. - -2003-03-14 Matt Austern - - * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray. - (unemitted_tinfo_decl_p): Remove. - (emit_tinfo_decl): Change declaration to remove unused parameter. - * decl2.c (finish_file): Change tinfo emission to loop through - unemitted_tinfo_decls array instead of looping through all decls. - * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove - unused second parameter. - (init_rtti_processing): initialize unemitted_tinfo_decls varray. - (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls. - (emit_tinfo_decl): remove unused second parameter, add assertion - that decl hasn't already been emitted. - -2003-03-19 Nathanael Nerode - - * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return - type from 'int' to 'bool'. Replace 0 and 1 with true and false in - return statements. - -2003-03-19 Jason Merrill - - PR c++/8316, c++/9315, c++/10136 - * call.c (print_z_candidate): Split out from... - (print_z_candidiates): ...here. - (joust): Use it. - -2003-03-17 Roger Sayle - - PR c++/10031 - * decl.c (duplicate_decls): Use the new type when prototyping - anticipated decls, even when the types match. This defines the - exception list for the built-in function. - -2003-03-17 Jason Merrill - - PR c++/10091 - * typeck.c (build_class_member_access_expr): Compare - TYPE_MAIN_VARIANTs. - -2003-03-17 Mark Mitchell - - PR c++/9639 - * parser.c (cp_parser_declarator_id): Clear parser->scope. - -2003-03-16 Jason Merrill - - PR c++/9993 - * decl.c (finish_function): Only allow the NRVO to use variables - declared at function scope. - -2003-03-17 Andreas Jaeger - - * Make-lang.in (cp/TAGS): Remove. - -2003-03-16 Nathan Sidwell - - PR c++/9629 - * cp-tree.h (struct language_function): Add in_base_initializer. - (in_base_initializer): define it. - (expand_member_init): Remove INIT param. - * init.c (expand_member_init): Remove INIT param, return the member. - (emit_mem_initializers): Set in_base_initializer. - * class.c (build_base_path): Check in_base_initializer. - * parser.c (cp_parser_mem_initializer): Set in_base_initializer. - * pt.c (tsubst_initializer_list): Likewise. - -2003-03-16 Gabriel Dos Reis - - * decl.c (binding_for_name): Fix initialization thinko. - -2003-03-15 Gabriel Dos Reis - - Compile-time improvement: 2/n. - * cp-tree.h (struct cxx_binding): New datatype; - (struct lang_identifier): Use it. - (LOCAL_BINDING_P): Adjust definition. - (INHERITED_VALUE_BINDING_P): Likewise. - (BINDING_SCOPE): Likewise. - (BINDING_HAS_LEVEL_P): Likewise. - (BINDING_VALUE): Likewise. - (BINDING_TYPE): Likewise. - (IDENTIFIER_VALUE): Likewise. - (struct tree_binding): Remove. - (TS_CP_BINDING): Likewise. - ((union lang_tree_node): Remove field "binding". - (cxx_binding_clear): New macro. - (binding_for_name): Adjust return type. - (qualified_lookup_using_namespace): Adjust prototype. - (lookup_using_namespace): Adjust prototype. - (cxx_scope_find_binding_for_name): Declare. - * cp-tree.def: Remove CPLUS_BINDING definition. - * decl.c (push_binding): Adjust local variable type. - (add_binding): Likewise. - (push_class_binding): Likewise. - (pop_binding): Likewise. - (poplevel): Likewise. - (poplevel_class): Likewise. - (free_bindings): Adjust type. - (find_binding): Adjust return type, add a third parameter. Remove - non-useful assertion now that we use static typing. - (cxx_scope_find_binding_for_name): New function. - (binding_for_name): Use it. Adjust local variable type. Simplify. - (namespace_binding): Simplify. - (set_namespace_binding): Likewise. - (set_identifier_type_value_with_scope): Adjust local variable type. - (lookup_tag): Don't type-abuse of local variable 'old'. - (lookup_namespace_name): Likewise. Allocate binding on stack. - (select_decl): Adjust prototype. - (unqualified_namespace_lookup): Allocate binding on stack. - Don't type-abuse of local variable 'val'. - (lookup_name_real): Likewise. - (maybe_inject_for_scope_var): Adjust local variable type. - (cp_tree_node_structure): Remove CPLUS_BINDING case label. - (namespace_binding): Adjust logic, simplify. - (BINDING_LEVEL): Adjust definition. - (push_class_level_binding): Adjust local variable type. - (struct cxx_saved_binding): Adjust field 'binding' type. - * decl2.c (ambiguous_decl): Adjust prototype. - (lookup_using_namespace): Adjust local variable type. - (qualified_lookup_using_namespace): Catch type error and correct - ensueing logic error. - (do_nonmember_using_decl): Adjust local variable type. Allocate - temporary cxx_binding on stack. - (do_toplevel_using_decl): Adjust local variable type. - * ptree.c (cxx_print_cxx_binding): New function. - (cxx_print_identifier): Use it. - (cxx_print_xnode): Delete CPLUS_BINDING case label. - -2003-03-15 Roger Sayle - - * tree.c (count_functions): Fix whitespace. - -2003-03-15 Neil Booth - - * Make-lang.in: Update. - -2003-03-15 Kriang Lerdsuwanakij - - PR c++/6440 - * pt.c (maybe_process_partial_specialization): Handle - member class template when enclosing class template is - explicit specialized. - (most_general_template): Stop looking when DECL is already - specialized. - -2003-03-13 Jason Merrill - - PR c++/9420 - * search.c (lookup_conversions): Call complete_type here. - * call.c (implicit_conversion): Not here. - -2003-03-13 Mark Mitchell - - * decl2.c (do_nonmember_using_decl): Correct handling of - simultaneous type/non-type bindings. - - * call.c (initialize_reference): Remove bogus assertion. - * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09. - -2003-03-12 Andrew Lewycky - - PR c++/7050 - * expr.c (cxx_expand_expr): Return const0_rtx for throw - expressions. - -2003-03-11 Mark Mitchell - - PR c++/9474 - * decl2.c (do_nonmember_using_decl): Do not call duplicate decls - to merge old and new declarations. - -2003-03-12 Alexandre Oliva - - * g++.1: Remove. - * Make-lang.in (c++.generated-manpages): Build cp/g++.1. - (cp/g++.1): Build it from scratch in the build tree. - (c++.install-man): Depend on it. Install it from the build tree. - (c++.mostlyclean): Clean it. - -2003-03-11 Mark Mitchell - - PR c++/9474 - * decl2.c (do_nonmember_using_decl): Do not call duplicate decls - to merge old and new declarations. - - PR c++/9924 - * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins. - -2003-03-11 Jason Merrill - - PR c++/9820 - * search.c (lookup_member): Fix handling of functions in a class - being defined. - -2003-03-11 Mark Mitchell - - PR c++/8700 - * call.c (convert_class_to_reference): Adjust usage of - splice_viable. - (any_viable): Remove. - (splice_viable): Combine with any_viable. - (print_z_candidates): Avoid printing duplicates. - (build_user_type_conversion_1): Adjust usage of splice_viable. - (build_new_function_call): Likewise. - (build_operator_new_call): Likewise. - (build_object_call): Likewise. - (build_conditional_expr): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - (joust): Remove spurious comment. - * cp-tree.h (DECL_FRIENDLIST): Correct documentation. - * decl2.c (arg_assoc_class): Simplify. - * friend.c (add_friend): Likewise. - -2003-03-11 Jason Merrill - - PR c++/8660 - * decl2.c (check_classfn): A member template only matches a - member template. - -2003-03-11 Neil Booth - - * Make-lang.in (CXX_C_OBJS): Update. - * lang-specs.h: Don't define __GNUG__ here. - -2003-03-10 Mark Mitchell - - * call.c (perform_overload_resolution): New function. - (build_new_function_call): Use it. - (build_operator_new_call): Likewise. - (add_candidates): Add explicit_targs and template_only parameters. - (build_new_op): Adjust accordingly. - * cp-tree.h (build_operator_new_call): New function. - (build_function_call_real): Remove. - (build_function_call_maybe): Likewise. - * init.c (build_new_1): Use build_operator_new_call. - * typeck.c (build_function_call_real): Rename to ... - (build_function_call): ... this. - -2003-03-10 Devang Patel - - PR c++/9394 - * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG. - -2003-03-10 Jason Merrill - - PR c++/9798 - * decl.c (push_using_directive): Push before recursing. - - PR c++/9868, c++/9524 - * call.c (resolve_scoped_fn_name): Handle the case of a function - pointer member. - - * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this' - argument in the pointer-to-member case. - -2003-03-09 Mark Mitchell - - PR c++/9373 - * cp-lang.c (cxx_get_alias_set): Use alias set zero for - pointers to member functions. - - PR c++/8534 - * decl.c (build_ptrmemfunc_type): Do not allow default arguments - in pointer-to-member-function types. - -2003-03-10 Gabriel Dos Reis - - * expr.c (cplus_expand_constant): Use C90 prototype style. - (cxx_expand_expr): Likewise. - -2003-03-09 Kriang Lerdsuwanakij - - PR c++/9970 - * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual - functions. - -2003-03-08 Geoffrey Keating - - * lang-specs.h (c++-header): Change .pch to .gch. - -2003-03-08 Neil Booth - - * cp-tree.h (cxx_init): Update prototype. - * lex.c (cxx_init): Similarly. - -2003-03-08 Mark Mitchell - - PR c++/9823 - * cp-tree.h (begin_mem_initializers): Remove. - * parser.c (cp_parser_mem_initializer_list): Inline it here. - Do not call finish_mem_initializers if not in a constructor. - (cp_parser_class_head): Fix typo in error message. - * semantics.c (begin_mem_initializers): Remove. - * testsuite/g++.dg/parser/constructor1.C: New test. - - PR c++/9809 - * call.c (add_function_candidate): Skip builtin fuctions that have - not yet been declared. - - PR c++/9982 - * init.c (build_new_1): Correct logic for determining whether or - not to use an array cookie. - - PR c++/9524 - * parser.c (cp_parser_postfix_expression): Call - finish_non_static_data_member, even when processing_template_decl. - - PR c++/9912 - * cp-tree.h (is_ancestor): New function. - (handle_class_head): Change prototype. - * decl2.c (is_namespace_ancestor): Rename to ... - (namespace_anecestor): ... this. - (set_decl_namespace): Adjust accordingly. - (handle_class_head): Remove unnecessary parameters. - * parser.c (cp_parser_class_head): Check that - nested-name-specifiers are used appropriately. - -2003-03-07 Mark Mitchell - - * call.c (reference_binding): Remove REF_IS_VAR parameter. - (implicit_conversion): Adjust call to reference_binding. - (make_temporary_var_for_ref_to_type): Add TYPE parameter. - (initialize_reference): Adjust handling for references bound to - rvalues. - * cp-tree.h (make_temporary_var_for_ref_to_temp): Change - prototype. - (real_non_cast_lvalue_p): New method. - * cvt.c (build_up_reference): Adjust use of - make_temporary_var_for_ref_to_temp. - * tree.c (real_non_cast_lvalue_p): New method. - -2003-03-07 Gabriel Dos Reis - - * except.c (init_exception_processing): Use C90 prototype style. - (cp_protect_cleanup_actions): Likewise. - (prepare_eh_type): Likewise. - (build_eh_type_type): Likewise. - (build_exc_ptr): Likewise. - (do_begin_catch): Likewise. - (dtor_nothrow): Likewise. - (do_end_catch): Likewise. - (push_eh_cleanup): Likewise. - (decl_is_java_type): Likewise. - (choose_personality_routine): Likewise. - (initialize_handler_parm): Likewise. - (expand_start_catch_block): Likewise. - (expand_end_catch_block): Likewise. - (begin_eh_spec_block): Likewise. - (finish_eh_spec_block): Likewise. - (do_allocate_exception): Likewise. - (do_free_exception): Likewise. - (wrap_cleanups_r): Likewise. - (stabilize_throw_expr): Likewise. - (build_throw): Likewise. - (complete_ptr_ref_or_void_ptr_p): Likewise. - (is_admissible_throw_operand): Likewise. - (nothrow_libfn_p): Likewise. - (can_convert_eh): Likewise. - (check_handlers_1): Likewise. - (check_handlers): Likewise. - -2003-03-06 Mark Mitchell - - * call.c (merge_conversion_sequences): New function. - (build_conv): Set ICS_USER_FLAG for USER_CONVs. - (convert_class_to_reference): Correct handling of second - standard conversion sequence in a user-defined conversion - sequence. - (build_user_type_conversion_1): Use merge_conversion_sequences. - * cp-tree.def: Add comments for CONV nodes. - * rtti.c (get_tinfo_decl): Use build_address/build_nop. - -2003-03-07 Gabriel Dos Reis - - * error.c (init_error): Use C90 prototype style. - (dump_scope): Likewise. - (dump_qualifiers): Likewise. - (dump_template_argument): Likewise. - (dump_template_argument_list): Likewise. - (dump_template_parameter): Likewise. - (dump_template_bindings): Likewise. - (dump_type): Likewise. - (dump_typename): Likewise. - (class_key_or_enum): Likewise. - (dump_aggr_type): Likewise. - (dump_type_prefix): Likewise. - (dump_type_suffix): Likewise. - (dump_global_iord): Likewise. - (dump_simple_decl): Likewise. - (dump_decl): Likewise. - (dump_template_decl): Likewise. - (dump_function_decl): Likewise. - (dump_parameters): Likewise. - (dump_exception_spec): Likewise. - (dump_function_name): Likewise. - (dump_template_parms): Likewise. - (dump_char): Likewise. - (dump_expr_list): Likewise. - (dump_expr): Likewise. - (dump_binary_op): Likewise. - (dump_unary_op): Likewise. - (type_as_string): Likewise. - (expr_as_string): Likewise. - (decl_as_string): Likewise. - (context_as_string): Likewise. - (lang_decl_name): Likewise. - (cp_file_of): Likewise. - (cp_line_of): Likewise. - (decl_to_string): Likewise. - (expr_to_string): Likewise. - (fndecl_to_string): Likewise. - (code_to_string): Likewise. - (language_to_string): Likewise. - (parm_to_string): Likewise. - (op_to_string): Likewise. - (type_to_string): Likewise. - (assop_to_string): Likewise. - (args_to_string): Likewise. - (cv_to_string): Likewise. - (cxx_print_error_function): Likewise. - (cp_diagnostic_starter): Likewise. - (cp_diagnostic_finalizer): Likewise. - (cp_print_error_function): Likewise. - (function_category): Likewise. - (print_instantiation_full_context): Likewise. - (print_instantiation_partial_context): Likewise. - (maybe_print_instantiation_context): Likewise. - (print_instantiation_context): Likewise. - (cp_printer): Likewise. - (print_integer): Likewise. - (print_non_consecutive_character): Likewise. - (locate_error): Likewise. - -2003-03-06 Mark Mitchell - - PR c++/9965 - * call.c (reference_binding): Add ref_is_var parameter. - (implicit_conversion): Adjust call to reference_binding. - (initialize_reference): Likewise. - - PR c++/9400 - * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL - PARM_DECLs. - - PR c++/9791 - * class.c (get_basefndecls): Use lookup_fnfields_1. - -2003-03-06 Kriang Lerdsuwanakij - - PR c++/9188 - * parser.c (cp_parser_type_parameter): Remove redundant `expect' - in error message. - (cp_parser_single_declaration): Likewise. - -2003-03-05 Jason Merrill - - PR c++/9440 - * call.c (build_conditional_expr): Use convert rather than an - explicit NOP_EXPR. - -2003-03-02 Matt Austern - - * decl.c (cp_binding_level): Add static_decls varray member. - (add_decl_to_level): Add static/inline namespace scope - declarations to static_decls array. - (wrapup_global_for_namespace): Pass static_decls only, instead of - all decls, to wrapup_global_declarations/check_global_declarations. - (push_namespace): Initialize static_decls for ordinary namespaces. - (cxx_init_decl_processing): Initialize static_decls for global - namespace. - -2003-03-05 Mark Mitchell - - * class.c (end_of_class): Correct thinko. - -2003-03-04 Nathanael Nerode - - * config-lang.in: Replace ${libstdcxx_version} by its value. - -2003-03-04 Gabriel Dos Reis - - * cp-tree.h (cxx_saved_binding): Declare. - (struct saved_scope): Adjust type of field 'old_binding'. - * decl.c (cxx_saved_binding_make): New macro. - (struct cxx_saved_binding): Define. - (store_bindings): Adjust prototype. Use cxx_saved_binding to save - C++ bindings. - (maybe_push_to_top_level): Adjust local variable type. - (pop_from_top_level): Likewise. - -2003-03-04 Tom Tromey - - * Make-lang.in (c++.tags): New target. - -2003-03-04 Neil Booth - - * Make-lang.in: Update. - -2003-03-03 Jason Merrill - - * decl.c (finish_enum): Do set the type in a template. Simplify. - * pt.c (tsubst_enum, tsubst_copy): Revert last patch. - -2003-03-03 Mark Mitchell - - PR c++/9878 - * call.c (convert_class_to_reference): Correct conversion - sequences. - (reference_binding): Add ref_bound_directly_to_rvalue_p parameter. - (implicit_conversion): Adjust call to reference_binding. - (add_candidate): Change type of candidates parameter. - (add_function_candidate): Likewise. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - (add_builtin_candidate): Likewise. - (add_builtin_candidates): Likewise. - (add_template_candidate_real): Likewise. - (add_template_candidate): Likewise. - (add_template_conv_candidate): Likewise. - (build_user_type_conversion_1): Adjust accordingly. - (build_object_call): Likewise. - (build_conditional_expr): Likewise. - (add_candidates): Likewise. - (build_new_op): Likewise. - (convert_like_real): Use USER_CONV_CAND. Use build_nop. - (build_new_method_call): Adjust calls to add_function_candidate. - (make_temporary_var_for_ref_to_temp): New function. - (initialize_reference): Add decl parameter. - * class.c (build_rtti_vtbl_entries): Use build_address and - build_nop. - * cp-tree.h (initialize_reference): Change prototype. - (make_temporary_var_for_ref_to_temp): New function. - (build_type_conversion): Change prototype. - (build_address): New function. - (build_nop): Likewise. - * cvt.c (cp_convert_to_pointer): Adjust call to - build_type_conversion. Avoid indicating redundant NOP_EXPRs. - Use build_nop. - (convert_to_pointer_force): Use build_nop. - (build_up_reference): Use make_temporary_var_for_ref_to_temp. - (convert_to_reference): Adjust call to build_type_conversion. - (ocp_convert): Likewise. - (build_type_conversion): Remove for_sure parameter. - * decl.c (grok_reference_init): Use initialize_reference. - * typeck.c (build_address): New function. - (build_nop): Likewise. - (build_unary_op): Use them. - (build_ptrmemfunc): Tidy slightly. - (convert_for_initialization): Adjust call to - initialize_reference. - * typeck2.c (store_init_value): Remove #if 0'd code. - -2003-03-03 Jason Merrill - - * decl.c (start_function): Clear DECL_NUM_STMTS. - - * class.c (get_vtable_decl): Use vtbl_type_node. - (build_primary_vtable): Check for it. - -2003-03-02 Aldy Hernandez - - * decl.c (check_initializer): Check for vector_opaque_p. - -2003-03-02 Ashif Harji - - * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to - invoke an external cpp during compilation. - -2003-03-01 Gabriel Dos Reis - - * decl.c (duplicate_decls): Convert use of warning_with_decl() to - that of warning(). - (start_decl): Likewise. - (start_function): Likewise. - -2003-03-01 Neil Booth - - * Make-lang.in (CXX_C_OBJS): Update. - -2003-02-28 Mark Mitchell - - PR c++/9892 - * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when - instantiating it. - -2003-02-28 Aldy Hernandez - - * parser.c (cp_parser_init_declarator): Revert opaque - vector_opaque_p change. - Do not include target.h. - -2003-02-28 Mark Mitchell - - PR c++/9879 - * cp-tree.h (build_zero_init): Add parameter. - * decl.c (cp_finish_decl): Adjust call. - * init.c (build_zero_init): Add nelts parameter. Adjust recursive - calls. - (build_default_init): Add nelts parameter. Adjust calls to - build_zero_init. - (build_new_1): Adjust call to build_default_init. - * typeck2.c (process_init_constructor): Adjust call to build_zero_init. - -2003-02-26 Devang Patel - - * decl.c (finish_enum): Merge two 'for' loops. Copy value node if - required. Postpone enum setting for template decls. - (build_enumerator): Delay copying value node until finish_enum - (). Remove #if 0'ed code. - * pt.c (tsubst_enum): Set TREE_TYPE and copy value node. - (tsubst_copy): Add check for enum type. - -2003-02-25 Mark Mitchell - - PR c++/9683 - * decl2.c (prune_vars_needing_no_initialization): Do not throw - away initializations for DECL_EXTERNAL VAR_DECLs. - (finish_file): Adjust accordingly. - * pt.c (instantiate_decl): Do not defer VAR_DECLs. - -2003-02-24 Gabriel Dos Reis - - * decl.c (add_binding): Time TV_NAME_LOOKUP. - (push_class_binding): Likewise. - (set_namespace_binding): Likewise. - -2003-02-24 Mark Mitchell - - PR c++/9836 - * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from - specializations back to the main template. - * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use. - * pt.c (resolve_typename_type): Likewise. - -2003-02-24 Jeffrey D. Oldham - - PR c++/9778 - * pt.c (tsubst_copy_and_build): For a templated function inside a - scope, process template arguments. - -2003-02-24 Kriang Lerdsuwanakij - - PR c++/9602 - * typeck2.c (abstract_virtuals_error): Don't check when - TYPE is still template parameter dependent. - -2003-02-23 Mark Mitchell - - PR c++/5333 - * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro. - * parser.c (cp_parser_diagnose_invalid_type_name): Use it. - * pt.c (instantiate_class_template): Don't try to instantiate - dependent types. - (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE. - -2003-02-21 Mark Mitchell - - PR c++/9749 - * decl.c (grokdeclarator): Do not allow parameters with variably - modified types. - -2003-02-21 Nathan Sidwell - - * search.c (grow_bfs_bases): Remove. Fold into ... - (bfs_walk): ... here, fix fencepost error. Fix merge lossage - in previous patch. - -2003-02-20 Mark Mitchell - - PR c++/9729 - * mangle.c (mangle_conv_op_name_for_type): Issue an error message - when the G++ 3.2 ABI prevents correct compilation. - -2003-02-20 Nathan Sidwell - - Change base class access representation. Share virtual base - binfos. - * cp/call.c (build_special_member_call): Remove binfo_for_vbase - call. - * cp/class.c (build_base_path): Likewise. - (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use. - (build_secondary_vtable): Remove FOR_TYPE arg. Adjust. - (make_new_vtable): Adjust. - (force_canonical_binfo_r): Delete. - (force_canonical_binfo): Delete. - (mark_primary_virtual_base): Delete. - (dfs_unshared_virtual_bases): Delete. - (mark_primary_bases): Adjust. - (maybe_warn_about_overly_private_class): Adjust. - (dfs_base_derived_from): Delete. - (base_derived_from): Follow the inheritance chain. - (struct find_final_overrider_data): Add vpath member. - (dfs_find_final_overrider): Adjust. - (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New. - (find_final_overrider): Adjust. - (update_vtable_entry_for_fn): Adjust. - (modify_all_vtables): Adjust. - (walk_subobject_offsets): Adjust. - (layout_nonempty_base_or_field): Adjust. - (layout_empty_base): Remove last parameter. Adjust. - (build_base_field): Adjust. - (build_base_fields): Adjust. - (propagate_binfo_offsets): Remove last parameter. Adjust. - (dfs_set_offset_for_unshared_vbases): Delete. - (layout_virtual_bases): Adjust. - (finish_struct_1): Adjust. - (init_class_processing): Don't init access nodes. - (dfs_get_primary_binfo): Delete. - (get_primary_binfo): Adjust. - (dump_class_hierarchy_r): Remove most derived arg, add IGO - parameter. Adjust. - (dump_class_hierarchy): Adjust. - (finish_vtbls): Adjust. - (get_original_base): Delete. - (build_vtt_inits): Adjust. - (dfs_build_secondary_vptr_vtt_inits): Adjust. - (dfs_ctor_vtable_bases_queue_p): Adjust. - (build_ctor_vtbl_group): Adjust. - (dfs_accumulate_vtbl_inits): Adjust. - (build_vtbl_initializer): Adjust. - (build_vbase_offset_vtbl_entries): Adjust. - (add_vcall_offset_vtbl_entries_1): Adjust. - * cp/cp-tree.h (CPTI_ACCESS_*): Remove. - (access_*_node): Remove. - (CANONICAL_BINFO): Delete. - (BINFO_UNSHARED_MARKED): Remove. - (BINFO_MARKED): Set LANG_FLAG_0 directly. - (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete. - (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly. - (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED): - Delete. - (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly. - (SET_BINFO_NEW_VTABLE_MARKED): Adjust. - (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED): - Delete. - (BINFO_DEPENDENT_BASE_P): New. - (dfs_walk, dfs_walk_real): Queue function takes derived binfo and - index. - (markedp, unmarkedp): Adjust. - (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p, - dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp, - find_vbase_instance, binfo_for_vbase): Delete. - (copied_binfo, original_binfo): Declare. - (finish_base_specifier): Add virtual_p arg. - (unshare_base_binfos): Delete. - (copy_base_binfos): Declare. - (reverse_path): Delete. - * cp/decl.c (xref_basetypes): Access and virtuality passed - differently. Don't copy direct base binfos here. Call - copy_base_binfos. - * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust. - (initialize_vtbl_ptrs): Adjust. - (expand_member_init): Adjust. - * cp/parser.c (cp_parser_base_specifier): Adjust. - * cp/pt.c (instantiate_class_template): Adjust. - (get_template_base_recursive): Adjust. - * cp/rtti.c (get_pseudo_ti_init): Adjust. - (get_pseudo_ti_desc): Adjust. - * cp/tree.c (unshare_base_binfos): Rename to ... - (copy_base_binfos): ... here, reimplement. - (make_binfo): Set BINFO_DEPENDENT_BASE_P. - (reverse_path): Remove. - * cp/typeck.c (get_delta_difference): Adjust error messages. - * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust. - * cp/search.c (lookup_base_r): Adjust. - (dynamic_cast_base_recurse): Adjust. - (canonical_binfo): Remove. - (dfs_canonical_queue): Remove. - (dfs_assert_unmarked_p): Remove. - (assert_canonical_unmarked): Remove. - (shared_marked_p, shared_unmarked_p): Remove. - (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE. - (dfs_access_in_type): Adjust. - (access_in_type): Adjust. - (dfs_accessible_queue_p): Adjust. - (dfs_accessible_p): Adjust. - (is_subobject_of_p_1, is_subobject_of_p): Remove. - (struct lookup_field_info): Remove from_dep_base_p field. - (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P. - (lookup_field_r): Remove dependent base code. - (lookup_member): Likewise. - (dfs_walk, dfs_walk_real): Add access arg to queue fn. - (dfs_unmarked_real_bases_queue_p): Remove. - (dfs_marked_real_bases_queue_p): Remove. - (dfs_skip_vbases): Remove. - (dfs_get_pure_virtuals): Adjust. - (markedp, unmarkedp): Adjust. - (marked_vtable_pathp, unmarked_vtable_pathp): Remove. - (marked_pushdecls_p, unmarked_pushdecls_p): Adjust. - (dfs_unmark): Adjust. - (dfs_get_vbase_types):Remove. - (dfs_build_inheritance_graph_order): Remove. - (get_vbase_types): Remove - (dfs_find_vbase_instance): Remove. - (find_vbase_instance): Remove. - (dfs_debug_unmarkedp): Adjust. - (dependent_base_p): Remove. - (dfs_push_type_decls): Adjust. - (dfs_push_decls): Adjust. - (dfs_no_overlap_yet): Adjust. - (copied_binfo): New function. - (original_binfo): New function. - (binfo_for_vbase): Remove. - -2003-02-18 Zack Weinberg - - * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk. - (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES - vectors, for speed. - -2003-02-18 Mark Mitchell - - PR c++/9704 - * class.c (layout_class_type): In the 3.2 ABI, take into account - trailing bit fields when computing CLASSTYPE_SIZE_UNIT. - -2003-02-18 Matt Austern - - * cp/cp-lang.c: Change lang hooks so that final_write_globals does - nothing for C++. - * cp/decl.c (wrapup_globals_for_namespace): Remove special - handling of global namespace. - -2003-02-18 Geoffrey Keating - - * cp-tree.h (rid_to_yy): Delete. - (C_RID_YYCODE): Delete. - (finish_file): Delete redundant declaration. - -2003-02-18 Jason Merrill - - PR c++/9623 - * decl.c (reshape_init): Don't mess with initializer labels. - - PR c++/9485 - * parser.c (cp_parser_postfix_expression): Set idk properly for - object->scope::member. - -2003-02-18 Ben Elliston - - PR other/7350 - * decl.c (duplicate_decls): Fix typo in comment. - -2003-02-17 Michael Elizabeth Chastain - - PR debug/9717 - * class.c (build_base_field): Mark fields for base classes with - DECL_IGNORED_P. - -2003-02-17 Kriang Lerdsuwanakij - - PR c++/9457 - * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute - CONSTRUCTOR_ELTS only once. - -2003-02-16 Kriang Lerdsuwanakij - - PR c++/9459 - * error.c (dump_type_prefix): Handle TYPEOF_TYPE. - (dump_type_suffix): Likewise. - -2003-02-14 Nathan Sidwell - - * search.c: ANSIfy function declarations and definitions. - * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool. - * call.c (build_method_call, resolve_scoped_fn_name, - build_java_interface_fn_ref): Adjust lookup_field, lookup_member - calls. - * class.c (handle_using_decl): Likewise. - * decl.c (make_typename_type, make_unmound_class_template, - start_decl, compute_array_index_type): Likewise. - * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise. - * init.c (expand_member_init, build_member_call): Likewise. - * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation, - resolve_typename_type): Likewise. - * typeck.c (lookup_destructor, finish_class_member_access_exprm - build_prememfunc_access_expr): Likewise. - -2003-02-13 Gabriel Dos Reis - - * decl2.c: Include "timevar.h". - (namespace_ancestor): Time name lookup. - (add_using_namespace): Likewise. - (lookup_using_namespace): Likewise. - (qualified_lookup_using_namespace): Likewise. - (decl_namespace): Likewise. - (lookup_arg_dependent): Likewise. - * lex.c (do_identifier): Likewise. - (do_scoped_id): Likewise. - * pt.c (lookup_template_class): Likewise. - -2003-02-14 Andrew Pinski - - * decl.c: (define_label): Fix warning for return 0 instead of NULL. - -2003-02-13 Gabriel Dos Reis - - * decl.c: Include "timevar.h". - (poplevel): Time name lookup. - (find_binding): Likewise. - (push_namespace): Likewise. - (pop_nested_namespace): Likewise. - (store_bindings): Likewise. - (maybe_push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (push_local_name): Likewise. - (pushtag): Likewise. - (pushdecl): Likewise. - (pushdecl_with_scope): Likewise. - (pushdecl_namespace_level): Likewise. - (pushdecl_top_level): Likewise. - (pushdecl_class_level): Likewise. - (push_class_level_binding): Likewise. - (push_using_decl): Likewise. - (push_using_directive): Likewise. - (push_overloaded_decl): Likewise. - (lookup_label): Likewise. - (define_label): Likewise. - (lookup_tag): Likewise. - (lookup_tag_reverse): Likewise. - (lookup_namespace_name): Likewise. - (select_decl): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_name_real): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (maybe_inject_for_scope_var): Likewise. - (xref_tag): Likewise. - - * Make-lang.in (cp/decl.o): Add dependency on timevar.h - -2003-02-12 Phil Edwards - - * decl.c (build_enumerator): Remove unneeded test. - -2003-02-09 Dan Nicolaescu - - * cp-tree.h (struct lang_type_header): Make all fields unsigned - char. - -2003-02-03 Mark Mitchell - - PR c++/7129 - * call.c (z_candidate): Add args. - (convert_class_to_reference): Set it. - (implicit_conversion): Tidy. - (add_candidate): Add args parameter. - (add_function_candidate): Adjust call to add_candidate. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - (build_user_type_conversion_1): Eliminate wasteful tree_cons - usage. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (add_candidates): New function. - (build_new_op): Use it. - (covert_like_real): Adjust call to build_over_call. - (build_over_call): Remove args parameter. - * operators.def: Add ?=. - -2003-02-01 Richard Sandiford - - * typeck.c (build_indirect_ref): Don't check flag_volatile. - -2003-01-31 Kriang Lerdsuwanakij - - PR c++/8849 - * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL. - -2003-01-31 Nathan Sidwell - - * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, - BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS. - (BINFO_LANG_ELTS): New #define. - * tree.c (make_binfo): Use BINFO_LANG_ELTS. - -2003-01-30 Geoffrey Keating - - * cp/Make-lang.in: Remove -Wno-error from cp/decl.o. - -2003-01-30 Mark Mitchell - - * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY - for class types. - * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit - rather than TYPE_LANG_FLAG_0. - (TYPE_BUILT_IN): Remove. - (TYPE_DEPENDENT_P): New macro. - (TYPE_DEPENDENT_P_VALID): Likewise. - (lang_type_class): Add fields_readonly. - * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN. - * pt.c (dependent_type_p_r): New function, split out from ... - (dependent_type_p): ... here. Memoize results. - * search.c (dependent_base_p): Use dependent_type_p, not - uses_template_parms. - * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY - for class types. - -2003-01-29 Mark Mitchell - - * call.c (build_field_call): Use build_new_op, not build_opfncall. - (prep_operand): New function. - (build_new_op): Use it. Remove dead code. - * class.c (pushclass): Change "modify" parameter type from int to - bool. - (currently_open_class): Use same_type_p, not pointer equality. - (push_nested_class): Adjust calls to pushclass, remove modify - parameter. - * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro. - (pushclass): Change prototype. - (push_nested_class): Likewise. - (grokoptypename): Remove. - (build_opfncall): Remove. - (value_dependent_expression_p): Declare. - (resolve_typename_type): Likewise. - (resolve_typename_type_in_current_instantiation): Likewise. - (enter_scope_of): Remove. - (tsubst): Remove. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (tsubst_copy_and_build): Likewise. - * decl.c (warn_about_implicit_typename_lookup): Remove. - (finish_case_label): Return error_mark_node for erroneous labels. - (start_decl): Adjust calls to push_nested_class. - (grokfndecl): Call push_scope/pop_scope around call to - duplicate_decls. - (grokdeclarator): Do not call tsubst. - (start_function): Adjust calls to push_nested_class. - * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall. - (check_classfn): Use push_scope/pop_scope around type comparisions. - (grokoptypename): Remove. - (push_sscope): Adjust call to push_nested_class. - * error.c (dump_type): Show cv-qualification of typename types. - * init.c (build_member_call): Use build_new_op, not - build_opfncall. - * method.c (build_opfncall): Remove. - * parser.c (cp_parser): Add allow_non_constant_expression_p and - non_constant_expression_p. - (cp_parser_constant_expression): Adjust prototype. - (cp_parser_resolve_typename_type): Remove. - (cp_parser_non_constant_expression): New function. - (cp_parser_non_constant_id_expression): Likewise. - (cp_parser_new): Set allow_non_constant_expression_p and - non_constant_expression_p. - (cp_parser_primary_expression): Reject `this' and `va_arg' in - constant-expressions. Note that dependent names aren't really - constant. - (cp_parser_postfix_expression): Reject conversions to non-integral - types in constant-expressions. Neither are increments or - decrements. - (cp_parser_unary_expression): Reject increments and decrements in - constant-expressions. - (cp_parser_direct_new_declarator): Adjust call to - cp_parser_constant_expression. - (cp_parser_cast_expression): Reject conversions to non-integral - types in constant-expressions. - (cp_parser_assignment_expression): Rejects assignments in - constant-expressions. - (cp_parser_expression): Reject commas in constant-expressions. - (cp_parser_labeled_statement): Adjust call to - cp_parser_constant_expression. - (cp_parser_direct_declarator): Simplify array bounds, even in - templates, when they are non-dependent. Use - resolve_typename_type, not cp_parser_resolve_typename_type. - (cp_parser_class_head): Use resolve_typename_type, not - cp_parser_resolve_typename_type. - (cp_parser_member_declaration): Adjust call to - cp_parser_constant_expression. - (cp_parser_constant_initializer): Likewise. - (cp_parser_constructor_declarator): Use resolve_typename_type, not - cp_parser_resolve_typename_type. - (cp_parser_late_parsing_default_args): Adjust call to - push_nested_class. - * pt.c (tsubst): Give it internal linkage. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (tsubst_copy_and_build): Likewise. - (push_access_scope_real): Likewise. - (tsubst_friend_class): Likewise. - (instantiate_class_template): Adjust call to pushclass. - (value_dependent_expression_p): Give it external linkage. - Robustify. - (resolve_typename_type): New function. - * semantics.c (finish_call_expr): Use build_new_op, not - build_opfncall. - (begin_constructor_declarator): Remove. - (begin_class_definition): Adjust call to pushclass. - (enter_scope_of): Remove. - * typeck.c (comptypes): Resolve typename types as appropriate. - (build_x_indirect_ref): Use build_new_op, not build_opfncall. - (build_x_compound_expr): Likewise. - (build_modify_expr): Likewise. - (build_x_modify_expr): Likewise. - * typeck2.c (build_x_arrow): Likewise. - -2003-01-29 Fariborz Jahanian - - * pt.c (last_pending_template) Declare GTY(). - -2003-01-29 Kriang Lerdsuwanakij - - PR c++/8591 - * parser.c (cp_parser_elaborated_type_specifier): Convert - TEMPLATE_DECL to TYPE_DECL only when processing template friends. - (cp_parser_maybe_treat_template_as_class): Remove redundant tests. - -2003-01-28 Nathan Sidwell - - PR c++/9437 - * pt.c (unify): Don't unify '*T' with 'U C::*'. - - PR c++/3902 - * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor - inside a declarator. - -2003-01-27 Nathan Sidwell - - * class.c (update_vtable_entry_for_fn): Add index parameter. - Generate vcall thunk for covariant overriding from a virtual - primary base. - (dfs_modify_vtables): Adjust. - -2003-01-25 Nathan Sidwell - - PR c++/9403 - * parser.c (cp_parser_class_or_namespace_name): Reject duplicate - template keyword. - (cp_parser_base_specifier): Look for and consume a - TEMPLATE keyword. Replace switch with array index. - - PR c++/795 - * semantics.c (finish_non_static_data_member): Remember the - field's type even in a template. - - PR c++/9415 - * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are - already scoped. - - PR c++/8545 - * parser.c (cp_parser_cast_expression): Be more tentative. - -2003-01-25 Kriang Lerdsuwanakij - - * cp-tree.h (flagged_type_tree_s): Remove. - (check_for_new_type): Likewise. - * typeck2.c (check_for_new_type): Likewise. - -2003-01-23 Nathanael Nerode - - * dump.c: ANSIfy function declarations and definitions. - - * cp-tree.h, decl.h: Get rid of PARAMS. Again. - -2003-01-22 Mark Mitchell - - PR c++/9354 - * init.c (build_new): Set the type of the new-expression, even - when processing_templte_decl. - - PR c++/9216 - * parser.c (cp_parser_primary_expression): Improve error message - for templates used in an expression context. - - PR c++/8696 - * parser.c (cp_parser_decl_specifier_seq): Commit to tentative - parse when encountering "typedef". - -2003-01-22 Nathanael Nerode - - * class.c, parser.c: ANSIfy function definitions and declarations. - -2003-01-22 Mark Mitchell - - PR c++/9328 - * error.c (dump_decl): For an OVERLOAD, just print the name of the - function; it doesn't make sense to try to print its type. - * semantics.c (finish_typeof): Issue errors about invalid uses. - - PR c++/9298 - * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New - function. - (cp_parser_expression_statement): Use it. - (cp_parser_explicit_instantiation): Likewise. - * pt.c (do_decl_instantiation): Improve error handling logic. - -2003-01-22 Mark Mitchell - - PR c++/9384 - * parser.c (cp_parser_using_declaration): Issue error messages - about name resolution failures here. - - PR c++/9388 - * class.c (currently_open_derived_class): Use dependent_type_p. - * cp-tree.h (dependent_type_p): New function. - (dependent_template_arg_p): Likewise. - (dependent_template_p): Likewise. - (type_dependent_expression_p): Likewise. - * parser.c (cp_parser_dependent_type_p): Remove. - (cp_parser_value_dependent_type_p): Likewise. - (cp_parser_type_dependent_expression_p): Likewise. - (cp_parser_dependent_template_arg_p): Likewise. - (cp_parser_dependent_template_id_p): Likewise. - (cp_parser_dependent_template_p): Likewise. - (cp_parser_diagnose_invalid_type_name): Replace - cp_parser_dependent_type_p with dependent_type_p, etc. - (cp_parser_primary_expresion): Likewise. - (cp_parser_nested_name_specifier_opt): Likewise. - (cp_parser_postfix_expression): Likewise. - (cp_parser_unary_expression): Likewise. - (cp_parser_template_name): Likewise. - (cp_parser_class_name): Likewise. - (cp_parser_lookup_name): Likewise. - * pt.c (dependent_type_p): New function. - (value_dependent_expression_p): Likewise. - (type_dependent_expression_p): Likewise. - (dependent_template_arg_p): Likewise. - (dependent_template_id_p): Likewise. - (dependent_template_p): Likewise. - - PR c++/9285 - PR c++/9294 - * parser.c (cp_parser_simple_declaration): Return quickly when - encountering errors. - -2003-01-21 Kaveh R. Ghazi - - Make-lang.in (cp/decl.o-warn): Add -Wno-error. - -2003-01-17 Jason Merrill - - PR c++/9167, c++/9358 - * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE. - -2003-01-17 Jason Merrill - - PR c++/9342 - * call.c (build_conditional_expr): Always do lvalue-rvalue - conversion. - -2003-01-17 Mark Mitchell - - PR c++/9294 - * cp-tree.def (BASELINK): Make it class 'x', not class 'e'. - * cp-tree.h (BASELINK_BINFO): Adjust. - (BASELINK_FUNCTIONS): Likewise. - (BASELINK_ACCESS_BINFO): Likewise. - (tree_baselink): New structure. - (cp_tree_node_structure_enum): Add TS_CP_BASELINK. - (lang_tree_node): Add baselink. - * decl.c (cp_tree_node_structure): Add BASELINK case. - * search.c (build_baselink): Adjust. - * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P - test from TREE_LIST case. - - PR c++/9272 - * parser.c (cp_parser_constructor_declarator_p): Do not assume - that a constructor cannot be declared outside of its own class. - - * parser.c (cp_parser_resolve_typename_type): If the scope cannot - be resolved, neither can the qualified name. - - * rtti.c (get_pseudo_ti_desc): Fix thinko. - -2003-01-16 Jason Merrill - - PR c++/8564 - * init.c (build_vec_init): Re-add maxindex parm. - (perform_member_init, build_aggr_init): Pass it. - (build_new_1): Pass it. Use an incomplete array type for full_type. - * typeck.c (build_modify_expr): Pass it. - * cp-tree.h: Adjust. - -2003-01-16 Jeffrey D. Oldham - - * cp-tree.h (tsubst_copy_and_build): New declaration. - * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment. - (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment. - (tsubst_copy_and_build): New function. - -2003-01-16 Mark Mitchell - - * cp-tree.h (lang_type_class): Remove is_partial_instantiation. - (PARTIAL_INSTANTIATION_P): Remove. - (IMPLICIT_TYPENAME_P): Likewise. - (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise. - (build_typename_type): Remove declaration. - (parmlist_is_exprlist): Likewise. - * decl.c (build_typename_type): Make it static, remove third - parameter. - (push_class_binding): Don't do implicit typename stuff. - (make_typename_type): Likewise. - (lookup_name_real): Likewise. - (grokdeclarator): Don't try to convert declarations into - initializations. Don't do implicit typename stuff. - (parmlist_is_exprlist): Remove. - (xref_basetypes): Simplify. - * decl2.c (grokfield): Don't try to convert declarations into - initializations. - (build_anon_union_vars): Do this while processing templates, too. - (finish_anon_union): Likewise. - * error.c (dump_type): Remove implicit typename handling. - * parser.c (cp_parser_diagnose_invalid_type_name): New method. - (cp_parser_primary_expression): Correct handling of names not - found by unqualified name lookup in templates. - (cp_parser_nested_name_specifier_opt): Avoid checking dependency - of types when possible. - (cp_parser_simple_declaration): Complain intelligently about some - invalid declarations. - (cp_parser_member_declaration): Likewise. - (cp_parser_constructor_declarator_p): Don't check when we're in a - function scope. - * pt.c (instantiate_class_template): Remove - PARTIAL_INSTANTIATION_P gunk. - * search.c (lookup_field_r): Don't build implicit typenames. - (marked_pushdecls_p): Don't enter dependent base types. - (unmarked_pushdecls_p): Likewise. - * semantics.c (begin_class_definition): Remove implicit typename - stuff. - -2003-01-16 Nathan Sidwell - - PR c++/9212 - * parser.c (cp_parser_direct_declarator): If accepting either - abstract or named, the name must be an unqualified-id. - -2003-01-16 Kaveh R. Ghazi - - * class.c (layout_virtual_bases): Avoid signed/unsigned warning. - -2003-01-14 Kaveh R. Ghazi - - * decl2.c (check_classfn): Fix uninitialized warning. - (build_anon_union_vars): Likewise. - * pt.c (tsubst_copy): Likewise. - -2003-01-14 Jeffrey D. Oldham - - Further conform g++'s __vmi_class_type_info to the C++ ABI - specification. - * rtti.c (dfs_class_hint_mark): Do not set hints not specified by - the specification. - (class_hint_flags): Likewise. - -2003-01-14 Kriang Lerdsuwanakij - - * config-lang.in: Add semantics.c to gtfiles. - * cp-tree.h (flagged_type_tree_s): Remove lookups field. - (saved_scope): Likewise. - (type_lookups): Remove. - (deferred_access): New structure. - (type_access_control): Remove. - (save_type_access_control): Likewise. - (reset_type_access_control): Likewise. - (decl_type_access_control): Likewise. - (push_deferring_access_checks): Declare. - (resume_deferring_access_checks): Likewise. - (stop_deferring_access_checks): Likewise. - (pop_deferring_access_checks): Likewise. - (get_deferred_access_checks): Likewise. - (pop_to_parent_deferring_access_checks): Likewise. - (perform_deferred_access_checks): Likewise. - (perform_or_defer_access_check): Likewise. - * decl.c (make_typename_type): Use perform_or_defer_access_check. - (make_unbound_class_template): Likewise. - (grokdeclarator): Don't call decl_type_access_control. - * parser.c (cp_parser_context): Remove deferred_access_checks - and deferring_access_checks_p fields. - (cp_parser_context_new): Adjust. - (cp_parser): Remove access_checks_lists. - (cp_parser_defer_access_check): Remove. - (cp_parser_start_deferring_access_checks): Remove. - (cp_parser_stop_deferring_access_checks): Remove. - (cp_parser_perform_deferred_access_checks): Remove. - (cp_parser_nested_name_specifier_opt): Use new deferred access - functions. - (cp_parser_simple_declaration): Likewise. - (cp_parser_template_id): Likewise. - (cp_parser_function_definition): Likewise. - (cp_parser_class_specifier): Likewise. - (cp_parser_lookup_name): Likewise. - (cp_parser_single_declaration): Likewise. - (cp_parser_pre_parsed_nested_name_specifier): Likewise. - (cp_parser_parse_tentatively): Likewise. - (cp_parser_parse_definitely): Likewise. - (yyparse): Likewise. - (cp_parser_init_declarator): Remove access_checks parameter. - Use new deferred access functions. - (cp_parser_function_definition_from_specifiers_and_declarator): - Likewise. - (cp_parser_class_head): Remove deferring_access_checks_p and - saved_access_checks parameters. Use new deferred access functions. - (cp_parser_member_specification_opt): Don't call - reset_type_access_control. - * search.c (type_access_control): Remove. - * semantics.c: Include "gt-cp-semantics.h". - (deferred_type_access_control): Remove. - (deferred_access_stack): New variable. - (deferred_access_free_list): Likewise. - (push_deferring_access_checks): New function. - (resume_deferring_access_checks): Likewise. - (stop_deferring_access_checks): Likewise. - (pop_deferring_access_checks): Likewise. - (get_deferred_access_checks): Likewise. - (pop_to_parent_deferring_access_checks): Likewise. - (perform_deferred_access_checks): New function, adapted from - cp_parser_perform_deferred_access_checks. - (perform_or_defer_access_check): New function, adapted from - cp_parser_defer_access_check. - (current_type_lookups): Remove. - (deferred_type_access_control): Likewise. - (decl_type_access_control): Likewise. - (save_type_access_control): Likewise. - (reset_type_access_control): Likewise. - (begin_function_definition): Adjust. - (begin_class_definiton): Likewise. - -2003-01-13 Jason Merrill - - PR c++/8748 - * class.c (build_base_path): Take the address before calling save_expr. - - * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if - all the ambiguous conversions are bad. - - * class.c (maybe_warn_about_overly_private_class): Don't stop - searching when we find a nonprivate method. - - * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue. - -2003-01-12 Mark Mitchell - - * cp-tree.h (get_arglist_len_in_bytes): Remove. - - PR c++/9264 - * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous - typeame types more robustly. - -2003-01-11 Phil Edwards - - * parser.c: Fix comment typos. - -2003-01-10 Mark Mitchell - - PR c++/9099 - * parser.c (cp_parser_scope_through_which_access_occurs): Handle - an object_type which is not a class type. - -2003-01-10 Geoffrey Keating - - * parser.c (cp_parser_late_parsing_for_member): Don't cast to void. - (cp_parser_late_parsing_default_args): Likewise. - -2003-01-10 Nathanael Nerode - - * cfns.gperf: ANSIfy function declarations. - * cfns.h: Regenerate. - * cp-tree.h: ANSIfy function declarations. - -2003-01-10 Mark Mitchell - - * cp-tree.h (reparse_absdcl_as_expr): Remove. - (reparse_absdcl_as_casts): Likewise. - (reparse_decl_as_expr): Likewise. - (finish_decl_parsing): Likewise. - * decl2.c (reparse_absdcl_as_expr): Remove. - (reparse_absdcl_as_casts): Likewise. - (repase_decl_as_expr): Likewise. - (finish_decl_parsing): Likewise. - - PR c++/9128 - PR c++/9153 - PR c++/9171 - * parser.c (cp_parser_pre_parsed_nested_name_specifier): New - function. - (cp_parser_nested_name_specifier_opt): Correct the - check_dependency_p false. - (cp_parser_postfix_expression): Fix formatting. - (cp_parser_decl_specifier_seq): Avoid looking for constructor - declarators when possible. - (cp_parser_template_id): Avoid performing name-lookup when - possible. - (cp_parser_class_head): Do not count specializations when counting - levels of templates. - (cp_parser_constructor_declarator_p): Return immediately if - there's no chance that the tokens form a constructor declarator. - * rtti.c (throw_bad_typeid): Add comment. Do not return an - expression with reference type. - (get_tinfo_decl_dynamic): Do not return an expression with - reference type. - (build_typeid): Add comment. Do not return an expression with - reference type. - * typeck.c (build_class_member_access_expr): Improve handling of - conditionals and comma-expressions as objects. - -2003-01-09 Nathanael Nerode - - * cfns.gperf: ANSIfy function declarations. - * cfns.h: Regenerate. - * cp-tree.h: ANSIfy function declarations. - * parser.c: ANSIfy function declarations & definitions. - - * decl.c (bad_specifiers): Fix parameter order error I introduced. - -2003-01-09 Geoffrey Keating - - Merge from pch-branch: - - 2003-01-09 Geoffrey Keating - - Merge to tag pch-merge-20030102: - - * semantics.c (finish_translation_unit): Don't call finish_file. - * parser.c: Don't include ggc.h. - (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer, - read first token here. Don't allow PCH files after the first - token is read. - (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new. - (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL. - (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory. - (cp_parser_late_parsing_for_member): Don't duplicate call to - cp_lexer_set_source_position_from_token. - (cp_parser_late_parsing_default_args): Likewise. - (yyparse): Call finish_file after clearing the_parser. - - 2002-12-11 Geoffrey Keating - - * Make-lang.in: Remove $(GGC_H) from all dependencies. - (CXX_TREE_H): Add $(GGC_H). - * class.c: Don't include ggc.h. - (field_decl_cmp): Make parameters be 'const void *' to match qsort. - (method_name_cmp): Likewise. - (resort_data): New variable. - (resort_field_decl_cmp): New. - (resort_method_name_cmp): New. - (resort_sorted_fields): New. - (resort_type_method_vec): New. - (finish_struct_methods): Delete cast. - (finish_struct_1): Delete cast. - * cp-tree.h: Include ggc.h. - (struct lang_type_class): Add reorder attribute to field `methods'. - (union lang_decl_u3): Add reorder attribute to field `sorted_fields'. - (resort_sorted_fields): New prototype. - (resort_type_method_vec): New prototype. - * call.c: Don't include ggc.h. - * decl.c: Likewise. - * decl2.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * method.c: Likewise. - * optimize.c: Likewise. - * parse.y: Likewise. - * pt.c: Likewise. - * repo.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - - * lang-specs.h: Remove comment. - - 2002-12-03 Geoffrey Keating - - * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery. - (operator_name_info): Mark to be saved for PCH, specify size. - (assignment_operator_name_info): Likewise. - - 2002-11-19 Geoffrey Keating - - * decl.c (anon_cnt): Mark to be saved for PCH. - - 2002-10-25 Geoffrey Keating - - * lex.c (init_reswords): Delete now-untrue comment. - Allocate ridpointers using GGC. - - 2002-10-04 Geoffrey Keating - - * cp-tree.h (union lang_decl_u2): Add tags to all fields. - - * g++spec.c (lang_specific_driver): Don't include standard - libraries in `added'. - - 2002-08-27 Geoffrey Keating - - * decl2.c (finish_file): Call c_common_write_pch. - * Make-lang.in (CXX_C_OBJS): Add c-pch.o. - - 2002-08-17 Geoffrey Keating - - * g++spec.c (lang_specific_driver): Treat .h files as C++ header - files when using g++. - * lang-specs.h: Handle compiling C++ header files. - -2003-01-09 Jakub Jelinek - - * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs. - -2003-01-09 Kriang Lerdsuwanakij - - * pt.c (push_access_scope_real): Call push_to_top_level for - function in namespace scope. - (pop_access_scope): Call pop_from_top_level for function in - namespace scope. - -2003-01-09 Jakub Jelinek - - * decl.c (start_decl): Don't set DECL_COMMON for __thread variables. - -2003-01-09 Christian Cornelssen - - * Make-lang.in (c++.install-common, c++.install-man, - c++.uninstall): Prepend $(DESTDIR) to destination paths in - all (un)installation commands. - (c++.install-common): Rewrite $(LN) commands to support - DESTDIR with "ln" as well as with "ln -s". - -2003-01-08 Jason Merrill - - * parser.c (cp_parser_primary_expression): See through explicitly - scoped ALIAS_DECLs, too. - -2003-01-08 Nathanael Nerode - - * decl.c: Remove some #if 0 code. - - * decl.c: ANSIfy function declarations. - -2003-01-07 Mark Mitchell - - * parser.c (cp_parser_asm_definition): Correct handling of omitted - operands. - -2003-01-08 Kriang Lerdsuwanakij - - PR c++/9030 - * decl.c (make_typename_type): Check access only when tf_error. - (make_unbound_class_template): Likewise. - * pt.c (saved_access_scope): New variable. - (push_access_scope_real): New function. - (push_access_scope): Likewise. - (pop_access_scope): Likewise. - (tsubst_default_argument): Use them. - (instantiate_template): Likewise. - (regenerate_decl_from_template): Likewise. - (instantiate_decl): Likewise. - (get_mostly_instantiated_function_type): Likewise. - -2003-01-07 Nathanael Nerode - - * tree.c: Delete bogus #if 0 code. - -2003-01-07 Andreas Schwab - - * class.c (layout_class_type): Don't use - PCC_BITFIELD_TYPE_MATTERS if not defined. - -2003-01-06 Mark Mitchell - - PR c++/9165 - * decl2.c (build_cleanup): Mark the object as used. - - * pt.c (retrieve_local_specialization): Revert 2003-01-05 change. - (hash_local_specialization): New function. - (register_local_specialization): Revert 2003-01-05 change. - (instantiate_decl): Use hash_local_specialization when creating - the local_specializations table. - - * decl2.c (mark_used): Do not synthesize thunks. - - * class.c (layout_class_type): Correct handling of unnamed - bitfields wider than their types. - - PR c++/9189 - * parser.c (cp_parser): Remove default_arg_types. Update - documentation for unparsed_functions_queues. - (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the - parameter. - (cp_parser_new): Don't set parser->default_arg_types. - (cp_parser_function_definition): Adjust usage of - unparsed_funtions_queues. - (cp_parser_class_specifier): Don't mess with - parser->default_arg_types. Handle default argument processing in - a separate phase from function body processing. - (cp_parser_template_declaration_after_export): Adjust usage of - unparsed_functions_queues. - (cp_parser_late_parsing_for_member): Do not handle default - arguments. - -2003-01-06 Nathan Sidwell - - PR c++/9109 - * parser.c (cp_parser_declarator_kind): New enum. - (cp_parser_declarator): Adjust. - (cp_parser_direct_declarator): Adjust. Allow for either named or - abstract declarator. Prefer abstract, if possible. Allow - parenthesized function name. - (cp_parser_condition): Adjust cp_parser_declarator call. - (cp_parser_explicit_instantiation): Likewise. - (cp_parser_init_declarator): Likewise. - (cp_parser_type_id): Likewise. - (cp_parser_function_definition): Likewise. - (cp_parser_member_declaration): Likewise. - (cp_parser_parameter_declaration): Use cp_parser_declarator to do - the tentative parsing. - (cp_parser_exception_declaration): Likewise. - -2003-01-05 Mark Mitchell - - * parser.c (cp_parser_template_parameter): Adjust call to - cp_parser_parameter_declaration. - (cp_parser_parameter_declaration_list): Likewise. - (cp_parser_parameter_declaration): Replace - greater_than_is_operator_p with template_parm_p parameter. Do not - cache tokens for template default arguments. - - * pt.c (retrieve_local_specialization): Use htab_find, not - htab_find_with_hash. - (register_local_specialization): Use htab_find_slot, not - htab_find_slot_with_hash. - (instantiate_decl): Pass a hash function to htab_create. - -2003-01-04 Kaveh R. Ghazi - - * parser.c (cp_parser_binary_expression, - cp_parser_multiplicative_expression, - cp_parser_additive_expression, cp_parser_shift_expression, - cp_parser_relational_expression, cp_parser_equality_expression, - cp_parser_and_expression, cp_parser_exclusive_or_expression, - cp_parser_inclusive_or_expression, - cp_parser_logical_and_expression, cp_parser_logical_or_expression, - cp_parser_binary_expression): Const-ify. - -2003-01-04 Mark Mitchell - - * method.c (use_thunk): Disable access control while building the - body of the thunk. - -2003-01-03 Nathanael Nerode - - * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C - front end. - -2003-01-03 Matt Austern - - * cp-tree.h (struct lang_type_class): add field for key method - (cp_global_trees): rename dynamic_classes to keyed_classes - (key_method): add definition - * class.c (finish_struct_1): compute class's key method, and add - the class to keyed_classes list if there is no key method. - * decl.c (finish_function): add class to keyed_classes list if we - see a definition of the class's key method. - * pt.c (instantiate_class_template): add template specialization - of a dynamic class to keyed_classes list. - * decl2.c (key_method): remove - (finish_file): iterate only through keyed_classes list when - deciding whether to emit vtables, remove class from its list after - we do the emission. - -2003-01-02 Jason Merrill - - * call.c (build_conditional_expr): Stabilize lvalues properly. - * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type. - * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues. - Don't allow CALL_EXPR or VA_ARG_EXPR, either. - - * call.c (convert_like_real): Call decl_constant_value for an - IDENTITY_CONV even if there are no more conversions. - - * cvt.c (build_up_reference): Don't push unnamed temps. - - * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL. - - * dump.c (cp_dump_tree): Don't try to dump class-specific fields - for a backend struct. - - * except.c (wrap_cleanups_r, build_throw): Make - MUST_NOT_THROW_EXPRs void. - * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR. - - * init.c (build_vec_delete_1): Pre-evaluate the base address. - - * init.c (get_temp_regvar): Simplify logic. - - * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if - our replacement is a decl. - - * decl.c (cp_make_fname_decl): Push the decls inside the - outermost scope. - -2003-01-03 Nathan Sidwell - - PR c++/45, c++/3784 - * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be - the same too. - -2003-01-03 Graham Stott - - * parser.c (struct cp_parser): Add access_checks_lists field - (cp_parser_simple_declaration): Use. - (cp_parser_init_declarator): Likewise. - -2003-01-02 Mark Mitchell - - * parser.c (cp_parser_declaration): Accept the __extension__ - keyword before the declaration. - - PR c++/2843 - * parser.c (cp_parser_parameter_declaration): Allow attributes to - appear after the declarator. - - * call.c (build_new_method_call): Fix typo in message format - string. - -2003-01-02 Mark Mitchell - - * parser.c (cp_lexer_next_token_is): Declare it inline. - (cp_lexer_set_source_position_from_token): Likewise. - (cp_lexer_debugging_p): Likewise. - (cp_parser_parsing_tentatively): Likewise. - (cp_parser_nested_name_specifier_opt): Reduce the number of calls - to the cp_lexer_peek_token. - - * parser.c (cp_parser_sizeof_operand): Do not evaluate the - expression. - -2003-01-02 Steven Bosscher - - * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c, - cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c, - cp/repo.c: Fix copyright years. - -2003-01-01 Neil Booth - - * lex.c: Remove superfluous include of cpplib.h. - (CONSTRAINT): Define without conditions. - (init_cp_pragma): Use c_register_pragma. - -2002-12-31 Neil Booth - - * .cvsignore: Remove. - -2002-12-31 Steven Bosscher - - * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c, - except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h, - lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c, - pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c, - typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the - copyright header. - * lex.h: parse.y is dead, so don't mention it. Also replace the - copyright header with the default GNU copyright header. - -2002-12-31 Mark Mitchell - - * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove. - (lookup_name_namespace_only): Likewise. - (begin_only_namespace_names): Likewise. - (end_only_namespace_names): Likewise. - * decl.c (only_namespace_names): Remove. - (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED. - (lookup_name_real): Do not check only_namespace_names. - (lookup_name_namespace_only): Remove. - (begin_only_namespace_names): Likewise. - (end_only_namespace_names): Likewise. - * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous - nested-name-specifiers more gracefully. - (cp_parser_class_or_namespace_name): Avoid looking up namespace - names when they cannot possibly appear. - (cp_parser_template_name): Adjust call to cp_parser_lookup_name. - (cp_parser_elaborated_type_specifier): Likewise. - (cp_parser_namespace_name): Only look for namespace names. - (cp_parser_lookup_name): Add is_namespace parameter. - (cp_parser_lookup_name_simple): Adjust call to - cp_parser_lookup_name. - - * parser.c (cp_parser_dependent_type_p): Fix thinko. - -2002-12-31 Neil Booth - - * .cvsignore: Update. - -2002-12-31 Nathan Sidwell - - * class.c (modify_vtable_entry): Remove unused variable. - (get_vcall_index): Always expect a non-thunk. - (update_vtable_entry_for_fn): Combine covariant adjustments, when - overriding a thunk. Pass get_vcall_index a non-thunk. - - * decl2.c (finish_file): Mark undefined inlines as extern. - -2002-12-31 Mark Mitchell - - * cp-tree.def (RETURN_INIT): Remove. - * cp-tree.h (DECL_IN_MEMORY_P): Remove. - (scope_kind): Add sk_block, sk_try, sk_catch, sk_for. - (note_level_for_for): Remove. - (note_level_for_try): Likewise. - (note_level_for_catch): Likewise. - (finish_named_return_value): Likewise. - (do_pushlevel): Change prototype. - (pending_lang_change): Remove. - * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch, - sk_for. - (note_level_for_for): Remove. - (note_level_for_try): Likewise. - (note_level_for_catch): Likewise. - (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P. - * parser.c (cp_parser_context_free_list): Make it "deletable". - (cp_parser_template_argument): Remove misleading comment. - * pt.c (tsubst_expr): Remove RETURN_INIT code. - * semantics.c (genrtl_named_return_value): Remove. - (do_pushlevel): Take a scope kind as an argument. - (begin_if_stmt): Adjust. - (begin_while_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_for_init_stmt): Likewise. - (begin_switch_stmt): Likewise. - (begin_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_named_return_value): Remove. - (cp_expand_stmt): Remove RETURN_INIT case. - * tree.c (cp_statement_code_p): Remove RETURN_INIT case. - -2002-12-31 Mark Mitchell - - PR c++/9112 - * parser.c (cp_parser_direct_declarator): Handle erroneous - parenthesized declarators correctly. - -2002-12-31 Gabriel Dos Reis - - * cp-tree.h (pending_lang_change): Declare. - -2002-12-30 Mark Mitchell - - * parser.c (cp_parser_context_free_list): New variable. - (cp_parser_context_new): Use it. - (cp_parser_error): Check return code from - cp_parser_simulate_error. - (cp_parser_simulate_error): Return a value. - (cp_parser_id_expression): Optimize common case. - (cp_parser_class_name): Likewise. - (cp_parser_class_specifier): Adjust call to - cp_parser_late_parsing_default_args. - (cp_parser_lookup_name): Optimize common case. - (cp_parser_late_parsing_for_member): Adjust call to - cp_parser_late_parsing_default_args. - (cp_parser_late_parsing_default_args): Add scope parameter. - (cp_parser_require): Avoid creating the error message unless it's - needed. - (cp_parser_parse_definitely): Place free'd contexts on the free - list. - - * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change. - -2002-12-30 David Edelsohn - - * parser.c (cp_parser_parameter_declaration_clause): Treat system - header as extern "C" if NO_IMPLICIT_EXTERN_C undefined. - -2002-12-30 Nathanael Nerode - - * config-lang.in, Make-lang.in, operators.def, cp-tree.def: - GCC, not GNU CC. - -2002-12-30 Mark Mitchell - - * parse.y: Remove. - * spew.c: Likewise. - * Make-lang.in (gt-cp-spew.h): Remove. - * cp-tree.h (do_pending_lang_change): Remove. - (do_identifier): Change prototype. - (finish_id_expr): Remove. - * decl.c (lookup_name_real): Remove yylex variable. - * decl2.c (build_expr_from_tree): Adjust call to do_identifier. - * lex.c (init_cpp_parse): Remove. - (reduce_cmp): Likewise. - (token_cmp): Likewise. - (yychar): Likewise. - (lastiddecl): Likewise. - (token_count): Likewise. - (reduce_count): Likewise. - (yyhook): Likewise. - (print_parse_statistics): Likewise. - (do_pending_lang_change): Likewise. - (do_identifier): Remove parsing parameter. - * lex.h (lastiddecl): Remove. - (looking_for_typename): Remove. - (looking_for_template): Likewise. - (pending_lang_change): Likewise. - (yylex): Likewise. - * semantics.c (finish_id_expr): Remove. - - * decl.c (grokdeclarator): Diagnost "extern thread" and "static - thread" correctly. - -2002-12-30 Nathanael Nerode - - * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front - end, not the C front end. - -2002-12-30 Nathan Sidwell - - * cp-tree.h (THUNK_TARGET): New macro. - (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo. - (finish_thunk): Remove offset parms. - * class.c (find_final_overrider): Look through thunks. - (get_vcall_index): Use THUNK_TARGET. - (update_vtable_entry_for_fn): Look through thunks. Set covariant - fixed offset here. Adjust finish_thunk call. - (build_vtbl_initializer): Adjust finish_thunk calls. - * mangle.c (mangle_call_offset): Remove superfluous if. - (mangle_thunk): Adjust. - * method.c (make_thunk): Adjust. - (finish_thunk): Adjust. - (thunk_adjust): Remove assert. - (use_thunk): Use THUNK_TARGET - * dump1.c (cp_dump_tree): Adjust thunk dumping. - - PR c++/9054 - * class.c (layout_class_type): Set TYPE_CONTEXT of type for base. - * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types. - -2002-12-28 Gabriel Dos Reis - - Remove traditional C constructs 4/n. - * decl2.c (grok_method_quals, warn_if_unknown_interface, - grok_x_components, cp_build_parm_decl, build_artificial_parm, - maybe_retrofit_in_chrg, grokclassfn, grok_array_decl, - delete_sanity, check_member_template, check_java_method, - check_classfn, finish_static_data_member_decl, grokfield, - grokbitfield, grokoptypename, grok_function_init, - cplus_decl_attributes, constructor_name, defer_fn, - build_anon_union_vars, finish_anon_union, coerce_new_type, - coerce_delete_type, comdat_linkage, maybe_make_one_only, - key_method, import_export_vtable, import_export_class, - output_vtable_inherit, import_export_decl, import_export_tinfo, - build_cleanup, get_guard, get_guard_bits, get_guard_cond, - set_guard, start_objects, finish_objects, - start_static_storage_duration_function, - finish_static_storage_duration_function, get_priority_info, - start_static_initialization_or_destruction, - finish_static_initialization_or_destruction, - do_static_initialization, do_static_destruction, - prune_vars_needing_no_initialization, write_out_vars, - reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor, - add_using_namespace, merge_functions, ambiguous_decl, - lookup_using_namespace, lookup_using_namespace, - qualified_lookup_using_namespace, set_decl_namespace, - decl_namespace, current_decl_namespace, push_decl_namespace, - pop_decl_namespace, push_scope, pop_scope, add_function, - arg_assoc_namespace, arg_assoc_template_arg, arg_assoc, - lookup_arg_dependent, do_namespace_alias, - validate_nonmember_using_decl, do_nonmember_using_decl, - do_toplevel_using_decl, do_local_using_decl, - do_class_using_decl, do_using_directive, check_default_args, - mark_used, handle_class_head): Use C90 prototypings. Use booleans. - * parser.c (cp_parser_class_head): Use booleanss. - * decl.c (walk_globals, walk_vtables): Likewise. - * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables, - walk_globals): Change return type from 'int' to 'bool'. - * rtti.c (init_rtti_processing, build_headof, throw_bad_cast - throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p, - build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr, - get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast, - qualifier_flags, tinfo_base_init, generic_initializer, - ptr_initializer, dfs_class_hint_mark, ptm_initializer, - dfs_class_hint_unmark, class_hint_flags, class_initializer, - typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info, - get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos, - unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise. - * repo.c (repo_compile_flags, repo_template_declared, - repo_template_defined, repo_class_defined, repo_get_id, - repo_template_used, repo_vtable_used, repo_inline_used, - repo_tinfo_used, repo_template_instantiated, extract_string, - open_repo_file, afgets, init_repo, reopen_repo_file_for_write, - finish_repo): Likewise. - * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier, - cxx_print_xnode): Likewise.. - * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set, - cxx_warn_unused_global_decl, cp_expr_size): Likewise. - * cxxfilt.c (demangle_it, print_demangler_list, usage, - standard_symbol_characters, hp_symbol_characters, main, fatal): - Likewise. - (strip_underscore): Change type from 'int' to 'bool'. - (main): Use boolean constants. - -2002-12-28 Gabriel Dos Reis - - Remove traditional C constructs 3/n. - * cvt.c (cp_convert_to_pointer, convert_to_pointer_force, - build_up_reference, warn_ref_binding, convert_to_reference, - convert_from_reference, convert_lvalue, cp_convert, ocp_convert, - convert_to_void, convert, convert_force, build_type_conversion, - build_expr_type_conversion, type_promotes_to, - perform_qualification_conversions): Use C90 prototyping style. - * decl2.c (grok_array_decl): Use boolean constant. - (delete_sanity): Likewise. - * typeck.c (build_unary_op): Likewise. - * semantics.c (finish_switch_cond): Likewise. - * parser.c (cp_parser_direct_new_declarator): Likewise. - * init.c (build_new): Likewise. - -2002-12-27 Mark Mitchell - - * Make-lang.in (po-generated): Remove parse.c. - (CXX_OBJS): Remove parse.o and spew.o. Add parser.o. - ($(srcdir)/cp/parse.h): Remove target. - ($(srcdir)/cp/parse.c): Likewise. - (gt-cp-parse.h): Likewise. - (gt-cp-parser.h): New target. - (c++.distclean): Do not remove parse.output. - (c++.maintainer-clean): Do not remove parse.c or parse.h. - (cp/spew.o): Remove target. - (cp/lex.o): Adjust dependencies. - (cp/pt.o): Likewise. - (cp/parse.o): Likewise. - (cp/TAGS): Do not mention parse.c. - (cp/parser.o): New target. - * NEWS: Mention the new parser. - * call.c (build_scoped_method_call): Simplify. - (build_method_call): Likewise. - (build_new_function_call): Adjust calls to add_function_candidate - and add_template_candidate. - (build_new_op): Improve handling of erroroneous operands. - (convert_default_arg): Remove circular argument processing. - (name_as_c_string): New function. - (build_new_method_call): Use it. - (perform_implicit_conversion): Use error_operand_p. - * class.c (finish_struct_anon): Use constructor_name_p. - (check_field_decls): Likewise. - (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN. - (resolve_address_of_overloaded_function): Likewise. - (instantiate_type): Tweak pointer-to-member handling. - (get_primary_binfo): Remove incorrect assertion. - * config-lang.in (gtfiles): Add parser.c, remove parse.c. - * cp-tree.h (DEFARG_TOKENS): New macro. - (default_arg): New structure. - (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG. - (lang_tree_node): Add default_arg. - (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE. - (type_info_ref_type): New macro. - (saved_scope): Make processing_explicit_instantiation a boolean. - (check_access): New field. - (unparsed_text): Remove. - (language_function): Remove unparsed_inlines. - (error_operand_p): New macro. - (lang_decl): Adjust pending_inline_info. - (DEFARG_POINTER): Remove. - (tag_types): Add typenames. - (lookup_ualified_name): Declare. - (lookup_name_real): Likewise. - (shadow_tag): Adjust prototype. - (get_scope_of_declarator): Declare it. - (process_next_inline): Remove it. - (check_for_missing_semicolon): Likewise. - (maybe_get_template_decl_from_type_decl): Declare it. - (finish_label_stmt): Adjust prototype. - (finish_non_static_data_meber): Declare it. - (finish_pseudo_destructor_call_expr): Rename to ... - (finish_pseudo_destructor_expr): ... this. - (finish_compound_literal): Declare it. - (begin_inline_definitions): Remove it. - (init_spew): Remove. - (peekyylex): Likewise. - (arbitrate_lookup): Likewise. - (frob_opname): Likewise. - (maybe_snarf_defarg): Likewise. - (add_defarg_fn): Likewise. - (do_pending_defargs): Likewise. - (done_pending_defargs): Likewise. - (unprocessed_defarg_fn): Likewise. - (replace_defarg): Likewise. - (end_input): Likewise. - (get_overloaded_fn): Likewise. - * cvt.c (convert_to_reference): Improve error handling. - * decl.c (lookup_name_real): Do not declare it static. - (maybe_push_to_top_level): Set check_access. - (identifier_type_value): Adjust call to lookup_name_real. - (lookup_qualified_name): New method. - (lookup_name_real): Remove special-case parsing code. - (lookup_name-nonclass): Adjust call to lookup_name_real. - (lookup_name_namespace_only): Likewise. - (lookup_name): Likewise. - (check_tag_decl): Return the type declared. - (shadow_tag): Likewise. - (register_dtor_fn): Tweak check_access. - (grokfndecl): Use constructor_name_p. - (get_scope_of_declarator): New function. - (grokdeclarator): Obscure tweaks for slightly different declarator - representations. - (start_method): Return error_mark_node to indicate failure. - (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs. - * decl2.c (constructor_name_full): Simplify. - (constructor_name): Use it. - (build_expr_from_tree): Adjust for changes to do new parser. - (push_scope): Improve robustness. - (validate_nonmember_using_decl): Process declarations, not names. - (do_class_using_decl): Likewise. - (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS - here. - * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs. - * expr.c (cxx_expand_expr): Handle BASELINKs. - * init.c (member_init_ok_or_else): Issue more errors. - (build_offset_ref): Tweak handling of FUNCTION_DECLs. - * lex.c: Do not include parse.h. - (yypring): Do not declare. - (yylval): Likewise. - (make_reference_declarator): Remove error-generating code. - (rid_to_yy): Remove. - (cxx_init): Do not call init_spew. - (yypring): Remove. - (check_for_missing_semicolon): Remove. - * lex.h (got_scope): Remove. - (got_object): Remove. - * method.c (hack_identifier): Use finish_non_static_data_member. - (implicitly_declare_fn): Adjust use of constructor_name. - * parser.c: New file. - * pt.c (parse.h): Do not include it. - (maybe_get_template_decl_from_template): Do not declare it. - (finish_member_template_decl): Tweak. - (begin_explicit_instantiation): Adjust for - processing_explicit_instantiation being boolean. - (end_explicit_instantiation): Likewise. - (maybe_process_partial_specialization): Tighten specialization - test. - (retrieve_local_specialization): Adjust ue of hash table. - (eq_local_specializations): New function. - (register_local_specialization): Likewise. - (push_template_decl_real): Remove unnecessary test. - (maybe_get_template_decl_from_type_decl): Don't make it static. - (for_each_template_parm_r): Handle TYPEOF_TYPE. - (tsubst_copy): Use retrieive_local_specialization to handle - PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs. - Handle COMPONENT_REFs with pseudo-destructor-expressions. - Simplify handling of CALL_EXPR and METHOD_CALL_EXPR. - (tsubst_expr): Pass decls, not names, to do_local_using_decl. - (unify): Tweak handling of CONST_DECLs. - (regenerate_decl_from_template): Use push_nested_class. - (template_for_substitution): New funciton. - (instantiate_decl): Use it. Register parameters as local - specializations. - * rtti.c (init_rtti_processing): Set type_info_ref_type. - (build_typeid): Use it. - (get_typeid): Likeise. - * search.c (accessible_p): Use check_access, not - flag_access_control. - (adjust_result_of_qualified_name_lookup): Pay attention to the - context_class. - * semantics.c (finish_asm_stmt): Adjust error handling. - (finish_label_stmt): Return the statement. - (finish_non_static_data_member): New function. - (finish_class_expr): Handle BASELINKs. - (finish_call_expr): Handle PSEUDO_DTOR_EXPR. - (finish_object_call_expr): Simplify handling during templates. - (finish_pseudo_destructor_call_expr): Rename to ... - (finish_pseudo_dtor_expr): ... this. - (finish_compound_literal): New function. - (begin_inline_definitions): Remove. - (finish_sizeof): Remove special template handling. - * spew.c: Do not include parse.h. - * tree.c (get_overloaded_fn): Remove. - * typeck.c (build_class_member_access_expr): Handle - PSEUDO_DTOR_EXPR. Adjust handling of static member functions. - (lookup_destructor): New function. - (finish_class_member_access_expr): Use it. - (convert_arguments): Simplify. - (build_unary_op): Handle BASELINKs. - -2002-12-26 Nathan Sidwell - - PR c++/4803 - * decl2.c (mark_used): Defer inline functions. - (finish_file): Merge deferred_fns loops. Check all used - inline functions have a definition. - * method.c (make_thunk): Thunks are not inline. - - PR c++/5116, c++/764 - * call.c (build_new_op): Make sure template class operands are - instantiated. - -2002-12-24 Nathan Sidwell - - PR C++/7964 - * cp-tree.h (resolve_scoped_fn_name): Prototype. - * call.c (resolve_scoped_fn_name): New function. Deal with - more template expansion. Broken out of ... - * parse.y (parse_finish_call_expr): ... here. Call it. - * decl2.c (build_expr_from_tree, CALL_EXPR): Use - resolve_scoped_fn_name and build_call_from_tree. - - PR c++/9053 - * decl.c (duplicate_decls): Templates may be disambiguated by - return type. - - PR c++/8702 - * decl2.c (check_classfn): Use lookup_fnfield_1. List all - conversion operators on failure. - -2002-12-23 Gabriel Dos Reis - - Remove traditional C constructs 2/n. - * call.c (tourney, build_field_call, equal_functions, joust, - compare_ics, build_over_call, build_java_interface_fn_ref, - convert_like_real, op_error, build_object_call, resolve_args, - build_vfield_ref, check_dtor_name, build_scoped_method_call, - build_addr_func, build_call, build_method_call, null_ptr_cst_p, - sufficient_parms_p, build_conv, non_reference, strip_top_quals, - standard_conversion, reference_related_p, - reference_compatible_p, convert_class_to_reference, - direct_reference_binding, reference_binding, - ,implicit_conversion, is_complete, promoted_arithmetic_type_p, - add_template_conv_candidate, any_viable, any_strictly_viable, - build_this, splice_viable, print_z_candidates, - build_user_type_conversion, build_new_function_call, - conditional_conversion, build_conditional_expr, build_new_op, - build_op_delete_call, enforce_access, call_builtin_trap, - convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to, - convert_default_arg, type_passed_as, convert_for_arg_passing, - in_charge_arg_for_name, is_properly_derived_from, - maybe_handle_implicit_object, maybe_handle_ref_bind, - source_type, add_warning, can_convert, can_convert_arg, - perform_implicit_conversion, can_convert_arg_bad, - initialize_reference, add_conv_candidate, - add_template_candidate_real, add_template_candidate): Ansify. - -2002-12-22 Nathan Sidwell - - PR c++/8572 - * cp-tree.h (grokoptypename): Add SCOPE parameter. - * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type - if in a template scope. - * parse.y (unoperator): Return the scope. - (operator_name): Adjust grokoptypename call. - -2002-12-22 Kriang Lerdsuwanakij - - * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t. - * decl.c (make_unbound_class_template): Adjust. Check for tf_error. - * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error. - -2002-12-20 Kazu Hirata - - * ChangeLog: Fix a typo. - * class.c: Fix comment typos. - * cp-tree.h: Likewise. - -2002-12-18 Jason Merrill - - Handle anonymous unions at the tree level. - C++ ABI change: Mangle anonymous unions using the name of their - first named field (by depth-first search). Should not cause - binary compatibility problems, though, as the compiler previously - didn't emit anything for affected unions. - * cp-tree.def (ALIAS_DECL): New tree code. - * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the - first field, not the largest. - (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME, - push the decl, and write it out at namespace scope. - * decl.c (lookup_name_real): See through an ALIAS_DECL. - (pushdecl): Add namespace bindings for ALIAS_DECLs. - * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name - of a decl which doesn't have one. - * typeck.c (build_class_member_access_expr): Don't recurse if - we already have the type we want. - -2002-12-18 Kriang Lerdsuwanakij - - PR c++/8099 - * friend.c (make_friend_class): Allow partial specialization - when declaration is not a template friend. - -2002-12-18 Kriang Lerdsuwanakij - - PR c++/3663 - * pt.c (lookup_template_class): Copy TREE_PRIVATE and - TREE_PROTECTED to created decl nodes. - -2002-12-18 Mark Mitchell - - * class.c (build_base_field): Do not set DECL_PACKED on the - FIELD_DECL. - -2002-12-18 Gabriel Dos Reis - - * cp-tree.h (struct tree_srcloc): Use location_t. - (SOURCE_LOCUS): New. - (SRCLOC_FILE, SRCLOC_LINE): Adjust. - -2002-12-17 Jason Merrill - - * decl.c (finish_function): Also complain about no return in - templates. - * semantics.c (finish_return_stmt): Also call check_return_expr in - templates. - * typeck.c (check_return_expr): In a template, just remember that we - saw a return. - -2002-12-16 Jason Merrill - - * semantics.c (simplify_aggr_init_exprs_r): Don't change the type - of the CALL_EXPR. - - * semantics.c (do_pushlevel): Call pushlevel after adding the - SCOPE_STMT. - (do_poplevel): Call poplevel before adding the SCOPE_STMT. - * parse.y (function_body): Go back to using compstmt. - * decl.c (pushdecl): Skip another level to get to the parms level. - - * call.c (build_new_method_call): Use is_dummy_object to determine - whether or not to evaluate the object parameter to a static member - function. - -2002-12-14 Jason Merrill - - * semantics.c (simplify_aggr_init_exprs_r): Also prepend the - return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR. - * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE, - don't bother with an AGGR_INIT_EXPR. - (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE, - just generate a new decl normally. Take return slot parm. - * cp-tree.h: Adjust prototype. - -2002-12-13 Gabriel Dos Reis - - PR C++/8031 - * cvt.c (convert_to_pointer_force): Don't try comparing against - erronous type. - -2002-12-13 Geoffrey Keating - - * cp-tree.h: Have the multiple-include guards around - the entire file. - -2002-12-10 David Edelsohn - - * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos - for SPEW_DEBUG. - (snarf_method): Same. - (snarf_defarg): Same. - -2002-12-10 Mark Mitchell - - PR c++/8372 - * pt.c (tsubst_copy): Handle destructor names more correctly. - -2002-12-10 Matt Austern - - * cp-tree.h: get rid of needs_virtual_reinit bit. - -2002-12-09 Mark Mitchell - - * NEWS: Document removal of in-class initialization extension for - static data members of non-arithmetic, non-enumeration type. - * decl.c (check_static_variable_definition): Do not allow that - extension. - * decl2.c (grokfield): Do not call digest_init when processing - templates. - -2002-12-05 Kaveh R. Ghazi - - * error.c (dump_expr): Fix format specifier warning. - -2002-12-04 Geoffrey Keating - - * class.c (finish_struct_1): Correct comment. - * cp-tree.c (DECL_SORTED_FIELDS): Likewise. - -2002-12-04 Gabriel Dos Reis - - PR C++/8799 - * error.c (dump_expr): Don't ever try to dump a non-existent - expression. - -2002-12-03 Nathan Sidwell - - Implement covariant returns. - * cp-tree.h (IS_AGGR_TYPE_2): Remove. - (struct lang_decl_flags): Add this_thunk_p flag. - Rename vcall_offset to virtual_offset. - (struct lang_decl): Rename delta to fixed_offset. - (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines. - (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg. - (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ... - (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here. - (make_thunk): Add this_adjusting arg. - (finish_thunk): Declare. - (mangle_thunk): Add this_adjusting arg. - * class.c (get_vcall_index): Use base function for lookup. - (update_vtable_entry_for_fn): Generate covariant thunk. - (finish_struct_1): Set DECL_VINDEX to NULL for thunks. - (build_vtbl_initializer): Use base function for lookup. - Finish covariant thunk here. Adjust thunk generation. - * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling. - Adjust thunk dumping. - * mangle.c (mangle_call_offset): New function. - (mangle_thunk): Adjust for covariant thunks. - * method.c (make_thunk): Adjust. Do not set name here. - (finish_thunk): New function. Set name here. - (use_thunk): Generate covariant thunks too. - (thunk_adjust): New function. - * search.c (covariant_return_p): Remove. Fold into ... - (check_final_overrider): ... here. Simplify. - * semantics.c (emit_associated_thunks): Walk covariant thunk lists. - -2002-12-03 Jason Merrill - - PR c++/8674 - * call.c (build_over_call): Check specifically for TARGET_EXPR - when eliding. - - PR c++/8461, c++/8625 - * call.c (convert_for_arg_passing): Don't mess with error_mark_node. - (cp_convert_parm_for_inlining): Remove. - * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): - Remove. - * cp-tree.h (ADDR_IS_INVISIREF): Remove. - * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code. - - * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on - an ambiguous conversion. - -2002-12-03 Mark Mitchell - - PR c++/8688 - * decl.c (reshape_init): Handle erroneous initializers. - -2002-12-02 Mark Mitchell - - PR c++/8720 - * spew.c (remove_last_token): Make sure that last_chunk is set - correctly. - - PR c++/8615 - * error.c (dump_expr): Handle character constants with - TREE_OVERFLOW set. - -2002-12-02 Kriang Lerdsuwanakij - - DR 180 - * decl.c (grokdeclarator): Require class-key for all friend class. - Output the correct type and context in the error message. - -2002-12-01 Mark Mitchell - - PR c++/5919 - * pt.c (unify): Use variably_modified_type_p to test validity of - template argument types. - - PR c++/8727 - * cp-tree.h (lang_type_class): Add typeinfo_var. - (CLASSTYPE_TYPEINFO_VAR): New macro. - * rtti.c (get_tinfo_decl): Use it. - - PR c++/8663 - * init.c (expand_member_init): Always get the main variant of a - base class. - -2002-12-01 Mark Mitchell - - PR c++/8332 - PR c++/8493 - * decl.c (cxx_init_decl_processing): Use size_type_node, not - c_size_type_node. - * decl2.c (coerce_new_type): Likewise. - * except.c (do_allocate_exception): Likewise. - -2002-11-30 Zack Weinberg - - * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c, - dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c, - lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c, - repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, - typeck2.c: Include coretypes.h and tm.h. - * Make-lang.in: Update dependencies. - -2002-11-30 Mark Mitchell - - PR c++/8227 - * decl.c (layout_var_decl): Deal gracefully with erroneous types. - (check_initializer): Validate the type of the initialized - variable, even if the initializer is absent. - * typeck.c (cp_type_quals): Deal gracefully with erroneous types. - - PR c++/8214 - * typeck.c (convert_for_assignment): Do not use - decl_constant_value on the operand. - - PR c++/8511 - * pt.c (instantiate_decl): Handle template friends defined outside - of the class correctly. - -2002-11-29 Joe Buck - - * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for - anonymous structs. - -2002-11-29 Mark Mitchell - - * class.c (walk_subobject_offsets): Recur on binfos as well as on - types. - (layout_nonempty_base_or_field): Pass it a binfo when processing a - base class. - (layout_empty_base): Likewise. - (build_base_field): Likewise. - -2002-11-27 Mark Mitchell - - * class.c (build_base_field): Make sure we get the canonical base - when descending through primary bases. - -2002-11-26 Geoffrey Keating - - * decl.c (check_initializer): Don't error on initialisation of - a scalar with a brace-enclosed expression. - -2002-11-26 Nathan Sidwell - - * cp-tree.h (DECL_LANG_FLAG_4): Document more uses. - (template_parms_equal): Remove prototype. - * typeck.c (buuld_indirect_ref): Reformat. - -2002-11-25 Jason Merrill - - * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT - and a DO_STMT. - -2002-11-25 Mark Mitchell - - * tree.c (cp_build_qualified_type_real): Correct handling of - array types. - * class.c (walk_subobject_offsets): Fix thinko. - (build_base_field): Record offsets of empty bases in primary - virtual bases. - (layout_class_type): Record offsets of empty bases in fields. - - * search.c (is_subobject_of_p_1): Fix thinko. - (lookup_field_queue_p): Likewise. - -2002-11-24 Mark Mitchell - - * class.c (layout_class_type): Reuse tail padding when laying out - virtual bases. - -2002-11-22 Mark Mitchell - - * rtti.c (qualifier_flags): Fix thinko. - -2002-11-21 Gabriel Dos Reis - - Remove traditional C constructs 1/n. - * cp-tree.h (init_method, set_mangled_name_for_decl, - build_opfncall, hack_identifier, make_thunk, use_thunk, - synthesize_method, implicitly_declare_fn, - skip_artificial_parms_for, optimize_function, calls_setjmp_p, - maybe_clone_body): Remove use of PARAMS. - - * method.c (do_build_assign_ref, do_build_copy_constructor, - synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy): - Likewise. - (synthesize_method): Use 'bool' type and constants instead of - 'int'. - (locate_copy): Likewise. - (implicitly_declare_fn): Likewise. - - * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function): - Remove old-style declaration. - (maybe_clone_body): Use 'bool' type and constants. - -2002-11-21 Glen Nakamura - - PR c++/8342 - * typeck.c (get_member_function_from_ptrfunc): Make sure that a - SAVE_EXPR for instance_ptr doesn't get evaluated first inside one - of the branches of a COND_EXPR. - -2002-11-19 Mark Mitchell - - * pt.c (for_each_template_parm): Free allocated memory. - * search.c (is_subobject_of_p_1): New function. - (is_subobject_of_p): Avoid walking virtual bases multiple times. - -2002-11-19 Jason Thorpe - - * g++spec.c (lang_specific_spec_functions): New. - -2002-11-15 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * class.c: Likewise. - * decl2.c: Likewise. - -2002-11-14 Zack Weinberg - - * search.c (dfs_push_decls): Do not try to reorder elements - 3..n of method_vec if method_vec has only two elements. - Reverse order of two tests to avoid accessing unallocated - memory. - -2002-11-14 Mark Mitchell - - * class.c (dfs_find_final_overrider): Adjust so that the most - derived object is a binfo, rather than a class type. - (find_final_overrider): Likewise. - (add_vcall_offset_vtbl_entries_1): Simplify accordingly. - (add_vcall_offset): Likewise. - -2002-11-09 Kriang Lerdsuwanakij - - PR c++/8389 - * pt.c (instantiate_template): Push class scope for member - functions. - (get_mostly_instantiated_function_type): Likewise. Don't call - tsubst on context. Remove CONTEXTP and TPARMSP parameters. - * cp-tree.h (get_mostly_instantiated_function_type): Adjust. - * mangle.c (write_encoding, write_unqualified_name): Adjust. - -2002-11-07 Mark Mitchell - - * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of - vcall offfsets. Split out ... - (add_vcall_offset): ... new function. - - PR c++/8338 - * pt.c (for_each_template_parm): Add htab parameter. - (process_partial_specialization): Adjust call. - (push_template_decl_real): Likewise. - (pair_fn_data): Add visited. - (for_each_template_parm_r): Avoid walking duplicates more than - once. - (uses_template_parms): Adjust call to for_each_template_parm. - -2002-11-07 Mark Mitchell - - * class.c (add_implicitly_declared_members): Put implicitly - declared functions at the end of TYPE_METHODs when -fabi-version - is at least 2. - -2002-11-05 Geoffrey Keating - - * decl2.c (finish_file): Correct spelling. - -2002-11-03 Mark Mitchell - - * call.c (build_special_member_call): Do not try to lookup VTTs by - name. - * class.c (vtbl_init_data): Add generate_vcall_entries. - (get_vtable_decl): Do not look up virtual tables by name. - (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P. - (set_primary_base): Do not set CLASSTYPE_RTTI. - (determine_primary_base): Likewise. - (get_matching_virtual): Remove. - (get_vcall_index): New function. - (update_vtable_entry_for_fn): Do not try to use virtual thunks - when they are not required. Assign vcall indices at this point. - (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT. - Do update dynamic_classes. - (build_vtt): Do not add VTTs to the symbol table. - (build_ctor_vtbl_group): Likewise. - (build_vtbl_initializer): Simplify handling of vcall indices. - (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets - for the most derived class. - (add_vcall_offset_vtbl_entries_1): But do not actually add them to - the vtable. - * cp-tree.h (dynamic_classes): New macro. - (lang_type_class): Remove rtti. Add vtables. Add vcall_indices. - (CLASSTYPE_RTTI): Remove. - (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove. - (CLASSTYPE_VCALL_INDICES): New macro. - (CLASSTYPE_VTABLES): Likewise. - (BV_USE_VCALL_INDEX_P): Remove. - (build_vtable_path): Remove. - * decl2.c (finish_vtable_vardecl): Remove. - (key_method): Remove #if 0'd code. - (finish_vtable_vardecl): Rename to ... - (maybe_emit_vtables): ... this. - (finish_file): Use it. - * search.c (look_for_overrides_here): Update comment. - -2002-11-01 Zack Weinberg - - PR c/7353 redux - * decl2.c (grokfield): Reject TYPE_DECLs with initializers. - -2002-10-30 Jason Merrill - - PR c++/8186 - * cp-tree.h (ADDR_IS_INVISIREF): New macro. - * call.c (convert_for_arg_passing): Set it. - * except.c (stabilize_throw_expr): Recurse for such an arg. - -2002-10-31 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove init_priority. - (lang_decl): Add delta. - (GLOBAL_INIT_PRIORITY): Remove. - (THUNK_DELTA): Revise definition. - * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY. - * dump.c (cp_dump_tree): Don't dump it. - -2002-10-30 Mark Mitchell - - PR c++/8160 - * typeck2.c (process_init_constructor): Call complete_array_type. - - PR c++/8149 - * decl.c (make_typename_type): Issue errors about invalid results. - -2002-10-30 Kriang Lerdsuwanakij - - Core issue 287, PR c++/7639 - * cp-tree.h (lang_type_class): Add decl_list field. - (CLASSTYPE_DECL_LIST): New macro. - (maybe_add_class_template_decl_list): Add declaration. - * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST. - (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST. - (maybe_add_class_template_decl_list): New function. - (add_implicitly_declared_members): Use it. - * decl.c (maybe_process_template_type_declaration): Likewise. - (pushtag): Likewise. - * friend.c (add_friend): Likewise. - (make_friend_class): Likewise. - * semantics.c (finish_member_declaration): Likewise. - (begin_class_definition): Initialize CLASSTYPE_DECL_LIST. - * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST - to process members and friends in the order of declaration. - -2002-10-29 Mark Mitchell - - PR c++/8287 - * decl.c (finish_destructor_body): Create the label to jump to - when returning from a destructor here. - (finish_function_body): Rather than here. - -2002-10-25 Zack Weinberg - - PR c++/7266 - * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a - SCOPE_REF is not null before dereferencing it. - -2002-10-25 Mark Mitchell - - * call.c (build_over_call): Use DECL_CONTEXT, not - DECL_VIRTUAL_CONTEXT. - * class.c (modify_vtable_entry): Don't mess with - DECL_VIRTUAL_CONTEXT. - (set_vindex): Remove. - (set_primary_base): Remove vfuns_p parameter. - (determine_primary_base): Likewise. - (modify_all_vtables): Likewise. - (layout_class_type): Likewise. Adjust calls to other functions - accordingly. - (finish_struct_1): Adjust calls to modified functions. Set - DECL_VINDEX here. - * cp-tree.h (lang_type_class): Remove vsize. - (CLASSTYPE_VSIZE): Remove. - (lang_decl): Remove thunks. - (DECL_THUNKS): Adjust. - (DECL_VIRTUAL_CONTEXT): Remove. - (duplicate_decls): Don't copy it. - * pt.c (build_template_decl): Don't set it. - (tsubst_decl): Likewise. - * typeck.c (expand_ptrmemfunc_cst): Don't use it. - - * class.c (build_vtbl_initializer): Don't use build_vtable_entry. - (build_vtable_entry): Remove. - * cp-tree.h (BINFO_VIRTUALS): Expand documentation. - (lang_decl): Add thunks. - (DECL_THUNKS): New macro. - * decl.c (duplicate_decls): Copy it. - * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS. - * semantics.c (emit_associated_thunks): Simplify. - -2002-10-24 David Edelsohn - - PR c++/7228 - * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that - lang_type structure exists before accessing field. - (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro. - (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar. - (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro. - * class.c (check_field_decls): Use new macros. - * typeck2.c (process_init_constructor): Remove redundant check for - existence of lang_type structure. - -2002-10-24 Mark Mitchell - - * class.c (end_of_base): New method. - (end_of_class): Use it. Check indirect virtual bases. - - * class.c (check_field_decls): Fix typo. - -2002-10-23 Mark Mitchell - - PR c++/8067 - * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and - related variables. - - PR c++/7679 - * spew.c (next_token): Do not return an endless stream of - END_OF_SAVED_INPUT tokens. - (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of - the cached token stream. - (snarf_defarg): Likewise. - -2002-10-23 Zack Weinberg - - * cp-lang.c (cp_var_mod_type_p): New: C++ hook for - variably_modified_type_p. - * cp-tree.h: Remove prototype of variably_modified_type_p. - * tree.c (variably_modified_type_p): Remove; now implemented - in language-independent code. - -2002-10-22 Mark Mitchell - - PR c++/6579 - * spew.c (snarf_parenthesized_expression): New function. - (snarf_block): Use it. - -2002-10-22 Richard Henderson - - * method.c (use_thunk): Always compute vcall_value; assert that - it is not zero. Use can_output_mi_thunk; use output_mi_thunk - for vcall thunks as well. - -2002-10-21 Mark Mitchell - - * class.c (empty_base_at_nonzero_offset_p): New function. - (layout_nonempty_base_or_field): Do not check for conflicts when - laying out a virtual base using the GCC 3.2 ABI. - (build_base_field): Correct checking for presence of empty classes - at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. - - * class.c (include_empty_classes): Use normalize_rli. - (layout_class_type): Likewise. - - * decl.c (reshape_init): Tweak handling of character arrays. - - PR c++/8218 - * cp-tree.h (lang_type_class): Add contains_empty_class_p. - (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. - * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. - (check_field_decls): Likewise. - (layout_class_type): Likewise. - (finish_struct_1): Initialize it. - (walk_subobject_offsets): Use it to prune searches. - -2002-10-20 Mark Mitchell - - * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT. - * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with - TARGET_ASM_OUTPUT_MI_THUNK in comments. - -2002-10-18 Zack Weinberg - - * decl.c (start_decl): Point users of the old initialized- - typedef extension at __typeof__. - -2002-10-18 Mark Mitchell - - * Make-lang.in (method.o): Depend on TARGET_H. - * method.c (target.h): Include it. - (use_thunk): Use target hooks. Use vcall thunks, if available. - -2002-10-18 Mark Mitchell - - * class.c (base_derived_from): Make sure return value is a bool. - -2002-10-18 Mark Mitchell - - * class.c (find_final_overrider_data_s): Remove overriding_fn and - overriding_base. - (dfs_base_derived_from): New function. - (base_derived_from): Likewise. - (dfs_find_final_overrider): Use base_derived_from. - (find_final_overrider): Adjust. - -2002-10-18 Jason Merrill - - PR c++/8080 - * semantics.c (finish_for_cond, finish_while_cond): Don't mess - with condition decls in a template. - -2002-10-17 Nathan Sidwell - - * class.c (add_method): Compare template parms too. - -2002-10-17 Mark Mitchell - - PR c++/7584 - * class.c (handle_using_decl): Allow the declaration used to be - from an ambiguous base. - - * pt.c (convert_template_argument): Revert this change: - 2002-10-16 Mark Mitchell - * pt.c (convert_template_argument): Do not fold non-type - template rguments when inside a template. - - * init.c (expand_default_init): Handle brace-enclosed initializers - correctly. - -2002-10-16 Mark Mitchell - - * mangle.c (write_expression): Correct handling of enumeration - constants. - (write_template_arg): Likewise. - * pt.c (convert_template_argument): Do not fold non-type template - arguments when inside a template. - - PR c++/7478 - * cvt.c (convert_to_reference): Allow references as the incoming - type. - -2002-10-16 Mark Mitchell - - PR c++/7524 - * method.c (do_build_assign_ref): Use cp_build_qualified_type, not - build_qualified_type. - -2002-10-15 Richard Henderson - - * error.c (dump_expr): Use real_to_decimal directly, and with - the new arguments. - -2002-10-15 Mark Mitchell - - * decl.c (reshape_init): Fix typo. - - * cp-tree.h (operator_name_info_t): Add arity. - * lex.c (init_operators): Initialize it. - * mangle.c (write_conversion_operator_name): New function. - (write_unqualified_name): Use it. - (write_template_args): Accept template arguments as a TREE_LIST. - (write_expression): Adjust handling of qualified names to match - specification. - -2002-10-15 Jason Merrill - - * call.c (call_builtin_trap): New fn. - (convert_arg_to_ellipsis): Use it. Downgrade error to warning. - (build_call): Don't set current_function_returns_abnormally outside - a function. - -2002-10-14 Mark Mitchell - - * class.c (check_field_decls): Remove empty_p parameter. Instead, - clear CLASSTYPE_EMPTY_P. - (build_base_field): Likewise. - (build_base_fields): Likewise. - (check_bases_and_members): Likewise. - (create_vtbl_ptr): Likewise. - (layout_class_type): Likewise. Ensure that empty classes have - size zero when used as base classes in the 3.2 ABI. - (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and - CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p - parameter. - (is_empty_class): Correct definition when using post-3.2 ABI. - * cp-tree.h (lang_type_class): Add empty_p. - (CLASSTYPE_EMPTY_P): New macro. - -2002-10-12 Nathan Sidwell - - * init.c (build_delete): Do not apply save_expr for arrays. - (build_vec_delete): Likewise. - -2002-10-14 Mark Mitchell - - * decl.c (layout_var_decl): Call layout_decl even for variables - whose type is an array with unspecified bounds. - - PR c++/7176 - * lex.c (do_identifier): Add another option for the parsing - parameter. - * parse.y (do_id): Use it. - -2002-10-11 Gabriel Dos Reis - - PRs C++/6803, C++/7721 and C++/7803 - * decl.c (grokdeclarator): Gracefully handle template-name as - decl-specifier. - -2002-10-11 Jason Molenda - - * init.c (build_field_list): Provide uses_unions_p with a default - value. - -2002-10-11 Mark Mitchell - - PR c++/5661 - * cp-tree.h (variably_modified_type_p): New function. - (grokdeclarator) Tighten check for variably modified types as - fields. - * pt.c (convert_template_argument): Do not allow variably modified - types as template arguments. - * tree.c (variably_modified_type_p): New function. - - * NEWS: Document removal of "new X = ..." extension. - * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on - brace-enclosed initializers. - * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro. - (initialize_local_var): Remove declaration. - (expand_static_init): Likewise. - * decl.c (next_initializable_field): New function. - (reshape_init): Likewise. - (check_initializer): Use them. Build dynamic initializer for - aggregates here too. - (initialize_local_var): Simplify, and incorporate cleanup - insertion code as well. - (destroy_local_var): Remove. - (cp_finish_decl): Tidy. - (expand_static_init): Fold checks for whether or not a variable - needs initialization into this function. Simplify. - * decl2.c (do_static_initialization): Simplify. - * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will - be done for us automatically. - (expand_default_init): Handle brace-enclosed initializers - correctly. - (expand_aggr_init_1): Remove RTL-generation code. - (build_vec_init): Remove "new X = ..." support. - * parse.y (new_initializer): Likewise. - * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on - brace-enclosed initializer. - (create_pseudo_type_info): Likewise. - * typeck2.c (store_init_value): Don't try to handle digest_init - being called more than once. - (digest_init): Tidy handling of brace-enclosed initializers. - -2002-10-10 Kaveh R. Ghazi - - * decl.c (typename_hash): Use htab_hash_pointer. - -2002-10-10 Jim Wilson - - * decl.c (duplicate_decls): Don't call decl_attributes. - -2002-10-09 Zack Weinberg - - PR c/7353 - * decl.c (start_decl): Unconditionally issue error for - 'typedef foo = bar'. - (cp_finish_decl): Remove special case for TYPE_DECL with initializer. - (grokdeclarator): Remove redundant error for 'typedef foo = bar'. - -2002-10-09 Kaveh R. Ghazi - - * decl2.c (prune_vtable_vardecl): Delete unused function. - -2002-10-03 Mark Mitchell - - PR c++/7754 - * decl2.c (finish_anon_union): Do not expand anonymous unions when - procesing template functions. - * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable - type. Call layout_decl. - (tsubst_expr, case DECL_STMT): Handle anonymous unions. - -2002-10-07 Richard Henderson - - * decl2.c, pt.c: Revert c++/7754 fix. - -2002-10-05 Kriang Lerdsuwanakij - - PR c++/7804 - * error.c (dump_expr) [REAL_CST]: Output in decimal format. - -2002-10-03 Mark Mitchell - - PR c++/7931 - * pt.c (for_each_template_parm_r): Handle BASELINKs. - - PR c++/7754 - * decl2.c (finish_anon_union): Do not expand anonymous unions when - procesing template functions. - * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable - type. Call layout_decl. - (tsubst_expr, case DECL_STMT): Handle anonymous unions. - -2002-10-03 Mark Mitchell - - PR c++/8006 - * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template - template parameters. - (globals): Add entity and need_abi_warning. - (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not - CLASSTYPE_TEMPLATE_INFO. - (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not - TYPE_TI_TEMPLATE. - (write_prefix): Handle typename types correctly. - (write_template_prefix): Handle template template parameters - correctly. - (start_mangling): Add entity parameter. - (finish_mangling): Warn about names whose mangling will change. - (mangle_decl_string): Adjust. - (mangle_type_string): Likewise. - (mangle_special_for_type): Likewise. - (mangle_ctor_vtbl_for_type): Likewise. - (mangle_thunk): Likewise. - (mangle_guard_variable): Likewise. - (mangle_ref_init_variable): Likewise. - -2002-10-02 Mark Mitchell - - PR c++/7188. - * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two. - * cp-tree.h (emit_base_init): Rename to .... - (emit_mem_initializers): ... this. - (expand_member_init): Change prototype. - * init.c (perform_member_init): Compute explicit, rather than - requiring it as a parameter. - (sort_member_init): Rename to ... - (sort_mem_initializers): ... this. Process bases and data members - together. - (sort_base_init): Remove. - (emit_base_init): Rename to ... - (emit_mem_initializers): ... this. - (expand_aggr_vbase_init_1): Remove. - (construct_virtual_bases): Rename to ... - (construct_virtual_base): ... this. - (expand_member_init): Rework handling of base initializers. - * method.c (do_build_copy_constructor): Use - finish_mem_initializers. - * parse.y (member_init): Adjust calls to expand_member_init. - * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case. - (tsubst_initializer_list): Use expand_member_init. - * semantics.c (finish_mem_intiailizers): Simplify. - -2002-10-02 Matt Austern - * decl.c (walk_vtables_r): Fixed typo that caused result to - never get a nonzero value. - -2002-10-02 Roger Sayle - - PR optimization/6627 - * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition - from here, and move it to tree.h. - * decl.c (cxx_init_decl_processing): If storing the vbit - in function pointers, ensure that force_align_functions_log - is atleast one. - -2002-10-02 Matt Austern - - * class.c (check_field_decls): Changed warning about const member - variables so that it doesn't get issued for a class aggregate. - -2002-10-01 Mark Mitchell - - * decl.c (cp_finish_decl): Make sure array types are laid out, - even if the array bounds are unknown. - -2002-10-01 Steve Ellcey - - * class.c (build_vtbl_initializer): Change build_c_cast - to build1. - -2002-10-01 Mark Mitchell - - * decl.c (cp_finish_decl): Make sure array types are laid out, - even if the array bounds are unknown. - - * decl.c (cp_finish_decl): Correct check for dynamic - initialization of thread-local storage. - -2002-09-30 Nathan Sidwell - - * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also - overloaded. - -2002-09-30 Steve Ellcey - - * class.c (build_vtbl_initializer): Add cast. - (add_vcall_offset_vtbl_entries_1): - Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset. - -2002-09-30 Mark Mitchell - - * class.c (walk_subobject_offsets): Correct the calculation of - offsets for virtual bases. Correct the counting of array - elements. - (layout_nonempty_base_or_field): Simplify. Correct the - calculation of offsets to be propagated through the binfo - hierarchy. - (build_base_field): Avoid creating a FIELD_DECL for empty bases. - Add the FIELD_DECL to TYPE_FIELDS. - (build_base_fields): Adjust accordingly. - (layout_virtual_bases): Use build_base_field. - (end_of_class): Return a tree, not an integer. - (warn_about_ambiguous_direct_bases): Rename to ... - (warn_about_ambiguous_bases): ... this. - (include_empty_classes): New function. - (layout_class_type): Create an alternative version of the type to - be used when as a base class type. Do not call - finish_record_layout until we are done laying out the class. - * cp-tree.h (lang_type_class): Remove size, size_unit. Add - as_base. - (CLASSTYPE_SIZE): Reimplement. - (CLASSTYPE_SIZE_UNIT): Likewise. - (CLASSTYPE_ALIGN): Likweise. - (CLASSTYPE_USER_ALIGN): Likewise. - (CLASSTYPE_AS_BASE): New macro. - (DECL_INITIALIZED_P): Likewise. - (extract_init): Remove prototype. - (build_forced_zero_init): Rename to ... - (build_zero_init): ... this. - (force_store_init_value): Remove. - * decl.c (obscure_complex_init): Remove. - (duplicate_decls): Copy DECL_INITIALIZED_P. - (check_initializer): Do not leave junk in DECL_INITIAL. - (cp_finish_decl): Handle zero-initialization of entities with - static storage duration. - * expr.c (extract_init): Remove. - * init.c (build_forced_zero_init): Remove. - (build_zero_init): New function. - (build_default_init): Use it. - (build_field_list): Skip FIELD_DECLs for base subobjects. - (push_base_cleanups): Likewise. - * method.c (do_build_assign_ref): Likewise. - (synthesize_exception_spec): Likewise. - * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P. - (regenerate_decl_from_template): To not set DECL_INITIAL for a - static data member whose initialization took place in its class. - (instantiate_decl): Do not pass an initializer to cp_finish_decl - in that situation. - * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects. - (dfs_unuse_fields): Likewise. - * tree.c (pod_type_p): Handle error_mark_node. - (zero_init_p): Likewise. - * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base - subobjects. - * typeck2.c (store_init_value): Remove #if 0'd code. - (force_store_init_value): Remove. - (process_init_constructor): Use build_zero_init. - -2002-09-29 Nathan Sidwell - - PR c++/7788 - * rtti.c (unemitted_tinfo_decl_p): Check it has a field. - -2002-09-29 Kazu Hirata - - * cp-tree.h: Fix comment typos. - * decl.c: Likewise. - * pt.c: Likewise. - -2002-09-25 Mark Mitchell - - * cp/class.c (contains_empty_class_p): New method. - (walk_subobject_offsets): Correct computation of field offset. - (layout_empty_base): Correct placement of emtpy base classes. - (layout_class_type): Warn about ABI changes. - -2002-09-23 Mark Mitchell - - * cp/class.c (layout_virtual_bases): Do not round the size of the - type to a multiple of the alignment before laying out virtual bases. - (layout_class_type): Correct handling of bit-fields that are wider - than their type inside unions. Round the size of the type to a - even number of bytes when computing the size without virtual - bases. - * cp/cp-tree.h (abi_version_at_least): New macro. - -2002-09-21 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.2: Likewise. - * call.c: Likewise. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * friend.c: Likewise. - * g++spec.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * mangle.c: Likewise. - * method.c: Likewise. - * operators.def: Likewise. - * optimize.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2002-09-18 Devang Patel - - * cp/cp-tree.h: New prototype for walk_vtabls(). - * cp/decl.c (walk_vtables_r): New function. - (struct cp_binding_level): Add new members, namespaces, - names_size and vtables. - (add_decl_to_level): Add decl in namespaces or vtables - chain, if conditions match. - (walk_vtables): New function. - (walk_namespaces_r): Travers separate namespace chain - for namespace decls. - (wrapup_globals_for_namespace): Use names_size instead - of list_length(). - * cp/decl2.c (finish_file): Use walk_vtables() instead of - walk_globals() to walk vtable decls. - -2002-09-18 Nathan Sidwell - - * decl.c (grokdeclarator): Use assert, not internal_error. Don't - ICE with invalid pointers & references. - -2002-09-17 Zack Weinberg - - * Make-lang.in: Remove all references to the demangler. - * cxxfilt.c: Moved to binutils. - -2002-09-16 Nathan Sidwell - - PR c++/7718 - * pt.c (tsubst_decl): Remove assert. - - Remove DR 295 implementation. - * pt.c (check_cv_quals_for_unify): Disable function & method cases. - * tree.c (cp_build_qualified_type_real): Likewise. Don't warn - about ignoring volatile qualifiers. - - * search.c (lookup_member): Correct documentation. - -2002-09-16 Geoffrey Keating - - * cp-tree.h (union lang_tree_node): Add chain_next option. - -2002-09-16 Nathan Sidwell - - * parse.y (parse_finish_call_expr): Check lookup_member result. - - PR c++/7015 - * semantic.c (finish_asm_stmt): Fix operand/output_operands - thinko. - * typeck.c (c_expand_asm_operands): Protect from error_mark_node. - -2002-09-15 Nathan Sidwell - - PR c++/7919 - * call.c (build_over_call): Convert this pointer for fns found by - using decls. - -2002-09-15 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.1: Likewise. - -2002-09-14 Nathan Sidwell - - PR c++/7768 - * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. - -2002-09-14 Kazu Hirata - - * error.c: Fix comment formatting. - * except.c: Likewise. - * expr.c: Likewise. - * friend.c: Likewise. - * g++spec.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * mangle.c: Likewise. - * method.c: Likewise. - * optimize.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2002-09-13 Matt Austern - - PR C++/7828 - * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. - * cp/call.c: Change call-by-const-reference mechanism to use - non_cast_lvalue_p when deciding whether the create a temporary. - We need a temporary when passing, e.g. (long) x by const ref. - -2002-09-13 Nathan Sidwell - - * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. - -2002-09-13 Kazu Hirata - - * decl.c: Fix comment formatting. - * decl2.c: Likewise. - -2002-09-12 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cp-lang.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - -2002-09-11 Zack Weinberg - - * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c, - and c++filt from cxxfilt.o + version.o + $(LIBDEPS). - * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with - minor adjustments (use version_string, eliminate yet another - duplicate of xmalloc) - -2002-09-08 Kaveh R. Ghazi - - * cp-tree.h (require_complete_eh_spec_types): Add prototype. - -2002-09-05 Jason Merrill - - * typeck2.c (add_exception_specifier): Only pedwarn for an - incomplete type. - (require_complete_eh_spec_types): New fn. - (cxx_incomplete_type_diagnostic): Also support pedwarning. - * typeck.c (complete_type_or_diagnostic): Likewise. - * call.c (build_call): Call require_complete_eh_spec_types. - * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting - on an incomplete type. - -2002-09-04 Jakub Jelinek - - * decl.c (start_cleanup_fn): Clear interface_only before - start_function, restore it afterwards. - -2002-09-02 Nathan Sidwell - - * cp-tree.h (finish_builtin_type): Remove. - * decl2.c (finish_builtin_type): Move to common code. - * decl.c (build_ptrmemfunc_type): Adjust. - * rtti.c (create_pseudo_type_info): Adjust. - (create_tinfo_types): Adjust. - -2002-08-31 Jason Merrill - - * cp-lang.c (cp_expr_size): Allow initialization from a - CONSTRUCTOR. - -2002-08-30 Richard Henderson - - PR opt/7515 - * tree.c: Include target.h. - (cp_cannot_inline_tree_fn): Don't auto-inline functions that - don't bind locally. - * Makefile.in (tree.o): Update. - -2002-08-27 Mark Mitchell - - * class.c (layout_virtual_bases): Warn about bugs in G++ that - result in incorrect object layouts. - (layout_class_type): Likewise. - -2002-08-24 Matt Austern - - * tree.c (lvalue_p_1): Add argument for whether casts of lvalues - are allowable. - (real_lvalue_p): Update caller. - (lvalue_p): Ditto. - (non_cast_lvalue_or_else): New. - * tree.h: Declare it. - * typeck.c (build_unary_op): Use non_cast_lvalue_or_else. - -2002-08-22 Mark Mitchell - - * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR - and COND_EXPR specially; fix error message output. - -2002-08-22 Jason Merrill - - * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR. - * semantics.c (nullify_returns_r): Likewise. - -2002-08-17 Gabriel Dos Reis - - Fix PR/7621 - * typeck.c (finish_class_member_access_expr): Diagnose cases where - name lookup finds nothing. - -2002-08-15 Jason Merrill - - * semantics.c (finish_then_clause): Remove redundant assignment. - (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the - extra binding level outside the if/switch statement. - (finish_while_cond, finish_for_cond): Rewrite complex condition - into the loop body. - -2002-08-15 Alexandre Oliva - - * parse.y (sizeof, alignof, typeof): New non-terminals to - increment skip_evaluation. Replace terminals with them and - decrement skip_evaluation at the end of rules using them. - * decl2.c (mark_used): Don't assemble_external if - skipping evaluation. - -2002-08-15 Gabriel Dos Reis - - Fix PR/7504 - * parse.y (parse_finish_call_expr): Handle incomplete - type used to name a scope. - -2002-08-15 Nathan Sidwell - - PR c++/7598 - * typeck.c (build_unary_op): Fold offsetof idiom. Fixes - regression caused by my 2002-08-08 patch. - -2002-08-13 Mark Mitchell - - * decl.c (pushdecl_class_level): Honor requests to bind names to - OVERLOADs. - -2002-08-11 Kaveh R. Ghazi - - * decl2.c (build_call_from_tree): Fix uninitialized variable. - * parse.y (parse_finish_call_expr): Likewise. - * repo.c (old_args, old_dir, old_main): Const-ify. - -2002-08-11 Gabriel Dos Reis - - * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE - DECL_SOURCE_LINE with DECL_SOURCE_LOCATION. - * optimize.c (maybe_clone_body): Likewise. - * pt.c (tsubst_enum): Likewise. - (lookup_template_class): Likewise. - * tree.c (cp_copy_res_decl_for_inlining): Likewise. - -2002-08-10 Neil Booth - - * lang-specs.h: Remove -ansi. - -2002-08-10 Nathan Sidwell - - * tree.c (maybe_dummy_object): Replace // with /* */ - -2002-08-09 Mark Mitchell - - * call.c (standard_conversion): Use build_ptrmem_type. - * cp-tree.h (build_ptrmem_type): New function. - (adjust_result_of_qualified_name_lookup): Likewise. - * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate - static data members. - (build_ptrmem_type): New function. - (grokdeclarator): Do not use build_offset_type when encountering a - qualified name. - * parse.y (parse_finish_call_expr): Use - adjust_result_of_qualified_name_lookup. - * search.c (adjust_result_of_qualified_name_lookup): New function. - * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than - accessing OFFSET_TYPEs directly. - -2002-08-08 Mike Stump - - * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid. - (type_decays_to): Likewise. - * class.c (find_final_overrider): Likewise. - (maybe_note_name_used_in_class): Likewise. - * decl.c (current_tmpl_spec_kind): Likewise. - (add_binding): Likewise. - (push_class_binding): Likewise. - (duplicate_decls): Likewise. - (layout_var_decl): Likewise. - (grokfndecl): Likewise. - (grokdeclarator): Likewise. - (check_default_argument): Likewise. - * decl2.c (handle_class_head): Likewise. - * error.c (dump_template_decl): Likewise. - * init.c (build_offset_ref): Likewise. - * pt.c (check_specialization_scope): Likewise. - (determine_specialization): Likewise. - (check_explicit_specialization): Likewise. - (maybe_check_template_type): Likewise. - (process_partial_specialization): Likewise. - (check_default_tmpl_args): Likewise. - (push_template_decl_real): Likewise. - (convert_template_argument): Likewise. - (try_class_unification): Likewise. - (get_bindings_real): Likewise. - (do_decl_instantiation): Likewise. - * semantics.c (begin_function_definition): Likewise. - (finish_member_declaration): Likewise. - (check_multiple_declarators): Likewise. - * typeck.c (comp_array_types): Likewise. - (comptypes): Likewise. - (expr_sizeof): Likewise. - (build_binary_op): Likewise. - (dubious_conversion_warnings): Likewise. - (check_return_expr): Likewise. - -2002-08-08 Mark Mitchell - - * typeck.c (build_class_member_access_expr): Do not return - error_mark_node when no error has occurred. - -2002-08-08 Nathan Sidwell - - * typeck.c (build_component_addr): Remove. - (build_unary_op): Just check it's not a bitfield, and then build - an ADDR_EXPR. - -2002-08-08 Nathan Sidwell - - * class.c (convert_to_base): Correct check for error_mark_node. - (create_vtable_ptr): Remove unused VFUNS_P parm. - -2002-08-08 Nathan Sidwell - - * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. - -2002-08-07 Mark Mitchell - - Rework build_component_ref. - * call.c (build_vfield_ref): Do not go through build_component_ref. - (build_field_call): Use build_class_member_access_expr. - (build_user_type_conversion_1): Use BASELINK_FUNCTIONS. - (build_object_call): Likewise. - * class.c (convert_to_base): New function. - (type_requires_array_cookie): Use BASELINK_FUNCTIONS. - (instantiate_type): Handle BASELINKs. - * cp-tree.def (BASELINK): New tree code. - * cp-tree.h (BASELINK_P): Reimplement. - (SET_BASELINK_P): Remove. - (BASELINK_BINFO): Reimplement. - (BASELINK_FUNCTIONS): Likewise. - (BASELINK_ACCESS_BINFO): Likewise. - (BASELINK_OPTYPE): Likewise. - (convert_to_base): New function. - (name_p): Likewise. - (build_object_ref): Remove. - (build_component_ref_1): Likewise. - (build_component_ref): Likewise. - (build_x_component_ref): Likewise. - (build_class_member_access_expr): New function. - (finish_class_member_access_expr): Likewise. - (build_ptrmemfunc_access_expr): Likewise. - * decl.c (grokdeclarator): Handle BASELINKs. - * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using - finish_class_member_access_expr. - (arg_assoc): Handle BASELINKs. - (do_class_using_decl): Likewise. - * error.c (dump_decl): Likewise. - (dump_expr): Use build_ptrmemfunc_access_expr. - * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find - destructors. - (build_throw): Use BASELINK_FUNCTIONS. - * init.c (perform_member_init): Use - build_class_member_access_expr. - (build_offset_ref): Handle BASELINKs. Use - build_class_member_access_expr. - * method.c (hack_identifier): Likewise. - * parse.y (do_id): Use BASELINK, not TREE_LIST. - (primary): Remove uses of build_object_ref. - * pt.c (lookup_template_function): Handle BASELINKs. - (resolve_overloaded_unification): Likewise. - * search.c (build_baselink): Build a BASELINK, not a TREE_LIST. - (lookup_field): Use BASELINK, not TREE_LIST. - (lookup_fnfiels): Likewise. - (setup_class_bindings): Likewise. - * semantics.c (finish_object_call_expr): Do not use - build_method_call when we already know what function is being - called. - * spew.c (identifier_type): Use BASELINK, not TREE_LIST. - * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not - TREE_CHAIN. - (name_p): New function. - * typeck.c (build_object_ref): Remove. - (build_component_ref_1): Likewise. - (build_x_component_ref): Likewise. - (build_class_member_access_expr): New function. - (finish_class_member_access_expr): Likewise. - (build_ptrmemfunc_access_expr): Likewise. - (get_member_function_from_ptrfunc): Use - build_ptrmemfunc_access_expr. - (build_binary_op): Likewise. - (build_unary_op): Likewise. - (build_ptrmemfunc): Likewise. - (pfn_from_ptrmemfunc): Likewise. - * typeck2.c (build_m_component_ref): Adjust comment. - -2002-08-07 Neil Booth - - * Make-lang.in (CXX_C_OBJS): Update. - * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. - * cp-tree.h (cxx_decode_option): Remove. - * decl2.c (compare_options, lang_f_options, unsupported_options, - cxx_decode_option): Remove. - -2002-08-06 Gabriel Dos Reis - - * typeck.c (build_x_unary_op): Handle pointer-to-member. - -2002-08-05 Geoffrey Keating - - * class.c: Don't include obstack.h. - (popclass): - * decl2.c: Delete bogus comment. - * error.c: Don't include obstack.h. - * except.c: Likewise. - (dump_type): Correct comment. - * method.c: Don't include obstack.h. - * tree.c: Likewise. - -2002-08-04 Gabriel Dos Reis - - Fix PR/2213 - * cvt.c (cp_convert_to_pointer): Reject conversions from integral - expressions to pointer-to-data-member of pointer-to-member-functions. - -2002-08-04 Geoffrey Keating - - * cvt.c (ocp_convert): Delete obsolete code. - * parse.y (permanent_obstack): Delete declaration. - * pt.c (permanent_obstack): Delete declaration. - * repo.c (permanent_obstack): Delete declaration. - (open_repo_file): Use xmalloc instead of permanent_obstack. - (init_repo): Use xstrdup instead of permanent_obstack. - -2002-08-04 Nathan Sidwell - - * cp-tree.h (VF_DERIVED_VALUE): Remove. - * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE. - -2002-08-03 Nathan Sidwell - - PR 7470. - C++ ABI change - vfunc ordering. - * class.c (add_virtual_function): Remove. - (dfs_modify_all_vtables): Take list of all declared - virtuals. Assign all that are not in primary base. - (check_for_override): Adjust comments. - (create_vtable_ptr): Take single list of virtuals. Build chain - of declared virtuals here. - (layout_class_type): Take single list of virtuals. Adjust. - (finish_struct_1): Keep virtuals on single list. Adjust. - -2002-08-02 Mark Mitchell - - * init.c (build_member_call): Use build_new_method_call, not - build_method_call. - -2002-08-02 Krister Walfridsson - - * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies. - -2002-08-02 Mark Mitchell - - * call.c (build_method_call): Issue a more helpful error message - about ambiguous method names. - -2002-08-02 Nathan Sidwell - - * tree.c (build_shared_int_cst): Make cache file scope, and - GTY it. - -2002-08-02 Jason Merrill - - * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. - (cp_expr_size): New fn. - * call.c (build_over_call): Lose empty class hackery. - (convert_arg_to_ellipsis): Promote non-POD warning to error. - * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. - - * semantics.c (expand_body): Do tree optimization in the function - context, too. - -2002-08-01 Neil Booth - - * cp-tree.h: Move all warning and flag declarations to c-common.h. - * decl.c: Move all warning and flag variables to c-common.c. - * decl2.c: Move all warning and flag variables to c-common.c. - * lex.c (flag_digraphs): Remove. - (warn_traditional): Now in c-common.c. - -2002-07-31 Mark Mitchell - - * call.c (build_field_call): Do not look up the field by name. - (build_method_call): Simplify. - (struct z_candidate): Add access_path and conversion_path. Remove - basetype_path. - (convert_class_to_reference): Adjust use of - add_function_candidate. - (add_candidate): Add conversion_path argument. - (add_function_candidate): Use it. - (add_conv_dndidate): Likewise. - (build_builtin_candidate): Likewise. - (add_template_candidate_real): Add conversion_path argument. - (add_template_conv_candidate): Likewise. - (add_template_candidate): Likewise. - (build_user_type_conversion_1): Use it. - (build_new_function_call): Remove name lookup code. Adjust use of - add_template_candidate and add_function_candidate. - (build_new_op): Likewise. - (convert_like_real): Use build_special_member_call. - (build_over_call): Use cand->conversion_path. - (build_special_member_call): New method. - (build_new_method_call): Remove name lookup code. - * cp-tree.def (OFFSET_REF): Update documentation. - (TEMPLATE_ID_EXPR): Likewise. - * cp-tree.h (BASELINK_ACCESS_BINFO): New macro. - (BASELINK_OPTYPE): Likewise. - (build_new_method_call): Adjust prototype. - (build_special_member_call): New method. - (build_baselink): New method. - (build_offset_ref_call_from_tree): Likewise. - (build_call_from_tree): Likewise. - (finish_qualified_call_expr): Remove. - (finish_call_expr): Adjust prototype. - (build_x_function_call): Remove. - * cvt.c (ocp_convert): Use build_special_member_call. - * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr. - (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and - CALL_EXPR. - (build_offset_ref_call_from_tree): New function. - (build_call_from_tree): Likewise. - * init.c (expand_cleanup): Use build_special_member_call. - (expand_default_init): Likewise. - (build_member_call): Use finish_call_expr. - (build_new_1): Use build_special_member_call. - (push_base_cleanups): Likewise. - * method.c (do_build_assign_ref): Likewise. - * parse.y (template_id): Do not pass a COMPONENT_REF to - lookup_template_function. - (primary): Use parse_finish_call_epxr, not finish_call_expr. - (parse_finish_call_expr): New function. - * pt.c (lookup_template_function): Add assertions. - * search.c (lookup_base): Allow T to be a binfo. - (build_baselink): New function. - (lookup_member): Use it. - * semantics.c (finish_call_expr): Do not do name lookup. - (finish_object_call_expr): Remove #if 0'd code. - (finish_qualified_call_expr): Remove. - * typeck.c (build_x_function_call): Remove. - (build_static_case): Use build_special_member_call. - * typeck2.c (build_functional_cast): Likewise. - -2002-07-30 Franz Sirl - - * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. - -2002-07-30 Gabriel Dos Reis - - * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion. - -2002-07-30 Nathan Sidwell - - * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more - documentation. - -2002-07-29 Alan Modra - - * cp-tree.h: Comment typo fix. - -2002-07-29 Richard Earnshaw - - * spew.c (space_for_token): Allocate zeroed memory for a new token - chunk. - -2002-07-27 Roger Sayle - - * decl.c (builtin_function_1): No need to explicitly mark - BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. - -2002-07-27 Roger Sayle - - * decl2.c (cxx_decode_option): Support -fno-builtin-foo. - -2002-07-26 Jason Merrill - - * call.c (build_over_call): Likewise. - (cp_convert_parm_for_inlining): New fn. - (convert_for_arg_passing): New fn. - (convert_default_arg, build_over_call): Use it. - (type_passed_as): New fn. - * pt.c (tsubst_decl): Use it. - * decl2.c (cp_build_parm_decl): New fn. - (build_artificial_parm): Use it. - (start_static_storage_duration_function): Likewise. - * decl.c (start_cleanup_fn, grokdeclarater): Likewise. - (grokparms): Don't mess with DECL_ARG_TYPE. - * typeck.c (convert_arguments): Use convert_for_arg_passing. - * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): - Define. - * cp-tree.h: Declare new fns. - -2002-07-26 Neil Booth - - * cp-tree.h (flag_operator_names): Remove. - * decl2.c (flag_operator_names): Remove. - (lang_f_options): Remove operator-names. - * lex.c (D_OPNAME): Remove. - (reswords): Remove operator names. - (rid_to_yy): Remove operator names. - (init_reswords): No need to handle D_OPNAME. - * spew.c (read_process_identifier): There are no operator - names. - -2002-07-26 Jason Merrill - - * dump.c (cp_dump_tree): Call c_dump_tree. - * Make-lang.in (CXX_C_OBJS): Add c-dump.o. - -2002-07-25 Neil Booth - - * error.c (print_whitespace): Remove. - * g++spec.c (LIBUNWIND): Move. - * mangle.c (mangled_position, write_signed_number): Remove. - -2002-07-25 Neil Booth - - * decl2.c (cxx_decode_option): Similarly. - -2002-07-25 Gabriel Dos Reis - - * cp-tree.h (cxx_sizeof_nowarn): Now a macro. - (cxx_sizeof_or_alignof_type): Take a third argument. - (cxx_sizeof): Adjust definition. - (cxx_alignof): Likewise. - * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality. - * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for - complaining. - (c_sizeof_nowarn): Remove definition. - (build_unary_op): Use cxx_sizeof_nowarn. - -2002-07-24 Geoffrey Keating - - * tree.c (cp_build_qualified_type_real): When copying - pointer-to-method types, unshare the record that holds - the cached pointer-to-member-function type. - -2002-07-23 Neil Booth - - * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove. - -2002-07-23 Gabriel Dos Reis - - Fix PR/7363: - * typeck.c (cxx_sizeof_or_alignof_type): New function. - (c_sizeof): Remove definition. - (expr_sizeof): Use cxx_sizeof. - * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type. - * decl.c (finish_destructor_body): Use cxx_sizeof. - * semantics.c (finish_alignof): Likewise. - (finish_alignof): Use cxx_alignof. - * cp-tree.h (cxx_sizeof, cxx_alignof): New macros. - (cxx_sizeof_or_alignof_type): Declare. - (my_friendly_assert): Move to ../c-common.h. - -2002-07-23 Neil Booth - - * class.c, method.c, pt.c, search.c: Don't define obstack macros. - -2002-07-22 Kriang Lerdsuwanakij - - PR c++/7347, c++/7348 - * cp-tree.h (tsubst_flags_t): Add tf_parsing. - * decl.c (make_typename_type): Use it. - (make_unbound_class_template): Likewise. - (lookup_name_real): Don't call type_access_control if scope is - template parameter dependent. - * parse.y (template_arg): Call make_unbound_class_template with - tf_parsing set. - (nest_name_specifier): Call make_typename_type with tf_parsing set. - (typename_sub0): Likewise. - (typename_sub1): Likewise. - (instantiate_decl): Push class scope. - * pt.c (regenerate_decl_from_template): Call pushclass and popclass - for both static variable and member function template. - (instantiate_decl) Call pushclass and popclass when tsubst'ing type - and arguments. - * search.c (type_access_control): Do type access for TEMPLATE_DECL - too. - -2002-07-20 Roger Sayle - - * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions - test by using positive_option. Make whitespace consistent. - -2002-07-20 Gabriel Dos Reis - - * spew.c (struct unparsed_test): Replace 'filename' and 'lineno' - members with 'locus'. Adjust use throughout. - (struct feed): Likewise. - (alloc_unparsed_test): Change prototype, take a 'const location_t *'. - Adjust use. - (snarf_defarg): Use error(), not error_with_file_and_line(). - -2002-07-19 Chris Demetriou - - * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever - cpp_options is included. - -2002-07-17 Kriang Lerdsuwanakij - - PR c++/2862, c++/2863 - * pt.c (determine_specialization): Compare the length of - TYPE_ARG_TYPES. Tidy. - -2002-07-17 Kriang Lerdsuwanakij - - PR c++/3797 - * decl.c (duplicate_decls): Don't propagate inlining parameters from - olddecl to newdecl when newdecl is a specialization of the - instantiation olddecl. - -2002-07-17 Kriang Lerdsuwanakij - - PR c++/4802, c++/5387 - * decl.c (make_typename_type): Use enforce_access. - -2002-07-17 Scott Snyder - - PR c++/7320 - * rtti.c (get_tinfo_decl): Set DECL_COMDAT. - -2002-07-12 Mark Mitchell - - * class.c (add_method): Correct handling of conversion operators. - -2002-07-11 Mark Mitchell - - PR c++/7224 - * class.c (add_method): Simplify. - -2002-07-11 Jason Merrill - - PR c++/7279 - * tree.c (cp_copy_res_decl_for_inlining): Also copy - TREE_ADDRESSABLE. - -2002-07-10 Graham Stott - - * pt.c (template_parm_this_level_p, push_template_decl_real): - Pass depth as int pointer. - -2002-07-11 Tim Josling - - Remove front end hard coding from gengtype.c. - - * config-lang.in (gtfiles): Add files needed for this front end. - -2002-07-10 Mark Mitchell - - * cp-tree.h (unqualified_name_lookup_error): Declare it. - (begin_function_definition): Adjust prototype. - * lex.c (unqualified_name_lookup_error): New function, split out - from ... - (do_identifier): ... here. - * parse.y (parse_begin_function_definition): New function. - (fn.def1): Use it. - * semantics.c (begin_function_definition): Accept decl-specifiers - and attributes as separate parameters. - -2002-07-10 Jason Merrill - - PR c++/6255 - * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than - modifying the old one. - -2002-07-09 Mark Mitchell - - * cp-tree.h (constructor_name_p): Declare it. - (check_template_template_default_arg): Likewise. - * class.c (handle_using_decl): Use constructor_name_p. - * decl.c (grokdeclarator): Likewise. - * decl2.c (constructor_name_p): Define it. - * init.c (build_member_call): Use constructor_name_p. - * parse.y (template_parm): Use check_template_template_default_arg. - * pt.c (check_explicit_specialization): Use constructor_name_p. - * semantics.c (check_template_template_default_arg): New function. - -2002-07-08 Kriang Lerdsuwanakij - - * pt.c (can_complete_type_without_circularity): Add static to - function definition. - -2002-07-08 Mark Mitchell - - * cp-tree.h (have_extern_spec): Declare it - * decl.c (have_extern_spec): Define it. - (start_decl): Eliminate use of used_extern_spec. - (start_function): Likewise. - * parse.y (have_extern_spec): Remove declaration. - (used_extern_spec): Likewise. - (frob_specs): Eliminate use of used_extern_spec. - (.hush_warning): Likewise. - -2002-07-07 Mark Mitchell - - * Make-lang.in (cp/parse.o): Depend on decl.h. - * cp-tree.h (do_decl_instantiation): Change prototype. - * parse.y: Include decl.h. - (parse_decl_instantiation): New function. - (explicit_instantiation): Use it. - * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR - and DECLSPECS. - -2002-07-07 Roger Sayle - - * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for - constructor and destructor tests when passed a TEMPLATE_DECL. - -2002-07-05 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Call force_fit_type for null - pointers. - - PR optimization/7145 - * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. - -2002-07-05 Nathan Sidwell - - Repair damage on weak-impared targets caused by my previous patch. - * cp-tree.h (import_export_tinfo): Add parameter. - * decl2.c (import_export_tinfo): Add parameter, post adjust - DECL_COMDAT. - * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by - import_export_tinfo. - -2002-07-03 Kriang Lerdsuwanakij - - PR c++/6944 - * init.c (build_aggr_init): Remove qualifiers of init before calling - build_vec_init. - (build_vec_init): Flatten multi-dimensional array during cleanup. - (build_vec_delete_1): Abort if the type of each element is array. - -2002-07-03 Graham Stott - - * pt.c (instantiate_class_template): Fix typo. - -2002-07-02 Kriang Lerdsuwanakij - - * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused - by CVS conflict in my last patch. - -2002-07-02 Kriang Lerdsuwanakij - - PR c++/6716 - * pt.c (can_complete_type_without_circularity): New function. - (instantiate_class_template): Use it. - * typeck2.c (cxx_incomplete_type_diagnostic): Improve error - message due to incomplete fields. - -2002-07-01 Mark Mitchell - - PR c++/7112 - * mangle.c (write_expression): Add mangling for sizeof when - applied to a type. - * operators.def: Remove stale comment. - -2002-06-30 Nathan Sidwell - - * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... - (CPTI_TYPE_INFO_PTR_TYPE): ... this. - (tinfo_decl_type): Replace with ... - (type_info_ptr_type): ... this. - (import_export_tinfo): Declare. - (tinfo_decl_p): Rename to ... - (unemitted_tinfo_decl_p): ... this. - * decl2.c (import_export_decl): Break out tinfo handling into ... - (import_export_tinfo): ... here. New function. - (finish_file): Adjust. - * rtti.c (TINFO_REAL_NAME): New macro. - (init_rtti_processing): Create the tinfo types. - (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. - (get_tinfo_decl): Adjust. - (get_tinfo_ptr): New function. - (get_type_id): Use it. - (tinfo_base_init): Create vtable decl here, if it doesn't exist. - (ptr_initializer): Use get_tinfo_ptr. - (ptm_initializer): Likewise. - (synthesize_tinfo_var): Break into ... - (get_pseudo_ti_init): ... this. Just create the initializer. - (get_pseudo_ti_desc): .. and this. - (create_real_tinfo_var): Remove. - (create_pseudo_type_info): Don't create the vtable decl here. - (get_vmi_pseudo_type_info): Remove. - (create_tinfo_types): Adjust. - (tinfo_decl_p): Rename to ... - (unemitted_tinfo_decl_p): ... here. Adjust. - (emit_tinfo_decl): Adjust. Create the initializer. - -2002-06-27 Mark Mitchell - - PR c++/6695 - * pt.c (tsubst_friend_class): Substitute into the context of the - friend before using it. - -2002-06-26 Mark Mitchell - - * cp-tree.h (xref_tag): Change prototype. - (handle_class_head): Likewise. - (build_x_component_ref): Likewise. - * decl.c (cxx_init_decl_processing): Adjust call to xref_tag. - (xref_tag): Take attributes as a separate parameter. - (xref_tag_from_type): Adjust call to xref_tag. - * decl2.c (build_expr_from_tree): Adjust call to - build_x_component_ref. - (handle_class_head): Take attributes as a separate parameter. - * parse.y (parse_xref_tag): New function. - (parse_handle_class_head): Likewise. - (primary): Use parse_xref_tag. - (class_head_decl): Use parse_handle_class_head. - (class_head_defn): Likewise. - * rtti.c (init_rtti_processing): Adjust call to xref_tag. - (build_dynamic_cast_1): Likewise. - (create_pseudo_type_info): Likewise. - (emit_support_tinfos): Likewise. - * typeck.c (build_object_ref): Adjust call to - build_x_component_ref. - (build_x_component_ref): Remove protect parameter. - -2002-06-25 Mark Mitchell - - * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS. - * class.c (handle_using_decl): Likewise. - (instantiate_type): Likewise. - * cp-tree.h (BASELINK_FUNCTIONS): New macro. - (xref_basetypes): Change prototype. - (begin_mem_initializers): New function. - (get_overloaded_fn): Likewise. - * decl.c (xref_basetypes): Simplify. - * error.c (dump_expr): Use BASELINK_FUNCTIONS. - * init.c (build_offset_ref): Likewise. - * parse.y (base_init): Use begin_mem_initializers(). - (structsp): Adjust call to xref_basetypes. - * pt.c (determine_specialization): Use BASELINK_FUNCTIONS. - (instantiate_class_template): Adjust call to xref_basetypes. - * semantics.c (begin_mem_initializers): New function. - * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS. - (really_overloaded_fn): Likewise. - (get_overloaded_fn): New function.' - (get_first_fn): USe BASELINK_FUNCTIONS. - -2002-06-24 Mark Mitchell - - * cp-tree.h (SCALAR_TYPE_P): New macro. - (check_for_out_of_scope_variable): New function. - (at_class_scope_p): Likewise. - (finish_fname): Likewise. - * class.c (finish_struct): Use at_function_scope_p. - * decl.c (check_for_out_of_scope_variable): New function, split - out from do_identifier. - (finish_enum): Use at_function_scope_p. - * lex.c (do_identifier): Use check_for_out_of_scope_variable. - * parse.y (VAR_FUNC_NAME): Give it . Use finish_fname. - (primary): Use at_function_scope_p. - * search.c (at_class_scope_p): New function. - * semantics.c (finish_fname): Likewise. - (check_multiple_declarators): Use at_function_scope_p. - -2002-06-23 Mark Mitchell - - * parse.y (parse_scoped_id): New function. - (primary): Use it. - * cp-tree.h (do_scoped_id): Adjust declaration. - * lex.c (do_scoped_id): Remove call to yylex. - * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id. - * typeck2.c (add_exception_specifier): Use tree_cons, rather than - expanding it inline. - -2002-06-23 Matt Thomas - - * decl.c (finish_function): Change "#ifdef VMS_TARGET" to - "#if VMS_TARGET". - -2002-06-21 Kaveh R. Ghazi - - * mangle.c (integer_type_codes): Const-ify. - -2002-06-20 Richard Henderson - - PR c++/6747 - * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. - Call put_var_into_stack. - -2002-06-20 Kaveh R. Ghazi - - * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit - array size calculation. - -2002-06-20 Kriang Lerdsuwanakij - - PR c++/6892 - * pt.c (tsubst_expr): Handle FILE_STMT. - -2002-06-20 Kriang Lerdsuwanakij - - PR c++/6723 - * pt.c (lookup_template_class): Don't build complete argument of - BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template - argument. - -2002-06-19 Akim Demaille - - * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with - decl.h's TYPENAME. - * spew.c, lex.c: Adjust. - * parse.y (explicit_instantiation): Add empty action to override - the default $$ = $1 where it introduces a type clash. - -2002-06-14 Jason Merrill - - * semantics.c (begin_for_stmt): Push the 'for' scope before - adding the FOR_STMT. - - C++ ABI changes. - * class.c (build_base_field): Set DECL_PACKED. - (layout_class_type): Don't use tail padding of PODs. - * mangle.c (write_unqualified_name): Fix template conversion op - mangling. - -2002-06-16 Richard Henderson - - PR opt/6793 - * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test - after template instantiation. - -2002-06-16 Richard Henderson - - * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. - -2002-06-15 Gabriel Dos Reis - - * cp-tree.h (compiler_error): Remove declaration. - * lex.c (compiler_error): Remove definition. - -2002-06-14 Steve Ellcey - - * g++spec.c (LIBUNWIND): New. - (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set. - -2002-06-13 Jessica Han - - * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN. - (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE. - (build_vbase_offset_vtbl_entries): Likewise. - * rtti.c (build_headof): Likewise. - (get_tinfo_decl_dynamic): Likewise. - (create_pseudo_type_info): Likewise. - -2002-06-12 Stan Shebs - - * mpw-config.in: Remove file, no longer used. - * mpw-make.sed: Ditto. - -2002-06-07 Zack Weinberg - - * decl2.c: Update call to cpp_handle_option. - -2002-06-07 H.J. Lu (hjl@gnu.org) - - * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. - -2002-06-06 Gabriel Dos Reis - - * error.c (cp_error_at): Fix typo. - -2002-06-04 Gabriel Dos Reis - - * error.c (cp_diagnostic_starter): Adjust call. - (maybe_print_instantiation_context): Change prototype to take a - 'diagnostic_info *'. - (print_instantiation_full_context): Likewise. - (print_instantiation_partial_context): Likewise. - (cp_diagnostic_starter): Likewise. - (cp_diagnostic_finalizer): Likewise. - (cp_print_error_function): Likewise. - (cp_printer): Take a secondary parameter as a 'text_info *'. - Remove output_state savings. Adjust calls. - -2002-06-03 Geoffrey Keating - - * pt.c (inline_parm_levels): Mark for GC. - - * mangle.c (start_mangling): Allocate G.substitutions here... - (init_mangle): ... rather than here. - (finish_mangling): Clear the varray pointer when done with it. - * spew.c (yylexstring): Don't use VARRAY_FREE. - * search.c (bfs_walk): Don't use VARRAY_FREE. - * decl2.c (pending_statics): Use gengtype to mark. - (deferred_fns): Likewise. - (ssdf_decls): Likewise. - (init_decl2): Delete. - * decl.c (pop_from_top_level): Don't use VARRAY_FREE. - (cxx_init_decl_processing): Don't call init_decl2. - (cxx_pop_function_context): Don't use VARRAY_FREE. - * cp-tree.h (struct saved_scope): No need for special marking - of varrays. - (struct language_function): Likewise. - (local_classes): Use gengtype to mark. - (init_decl2): Delete prototype. - * class.c (init_class_processing): Don't use - ggc_add_tree_varray_root. - (build_vtbl_initializer): Don't use VARRAY_FREE. - - * decl.c (typename_compare): Don't use same_type_p. - - * decl.c: Include hashtab.h instead of hash.h. - (typename_hash): Update to use htab_h. - (typename_compare): Likewise. - (typename_htab): Use gengtype to mark. - (build_typename_type): Update to use htab_h. - * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h. - - * Make-lang.in (gt-cp-tree.h): New rule. - (cp/tree.o): Depend on gt-cp-tree.h. - * config-lang.in (gtfiles): Add cp/tree.c. - * tree.c: Include gt-cp-tree.h. - (list_hash_table): Use gengtype to mark. - (init_tree): Use gengtype to mark trees. - - * Make-lang.in (cp/decl.o): Add debug.h dependency. - * call.c (struct z_candidate): Use gengtype. - (USER_CONV_CAND): Use WRAPPER_ZC. - (convert_class_to_reference): Use build_zc_wrapper. - (build_type_conversion_1): Likewise. - (build_over_call): Use WRAPPER_ZC. - (add_warning): Use build_zc_wrapper. - * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete. - * cp-tree.h (struct lang_identifier): Use gengtype. - (struct template_parm_index_s): Likewise. - (struct ptrmem_cst): Likewise. - (struct tree_binding): Likewise. - (struct tree_overload): Likewise. - (struct tree_srcloc): Likewise. - (struct tree_wrapper): Likewise. Also modify to have a pointer - to struct z_candidate rather than void. - (enum cp_tree_node_structure_enum): New. - (union lang_tree_node): New. - (cxx_mark_tree): Delete prototype. - (cp_tree_node_structure): New prototype. - (build_ptr_wrapper): Delete prototype. - (build_int_wrapper): Delete prototype. - (build_zc_wrapper): New prototype. - * decl.c: Include debug.h - (cxx_mark_tree): Delete. - (cp_tree_node_structure): New. - * tree.c (build_ptr_wrapper): Delete. - (build_int_wrapper): Delete. - (build_zc_wrapper): New. - - * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK): - Correct typo. Patch from k_fukui@highway.ne.jp. - - * semantics.c (current_stmt_tree): Update for change to - struct language_function. - (finish_mem_initializers): Likewise. - * decl.c (cxx_init_decl_processing): Don't set mark_lang_status. - * cp-tree.h (struct language_function): Rename from - cp_language_function. Change all uses. - (cp_function_chain): Don't need to cast. - - * class.c (duplicate_tag_error): Reset discriminator. - (check_bases_and_members): Update for data structure changes. - * cp-tree.h (struct lang_id2): Use gengtype. - (flagged_type_tree): Likewise. - (SET_LANG_ID): Use GGC on struct lang_id2. - (struct cp_language_function): Use gengtype. Remove field - 'x_vcalls_possible_p'. - (current_vcalls_possible_p): Delete. - (struct lang_type_header): New. - (struct lang_type_class): Rename from struct lang_type. Include - struct lang_type_header. - (struct lang_type_ptrmem): New. - (struct lang_type): New. - (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros. - (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros. - (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes. - (struct lang_decl_flags): Use gengtype. Add discriminators. - (struct lang_decl): Use gengtype. Add and use discriminators. - Update the macros that reference moved fields. - (LANG_DECL_U2_CHECK): New function. Use it when appropriate. - (SET_DECL_THUNK_P): Set discriminator too. - (clear_inline_text_obstack): Delete prototype. - (finish_inline_definitions): Delete prototype. - (mark_pending_inlines): Delete prototype. - (lang_check_failed): New prototype. - * decl.c (struct named_label_use_list): Use gengtype. - (struct named_label_list): Likewise. - (mark_binding_level): Delete. - (mark_named_label_lists): Delete. - (push_local_name): Set discriminator on DECL_LANG_SPECIFIC. - (cxx_init_decl_processing): Use generated marker routine. - (begin_destructor_body): Delete dead set to - current_vcalls_possible_p. - (mark_lang_function): Delete. - (mark_cp_function_context): Delete. - (lang_mark_tree): Use generated marker routines. - * decl2.c (start_objects): Set discriminator when setting - GLOBAL_INIT_PRIORITY. - * lex.c (retrofit_lang_decl): Set discriminators. - (copy_lang_type): Update for changes to lang_type structure. - (cp_make_lang_type): Set discriminator. - * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers. - * search.c: Include ggc.h. - * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it. - (finish_inline_definitions): Delete. - * spew.c (struct token): Use gengtype. - (struct token_chunk): New. - (struct unparsed_text): Use gengtype. Store tokens in chunks. - (struct feed): Use gengtype. - (feed_obstack): Delete. - (feed): Mark as GC root. - (pending_inlines): Mark as GC root. - (pending_inlines_tail): Likewise. - (processing_these_inlines): Likewise. - (token_obstack): Make static. - (first_token): Likewise. - (init_spew): Don't initialize deleted things; use gengtype for roots. - (clear_inline_text_obstack): Delete. - (feed_input): Use GC for struct feed. Update for changes to - struct unparsed_text. - (mark_pending_inlines): Delete. - (next_token): Rename from add_token. Change all callers. Update - for changes to struct unparsed_text. - (space_for_token): New. - (remove_last_token): New. - (alloc_unparsed_text): New. - (snarf_block): Take an unparsed_text. Update for changes to struct - unparsed_text. - (snarf_method): Update for changes to struct unparsed_text. - (snarf_defarg): Update for changes to struct unparsed_text. - * tree.c (lang_check_failed): New. - - * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h - gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules. - (cp/spew.o): Add dependency on gt-.h. - (cp/decl2.o): Add dependency on gt-.h. - (cp/call.o): Add dependency on gt-.h. - (cp/pt.o): Add dependency on gt-.h. - (cp/repo.o): Add dependency on gt-.h. - (cp/parse.o): Add dependency on gt-.h. - * call.c: Use gengtype for roots. - * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c - decl2.c parse.y pt.c repo.c spew.c. - * cp-tree.h: Use gengtype for roots. - (struct saved_scope): Use GGC, gengtype. - (cp_parse_init): Delete prototype. - (init_pt): Delete prototype. - * decl.c: Use gengtype for roots. - (mark_saved_scope): Delete. - (cxx_init_decl_processing): Don't call deleted initilisation - routines. - (signed_size_zero_node): Delete, unused. - * decl.h: Use gengtype for roots. - * decl2.c: Use gengtype for roots. - * lex.h: Use gengtype for roots. - * parse.y: Use gengtype for roots. - (cp_parse_init): Delete. - * pt.c: Use gengtype for roots. - (init_pt): Delete. - * repo.c: Use gengtype for roots. - * spew.c: Use gengtype for roots. - - * Make-lang.in: Allow for filename changes. Add gtype-cp.h. - (cp/decl.o): Add dependency on gtype-cp.h. - * decl.c: Remove use of add_deletable_root, use GTY marker instead. - Include gtype-cp.h. Allow for filename changes. - - * Make-lang.in (cp/gt-decl.h): Generate using gengtype. - (cp/decl.o): Add cp/gt-decl.h dependency. - * config-lang.in (gtfiles): New. - * tree.h: Rename struct binding_level to struct cp_binding_level. - * decl.c: Rename struct binding_level to struct cp_binding_level. - Include cp/gt-decl.h. - (struct cp_binding_level): Use gengtype. - (make_binding_level): Use GGC on struct cp_binding_level. - (mark_binding_level): Use gt_ggc_m_cp_binding_level. - (cxx_init_decl_processing): Mark free_binding_level as - deletable. - - * decl.c (mark_cp_function_context): Update calling sequence. - - * decl.c (start_function): Don't free 'struct - cp_language_function'. - (pop_cp_function_context): Likewise. - (save_function_data): Allocate it using GC. - * semantics.c (genrtl_start_function): Don't free 'struct - cp_language_function'. - -2002-05-31 Matthew Woodcraft - - * lang-specs.h: Use cpp_debug_options. - -2002-05-28 Zack Weinberg - - * mangle.c, tree.c: Include real.h. - * Make-lang.in: Update dependency lists. - -2002-05-25 Neil Booth - - * lex.c: Don't include c-lex.h. - * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. - -2002-05-23 Neil Booth - - * spew.c (yyungetc, snarf_block): Remove indent_level handling. - -2002-05-22 Richard Henderson - - * decl.c (obscure_complex_init): Check for VAR_DECL - before using DECL_THREAD_LOCAL. - -2002-05-22 Richard Henderson - - * decl.c (check_tag_decl): Handle RID_THREAD. - (obscure_complex_init): Reject run-time init of tls. - (grokvardecl, grokdeclarator): Handle RID_THREAD. - * lex.c (reswords): Add __thread. - (rid_to_yy): Map RID_THREAD to SCSPEC. - -2002-05-22 Neil Booth - - * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. - * cp-tree.h (cxx_post_options): Kill. - * cp-lex.c (cxx_post_options): Kill. - -2002-05-21 Richard Henderson - - * lex.c (rid_to_yy): Add RID_THREAD. - -2002-05-21 Alexandre Oliva - - * init.c (build_vec_init): Test for trivial copy-assignment when - copy-assigning arrays. - -2002-05-20 Andreas Jaeger - - * init.c (build_default_init): Remove unused variable. - -2002-05-20 Alexandre Oliva - - * call.c (any_strictly_viable): New. - (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs. - -2002-05-19 Kriang Lerdsuwanakij - - * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. - -2002-05-19 Kriang Lerdsuwanakij - - PR c++/186, DR 259 - * pt.c (do_decl_instantiation): Don't complain explicit - instantiation after explicit specialization. - (do_type_instantiation): Likewise. - -2002-05-19 Alexandre Oliva - - * cp-tree.h (complete_type_or_diagnostic): Changed prototype, - renamed from... - (complete_type_or_else): ... this. Redefined as macro. - (cxx_incomplete_type_diagnostic): Declare. - (cxx_incomplete_type_error): Define as macro. - * init.c (build_delete): Warn about incomplete types other than - void, and use the built-in operator delete for them. - * typeck.c (complete_type_or_diagnostic): Renamed from - complete_type_or_else. Added warn_only argument, passed to... - * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print - warnings or errors depending on new warn_only argument. Renamed - from... - (cxx_incomplete_type_error): ... this. New implementation in - terms of cxx_incomplete_type_diagnostic. - -2002-05-18 Jason Merrill - - PR c++/6611 - * decl2.c (import_export_decl): If we clear - DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. - -2002-05-15 Kriang Lerdsuwanakij - - PR c++/6620 - * pt.c (verify_class_unification): Don't check if PARM is template - parameter dependent. Simplify. - (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template - parameter dependent expression. - -2002-05-14 Jason Merrill - - * rtti.c (get_tinfo_decl): Don't call comdat_linkage. - Do set DECL_COMDAT. - (synthesize_tinfo_var): Take the public decl. - (create_real_tinfo_var): Likewise. Check DECL_COMDAT. - (emit_tinfo_decl): Adjust. Call import_export_decl. - * decl2.c (import_export_decl): Simplify tinfo decl handling. - -2002-05-14 Alexandre Oliva - - * cp-tree.h (struct lang_type): Added non_zero_init. - (CLASSTYPE_NON_ZERO_INIT_P): New macro. - (zero_init_p, force_store_init_value, build_forced_zero_init): Declare. - * class.c (check_field_decls): Test non_zero_init. - * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for - zero-to-NULL conversions. - * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a - type that needs zero-initialization without zeros. - (check_initializer_decl): Compute zero-initializer for types - that require a non-trivial one. - * init.c (build_forced_zero_init): New function. - (build_default_init): Use it. - * tree.c (zero_init_p): New function. - * typeck2.c (force_store_init_value): New function. - (process_init_constructor): Create non-trivial zero-initializers - for array members and class fields. - -2002-05-14 Neil Booth - - * lang-specs.h: Remove redundant -lang-c++. - -2002-05-13 Jason Merrill - - * class.c (build_vtbl_ref_1): Use fixed_type_or_null. - (fixed_type_or_null): See through reference vars. - (build_base_path): Vtable contents are constant. - * typeck.c (get_member_function_from_ptrfunc): Likewise. - -2002-05-12 Jason Merrill - - * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created - structs are safe. - -2002-05-09 Neil Booth - - * cp-tree.h (flag_ansi): Remove. - * decl2.c (flag_ansi): Remove. - (cxx_decode_option): Set flag_iso and flag_undef. - -2002-05-09 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Reorganize. - Use subtraction rather than a bitmask to get the index. - * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node. - - * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. - -2002-05-07 Neil Booth - - * Make-lang.in (decl2.o): Update. - * cp-tree.h (warn_multichar): Remove. - * decl2.c: Include c-common.h. - (warn_multichar): Remove. - -2002-05-03 Jason Merrill - - * tree.c (build_cplus_array_type): Only const and volatile get - special handling. - - * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. - -2002-04-30 Mark Mitchell - - ABI change, returning simple classes from functions. - * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if - TYPE_HAS_TRIVIAL_INIT_REF is false or - TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true. - -2002-04-30 Jason Merrill - - PR debug/6436 - * decl.c (grokdeclarator): Don't override TYPE_NAME of an - anonymous class with a typedef if there are attributes. - -2002-04-29 Paul Eggert - - * parse.y (nomods_initdcl0): Replace $3 with $$. - -2002-04-29 Jakub Jelinek - - PR c++/6477 - * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is - non-NULL first. - -2002-04-29 Mark Mitchell - - PR c++/6492 - * pt.c (tsubst_friend_class): If the friend has an explicit scope, - enter that scope before name lookup. - - PR c++/6486 - * method.c (do_build_copy_constructor): Avoid building - cv-qualified reference types. - -2002-04-29 Nathan Sidwell - - PR c++/5719 - * decl.c (grok_op_properties): Assignment ops don't have to return - by value. operator% should. - -2002-04-28 Franz Sirl - - PR c/6343 - * decl.c (duplicate_decls): Call merge_weak. - -2002-04-26 Richard Henderson - - * parse.y (malloced_yyss, malloced_yyvs): New. - (yyoverflow): Re-add. Set them. - (free_parser_stacks): New. - -2002-04-26 Mark Mitchell - - PR c++/6497 - * method.c (do_build_assign_ref): Pass a derivation to - build_method_call when calling base class assignment operators. - -2002-04-26 Richard Henderson - - * parse.y (yyoverflow): Revert. - -2002-04-26 Richard Henderson - - PR c/3581 - * parse.y (string): Remove. Update all uses to use STRING - instead, and not call combine_strings. - * rtti.c (tinfo_name): Use fix_string_type. - * semantics.c (finish_asm_stmt): Don't call combine_strings. - * spew.c (yylexstring): New. - (read_token): Use it. - -2002-04-25 Richard Henderson - - PR c/2161 - * parse.y (yyoverflow): New. - -2002-04-25 Jason Merrill - - PR c++/5607 - * search.c (check_final_overrider): No longer static. - * class.c (update_vtable_entry_for_fn): Call it. - * cp-tree.h: Adjust. - -2002-04-25 Neil Booth - - * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. - * cp-tree.h (cxx_set_yydebug): Die. - * lex.c (YYDEBUG): Get from c-lex.h. - (cxx_set_yydebug): Remove. - * parse.y: Include c-lex.h. - (YYDEBUG): Get from c-lex.h. - -2002-04-24 Mark Mitchell - - PR c++/6438. - * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs - void. - -2002-04-24 Neil Booth - - * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, - LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): - Redefine. - * cp-tree.h (cp_attribute_table): Rename. - * decl.c (lang_attribute_table): Remove declaration. - (cxx_init_decl_processing): Don't set it. - * tree.c (cp_attribute_table): Rename. - -2002-04-24 Jason Merrill - - PR c++/6331 - * method.c (do_build_copy_constructor): Use cp_build_qualified_type. - * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals. - The pedwarn for array assignment is now unconditional. - * tree.c (build_cplus_array_type_1): Still process simple array types - normally in templates. - - PR c++/6395 - * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i - stuff for comdats. - -2002-04-23 Jakub Jelinek - - * parse.y (check_class_key): Allow KEY to be union/enum/struct/class - node with attributes. - -2002-2-23 David O'Brien - - * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add. - Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given. - -2002-04-23 Mark Mitchell - - PR c++/6256: - * pt.c (tsubst_friend_class): Handle templates with explicit - nested names. - - PR c++/6331: - * typeck.c (merge_types): Remember the cv-qualification of pointer - types when merging them. - -2002-04-20 Neil Booth - - * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, - LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. - * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, - cxx_mark_function_context): New. - * decl.c (push_cp_function_context, pop_cp_function_context, - mark_cp_function_context): Rename for consistency. - (cxx_init_decl_processing): Don't set old hooks. - -2002-04-19 Neil Booth - - * call.c (convert_type_from_ellipsis): Rename, update. - * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. - * cp-tree.h (convert_type_from_ellipsis): Rename. - * decl.c (cxx_init_decl_processing): Don't set hook. - -2002-04-18 Neil Booth - - * call.c (build_new_method_call): Update. - * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. - * cp-tree.h (cxx_incomplete_type_error): New. - * decl.c (grokdeclarator, grokparms): Update. - * decl2.c (check_classfn): Update. - * pt.c (tsubst): Update. - * typeck.c (complete_type_or_else, expr_sizeof, - decay_conversion): Update. - * typeck2.c (incomplete_type_error): Rename. - (add_exception_specifier): Update. - -2002-04-18 Jason Merrill - - PR c++/5658 - * search.c (setup_class_bindings): A class template qualifies as a - type binding. - -2002-04-17 Jakub Jelinek - - PR c++/6316 - * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop - before expanding. - -2002-04-16 Mark Mitchell - - * init.c (begin_init_stmts): Remove commented out code. - (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. - * semantics.c (begin_gobal_stmt_expr): Adjust call to - expand_start_stmt_expr. - -2002-04-15 Mark Mitchell - - * decl.c (register_dtor_fn): Pass the address of dso_handle, not - dso_handle itself, to __cxa_atexit. - -2002-04-15 Gabriel Dos Reis - - * error.c (cxx_print_error_function): Adjust call to macros. - -2002-04-14 Jakub Jelinek - - * class.c (layout_virtual_bases): Do all dsize computation on trees. - -2002-04-14 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Don't do - gratuitious division and multiplication on - ptrmemfunc_vbit_in_delta targets. - -2002-04-12 Mark Mitchell - - PR c++/5373. - * semantics.c (finish_expr_stmt): Remember the type of the - expression before any conversions are performed. - -2002-04-12 Mark Mitchell - - PR c++/5189. - * call.c (add_template_candidate_real): Do not treat member - templates as copy constructors. - -2002-04-12 Mark Mitchell - - * decl.c (duplicate_decls): Do not copy the RTL for a variable - declaration if the old variable had an incomplete type and the new - variable does not. - (complete_vars): Do not call layout_decl for completed variables. - -2002-04-12 Richard Sandiford - - * decl.c (duplicate_decls): Don't try to unify an implicit typedef - with an explicit one. - (follow_tag_typedef): New. - (lookup_tag): Use it to extract the tag of an explicit typedef. - (xref_tag): Likewise. - -2002-04-11 Andrew Haley - - * typeck.c (type_after_usual_arithmetic_conversions): - If two types have the same variant, return immediately. - When two floating-point operands are the same precision: - convert to float if one of the operands is float; - if neither operand is one of the standard types, return the type - of the first operand. - -2002-04-10 Nathan Sidwell - - PR c++/5507 - * decl.c (make_typename_type): Remove implicit typenameness. - -2002-04-09 Jason Merrill - - PR optimization/6189 - * semantics.c (genrtl_start_function): Don't free - DECL_SAVED_FUNCTION_DATA for inline functions. - - * init.c (build_member_call): For now, don't convert to - intermediate base if it would cause an error. - -2002-04-08 Paolo Carlini - - * parse.y (namespace_qualifier, maybe_identifier, - begin_explicit_instantiation, end_explicit_instantiation, - apparent_template_type, .finish_template_type, - do_id, maybe_init, defarg_again, component_decl_1): - Add ending ';', in accordance with POSIX. - -2002-04-06 Mark Mitchell - - PR c++/5571 - * class.c (layout_class_type): Remember incomplete static - variables. - (finish_struct_1): Call complete_vars, not - hack_incomplete_structures. - * cp-tree.h (hack_incomplete_structures): Rename to ... - (complete_vars): ... this. - (struct saved_scope): Remove incomplete. - (namespace_scope_incomplete): Remove. - * decl.c (struct binding_level): Remove incomplete. - (incomplete_vars): New variable. - (mark_binding_level): Don't mark incomplete. - (print_binding_level): Don't print it. - (mark_saved_scope): Don't mark incomplete. - (pushdecl): Use maybe_register_incopmlete_var. - (cxx_init_decl_processing): Register incomplete_vars for GC. - (start_decl_1): Clarify error message. - (hack_incomplete_vars): Remove. - (maybe_register_incomplete_var): New function. - (complete_vars): Likewise. - -2002-04-06 Jason Merrill - - PR c++/4934 - * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is - set before checking it. - - PR c++/525 - * init.c (build_member_call): Use build_scoped_ref. - (resolve_offset_ref): Likewise. - * call.c (build_scoped_method_call): Likewise. - * tree.c (maybe_dummy_object): Kludge around current_class_type being - wrong. - * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm. - * cp-tree.h: Adjust. - - * init.c (push_base_cleanups): Just use build_scoped_method_call. - - PR c++/6179 - * method.c (implicitly_declare_fn): Pass unqualified type to - synthesize_exception_spec. - -2002-04-04 Neil Booth - - * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. - * cvt.c: Update comment. - * init.c (expand_cleanup_for_base): Update. - * semantics.c (finish_parenthesized_expr): Update. - * typeck.c (cp_truthvalue_conversion): Update. - -2002-04-04 Jason Merrill - - * semantics.c (finish_eh_cleanup): New fn. - * cp-tree.h: Add prototype. - * init.c (perform_member_init, expand_cleanup_for_base): Use - finish_eh_cleanup. - * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove. - * cp-tree.h: Remove references. - * decl.c (begin_constructor_body, end_constructor_body): Likewise. - * dump.c (cp_dump_tree): Likewise. - * pt.c (tsubst_expr): Likewise. - * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove. - (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT. - * tree.c (cp_statement_code_p): Likewise. - - * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup. - - PR c++/5636 - * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on - cleanup for nrv. - - PR c++/5104 - * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception - specifiers. - [METHOD_TYPE]: Use same code as FUNCTION_TYPE. - -2002-04-03 Richard Henderson - - * cp-lang.c (cxx_warn_unused_global_decl): New. - (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. - -2002-04-03 Neil Booth - - * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine. - * tree.c (init_tree): Don't set hook. - -2002-04-03 Roger Sayle - - PR c++/5998: - * decl.c (duplicate_decls): Don't mess with assembler names when - redeclaring builtin functions as static. - -2002-04-01 Neil Booth - - * call.c (build_addr_func): Update. - * class.c (resolve_address_of_overloaded_function): Update. - * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. - * cp-tree.h (cxx_mark_addressable): New. - * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. - * decl2.c (build_cleanup): Update. - * except.c (build_throw): Update. - * init.c (resolve_offset_ref): Update. - * pt.c (convert_nontype_argument): Update. - * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. - * typeck.c (decay_conversion, build_array_ref, build_unary_op, - unary_complex_lvalue): Update. - (mark_addressable): Rename. - -2002-04-01 Roger Sayle - - PR c++/5998: - * decl.c (duplicate_decls): Overwrite the RTL when (and only - when) overwriting a built-in function. Don't use COPY_DECL_RTL, - but follow the SET_DECL_RTL idiom used elsewhere in the function. - -2002-04-01 Neil Booth - - * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, - LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. - * decl.c (grokdeclarator): Update. - * mangle.c (write_integer_cst): Update. - * typeck.c (build_binary_op): Update. - -2002-03-31 Neil Booth - - * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. - * lex.c (cxx_init): Don't set hook. - -2002-03-31 Neil Booth - - * Make-lang.in (error.o): Update. - * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. - * cp-tree.h (struct diagnostic_context): Predeclare. - (cxx_print_error_function): New. - * error.c: Include langhooks-def.h. - (lang_print_error_function): Rename. Update. - (init_error): Don't set hook. - -2002-03-29 Neil Booth - - * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): - Redefine. - * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. - * decl.c (finish_enum): Similarly. - * error.c (dump_type): Similarly. - * lex.c (cxx_init): Similarly. - * mangle.c (write_builtin_type): Similarly. - * typeck.c (comptypes): Similarly. - -2002-03-28 Roger Sayle - - PR c++/5998: - * decl.c (cxx_init_decl_processing): Re-enable built-in functions - in the g++ front-end. - (duplicate_decl): Allow redefinition of anticipated built-ins. - Fix inlining problem by over-writing the old DECL_RTL. - (lookup_namespace_name): Fail to find an identifier in the - specified namespace if its still anticipated. - (builtin_function_1): New function split out from builtin_function - to create a builtin in the current namespace with given context. - (builtin_function): Call builtin_function_1 to define the - appropriate builtins in both the std and global namespaces. - (select_decl): Don't test for anticipated decls here. - (unqualified_namespace_lookup): Instead ignore them whilst - searching through scopes and namespaces. - * decl2.c (do_nonmember_using_decl): If a using declaration - specifies an anticipated built-in function, mark it as no longer - anticipated in that scope. - (ambiguous_decl): Avoid resolving to an anticipated decl. - * lex.c (do_scoped_id): Fail to find an identifier in the global - namespace if its still anticipated. - -2002-03-29 Neil Booth - - * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine. - * cp-tree.h (cp_make_lang_type): Rename. - * lex.c (cp_make_lang_type): Rename. - (make_aggr_type): Update. - * tree.c (init_tree): Don't set make_lang_type_fn. - -2002-03-29 Jakub Jelinek - - PR c++/6073 - * class.c (finish_struct_1): Update static field's DECL_MODE even - if its type is a variant of t. - -2002-03-27 Neil Booth - - * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. - * cp-tree.h (cxx_insert_default_attributes): New. - * decl.c (insert_default_attributes): Rename. - -2002-03-27 Mark Mitchell - - PR c++/4884 - * call.c (build_op_delete_call): Allow for the fact the placement - may be a COMPOUND_EXPR. - -2002-03-27 Neil Booth - - * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. - * cp-tree.h (init_cplus_expand): Remove. - (cxx_expand_expr): New. - * expr.c (cplus_expand_expr): Rename cxx_expand_expr, - fix prototype. - (init_cplus_expand): Remove. - * lex.c (cxx_init): Don't call init_cplus_expand. - -2002-03-26 Mark Mitchell - - PR c++/4884. - * init.c (build_new_1): Allow for the fact the result of - build_function_call may be a COMPOUND_EXPR. - -2002-03-26 Nathan Sidwell - - PR c++/5682 - * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better. - (dfs_skip_nonprimary_vbases_unmarkedp): Remove. - (dfs_skip_nonprimary_vbases_markedp): Remove. - * search.c (get_shared_vbase_if_not_primary): Remove. - (dfs_skip_nonprimary_vbases_unmarkedp): Remove. - (dfs_skip_nonprimary_vbases_markedp): Remove. - (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. - (dfs_marked_real_bases_queue_p): Likewise. - -2002-03-26 Neil Booth - - * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. - * cp-tree.h (cxx_mark_tree): New. - * decl.c (lang_mark_tree): Rename cxx_mark_tree. - -2002-03-25 Neil Booth - - * cp-tree.h (cxx_maybe_build_cleanup): New. - * decl.c (destroy_local_var, hack_incomplete_structures): Update. - (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. - * tree.c (build_target_expr): Update. - * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine. - -2002-03-24 Neil Booth - - * decl2.c (cxx_decode_option): Handle -E. - * lang-specs.h (default_compilers): Preprocess with cc1plus. - * lex.c (cxx_init): Exit quickly if c_common_init returns NULL. - -2002-03-23 Jakub Jelinek - - PR c++/6037 - * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. - -2002-03-23 Gabriel Dos Reis - - * error.c (dump_type): Be careful about implicit typenames. - -2002-03-21 Gabriel Dos Reis - - PR C++/3656 - * semantics.c (finish_base_specifier): Handle erronous base - classes. - -2002-03-22 Zack Weinberg - - * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test - REAL_IS_NOT_DOUBLE. - -2002-03-22 Jeff Knaggs - - * typeck.c (get_member_function_from_ptrfunc): Scale idx down to - an index into the vtable_entry array regardless of - TARGET_PTRMEMFUNC_VBIT_LOCATION. - -2002-03-21 Aldy Hernandez - - * tree.c (cp_cannot_inline_tree_fn): Same. - -2002-03-21 Neil Booth - - * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, - insert_block, getdecls, global_bindings_p): New. - -2002-03-20 Nathan Sidwell - - PR c++/4361 - * mangle.c (struct globals) Add internal_mangling_p member. - (write_template_param): Do internal mangling, if needed. - (mangle_conv_op_name_for_type): Request internal mangling. - -2002-03-20 Jason Merrill - - PR c++/2136 - * init.c (build_delete): Check access for a member op delete here. - * decl2.c (delete_sanity): Not here. - -2002-03-19 Jason Merrill - - PR c++/5118 - * class.c (get_vfield_name): Use the constructor_name. - -2002-03-20 Neil Booth - - * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. - * cp-tree.h (lang_printable_name): Rename. - * error.c (lang_decl_name): Use new hook. - * lex.c (cxx_init): Remove old hook. - * pt.c (tsubst_decl): Use new hook. - * tree.c (lang_printable_name): Rename. - -2002-03-18 Eric Botcazou - - PR c++/3882 - * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling... - (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer - only after recording the declaration. - -2002-03-18 Jason Merrill - - PR c++/2039 - * init.c (resolve_offset_ref): Hand off to build_component_ref. - - PR c++/4222, c++/5995 - * call.c (build_over_call): Fix empty class logic. - - PR c++/3870 - * cp-tree.h (struct saved_scope): Add last_parms field. - * decl.c (maybe_push_to_top_level): Save last_function_parms. - (pop_from_top_level): Restore it. - - PR c++/4377 - * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip - NON_LVALUE_EXPRs. - - PR c++/4003 - * pt.c (tsubst_friend_function): Use decl_namespace_context. - - PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch. - * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a - type with a nontrivial destructor. - -2002-03-17 Jason Merrill - - PR c++/4460 - * class.c (build_base_path): Virtual base layout is fixed in - in-charge [cd]tors. - -2002-03-17 Neil Booth - - * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. - * parse.y (yyparse): Remove macro. - -2002-03-17 Jason Merrill - - PR c++/5757 - * init.c (build_new_1): Pass the right pointer to op delete. - -2002-03-16 Nathan Sidwell - - PR c++/4361 - * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated - conversion operators go. - (struct lang_decl_flags): Add template_conv_p and unused - bitfields. - (DECL_TEMPLATE_CONV_FN_P): New macro. - * call.c (build_user_type_conversion_1): Don't check second type - conversion of overload set first. - * class.c (add_method): Make sure templated conversion operators - all end up on slot 2. - * lex.c (do_identifier): A conversion operator token might be - satisfied by a templated conversion operator. - * pt.c (check_explicit_specialization): Use - CLASSTYPE_FIRST_CONVERSION_SLOT. - (template_parm_this_level_p): New function. - (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P. - * search.c (lookup_fnfields_1): Template conversions will be on - the first slot. - * typeck.c (build_component_ref): Preserve the type of an - conversion operator name on the overload type. - (build_x_function_call): Retrieve the conversion operator name. - -2002-03-15 Richard Henderson - - * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. - -2002-03-15 Mark Mitchell - - * cp-tree.h (CLEANUP_DECL): Remove. - (CLEANUP_EXPR): Likewise. - * decl.c (destroy_local_var): Simplify. - (maybe_build_cleanup): Tidy. - * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT. - * semantics.c (cp_expand_stmt): Likewise. - * cp/tree.c (cp_statement_code_p): Likewise. - -2002-03-15 Jason Merrill - - PR c++/5857 - * decl.c (duplicate_decls): Use merge_types instead of common_type. - * typeck.c (common_type): Just hand off to - type_after_usual_arithmetic_conversions and - composite_pointer_type. - (merge_types): New fn. - (commonparms): Use it instead of common_type. - (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE. - (composite_pointer_type): Also handle attributes. - * cp-tree.h: Declare merge_types. - - * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT - variables. - * decl2.c (maybe_make_one_only): Also mark the decl as needed. - -2002-03-14 Richard Henderson - - * decl.c: Include c-pragma.h. - (start_decl, start_function): Invoke maybe_apply_pragma_weak. - * Make-lang.in: Update dependencies. - -2002-03-14 Jakub Jelinek - - PR c++/5908 - * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too. - * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING. - -2002-03-12 Richard Sandiford - - * mangle.c (write_builtin_type): Handle 128-bit integers even if - they are not a standard integer type. - -2002-03-12 Richard Sandiford - - * cp-tree.h (init_init_processing): Remove declaration. - * init.c (BI_header_type, init_init_processing): Remove old ABI stuff. - * decl.c (cxx_init_decl_processing): Don't call init_init_processing. - -2002-03-12 Kaveh R. Ghazi - - * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): - Define. - * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not - tree_code_length. - * lex.c (cplus_tree_code_type, cplus_tree_code_length, - cplus_tree_code_name): Delete. - (cxx_init): Don't call add_c_tree_codes, instead set - lang_unsafe_for_reeval. Don't try to copy into the various - tree_code arrays. - -2002-03-12 Nathan Sidwell - - PR c++/5659 - * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here. - * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for - definitions. - -2002-03-11 Nathan Sidwell - - Revert 2001-03-26 Nathan Sidwell , - DR209 is now not a defect. - * cp-tree.h (skip_type_access_control): Remove. - * decl.c (grokdeclarator): Do type access control for friend - declarations. - * semantics.c (decl_type_access_control): Don't reset - current_type_lookups. - (save_type_access_control): Always save the lookups. - (skip_type_access_control): Remove. - (finish_class_definition): Don't change type_lookups. - -2002-03-11 Nathan Sidwell - - Revert 2000-12-01 Nathan Sidwell , - It is incorrect. - * typeck.c (build_static_cast): Compare non-qualified types - with pointer to member conversions. - -2002-03-11 Dan Nicolaescu - Daniel Berlin - - * cp-lang.c (ok_to_generate_alias_set_for_type): New function. - (cxx_get_alias_set): Use it. - -2002-03-10 Kaveh R. Ghazi - - * cp-tree.h (stabilize_expr): Prototype. - -2002-03-08 Craig Rodrigues - - * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of - conditional return void. - -2002-03-08 Neil Booth - - * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine. - * cp-tree.h (cxx_unsave): New. - * tree.c (cp_unsave): Rename cxx_unsave, update prototype. - (init_tree): Update. - -2002-03-03 Kaveh R. Ghazi - - * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of - explicit sizeof/sizeof. - * decl2.c (cxx_decode_option): Likewise. - * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise. - -2002-03-02 Nathan Sidwell - - PR c++/775 - * decl.c (lookup_tag): Only reject enum/class mismatch, not - class/union mismatch. - * parse.y (check_class_key): New function. - (structsp): Call it. - -2002-03-01 Michael Matz - - * typeck.c (cp_pointer_int_sum): Complete inner type which is - used later by size_in_bytes(). - -2002-03-01 Phil Edwards - - * cp-tree.h: Require __GNUC__ to be #defined. - (build_init): Add missing prototype. - -2002-03-01 Jason Merrill - - * except.c: Don't include decl.h or obstack.h. Do include - tree-inline.h. - (build_throw): Destroy temporaries from the thrown - expression before calling __cxa_throw. Construct a thrown - temporary directly into the exception object. - (stabilize_throw_expr): New function. - (wrap_cleanups_r): New function. - * tree.c (stabilize_expr): New function. - * init.c (build_init): New function. - * Make-lang.in (cp/except.o): Adjust .h deps. - -2002-02-28 Jason Merrill - - * search.c (lookup_base_r): Don't clear is_non_public just because - we found a friendly scope. - - * decl.c (finish_function): Only warn about missing return - statement with -Wreturn-type. - -2002-02-28 Neil Booth - - * class.c (build_clone): Update. - * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. - * cp-tree.h (cxx_dup_lang_specific_decl): New. - * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl. - (copy_decl): Update. - * method.c (make_thunk): Update. - -2002-02-27 Zack Weinberg - - * decl2.c: Delete traditional-mode-related code copied from - the C front end but not used, or used only to permit the - compiler to link. - -2002-02-24 Craig Rodrigues - - PR c++/4093 - * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition - to void. - -2002-02-22 Jakub Jelinek - - PR other/5746 - * semantics.c (finish_switch_cond): Don't call get_unwidened - if error_mark_node. - -2002-02-22 Nathan Sidwell - - PR c++/2645, DR 295 - * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, - tf_keep_type_decl. - (make_typename_type): Use tsubst_flags_t. - * decl.c (make_typename_type): Adjust. Return non-artificial - TYPE_DECLs, if required. - (grokdeclarator): Simplify CVR qualification handling. Allow bad - qualifiers on typedef types. - * decl2.c (handle_class_head): Adjust make_typename_type call. - * parse.y (nested_name_specifier): Likewise. - (typename_sub0): Likewise. - (typename_sub1): Likewise. - * pt.c (convert_template_argument): Adjust make_typename_type - return value. - (tsubst): Adjust cp_build_qualified_type_real calls. - (check_cv_quals_for_unify): Cope with allowing bad qualifications - on template type parms. - (instantiate_decl): Recheck substitutions to give warnings on bad - qualifications. - * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. - -2002-02-21 Aldy Hernandez - - * cp/decl.c (duplicate_decls): Merge always_inline attribute. - - * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 - unless DECL_ALWAYS_INLINE. - -2002-02-20 Jakub Jelinek - - * typeck.c (cp_pointer_int_sum): Renamed from - pointer_int_sum, call pointer_int_sum. - -2002-02-20 Jakub Jelinek - - * decl.c (duplicate_decls): Return 0 if issued error about - redeclaration. - -2002-02-19 Jason Merrill - - ABI change: Mangle `void (A::*)() const' as - M1AKFvvE, not MK1AFvvE. - * mangle.c (write_function_type): Write cv-quals for member - function type here. - (write_pointer_to_member_type): Not here. - -2002-02-18 Jason Merrill - - * pt.c (do_type_instantiation): Don't pedwarn if in_system_header. - (do_decl_instantiation): Likewise. - -2002-02-17 Craig Rodrigues - - PR c++/5685 - * decl.c (duplicate_decls): Make warning unconditional - if duplicate default argument declarations are present. - -2002-02-17 Jakub Jelinek - - * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit - shortening. - -2002-02-15 Nathan Sidwell - - * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs, - remove incorrect comment. Move #if 0'd code to common path. Use - IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication. - -2002-02-13 Jason Merrill - - * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. - (finish_function): Don't warn if current_function_returns_null. - - * typeck2.c (digest_init): Do handle values of vector type. - - * typeck2.c (digest_init, process_init_constructor): Treat vectors - like arrays. - -2002-02-11 Jason Merrill - - * parse.y (reserved_declspecs): Don't handle attributes. - (reserved_typespecquals): Handle them here. - * Make-lang.in (parse.c): Adjust expected conflicts. - -2002-02-08 Jakub Jelinek - - * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr - instead of compstmt. - (compstmt_or_stmtexpr): Renamed from compstmt. - (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. - -2002-02-07 Nathan Sidwell - - Rename instantiate_type_flags to tsubst_flags_t & expand use. - * cp-tree.h (instantiate_type_flags): Rename to ... - (tsubst_flags_t): ... here. Rename itf_complain to tf_error, - add tf_warning flag. - (instantiate_type): Adjust prototype. - (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, - do_type_instantiation, cp_build_qualified_type_real): Likewise. - cp_build_qualified_type: Adjust. - * class.c (instantiate_type): Adjust parameter. Rename itf_* to - tf_*. - * call.c (standard_conversion): Rename itf_* to tf_*. - (reference_binding): Likewise. - (convert_like_real): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_reference): Likewise. - * decl.c (lookup_namespace_name): Use tf_* flags. - (make_typename_type): Likewise. - (grokdeclarator): Likewise. - * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. - (coerce_template_template_parms, convert_template_argument, - coerce_template_parms, maybe_get_template_decl_from_type_decl, - lookup_template_class, tsubst_friend_function, tsubst_friend_class, - instantiate_class_template, tsubst_template_arg_vector, - tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, - tsubst_decl, tsubst_arg_types, tsubst_function_type, - tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, - instantiate_template, fn_type_unification, - resolve_overloaded_unification, verify_class_unification, - unify, get_bindings_real, do_type_instantiation, - regenerate_decl_from_template, instantiate_decl, - tsubst_initializer_list, tsubst_enum, - get_mostly_instantiated_function_type, - invalid_nontype_parm_type_p): Likewise. - * tree.c (cp_build_qualified_type_real): Likewise. - * typeck.c (build_binary_op): Rename itf_* to tf_*. - (build_ptrmemfunc): Likewise. - (convert_for_assignment): Likewise. - -2002-02-07 Nathan Sidwell - - PR c++/109 - * decl.c (grokdeclarator): Allow friend declarations from - dependent types. - * decl2.c (handle_class_head): Don't push into template parm contexts. - * pt.c (push_template_decl_real): Template parm contexts are never - being defined. - -2002-02-05 Alexandre Oliva - - * class.c: Include target.h. - (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, - BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS - bit-field layout. - * Make-lang.in: Adjust deps. - -2002-02-05 Jason Merrill - - * error.c (dump_type): Be more helpful about VECTOR_TYPE. - -2002-02-04 Jakub Jelinek - - * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. - (finish_switch_cond): Set SWITCH_TYPE. - -2002-02-04 Richard Henderson - - * method.c (use_thunk): Always initialize the block tree. Reindent. - * semantics.c (expand_body): Emit thunks after function, not before. - -2002-02-04 Jason Merrill - - * decl.c (start_function): Call cplus_decl_attributes immediately - after grokdeclarator. - - * decl.c (start_function): Combine DECL_RESULT handling code. - -2002-02-03 Jason Merrill - - * xref.c: Remove. - * Make-lang.in (CXX_OBJS): Remove cp/xref.o - (cp/xref.o): Remove dependencies. - * class.c (finish_struct_1, check_methods): Don't call xref fns. - (finish_struct_1): Likewise. - * friend.c (make_friend_class): Likewise. - * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. - * spew.c (read_process_identifier): Likewise. - -2002-02-01 Jason Merrill - - PR c++/4872 - * decl.c (finish_function): Warn about a non-void function with - no return statement and no abnormal exit. - * cp-tree.h (struct cp_language_function): Add returns_abnormally. - (current_function_returns_abnormally): New macro. - * call.c (build_call): Set it. - - * typeck.c (build_component_ref): Always complain about offsetof - constructs on non-PODs. Only make it an error for members of - virtual bases. - - * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. - (dump_function_decl): Always dump parms. - - * decl2.c (finish_static_data_member_decl): Complain about a local - class with a static data member. - - PR c++/4286 - * search.c (lookup_field_1): Don't xref a static data member - just because we looked it up. - -2002-01-31 Jason Merrill - - * Make-lang.in (parse.c): Handle .output file. - - PR c++/3395 - * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, - not TREE_TYPE. - * semantics.c (finish_class_definition): Adjust. - - Allow attributes in parms and casts. - * parse.y (named_parm): Don't strip attrs. - (declmods): Remove 'attributes' production. - (nonempty_cv_qualifiers): Accept attributes. - (ATTRIBUTE): Give precedence. - * decl.c (groktypename): Handle attributes. - (grokparms): Likewise. - -2002-01-29 Jakub Jelinek - - * decl2.c (cxx_decode_option): Pass 0 as last argument to - cpp_handle_option. - * lang-specs.h: Use cpp_unique_options instead of cpp_options - when used together with cc1_options. - -2002-01-29 Nathan Sidwell - - PR c++/5132 - * typeck2.c (digest_init): Make sure non-array core type is - instantiated. - * decl2.c (reparse_absdcl_as_casts): Just store the type in the - constructor, rather than build a new one. - (build_expr_from_tree, CONSTRUCTOR case): Be careful with the - PURPOSE of constructor elts. - -2002-01-23 Zack Weinberg - - * Make-lang.in (parse.c): Adjust expected number of - shift-reduce conflicts. - (decl.o): Depend on diagnostic.h. - * decl.c: Include diagnostic.h. - (grokdeclarator): Check for null pointer. - (finish_function): Don't abort when - current_binding_level->parm_flag != 1, if errors have - occurred; throw away the statement tree and extra binding - levels, and continue. - * lex.c (note_list_got_semicolon): Check for null pointer. - * method.c (hack_identifier): Just return error_mark_node if - value is error_mark_node. - * parse.y (primary: TYPEID(type_id)): No need to use - TYPE_MAIN_VARIANT here. - (handler_seq): Accept an empty list of catch clauses and - generate a fake handler block to avoid later crashes. - (ansi_raise_identifier): Accept the error token too. - * semantics.c (begin_class_definition, - finish_class_definition): Check for error_mark_node. - -2002-01-23 Zack Weinberg - - * typeck2.c (friendly_abort): Delete definition. - * cp-tree.h (friendly_abort): Don't prototype. - (my_friendly_assert): Use fancy_abort. - -2002-01-23 Craig Rodrigues - - * cp-tree.h (my_friendly_abort): Remove. - -2002-01-23 Jakub Jelinek - - * spew.c (pending_inlines, pending_inlines_tail, - processing_these_inlines): Make static. - (mark_pending_inlines): Remove static. - (begin_parsing_inclass_inline): If in function, save pi - for GC to cp_function_chain->unparsed_inlines instead. - (process_next_inline): Likewise. - * cp-tree.h (struct cp_language_function): Add unparsed_inlines. - (mark_pending_inlines): Add prototype. - * decl.c (spew_debug): Remove unused extern. - (mark_lang_function): Call mark_pending_inlines. - -2002-01-23 Craig Rodrigues - - * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, - init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, - semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: - Change my_fancy_abort() to abort(). - -2002-01-23 Jason Merrill - - PR c++/5453 - * class.c (fixed_type_or_null): Fix thinko. - - PR c++/3331 - * init.c (resolve_offset_ref): Use build_indirect_ref. - - * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. - -2002-01-22 Jason Merrill - - * parse.y (function_body): Suppress the block for the outermost - curly braces. - * decl.c (pushdecl): Don't try to skip it. - (begin_function_body): Keep the block we create, not the next one. - * init.c (emit_base_init): Don't mess with keep_next_level. - - * class.c (build_base_path): Tweak formatting. - -2002-01-19 Nathan Sidwell - - Fix regression introduced with patch for c++/775 - * parse.y (class_head_defn): Check for template specializations - with a different class-key. - -2002-01-17 Jason Merrill - - * decl.c (begin_constructor_body, begin_destructor_body): New fns. - (begin_function_body): Call them and keep_next_level. - * init.c (emit_base_init): Call keep_next_level. - * semantics.c (setup_vtbl_ptr): Lose. - * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. - (vtbls_set_up_p): Lose. - * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. - * method.c (do_build_copy_constructor): Likewise. - (synthesize_method): Call finish_mem_initializers. - * parse.y (nodecls): Likewise. - - * error.c (dump_type_suffix): Print the exception specs before - recursing. - (dump_function_decl): Here, too. - - * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. - -2002-01-10 Ira Ruben - - PR c++/907 - * decl.c (start_method): Handle attrlist. - -2002-01-10 Jakub Jelinek - - * decl2.c (max_tinst_depth): Increase default limit to 500. - -2002-01-10 Graham Stott - - * spew.c (YYCHAR): Uppercase macro parameter and add - parenthesis. - (YYCODE): Likewise. - (NAME): Uppercase macro parameter. - -2002-01-09 Graham Stott - - * decl.h (grokdeclarator): Wrap long line. - - * semantics.c (FINISH_COND): Uppercase macro paramaters and - add parenthesis. - -2002-01-08 Graham Stott - - * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis. - (PALLOC): Uppercase macro parameter and whitespace. - (SALLOC): Uppercase macro parameter. - (SFREE): Uppercase macros parameter, add parenthese and - whitespace. - (STREQL): Uppercase macro parameter and whitespace. - (STRNEQ): Likewise. - (STRLSS): Likewise. - (STRLEQ): Likewise. - (STRGTR): Likewise. - (STRGEQ): Likewise. - - * call.c (convert_like): Add parenthesis and wrap. - (convert_like_with_context): Likewise. - (ICS_RANK): Whitespace. - (NEED_TEMPORARY_P): Remove parenthesis. - - * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and - whitespace. - (VTT_MARKED_BINFO_P): Likewise. - - * decl.c (BINDING_LEVEL): Add parenthesis. - (DEF_OPERATOR): Likewise. - - * mangle.c (MANGLE_TRACE): Add parenthesis. - (MANGLE_TRACE_TREE): Likewise. - (write_signed_number): Likewise. - (write_unsigned_number): Likewise. - - * pt.c (ccat): Uppercase macro parameter. - (cat): Likewise - - * search.c (SET_BINFO_ACCESS): Add parenthesis. - -2002-01-07 Jason Merrill - - * decl2.c (coerce_new_type): Downgrade error for size_t mismatch - to pedwarn. - - PR c++/3536 - * method.c (make_thunk): If !flag_weak, give the thunk the - function's linkage. - (use_thunk): Here, too. - -2002-01-07 Graham Stott - - * error.c: Update copyright date. - (print_scope_operator): Add parenthesis. - (print_left_paren): Likewise. - (print_right_paren): Likewise. - (print_left_bracket): Likewise. - (print_right_bracket): Likewise. - (print_template_argument_list_start): Likewise. - (print_template_argument_list_end): Likewise. - (print_non_consecutive_character): Likewise. - (print_tree_identifier): Likewise. - (print_identifier): Likewise. - (NEXT_CODE): Uppercase macro parameter. - (ident_fndecl): Delete unused. - (GLOBAL_THING): Likewise. - -2002-01-06 Graham Stott - - * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. - (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise. - (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise. - (RECORD_OR_UNION_TYPE_CHECK): Likewise. - (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise. - (C_IS_RESERVED_WORD): Uppercase macro parameter. - (C_RID_YYCODE) Likewise. - (ptrmem_cst): Use rtx. - (LOCAL_BINDING_P): Add whitespace. - (INHERITED_VALUE_BINDING_P): Likewise. - (BINDING_SCOPE): Wrap long line. - (BINDING_HAS_LEVEL_P): Remove parenthesis. - (BINDING_VALUE): Wrap long line. - (BINDING_TYPE): Whitespace. - (IDENTIFIER_GLOBAL_VALUE): Add parenthesis. - (SET_IDENTIFIER_GLOBAL_VALUE): Likewise. - (IDENTIFIER_NAMESPACE_VALUE): Likewise. - (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise. - (same_type_p): Uppercase macro parameters. - (same_type_ignoring_top_level_qualifiers_p): Likewise. - (OVL_FUNCTION): Wrap long line. - (OVL_CHAIN): Whitespace. - (OVL_CURRENT): Add parenthesis and whitespace. - (OVL_NEXT): Whitespace. - (OVL_USED): Likewise. - (IDENTIFIER_TYPE_VALUE): Likewise. - (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis. - (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace. - (LANG_ID_FIELD): Whitespace. - (SET_LANG_ID(NODE,VALUE,NAME): Likewise. - (IDENTIFIER_LABEL_VALUE): Whitespace and wrap. - (SET_IDENTIFIER_LABEL_VALUE): Whitespace. - (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap. - (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace. - (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap. - (SET_IDENTIFIER_ERROR_LOCUS); Whitespace. - (IDENTIFIER_VIRTUAL_P): Likewise. - (IDENTIFIER_OPNAME_P): Likewise. - (IDENTIFIER_TYPENAME_P): Remove parenthesis. - (C_TYPE_FIELDS_READONLY): Uppercase macro parameters. - (C_SET_EXP_ORIGINAL_CODE): Likewise. - (TYPE_ASSEMBLER_NAME_STRING): Wrap long line. - (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. - (IS_AGGR_TYPE): Uppercase macro parameter. - (CLASS_TYPE_P): Likewise. - (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis. - (IS_AGGR_TYPE_2): Whitespace. - (TAGGED_TYPE_P): Uppercase macro parameter. - (TYPE_BUILT_IN): Whitespace. - (TYPE_FOR_JAVA): Likewise. - (FUNCTION_ARG_CHAIN): Remove parenthesis. - (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis. - (FUNCTION_FIRST_USER_PARAM): Likewise. - (PROMOTES_TO_AGGR_TYPE): Whitespace. - (DERIVED_FROM_P): Add parenthesis and wrap. - (UNIQUELY_DERIVED_FROM_P): Likewise. - (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise. - (PUBLICLY_UNIQUELY_DERIVED_P): Likewise. - (CLASSTYPE_USE_TEMPLATE): Whitespace. - (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis. - (TYPE_GETS_DELETE): Add parenthesis. - (TYPE_HAS_CONVERSION): Add parenthesis and wrap. - (TYPE_HAS_ASSIGN_REF): Likewise, - (TYPE_HAS_CONST_ASSIGN_REF): Likewise. - (TYPE_HAS_INIT_REF): Likewise. - (TYPE_HAS_CONST_INIT_REF): Likewise. - (TYPE_BEING_DEFINED): Likewise. - (TYPE_LANG_SPECIFIC): Likewise. - (CLASSTYPE_RTTI): Likewise. - (TYPE_OVERLOADS_CALL_EXPR): Likewise. - (TYPE_OVERLOADS_ARRAY_REF): Likewise. - (TYPE_OVERLOADS_ARROW): Likewise. - (TYPE_USES_MULTIPLE_INHERITANCE): Likewise. - (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis. - (CLASSTYPE_METHOD_VEC): Likewise. - (CLASSTYPE_MARKED_N): Likewise. - (CLASSTYPE_MARKED): Likewise. - (CLASSTYPE_MARKED2): Likewise. - (CLASSTYPE_MARKED3): Likewise. - (CLASSTYPE_MARKED4): Likewise. - (CLASSTYPE_MARKED5): Likewise. - (CLASSTYPE_MARKED6): Likewise. - (SET_CLASSTYPE_MARKED): Whitespace. - (CLEAR_CLASSTYPE_MARKED): Likewise. - (SET_CLASSTYPE_MARKED2): Likewise. - (CLEAR_CLASSTYPE_MARKED2): Likewise. - (SET_CLASSTYPE_MARKED3): Likewise. - (CLEAR_CLASSTYPE_MARKED3): Likewise. - (SET_CLASSTYPE_MARKED4): Likewise. - (CLEAR_CLASSTYPE_MARKED4): Likewise. - (SET_CLASSTYPE_MARKED5): Likewise. - (CLEAR_CLASSTYPE_MARKED5): Likewise. - (SET_CLASSTYPE_MARKED6): Likewise. - (CLEAR_CLASSTYPE_MARKED6): Likewise. - (CLASSTYPE_TAGS): Likewise. - (CLASSTYPE_VSIZE): Likewise. - (CLASSTYPE_VBASECLASSES): Likewise. - (CANONICAL_BINFO): Add parenthesis. - (CLASSTYPE_SIZE(NODE): Likewise. - (CLASSTYPE_SIZE_UNIT): Likewise. - (CLASSTYPE_ALIGN(NODE): Likewise. - (CLASSTYPE_USER_ALIGN): Likewise. - (TYPE_JAVA_INTERFACE): Likewise. - (CLASSTYPE_PURE_VIRTUALS): Likewise. - (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap. - (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. - (CLASSTYPE_HAS_MUTABLE): Likewise. - (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise. - (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap. - (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise. - (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise. - (CLASSTYPE_INTERFACE_ONLY): Likewise. - (CLASSTYPE_INTERFACE_KNOWN): Likewise. - (CLASSTYPE_INTERFACE_UNKNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. - (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap. - (BINFO_UNSHARED_MARKED): Whitespace. - (BINFO_MARKED): Whitespace and wrap. - (SET_BINFO_MARKED): Likewise. - (CLEAR_BINFO_MARKED): Likewise. - (BINFO_VTABLE_PATH_MARKED): Likewise. - (SET_BINFO_VTABLE_PATH_MARKED): Likewise. - (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise. - (BINFO_SUBVTT_INDEX): Remove parenthesis. - (BINFO_VPTR_INDEX): Likewise. - (BINFO_PRIMARY_BASE_OF): Likewise, - (CLASSTYPE_VFIELDS): Whitespace. - (VF_DERIVED_VALUE): Wrap long line. - (NAMESPACE_LEVEL): Whitespace. - (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis. - (DEFARG_POINTER): Whitespace. - (DECL_NEEDED_P): Remove parenthesis. - (DECL_LANGUAGE): Whitespace. - (SET_DECL_LANGUAGE): Add parenthesis. - (DECL_CONSTRUCTOR_P): Whitespace and wrap. - (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis. - (DECL_IN_AGGR_P): Whitespace. - (DECL_FRIEND_P): Likewise. - (DECL_BEFRIENDING_CLASSES): Likewise. - (DECL_STATIC_FUNCTION_P): Whitespace and wrap. - (DECL_NONCONVERTING_P): Whitespace. - (DECL_PURE_VIRTUAL_P): Likewise. - (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise. - (DECL_PENDING_INLINE_INFO): Whitespace. - (DECL_SORTED_FIELDS): Likewise. - (DECL_DEFERRED_FN): Likewise. - (DECL_TEMPLATE_INFO): Likewise. - (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise. - (SET_TYPE_TEMPLATE_INFO): Add parenthesis. - (TMPL_ARGS_LEVEL): Likewise. - (SET_TMPL_ARGS_LEVEL): Likewise. - (INNERMOST_TEMPLATE_PARMS): Whitespace. - (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter. - (INTEGRAL_CODE_P(CODE): Add parenthesis. - (CP_INTEGRAL_TYPE_P): Remove parenthesis. - (TYPE_HAS_CONSTRUCTOR): Whitespace. - (TREE_HAS_CONSTRUCTOR): Likewise. - (TYPE_HAS_DESTRUCTOR): Likewise. - (TYPE_HAS_REAL_ASSIGN_REF): Likewise. - (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise. - (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. - (TYPE_HAS_COMPLEX_INIT_REF): Likewise. - (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. - (TYPE_PTRMEMFUNC_P): Likewise. - (TYPE_PTRMEMFUNC_FLAG): Likewise. - (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. - (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. - (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. - (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. - (DECL_ACCESS): Whitespace. - (DECL_GLOBAL_CTOR_P): Remove parenthesis. - (DECL_GLOBAL_DTOR_P): Likewise. - (GLOBAL_INIT_PRIORITY): Likewise. - (DECL_TEMPLATE_PARMS): Likewise. - (DECL_TEMPLATE_RESULT): Likewise. - (DECL_TEMPLATE_INSTANTIATIONS): Likewise. - (DECL_TEMPLATE_SPECIALIZATIONS): Likewise. - (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis. - (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. - (PRIMARY_TEMPLATE_P): Add parenthesis. - (DECL_USE_TEMPLATE): Whitespace. - (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. - (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. - (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. - (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. - (CALL_DECLARATOR_PARMS): Remove parenthesis. - (CALL_DECLARATOR_QUALS): Likewise. - (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. - (TEMP_NAME_P): Wrap. - (VFIELD_NAME_P): Likewise. - (B_SET): Uppercase macro parameters and add parenthesis. - (B_CLR): Likewise. - (B_TST): Likewise. - (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters. - (LOOKUP_TYPES_ONLY): Uppercase macro parameters. - (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters. - (same_or_base_type_p): Likewise. - (cp_deprecated): Likewise. - -2002-01-05 Richard Henderson - - * semantics.c (expand_body): Revert last change. - -2002-01-04 Jason Merrill - - PR c++/4122 - * class.c (update_vtable_entry_for_fn): Set delta to zero for a - lost primary. - - * class.c (build_vtbl_initializer): Check for a lost primary - before calculating the vtable entry to throw away. - -2002-01-02 Jason Merrill - - * semantics.c (expand_body): Call outlining_inline_function when - emitting an inline function out of line. - -2002-01-02 Nathan Sidwell - - PR c++/5116, c++/764 reversion - * call.c (build_new_op): Revert the instantiations. They are - incorrect. - -2002-01-02 Nathan Sidwell - - PR c++/5089 - * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void. - -2002-01-02 Nathan Sidwell - - PR c++/3716 - * pt.c (tsubst_aggr_type): Move pmf handling into tsubst. - (tsubst, case POINTER_TYPE): Handle pmfs here. - (tsubst, case OFFSET_TYPE): Check it is not an offset to - reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE. - -2002-01-02 Nathan Sidwell - - PR c++/35 - * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too. - (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too. - * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the - PARM_DECL. - (tsubst_template_parms): Break up loop statements. - (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template - parm PARM_DECLs don't get promoted. - -2002-01-02 Nathan Sidwell - - PR c++/5123 - * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR. - (build_x_function_call): Cope with a COMPONENT_REF containing a - TEMPLATE_ID_EXPR. - -2002-01-02 Nathan Sidwell - - PR c++/5213 - * pt.c (convert_template_argument): Be more careful determining - when RECORD_TYPE templates are or are not templates. - -2002-01-02 Nathan Sidwell - - PR c++/775 - * cp-tree.h (handle_class_head): Adjust prototype. - * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P - parameters. Use for all class heads. - * parse.y (named_class_head_sans_basetype, named_class_head, - named_complex_class_head_sans_basetype, - named_class_head_sans_basetype_defn, - unnamed_class_head): Remove. - (class_head, class_head_apparent_template): Recognize class heads - (class_head_decl, class_head_defn): New reductions. Process class - heads. - (structsp): Adjust class definition and class declaration - reductions. - (maybe_base_class_list): Give diagnostic on empty list. - -2002-01-02 Nathan Sidwell - - PR c++/4379 - * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a - single non-static member. - (unary_complex_lvalue): If it cannot be a pointer to member, don't - make it so. Check it is not pointer to reference. - -2002-01-02 Nathan Sidwell - - PR c++/5132 - * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we - are processing a template decl. - -2002-01-02 Nathan Sidwell - - PR c++/5116, c++/764 - * call.c (build_new_op): Make sure template class operands are - instantiated. Simplify arglist construction. - -2001-12-29 Nathan Sidwell - - * call.c (build_user_type_conversion_1): Use my_friendly_assert - rather than if ... abort. - * cvt.c (convert_to_reference): Likewise. - * semantics.c (setup_vtbl_ptr): Likewise. - * pt.c (lookup_template_class): Comment typo. - -2001-12-29 Nathan Sidwell - - PR c++/5125 - * pt.c (push_template_decl_real): Make sure DECL has - DECL_LANG_SPECIFIC. - -2001-12-29 Nathan Sidwell - - PR c++/335 - * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer - for non-reference fields. - * typeck.c (require_complete_type): Use resolve_offset_ref). - -2001-12-26 Nathan Sidwell - - PR c++/196 - * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF. - -2001-12-24 Nathan Sidwell - - PR c++/160 - * typeck.c (build_modify_expr): Remove old unreachable code & tidy - up. Don't stabilize_references when initializing a reference. - -2001-12-23 Kaveh R. Ghazi - - * decl2.c (lang_f_options): Const-ify. - -2001-12-20 Joseph S. Myers - - * config-lang.in (diff_excludes): Remove. - -2001-12-19 Nathan Sidwell - - PR c++/90 - * typeck.c (build_function_call_real): Use original function - expression for errors. - -2001-12-18 Jason Merrill - - PR c++/3242 - * class.c (add_method): Do compare 'this' quals when trying to match a - used function. Don't defer to another used function. - -2001-12-18 Nathan Sidwell - - * pt.c (instantiate_clone): Remove, fold into ... - (instantiate_template): ... here. Simplify by removing mutual - recursion. - * typeck2.c (build_m_component_ref): Don't cv qualify the function - pointed to by a pointer to function. - * class.c (delete_duplicate_fields_1): Typo. - -2001-12-18 Jason Merrill - - C++ ABI change: destroy value arguments in caller. - * semantics.c (genrtl_start_function, genrtl_finish_function): Don't - create an extra binding level for the parameters. - * decl.c (store_parm_decls): Don't do parameter cleanups. - -2001-12-18 Nathan Sidwell - - * call.c (build_new_method_call): Use '%#V'. - * error.c (cv_to_string): Use V parameter to determine padding. - -2001-12-18 Joseph S. Myers - - * call.c, decl2.c, init.c: Use "built-in" and "bit-field" - spellings in messages. - -2001-12-17 Zack Weinberg - - * cp-tree.h: Delete #defines for cp_error, cp_warning, - cp_pedwarn, and cp_compiler_error. - * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c, - except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c, - rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, - typeck2.c: Change calls to the above macros to use their - language-independent equivalents: error, warning, pedwarn, and - internal_error respectively. - -2001-12-16 Neil Booth - - * decl2.c (finish_file): Remove back_end_hook. - -2001-12-16 Joseph S. Myers - - * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c, - cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c, - pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors. - -2001-12-15 Joseph S. Myers - - * lang-options.h: Use American spelling in messages. - -2001-12-13 Jason Merrill - - * Make-lang.in (parse.h): Separate rule, just depend on parse.c. - - Use cleanups to run base and member destructors. - * init.c (push_base_cleanups): New function, split out from... - (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code. - * decl.c (finish_destructor_body): Move vbase destruction code to - push_base_cleanups. - (begin_function_body, finish_function_body): New fns. - (finish_function): Move [cd]tor handling and call_poplevel to - finish_function_body. - (pushdecl): Skip the new level. - * semantics.c (genrtl_try_block): Don't call end_protect_partials. - (setup_vtbl_ptr): Call push_base_cleanups. - * method.c (synthesize_method): Call {begin,end}_function_body. - * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK. - * cp-tree.h: Declare new fns. - * parse.y (function_body, .begin_function_body): New nonterminals. - (fndef, pending_inline, function_try_block): Use function_body. - (ctor_initializer_opt, function_try_block): No longer has a value. - (base_init): Remove .set_base_init token. - (.set_base_init, compstmt_or_error): Remove. - * Make-lang.in (parse.c): Expect two fewer s/r conflicts. - - * optimize.c (maybe_clone_body): Fix parameter updating. - -2001-12-12 Jason Merrill - - * decl.c (store_parm_decls): Remove parms_have_cleanups cruft. - * semantics.c (genrtl_start_function): Don't pass - parms_have_cleanups or push an extra binding level. - (genrtl_finish_function): Lose cleanup_label cruft. - - * cp-tree.h (struct cp_language_function): Remove x_ctor_label. - (ctor_label): Remove. - * semantics.c (finish_return_stmt): Lose ctor_label support. - * decl.c (finish_constructor_body, mark_lang_function): Likewise. - * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not - dtor_label. - - * call.c (build_new_method_call): Let resolves_to_fixed_type_p - check for [cd]tors. - * class.c (fixed_type_or_null, case INDIRECT_REF): Fix. - - * decl.c (finish_function): Check VMS_TARGET, not VMS. - - * decl.c (start_cleanup_fn): Remove redundant pushlevel. - (end_cleanup_fn): And poplevel. - - * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER - if we're in a template. - -2001-12-12 Jakub Jelinek - - * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P, - ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT, - THIS_NAME_P): Delete. - * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P, - THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash - with internal naming scheme. - * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use. - -2001-12-12 Nathan Sidwell - - * decl.c (grokdeclarator): Deprecated implicit typename use. - -2001-12-11 Nathan Sidwell - - PR g++/51 - * parse.y (frob_specs): Indicate it is a language linkage which - contained the extern. - * decl.c (grokdeclarator): Allow extern language linkage with - other specifiers. - -2001-12-10 Nathan Sidwell - - PR g++/72 - * decl.c (add_binding): Don't reject duplicate typedefs involving - template parameters. - -2001-12-10 Neil Booth - - * parse.y, semantics.c: Similarly. - -2001-12-09 Nathan Sidwell - - PR g++/87 - * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p. - (copy_args_p): Rename to ... - (copy_fn_p): ... here. - (grok_special_member_properties): New function. - (grok_op_properties): Lose VIRTUALP parameter. - (copy_assignment_arg_p): Remove. - * call.c (build_over_call): Use copy_fn_p. - * decl.c (grokfndecl): Reformat. Adjust call to - grok_op_properties. - (copy_args_p): Rename to ... - (copy_fn_p): ... here. Reject template functions. Check for pass - by value. - (grok_special_member_properties): Remember special functions. - (grok_ctor_properties): Don't remember them here, just check. - (grok_op_properties): Likewise. - (start_method): Call grok_special_member_properties. - * decl2.c (grokfield): Likewise. - (copy_assignment_arg_p): Remove. - (grok_function_init): Don't remember abstract assignment here. - * pt.c (instantiate_class_template): Call - grok_special_member_properties. - (tsubst_decl): Adjust grok_op_properties call. - -2001-12-08 Aldy Hernandez - - * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and - RID_TYPES_COMPATIBLE_P. - -2001-12-08 John David Anglin - - * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in - call to build_aggr_init. - * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND. - -2001-12-08 Neil Booth - - * parse.y: Replace uses of the string non-terminal with STRING. - Don't perform string concatentaion here. - (string): Remove non-terminal. - * semantics.c (finish_asm_stmt): Don't concatenate strings here. - -2001-12-05 Jason Merrill - - * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. - (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. - * tree.c (cp_start_inlining, cp_end_inlining): New fns. - * pt.c (push_tinst_level): No longer static. - * cp-tree.h: Declare them. - - * init.c (resolve_offset_ref): Don't check access for the base - conversion to access a FIELD_DECL. - - * cp-tree.h (TYPE_REFFN_P): New macro. - * decl.c (bad_specifiers): Check it, too. - - * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY - on the __*_type_info type if we haven't seen a definition. - -2001-12-05 Neil Booth - - * decl.c: Include c-common.h. - (shadow_warning): Move to c-common.c. - -2001-12-05 Richard Kenner - - * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE. - -2001-12-04 Nathan Sidwell - - * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm. - -2001-12-04 Nathan Sidwell - - PR g++/164 - * init.c (sort_base_init): Allow binfos to be directly specified. - * method.c (do_build_copy_constructor): Explicitly convert to the - base instance. - (do_build_assign_ref): Likewise. - -2001-12-03 Hans-Peter Nilsson - - * decl.c (xref_basetypes): Don't use C99 construct in tag_code - declaration and initialization. - -2001-12-03 Neil Booth - - * typeck2.c: Remove leading capital from diagnostic messages, as - per GNU coding standards. - -2001-12-03 Mumit Khan - - PR c++/3394 - * decl.c (xref_basetypes): Handle attributes between - 'class' and name. - -2001-12-03 Nathan Sidwell - - PR g++/3381 - * parse.y (named_complex_class_head_sans_basetype): Add new - reduction. - * Make-lang.in (parse.c): Adjust expected conflict count. - -2001-12-03 Jason Merrill - - * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the - immediate binfos for our virtual bases. - -2001-12-02 Neil Booth - - * call.c (build_java_interface_fn_ref): Similarly. - * except.c (is_admissible_throw_operand): Similarly. - * init.c (build_java_class_ref): Similarly. - * xref.c (open_xref_file): Similarly. - -2001-12-01 Neil Booth - - * class.c (finish_struct): Remove trailing periods from messages. - * decl.c (check_tag_decl): Similarly. - * lex.c (cxx_set_yydebug): Similarly. - * typeck2.c (friendly_abort): Similarly. - -2001-11-29 Mark Mitchell - - PR c++/3048 - * cp-tree.h (ovl_member): Remove. - * decl2.c (merge_functions): Handle extern "C" functions - specially. - * tree.c (ovl_member): Remove. - -2001-11-29 Mark Mitchell - - PR c++/4842 - * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a - FUNCTION_DECL, as input. - (mark_overriders): Remove. - (warn_hidden): Rework for the new ABI. - -2001-11-29 Mark Mitchell - - PR c++/3471 - * call.c (convert_like_real): Do not build additional temporaries - for rvalues of class type. - -2001-11-28 Nathan Sidwell - - * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base. - (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise. - (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise. - (DERIVED_FROM_P): Likewise. - (enum base_access): Renumber, add ba_quiet bit mask. - (get_binfo): Remove. - (get_base_distance): Remove. - (binfo_value): Remove. - (ACCESSIBLY_DERIVED_FROM_P): Remove. - * call.c (standard_conversion): Use lookup_base. - * class.c (strictly_overrides): Likewise. - (layout_virtual_bases): Likewise. - (warn_about_ambiguous_direct_bases): Likewise. - (is_base_of_enclosing_class): Likewise. - (add_vcall_offset_vtbl_entries_1): Likewise. - * cvt.c (build_up_reference): Adjust comment. - * init.c (build_member_call): Reformat. - * search.c (get_binfo): Remove. - (get_base_distance_recursive): Remove. - (get_base_distance): Remove. - (lookup_base_r): Tweak. - (lookup_base): Add ba_quiet control. Complete the types here. - (covariant_return_p): Use lookup_base. - * tree.c (binfo_value): Remove. - (maybe_dummy_object): Use lookup_base. - * typeck.c (build_static_cast): Use lookup_base. - (get_delta_difference): Likewise. - * typeck2.c (binfo_or_else): Use lookup_base. - (build_scoped_ref): Add back error_mark_check. - (build_m_component_ref): Use lookup_base. - -2001-11-29 Joseph S. Myers - - * Make-lang.in (c++.generated-manpages): New dummy target. - -2001-11-27 Richard Kenner - - * Make-lang.in (cp-lang.o): Depends on c-common.h. - * cp-lang.c (c-common.h): Include. - (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. - * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. - * expr.c (init_cplus_expand): Don't set lang_expand_constant. - -2001-11-26 Neil Booth - - * decl2.c (c_language): Move to c-common.c. - * lex.c (cxx_post_options, cxx_init_options): Use c-common.c - functions. - (cxx_init): Update. - -2001-11-26 Jason Merrill - - * call.c (joust): Remove COND_EXPR hack. - -2001-11-25 Aldy Hernandez - - * search.c (lookup_base_r): Declare bk in variable declaration - space. - -2001-11-25 Nathan Sidwell - - PR g++/3145 - * class.c (build_vbase_pointer): Remove. - (build_vbase_path): Remove. - (build_base_path): New function. - * cp-tree.h (base_access, base_kind): New enumerations. - (build_base_path): Declare. - (convert_pointer_to_real): Remove. - (convert_pointer_to): Remove. - (lookup_base): Declare. - (convert_pointer_to_vbase): Remove. - * call.c (build_scoped_method_call): Use lookup_base & - build_base_path instead of convert_pointer_to_real, - get_base_distance & get_binfo. - (build_over_call): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_pointer_force): Likewise. - (build_up_reference): Likewise. - (convert_pointer_to_real): Remove. - (convert_pointer_to): Remove. - * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path - instead of convert_pointer_to_vbase & build_vbase_path. - (emit_base_init): Use build_base_path instead of - convert_pointer_to_real. - (expand_virtual_init): Lose unrequired conversions. - (resolve_offset_ref): Use lookup_base and build_base_path - instead of convert_pointer_to. - * rtti.c (build_dynamic_cast_1): Use lookup_base & - build_base_path instead of get_base_distance & build_vbase_path. - * search.c (get_vbase_1): Remove. - (get_vbase): Remove. - (convert_pointer_to_vbase): Remove. - (lookup_base_r): New function. - (lookup_base): New function. - * typeck.c (require_complete_type): Use lookup_base & - build_base_path instead of convert_pointer_to. - (build_component_ref): Likewise. - (build_x_function_call): Likewise. - (get_member_function_from_ptrfunc): Likewise. - (build_component_addr): Likewise. - * typeck2.c (build_scoped_ref): Likewise. - -2001-11-22 Bryce McKinlay - - * cp-tree.h (CP_TYPE_QUALS): Removed. - * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree. - * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and - LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN. - * dump.c (cp_dump_tree): Use void* dump_info argument to match - lang-hooks prototype. - * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c, - rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to - CP_TYPE_QUALS changed to cp_type_quals. - * Make-lang.in: References to c-dump.h changed to tree-dump.h. - (CXX_C_OBJS): Remove c-dump.o. - -2001-11-21 Mark Mitchell - - PR c++/3637 - * pt.c (lookup_template_class): Ensure that all specializations - are registered on the list corresponding to the most general - template. - -2001-11-20 Mark Mitchell - - * call.c (non_reference): Add documentation. - (convert_class_to_reference): Do not strip reference types - from conversion operators. - (maybe_handle_ref_bind): Simplify. - (compare_ics): Correct handling of references. - -2001-11-19 John Wilkinson - - * dump.c (dump_op): New function. - (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use - dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs. - DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P, - -2001-11-19 Mark Mitchell - - PR4629 - * semantics.c (finish_sizeof): Make sure that expression created - while processing a template do not have a type. - (finish_alignof): Likewise. - * typeck.c (c_sizeof): Likewise. - (expr_sizeof): Likewise. - -2001-11-18 Neil Booth - - * lex.c (cxx_finish): Call c_common_finish. - (finish_parse): Remove. - -2001-11-17 Kriang Lerdsuwanakij - - * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE - when displaying error message about missing array bounds. - -2001-11-17 Kriang Lerdsuwanakij - - * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR, - CONST_CAST_EXPR. - * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR. - -2001-11-16 Neil Booth - - * cp-tree.h (print_class_statistics): Restore. - -2001-11-15 Jason Merrill - - * method.c (use_thunk): Don't emit debugging information for thunks. - - * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions. - * decl.c (make_typename_type): Handle getting a class template. - * search.c (lookup_field_r): A class template is good enough for - want_type. - - * call.c (convert_like_real): Only use cp_convert for the bad part. - (standard_conversion): Also allow bad int->enum. - * typeck.c (ptr_reasonably_similar): Also allow functions to - interconvert. Pointers to same-size integers are reasonably - similar. - - * cvt.c (convert_to_void): If we build a new COND_EXPR, always - give it void type. - -2001-11-15 Nathan Sidwell - - PR g++/3154 - * init.c (sort_base_init): Remove unreachable code. - (expand_member_init): Adjust comment to reflect reality. Simplify - and remove unreachable code. - -2001-11-15 Neil Booth - - * cp-tree.h (init_reswords, cxx_init_decl_processing): New. - (cxx_init): Update prototype. - * decl.c (init_decl_processing): Rename. Move null node init - to its creation time. - * lex.c (cxx_init_options): Update. - (cxx_init): Combine with old init_parse; also call - cxx_init_decl_processing. - -2001-11-14 Richard Sandiford - - * decl.c (check_initializer): Try to complete the type of an - array element before checking whether it's complete. Don't - complain about arrays with complete element types but an - unknown size. - (cp_finish_decl): Build the hierarchical constructor before - calling maybe_deduce_size_from_array_init. - -2001-11-14 Joseph S. Myers - - * Make-lang.in: Change all uses of $(manext) to $(man1ext). - -2001-11-13 Nathan Sidwell - - PR g++/4206 - * parse.y (already_scoped_stmt): Remove. - (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt. - -2001-11-12 H.J. Lu - - * cvt.c (ocp_convert): Don't warn the address of a weak - function is always `true'. - -2001-11-09 Neil Booth - - * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, - LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, - LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. - * cp-tree.h (print_class_statistics): Remove. - (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, - cxx_print_identifier, cxx_set_yydebug): New. - * lex.c (set_yydebug): Rename c_set_yydebug. - * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, - lang_print_xnode): Rename. - * tree.c (print_lang_statistics): Rename. - -2001-11-09 Kaveh R. Ghazi - - * class.c (dump_array): Fix format specifier warning. - -2001-11-09 Neil Booth - - * cp-lang.c (LANG_HOOKS_NAME): Override. - (struct lang_hooks): Constify. - * lex.c (cxx_init_options): Update. - (lang_identify): Remove. - * parse.y (language_string): Remove. - -2001-11-08 Andreas Franck - - * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME, - DEMANGLER_CROSS_NAME): Handle program_transform_name the way - suggested by autoconf. - (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define. - (c++.install-common): Use the transformed target alias names. - -2001-11-06 Neil Booth - - * Make-lang.in: Update. - * cp-lang.c: Include langhooks-def.h. - -2001-11-04 Kriang Lerdsuwanakij - - * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR. - -2001-11-03 Kaveh R. Ghazi - - * lex.c (copy_lang_type): Add static prototype. - -2001-11-02 Kriang Lerdsuwanakij - - * pt.c (unify): Handle SCOPE_REF. - -2001-11-01 Jakub Jelinek - - * tree.c (cp_copy_res_decl_for_inlining): Adjust - DECL_ABSTRACT_ORIGIN for the return variable. - -2001-10-31 Zack Weinberg - - * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. - -2001-10-28 Joseph S. Myers - - * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c, - semantics.c, spew.c: Fix spelling errors. - -2001-10-27 Kriang Lerdsuwanakij - - * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL. - -2001-10-25 Zack Weinberg - - * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to - pop_everything. - -2001-10-23 Richard Kenner - - * cp-lang.c (cxx_get_alias_set): New function. - Point LANG_HOOKS_GET_ALIAS_SET to it. - -2001-10-23 Kriang Lerdsuwanakij - - * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node. - * cp-tree.h (make_unbound_class_template): Prototype new function. - * decl.c (make_unbound_class_template): New function. - * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE. - * error.c (dump_type): Likewise. - * mangle.c (write_type): Likewise. - * parse.y (template_parm): Likewise. - (template_argument): Use make_unbound_class_template. - * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE. - (tsubst): Likewise. - (tsubst_copy): Likewise. - (unify): Likewise. - * tree.c (walk_tree): Likewise. - * typeck.c (comptypes): Likewise. - -2001-10-21 Kaveh R. Ghazi - - * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold - extra calls into fewer ones. - -2001-10-18 Alexandre Oliva - - * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE. - Warn when merging inline with attribute noinline. - (start_decl, start_function): Warn if inline and attribute - noinline appear in the same declaration. - -2001-10-16 H.J. Lu - - * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined - for tree checking disabled. - -2001-10-16 Hans-Peter Nilsson - - * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL && - NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME. - -2001-10-15 Richard Sandiford - - * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define. - (unify): Only handle MINUS_EXPR specially if the above flag is set - and the subtracted constant is 1. Clear the flag on recursive calls. - Set it when unifying the maximum value in an INTEGER_TYPE's range. - -2001-10-15 Richard Sandiford - - * decl.c (bad_specifiers): Don't allow exception specifications - on any typedefs. - -2001-10-14 Neil Booth - - * cp/lex.c (init_cp_pragma): Similarly. - -2001-10-13 Kriang Lerdsuwanakij - - * pt.c (lookup_template_class): Build complete template arguments - for BOUND_TEMPLATE_TEMPLATE_PARM. - -2001-10-12 Kriang Lerdsuwanakij - - * cp-tree.h (TYPE_BINFO): Update comment. - (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info. - (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS. - (copy_type): Prototype new function. - * lex.c (copy_lang_decl): Gather tree node statistics. - (copy_lang_type): New function. - (copy_type): Likewise. - (cp_make_lang_type): Create lang_type for - BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE - and BOUND_TEMPLATE_TEMPLATE_PARM. - * pt.c (tsubst): Use copy_type instead of copy_node. - * search.c (lookup_field_1): Ignore TYPENAME_TYPE. - -2001-10-12 Kriang Lerdsuwanakij - - * pt.c (determine_specialization): Ignore functions without - DECL_TEMPLATE_INFO. - -2001-10-12 Nathan Sidwell - - PR g++/4476 - * typeck2.c (abstract_virtuals_error): Ignore incomplete classes. - -2001-10-11 Jason Merrill - - * typeck2.c (store_init_value): Don't re-digest a bracketed - initializer. - - * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of - ANON_AGGR_TYPE_P. - -2001-10-11 Richard Henderson - - * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead - of an asm statement. - (build_vtbl_ref_1): Split out from build_vtbl_ref. - (build_vfn_ref): Use it to handle vtable descriptors before - calling build_vtable_entry_ref. - * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit. - -2001-10-10 Richard Henderson - - * parse.y (asm_operand): Allow named operands. - * semantics.c (finish_asm_stmt): Tweek for changed location - of the operand constraint. - -2001-10-09 Jason Merrill - - * call.c (standard_conversion): Add bad conversion between - integers and pointers. - (convert_like_real): Don't use convert_for_initialization for bad - conversions; complain here and use cp_convert. - (build_over_call): Don't handle bad conversions specially. - (perform_implicit_conversion): Allow bad conversions. - (can_convert_arg_bad): New fn. - * cp-tree.h: Declare it. - * typeck.c (convert_for_assignment): Use it. - (ptr_reasonably_similar): Any target type is similar to void. - -2001-10-08 Alexandre Oliva - - * Make-lang.in (CXX_OBJS): Added cp-lang.o. - (cp/cp-lang.o): New rule. - * cp-tree.h: Declare hooks. - * tree.c: Make hooks non-static. - (init_tree): Don't initialize hooks here. - * lex.c: Likewise. Move definition of lang_hooks to... - * cp-lang.c: ... new file. - -2001-10-08 Richard Henderson - - * cp-tree.h (struct lang_decl_flags): Remove declared_inline. - (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl. - -2001-10-07 Kaveh R. Ghazi - - * class.c (build_vtable_entry_ref): Const-ify. - * decl.c (predefined_identifier, - initialize_predefined_identifiers): Likewise. - * init.c (build_new_1): Likewise. - * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): - Likewise. - -2001-10-05 Alexandre Oliva - - * optimize.c (struct inline_data): Moved to ../tree-inline.c. - (INSNS_PER_STMT): Likewise. - (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise. - (copy_body, initialize_inlined_parameters): Likewise. - (declare_return_variable, inlinable_function_p): Likewise. - (expand_call_inline, expand_calls_inline): Likewise. - (optimize_inline_calls, clone_body): Likewise. - * tree.c (walk_tree): Moved to ../tree-inline.c. - (walk_tree_without_duplicates): Likewise. - (copy_tree_r, remap_save_expr): Likewise. - -2001-10-04 Alexandre Oliva - - * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h. - (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise. - * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl. - (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h. - (flag_inline_trees): Moved declaration to ../tree-inline.h. - (walk_tree): Moved declaration to ../tree-inline.h. - (walk_tree_without_duplicates, copy_tree_r): Likewise. - (remap_save_expr): Likewise. - * decl.c: Include tree-inline.h. - (lang_mark_tree): Don't mark inlined_fns. - * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c. - * optimize.c: Include tree-inline.h. - (optimize_inline_calls): Move declaration to ../tree.h, as - non-static. - (remap_decl): Use language-independent constructs and hooks. - (remap_block, copy_body_r, declare_return_variable): Likewise. - (inlinable_function_p): Likewise. Don't test for - DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is - no longer language-specific. - (optimize_inline_calls): Likewise. Make it non-static. Moved - call of dump_function to... - (optimize_function): Here... - (clone_body): New function, extracted from... - (maybe_clone_body): ... here. Build decl_map locally and pass - it on to clone_body. - * pt.c, semantics.c: Include tree-inline.h. - * tree.c: Likewise. - (cp_walk_subtrees): New language-specific hook for tree inlining. - (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls, - cp_is_overload_p, cp_auto_var_in_fn_p, - cp_copy_res_decl_for_inlining): Likewise. - (walk_tree): Move language-specific constructs into... - (cp_walk_subtrees): this new function. - (copy_tree_r): Use language-independent constructs and hooks. - (init_tree): Initialize tree inlining hooks. - (remap_save_expr): Adjust prototype so that the declaration - does not require the definition of splay_tree. - -2001-10-03 John David Anglin - - * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used - to build the declaration instead of the declaration itself. - -2001-10-02 Jason Merrill - - * decl2.c (cxx_decode_option): Add 'else'. - - * spew.c (end_input): No longer static. - * cp-tree.h: Declare it. - * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion. - -2001-10-02 Joseph S. Myers - - * call.c (build_over_call), typeck.c (build_function_call_real): - Pass type attributes to check_function_format rather than name or - assembler name. Don't require there to be a name or assembler - name to check formats. - -2001-10-02 Joseph S. Myers - - * decl.c (init_decl_processing): Don't call - init_function_format_info. Initialize lang_attribute_table - earlier. - (builtin_function): Call decl_attributes. - (insert_default_attributes): New. - -2001-10-01 Jason Merrill - - * decl.c (grokdeclarator): Copy array typedef handling from C - frontend. - - * decl.c (grokdeclarator): Copy too-large array handling from C - frontend. - -2001-09-29 Alexandre Oliva - - * config-lang.in (target_libs): Added target-gperf, so that we - don't try to build it if C++ is disabled. - -2001-09-23 Zack Weinberg - - * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. - (cp/errfn.o): Delete rule. - (cp/error.o): Depend on flags.h. - * errfn.c: Delete file. - * cp-tree.h: Declare warn_deprecated. Remove definitions of - TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, - and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, - cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and - internal_error respectively. Make cp_deprecated into a macro. - Don't define cp_printer typedef or declare cp_printers. - * error.c: Include flags.h. - Delete: struct tree_formatting_info, print_function_argument_list, - print_declaration, print_expression, print_function_declaration, - print_function_parameter, print_type_id, print_cv_qualifier_seq, - print_type_specifier_seq, print_simple_type_specifier, - print_elaborated_type_specifier, print_rest_of_abstract_declarator, - print_parameter_declaration_clause, print_exception_specification, - print_nested_name_specifier, and definition of cp_printers. - (locate_error): New function. - (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and - rewritten in terms of locate_error and diagnostic.c. - (cp_tree_printer): Rename cp_printer; wire up to *_to_string - instead of deleted print_* routines. Handle %C, %L, %O, %Q also. - (init_error): Adjust to match. - -2001-09-22 Richard Kenner - - * Make-lang.in (CXX_C_OBJS): Add attribs.o. - -2001-09-21 Richard Henderson - - * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. - (build_vtbl_initializer): Likewise. - (build_vfn_ref): New. - * cp-tree.h: Declare it. - * call.c (build_over_call): Use it. - * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. - * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. - -2001-09-21 J"orn Rennecke - - * decl.c (grokdeclarator): Use C syntax for attr_flags declaration. - -2001-09-21 Joseph S. Myers - - Table-driven attributes. - * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. - * decl2.c (cplus_decl_attributes): Only take one attributes - parameter. - * cp-tree.c (cplus_decl_attributes): Update prototype. - * class.c (finish_struct), decl.c (start_decl, start_function), - decl2.c (grokfield), friend.c (do_friend), parse.y - (parse_bitfield): Update calls to cplus_decl_attributes. - * decl.c (grokdeclarator): Take a pointer to a single ordinary - attribute list. - * decl.h (grokdeclarator): Update prototype. - * decl2.c (grokfield): Take a single ordinary attribute list. - * friend.c (do_friend): Likewise. - * decl.c (shadow_tag, groktypename, start_decl, - start_handler_parms, grokdeclarator, grokparms, start_function, - start_method), decl2.c (grokfield, grokbitfield, grokoptypename), - parse.y (parse_field, parse_bitfield, component_decl_1), pt.c - (process_template_parm, do_decl_instantiation): Pass single - ordinary attribute lists around. - * decl.c (grokdeclarator): Correct handling of nested attributes. - Revert the patch - 1998-10-18 Jason Merrill - * decl.c (grokdeclarator): Embedded attrs bind to the right, - not the left. - . - * cp-tree.h (cp_valid_lang_attribute): Remove declaration - (cp_attribute_table): Declare. - * decl.c (valid_lang_attribute): Don't define. - (lang_attribute_table): Define. - (init_decl_processing): Initialize lang_attribute_table instead of - valid_lang_attribute. - * tree.c (cp_valid_lang_attribute): Remove. - (handle_java_interface_attribute, handle_com_interface_attribute, - handle_init_priority_attribute): New functions. - (cp_attribute_table): New array. - * decl2.c (import_export_class): Don't use - targetm.valid_type_attribute. - -2001-09-15 Gabriel Dos Reis - - * Make-lang.in (cp/error.o): Depend on real.h - * error.c: #include "real.h" - -2001-09-15 Kaveh R. Ghazi - - * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of - xmalloc/strcpy/strcat. - -2001-09-13 Kaveh R. Ghazi - - * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): - Const-ification. - * pt.c (tsubst_decl): Likewise. - -2001-09-12 Kaveh R. Ghazi - - * decl2.c (lang_f_options): Const-ification. - * lex.c (cplus_tree_code_name): Likewise. - * spew.c (yyerror): Likewise. - -2001-09-06 Nathan Sidwell - - PR c++/3986 - * class.c (force_canonical_binfo_r): Check & move an indirect - primary base first. - (force_canonical_binfo): Check that it's not already - canonical. - (mark_primary_virtual_base): Remove BINFO parameter. - (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here. - -2001-09-06 Nathan Sidwell - - Remove TYPE_NONCOPIED_PARTS. - * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto - CLASSTYPE_PURE_VIRTUALS. - (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. - * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. - (layout_class_type): Don't call fixup_inline_methods here ... - (finish_struct_1): ... call it here. - -2001-09-04 Mark Mitchell - - * decl.c (duplicate_decls): Remove code deadling with - DECL_SAVED_INSNS. - * decl2.c (finish_file): Likewise. - * pt.c (instantiate_decl): Likewise. - * semantics.c (expand_body): Don't defer local functions if - they wouldn't be deferred for some other reason. Don't - generate RTL for functions that will not be emitted. - (genrtl_start_function): Remove code deadling with - DECL_SAVED_INSNS. - (genrtl_finish_function): Likewise. - -2001-09-04 Nathan Sidwell - - PR c++/4203 - * call.c (build_over_call): Do not optimize any empty base - construction. - -2001-08-31 Kriang Lerdsuwanakij - - * error.c (dump_template_decl): Output template parameters - together with their specifiers. - Output `class' prefix for template template parameter. - (dump_decl): Fix formatting. - -2001-08-30 Kurt Garloff - - * optimize.c (inlinable_function_p): Allow only smaller single - functions. Halve inline limit after reaching recursive limit. - -2001-08-30 Joern Rennecke - Jason Merrill - - * class.c (build_vtable_entry_ref): Subtract in char*, not - ptrdiff_t. - -2001-08-23 Jason Merrill - - * tree.c (cp_build_qualified_type_real): Use get_qualified_type. - (build_cplus_array_type): Use cp_build_qualified_type, not - TYPE_MAIN_VARIANT, to get an unqualified version. - - * decl2.c (grok_alignof): Lose. - (build_expr_from_tree): Use expr_sizeof and c_alignof_expr. - * typeck.c (c_alignof): Lose. - * semantics.c (finish_sizeof, finish_alignof): New. - * parse.y: Use them. - * cp-tree.h: Declare them. - -2001-08-22 Jason Merrill - - * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement. - Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK. - * tree.c (cp_statement_code_p): A TAG_DEFN is a statement. - -2001-08-19 Jakub Jelinek - - * typeck2.c (add_exception_specifier): Only require complete type if - not in processing template declaration. - -2001-08-18 Kaveh R. Ghazi - - * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to - GNU_xref_start_scope and GNU_xref_end_scope. - - * tree.c (TYPE_HASH): Moved to ../tree.h. - -2001-08-16 Mark Mitchell - - * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS - on COMPOUND_EXPRs. - -2001-08-14 Richard Henderson - - * class.c, cp-tree.h (build_vfn_ref): Remove. - * call.c, rtti.c: Replace all refernces with build_vtbl_ref. - -2001-08-13 Mark Mitchell - - * call.c (build_over_call): Mark COMPOUND_EXPRs generated for - empty class assignment as having side-effects to avoid - spurious warnings. - -2001-08-13 Zack Weinberg - - * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. - * except.c: Include libfuncs.h. - -2001-08-11 Gabriel Dos Reis - - * decl.c (grokdeclarator): Clarify diagnostic message. - -2001-08-13 Kriang Lerdsuwanakij - - * decl2.c (do_nonmember_using_decl): Replace using directive - with using declaration in the error message. - -2001-08-11 Kriang Lerdsuwanakij - - * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the - criterion to avoid rebuilding expression tree instead of - processing_template_decl. - -2001-08-07 Jason Merrill - - Support named return value optimization for inlines, too. - * decl.c (finish_function): Nullify returns here. - * semantics.c (genrtl_start_function): Not here. - (cp_expand_stmt): Don't mess with CLEANUP_STMTs. - (nullify_returns_r): No longer static. Just clear RETURN_EXPR. - Also nullify the CLEANUP_STMT for the nrv. - * cp-tree.h: Declare it. - * optimize.c (declare_return_variable): Replace the nrv with the - return variable. - * typeck.c (check_return_expr): Be more flexible on alignment check. - Ignore cv-quals when checking for a matching type. - -2001-08-09 Richard Henderson - - * decl2.c (finish_objects): Use target hooks instead of - assemble_constructor and assemble_destructor. - -2001-08-08 John David Anglin - - * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'. - -2001-08-07 Nathan Sidwell - - PR c++/3820 - Stop using TYPE_NONCOPIED_PARTS. - * call.c (build_over_call): Be careful when copy constructing - or assigning to an empty class. - * class.c (check_bases_and_members): It has a - COMPLEX_ASSIGN_REF if it has a vptr. - (layout_class_type): Don't add empty class padding to - TYPE_NONCOPIED_PARTS. - (finish_struct_1): Don't add the VFIELD either. - * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_ - initialization. - -2001-08-07 Jason Merrill - - * tree.c (walk_tree): Walk siblings even if !walk_subtrees. - -2001-08-06 Richard Henderson - - * decl2.c (finish_objects): Pass a symbol_ref and priority to - assemble_{constructor,destructor}. Remove priority handling. - -2001-08-05 Gabriel Dos Reis - - Don't allow template-id in using-declaration. - * decl2.c (validate_nonmember_using_decl): Handle template-ids. - (do_class_using_decl): Likewise. - -2001-08-04 Neil Booth - - * cp/spew.c (read_token): No need to pop buffers. - -2001-08-02 Stan Shebs - - * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used. - (fnaddr_from_vtable_entry): Remove decl. - * method.c (use_thunk): Update comment. - -2001-08-01 Andrew Cagney - - * repo.c (get_base_filename): Change return value to const char - pointer. - -2001-08-02 Nathan Sidwell - - Kill -fhonor-std. - * NEWS: Document. - * cp-tree.h (flag_honor_std): Remove. - (CPTI_FAKE_STD): Remove. - (std_node): Remove comment about it being NULL. - (fake_std_node): Remove. - * decl.c (in_fake_std): Remove. - (walk_namespaces_r): Remove fake_std_node check. - (push_namespace): Remove in_fake_std code. - (pop_namespace): Likewise. - (lookup_name_real): Remove fake_std_node check. - (init_decl_processing): Always create std_node. Always add - std:: things there. - (builtin_function): Always put non '_' fns in std. - * decl2.c (flag_honor_std): Remove. - (lang_f_options): Remove honor-std. - (unsupported_options): Add honor-std. - (set_decl_namespace): Remove fake_std_node check. - (validate_nonmember_using_decl): Likewise. - (do_using_directive): Likewise. - (handle_class_head): Likewise. - * dump.c (cp_dump_tree): Likewise. - * except.c (init_exception_processing): Adjust. - * init.c (build_member_call): Remove fake_std_node check. - (build_offset_ref): Likewise. - * lang-options.h: Remove -fhonor-std, -fno-honor-std. - * rtti.c (init_rtti_processing): Adjust. - -2001-07-31 Alexandre Petit-Bianco - - * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second - operand while calling cp_tree_equal. - -2001-07-31 Nathan Sidwell - - The 3.0 ABI no longer has vbase pointer fields. - * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P, - FORMAT_VBASE_NAME): Remove. - * method.c (do_build_copy_constructor): Adjust. - (do_build_assign_ref): Adjust. - * search.c (lookup_field_r): Adjust. - * typeck.c (build_component_ref): Adjust. - - The 3.0 ABI always has a vtable pointer at the start of every - polymorphic class. - * rtti.c (build_headof_sub): Remove. - (build_headof): Adjust. - (get_tinfo_decl_dynamic): No need to check flag_rtti - here. Adjust. - (create_real_tinfo_var): Explain why we need a hidden name. - -2001-07-31 Nathan Sidwell - - PR c++/3631 - * class.c (update_vtable_entry_for_fn): The fixed adjustment - of a virtual thunk should be from declaring base. - -2001-07-31 Nathan Sidwell - - * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into - the shared virtual base, so preserving inheritance graph order. - -2001-07-30 Andreas Jaeger - - * decl2.c: Remove unused var global_temp_name_counter. - -2001-07-28 Richard Henderson - - * method.c (pending_inlines): Remove. - -2001-07-27 Nathan Sidwell - - * class.c (mark_primary_virtual_base): Don't adjust base - offsets here. - (dfs_unshared_virtual_bases): Adjust them here. - (mark_primary_bases): Explain why we adjust at the end. - -2001-07-27 Nathan Sidwell - - * class.c (finish_struct_1): When copying the primary base's - VFIELD, make sure we find it is at offset zero. - -2001-07-26 Kriang Lerdsuwanakij - - * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and - tsubst_expr for default template arguments. - -2001-07-26 Nathan Sidwell - - PR c++/3621 - * spew.c (yylex): Only copy the token's lineno, if it is - nonzero. - -2001-07-26 Nathan Sidwell - - PR c++/3624 - * call.c (resolve_args): Simplify, call - convert_from_reference. - (build_new_op): Resolve and convert from reference ARG1 - earlier. Adjust ARG2 & ARG3 resolve and conversion. - -2001-07-26 Nathan Sidwell - - * decl.c (last_function_parm_tags): Remove. - (current_function_parm_tags): Remove. - (init_decl_processing): Adjust. - (start_function): Adjust. - (store_parm_decls): Adjust. - - PR c++/3152 - * decl.c (grokdeclarator): Detect when a function typedef is - declaring a function, and create last_function_parms correctly. - -2001-07-25 Jason Merrill - - * call.c (joust): Only prefer a non-builtin candidate to a builtin - one if they have the same signature. - - * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on - it rather than toplevel_bindings_p. Give it a mangled name if static. - (convert_to_reference): Adjust. - * decl2.c (get_temp_name): Lose. - * mangle.c (mangle_ref_init_variable): New fn. - (mangle_guard_variable): Strip the ref-init header. - * cp-tree.h: Adjust. - * decl.c (cp_finish_decl): Add the DECL_STMT after processing the - initializer. - (grok_reference_init): Always use DECL_INITIAL. - -2001-07-25 Nathan Sidwell - - PR c++/3416 - * call.c (build_conditional_expr): Recheck args after - conversions. - * cp-tree.h (build_conditional_expr): Move to correct file. - * typeck.c (decay_conversion): Diagnose any unknown types - reaching here. - (build_binary_op): Don't do initial decay or default - conversions on overloaded functions. - (build_static_cast): Don't do a decay conversion here. - -2001-07-25 Nathan Sidwell - - PR c++/3543 - * typeck.c (condition_conversion): Resolve an OFFSET_REF. - * expr.c (cplus_expand_expr): An OFFSET_REF should never get here. - -2001-07-25 Nathan Sidwell - - * class.c (build_vtbl_or_vbase_field): Remove, move into ... - (create_vtbl_ptr): ... here. - -2001-07-25 Nathan Sidwell - - * class.c (build_vbase_offset_vbtl_entries): Look for - non-primary base of which we are a sub vtable. - -2001-07-24 Phil Edwards - - * semantics.c (finish_this_expr): Remove unused code. - -2001-07-24 Nathan Sidwell - - Simplify rtti, now we've only one ABI. - * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID, - CPTI_TINFO_VAR_ID. - (tinfo_decl_id, tinfo_var_id): Remove. - (get_typeid_1): Remove. - * rtti.c - (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id. - (typeid_ok_p): New function. - (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl. - (get_tinfo_decl): Remove old abi documentation. - (tinfo_from_decl): Remove. - (get_type_id): Call typeid_ok_p. Absorb get_typeid_1. - (get_typeid_1): Remove. - (get_base_offset): Remove. - (synthesize_tinfo_var): Absorb get_base_offset. - (create_real_tinfo_var): Don't use tinfo_decl_id. - -2001-07-23 Graham Stott - - * cp/class.c (type_requires_array_cookie): Fix use of uninitialized - variable has_two_argument_delete_p. - -2001-07-21 Nathan Sidwell - - Remove flag_vtable_thunk. It is always on for the 3.0 ABI. - * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove. - (CPTI_INDEX_IDENTIFIER): Remove. - (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove. - (delta2_identifier): Remove. - (index_identifier): Remove. - (pfn_or_delta2_identifier): Remove. - (flag_vtable_thunks): Remove. - (VTABLE_DELTA2_NAME): Remove. - (VTABLE_INDEX_NAME): Remove. - (FNADDR_FROM_VTABLE_ENTRY): Adjust. - (vfunc_ptr_type_node): Adjust. - (VTABLE_NAME_PREFIX): Adjust. - (build_vfn_ref): Lose first parameter. - (fixup_all_virtual_upcast_offsets): Remove. - * decl.c (initialize_predefined_identifiers): Remove - delta2_identifier, index_identifier, pfn_or_delta2_identifier. - (init_decl_processing): Remove no-vtable-thunk code. - * decl2.c (flag_vtable_thunks): Remove. - (mark_vtable_entries): Remove no-vtable-thunk code. - * error.c (dump_decl): Remove no-vtable-thunk code. - (dump_expr): Adjust ptr to member function code. - * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk - code. - * rtti.c (build_headof): Remove no-vtable-thunk code. - (get_tinfo_decl_dynamic): Adjust build_vfn_ref call. - * search.c (get_base_distance): Remove expand_upcast_fixups case. - (virtual_context) Remove. - (expand_upcast_fixups): Remove. - (fixup_virtual_upcast_offsets): Remove. - (fixup_all_virtual_upcast_offsets): Remove. - * typeck.c (get_member_function_from_ptrfunc): Remove - no-vtable-thunk code. - * call.c (build_over_call): Adjust call to build_vfn_ref. - * class.c (build_vfn_ref): Lose first parameter. Remove - no-vtable-thunk code. - (build_rtti_vtbl_entries): Remove no-vtable-thunk code. - (build_vtable_entry): Remove no-vtable-thunk code. - -2001-07-20 Nathan Sidwell - - Remove old-abi remnants. Remove comments about old abi - behavior. Remove references to 'new-abi' in comments. - * cp-tree.h: Adjust comments. - (vbase_offsets_in_vtable_p): Delete. - (vcall_offsets_in_vtable_p): Delete. - (vptrs_present_everywhere_p): Delete. - (all_overridden_vfuns_in_vtables_p): Delete. - (merge_primary_and_secondary_vtables_p): Delete. - (TYPE_CONTAINS_VPTR_P): Adjust. - (VTT_NAME_PREFIX): Remove. - (CTOR_VTBL_NAME_PREFIX): Remove. - (init_vbase_pointers): Remove. - * class.c: Adjust coments. - (build_vbase_pointer_fields): Delete. - (build_vbase_pointer): Remove old-abi code. - (build_secondary_vtable): Likewise. - (modify_all_vtables): Likewise. - (create_vtable_ptr): Likewise. - (layout_class_type): Likewise. - (finish_struct_1): Likewise. - (finish_vtbls): Likewise. - (dfs_finish_vtbls): Delete. - (build_vbase_offset_vtbl_entries): Remove old-abi code. - * cvt.c: Adjust comments. - * decl.c: Adjust comments. - * decl2.c: Adjust comments. - * init.c: Adjust comments. - (construct_virtual_bases): Remove old-abi code. - * lang-specs.h: Remove -fno-new-abi. - * mangle.c: Adjust comments. - * rtti.c: Adjust comments. - (get_base_offset): Remove old-abi-code. - * search.c: Adjust comments. - (dfs_init_vbase_pointers): Remove. - (dfs_vtable_path_unmark): Remove. - (init_vbase_pointers): Remove. - * semantics.c: Adjust comments. - (emit_associated_thunks): Remove old-abi code. - * typeck.c: Adjust comments. - -2001-07-20 Daniel Berlin - - * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not - params.h. - -2001-07-19 Mark Mitchell - - * class.c (finish_struct_anon): Forbid nested classes. - -2001-07-19 Neil Booth - - * decl2.c: Don't include dwarfout.h and dwarf2out.h. - * optimize.c: Include debug.h. - (maybe_clone_body): Use debug hook. - * semantics.c: Include debug.h. - (expand_body): Use debug hook. - -2001-07-19 Neil Booth - - * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases. - -2001-07-18 Mark Mitchell - - * class.c (type_requires_array_cookie): New function. - (check_methods): Don't try to figure out whether the type needs a - cookie here. - (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here. - * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove. - (TYPE_VEC_NEW_USES_COOKIE): Reimplement. - * pt.c (instantiate_class_template): Don't set - TYPE_VEC_DELETE_TAKES_SIZE. - * NEWS: Document ABI changes from GCC 3.0. - -2001-07-18 Xavier Delacour , - Gerald Pfeifer - - * NEWS (Changes in GCC 3.0): Fix typo. - -2001-07-13 Joseph S. Myers - - * decl2.c (cplus_decl_attributes): Take a pointer to the node to - which attributes are to be attached, and a flags argument. Update - call to decl_attributes. - (grokfield): Update call to decl_attributes. - * class.c (finish_struct): Update call to cplus_decl_attributes. - * cp-tree.h (cplus_decl_attributes): Update prototype. - * decl.c (start_decl, grokdeclarator, start_function): Update - calls to decl_attributes and cplus_decl_attributes. - * friend.c (do_friend): Update call to cplus_decl_attributes. - * parse.y (parse_bitfield): Update call to cplus_decl_attributes. - -2001-07-12 Mark Mitchell - - * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER - for `register' variables with an asm-specification. - -2001-07-11 Mark Mitchell - - * semantics.c (finish_asm_stmt): Mark the output operands - to an asm addressable, if necessary. - -2001-07-11 Ben Elliston - - * Revert this change -- there is a subtle bug. - - PR c++/80 - * decl.c (finish_enum): New "attributes" argument; pass it to - cplus_decl_attributes. Use a narrower type if the enum is packed. - * cp-tree.h (finish_enum): Adjust prototype. - * parse.y (enum_head): New non-terminal. - (structsp): Use it. Enums now may be preceded or followed by - optional attributes -- pass their chained tree to finish_enum(). - * pt.c (tsubst_enum): Pass NULL_TREE for the new argument. - -2001-07-10 Mark Mitchell - - * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope - variables. - -2001-07-10 Jason Merrill - - * semantics.c (cp_expand_stmt): Fix for null - current_function_return_value. - -2001-07-10 Jan van Male - - * call.c (build_op_delete_call): Initialize fn. - (convert_like_real): Delete conditional. - (joust): Initialize *w and *l. - * class.c: Add prototype for binfo_ctor_vtable. - (get_primary_binfo): Initialize result. - * init.c (build_java_class_ref): Initialize name. - -2001-07-09 Erik Rozendaal - - * typeck.c (unary_complex_lvalue): Do not duplicate the - argument to modify, pre-, or post-increment when used as an - lvalue and when the argument has side-effects. - -2001-07-08 Joseph S. Myers - - * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES. - (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call - cplus_decl_attributes even if attrs is NULL. - * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES. - -2001-07-08 Joseph S. Myers - - * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update - calls to decl_attributes. - -2001-07-06 Ira Ruben - - * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should - be DECL_TEMPLATE_RESULT. - -2001-07-05 Kriang Lerdsuwanakij - - * cp-tree.h (copy_template_template_parm): Rename to ... - (bind_template_template_parm): ... here. - * tree.c (copy_template_template_parm): Rename to ... - (bind_template_template_parm): ... here. Remove the case when - NEWARGS is NULL_TREE. - (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and - BOUND_TEMPLATE_TEMPLATE_PARM. - * pt.c (lookup_template_class): Adjust. - -2001-07-05 Jason Merrill - - * cvt.c (convert_lvalue): New fn. - * cp-tree.h: Declare it. - * method.c (do_build_assign_ref): Use it. - (do_build_copy_constructor): Convert parm to base types - before calling base constructors. - - * typeck.c (check_return_expr): Check DECL_ALIGN instead of - DECL_USER_ALIGN. Check flag_elide_constructors instead of - optimize. - * semantics.c (cp_expand_stmt): Don't destroy the named return value. - -2001-07-02 Nathan Sidwell - - * optimize.c (optimize_inline_calls): New function, broken out - of ... - (optimize_function): ... here. Call it. Don't inline if it is - a thunk. - (dump_function): Print name of dump flag causing this dump. - * semantics.c (expand_body): Move thunk inline check to - optimize_function. - -2001-06-29 Joseph S. Myers - - * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. - (comptypes): Use target.comp_type_attributes. - -2001-06-29 Nathan Sidwell - - * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration. - -2001-06-28 Gabriel Dos Reis - - * error.c (lang_print_error_function): Add a `diagnostic_context *' - parameter. Tweak. - -2001-06-27 Neil Booth - - * decl2.c (import_export_class): Update. - -2001-06-26 Gabriel Dos Reis - - * error.c (init_error): Adjust settings. - -2001-06-26 Gabriel Dos Reis - - * error.c (init_error): Adjust settings. - -2001-06-19 Richard Sandiford - - * except.c (initialize_handler_parm): Expect __cxa_begin_catch to - return pointers to data members by reference rather than by value. - -2001-06-18 Jason Merrill - - Implement the Named Return Value optimization. - * cp-tree.h (struct cp_language_function): Add x_return_value. - (current_function_return_value): Now a macro. - * decl.c: Don't define it. - (define_label, finish_case_label): Don't clear it. - (init_decl_processing): Don't register it with GC. - * semantics.c (genrtl_finish_function): Don't check it for - no_return_label. Copy the RTL from the return value to - current_function_return_value and walk, calling... - (nullify_returns_r): ...this new fn. - * typeck.c (check_return_expr): Set current_function_return_value. - -2001-06-15 Jason Merrill - - * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're - sharing a ctor vtable with. Merge code for cases 1 and 2. - (binfo_ctor_vtable): New fn. - (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it. - -2001-06-14 Jason Merrill - - * class.c (dfs_find_final_overrider): Fix logic. - - * class.c (update_vtable_entry_for_fn): Uncomment optimization to use - virtual thunk instead of non-virtual. - (get_matching_virtual): Uncomment. - - * pt.c (unify): Don't recurse between the POINTER_TYPE and the - OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on - PARM, not ARG. - -2001-06-14 Nathan Sidwell - - * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure - we've not emerged from the hierarchy of RTTI_BINFO on reaching - a non-virtual base. - -2001-06-13 Mark Mitchell - - * NEWS: Update release number. - -2001-06-12 Nathan Sidwell - - PR c++/3130, c++/3131, c++/3132 - * cp-tree.h (BINFO_UNSHARED_MARKED): New #define. - * class.c (force_canonical_binfo_r): Move - BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move - virtual bases unless they're primary and what they're primary - too has been moved. - (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope - with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and - BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most - derived binfo. - (mark_primary_bases): Use BINFO_UNSHARED_MARKED. - (layout_nonempty_base_or_field): Add most derived type - parameter. Adjust. - (layout_empty_base): Likewise. - (build_base_field): Likewise. - (build_base_fields): Likewise. - (propagate_binfo_offsets): Add most derived type - parameter. Skip non canonical virtual bases too. - (dfs_set_offset_for_unshared_vbases): Don't skip primary - bases. Do skip canonical bases. - (layout_virtual_bases): Adjust. - (layout_class_type): Adjust. - (dfs_get_primary_binfo): Build list of virtual primary base - candidates. - (get_primary_binfo): Check that the shared virtual primary - base candidate was found first. - (accumulate_vtbl_inits): Don't do anything for non-vptr - containing binfos. For case 1 primary virtual bases, keep - checking that we've not emerged from the hierarchy of RTTI_BINFO. - -2001-06-12 Nathan Sidwell - - PR c++/3089 - * class.c (dfs_accumulate_vtbl_inits): Always walk down the - hierarchy looking for primary bases for a ctor - vtable. Recursively call oneself, if we meet our primary via - this route and haven't met it yet via inheritance graph order. - -2001-06-11 Mark Mitchell - - * lang-options.h: Emit documentation for -fno-honor-std, not - -fhonor-std. - -2001-06-10 Alexandre Oliva - - * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]: - Don't clobber delta. - (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn. - -2001-06-10 Mark Mitchell - Gabriel Dos Reis - - * Make-lang.in (cp/call.o): Depend on diagnostic.h - (cp/typeck.o): Depend on diagnostic.h - (cp/typeck2.o): Depend on diagnostic.h - (cp/repo.o): Depend on dignostic.h - * typeck.c: #include diagnostic.h - (convert_for_initialization): Remove extern declaration for - warningcount and errorcount. - - * call.c: #include diagnostic.h - (convert_like_real): Remove extern declaration for warnincount and - errorcount. - - * repo.c: #include diagnostic.h - * typeck2.c: #include diagnostic.h - -2001-06-08 Nathan Sidwell - - * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko - in previous change. - -2001-06-08 Nathan Sidwell - - PR c++/2929 - * friend.c (do_friend): Use push_decl_namespace for classes at - namespace scope. - -2001-06-08 Nathan Sidwell - Jason Merrill - - PR c++/3061 - * class.c (build_secondary_vtable): Use assert, rather than an error - message. - (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL. - (dfs_accumulate_vtbl_inits): A lost primary virtual base may - be between ORIG_BINFO and RTTI_BINFO, but neither of them. - Don't set BINFO_VTABLE for a primary virtual base. - -2001-06-07 Mark Mitchell - - * decl.c (duplicate_decls): Update source position information - when a template function is defined. - -2001-06-07 Phil Edwards - - * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. - -2001-06-07 Nathan Sidwell - - PR c++/2914 - * decl.c (pushtag): Don't push into a complete type's scope. - -2001-06-06 Jason Merrill - - * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose. - (struct lang_decl_flags): Lose generate_with_vtable_p. - (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose. - * class.c (copy_virtuals): Adjust. - * decl2.c (mark_vtable_entries): Adjust. - * method.c (make_thunk, build_vtable_entry): Adjust. - * class.c (update_vtable_entry_for_fn): Only look as far as the - first defining class. - (build_vtbl_initializer): Put nothing in the slot for a function only - defined in a lost primary virtual base. - (add_vcall_offset_vtbl_entries_1): Use the same code for - the lost primary case and the normal case. - (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base. - (get_vfield_offset, get_derived_offset): Lose. - (dfs_find_final_overrider): Use look_for_overrides_here. - (get_matching_virtual): New fn. - * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P, - not BV_VCALL_INDEX. - * search.c (look_for_overrides_here): Split out from... - (look_for_overrides_r): Here. - - * class.c (find_final_overrider): Return error_mark_node on error. - - * decl2.c (key_method): #if 0 accidental change. - -2001-06-06 John David Anglin - - * call.c (convert_default_arg): Use INTEGRAL_TYPE_P. - (build_over_call): Likewise. - * decl.c (grokparms): Likewise. - * pt.c (tsubst_decl): Likewise. - * typeck.c (convert_arguments): Likewise. - -2001-06-05 Mark Mitchell - - * semantics.c (begin_class_definition): Robustify. - - * pt.c (instantiate_decl): Tell the repository code about the - clones, not the cloned functions. - * repo.c (repo_template_used): Explicitly instantiate the cloned - function, not the clones. - -2001-06-05 Nathan Sidwell - - * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and - ICS_BAD_FLAG on created conversion. - (compare_ics): Break out rank. - -2001-06-05 Nathan Sidwell - - * decl.c (xref_tag): Remove extraneous %s on dependent name - lookup warning. - -2001-06-05 Nathan Sidwell - - * class.c (layout_vtable_decl): Fix off by one error on - build_index_type. - (build_vtt): Likewise. - (build_ctor_vtbl_group): Likewise. - -2001-06-05 Nathan Sidwell - - * class.c (maybe_indent_hierarchy): New function. - (dump_class_hierarchy_r): Add flags. Dump extra binfo - information, if enabled. Use maybe_indent_hierarchy. Adjust - output format. - (dump_class_hierarchy): Adjust prototype. Adjust output format. - (dump_array, dump_vtable, dump_vtt): New functions. - (finish_struct_1): Adjust hierarchy dumping. - (initialize_vtable): Call dump_vtable. - (build_vtt): Call dump_vtt. - (build_ctor_vtbl_group): Call dump_vtable. - * decl2.c (flag_dump_class_layout): Remove. - (cxx_decode_option): Remove dump translation unit - and dump class hierarchy check. Call dump_switch_p. - (finish_file): Adjust dumping. - (dump.c): Only dump base classes if not TDF_SLIM. - Only dump namespace members if not TDF_SLIM. - * optimize.c (dump_function): New function. - (optimize_function): Call dump_function. - * semantics.c (expand_body): Use dump_enabled_p. - -2001-06-01 Nathan Sidwell - - PR g++/2936 - Part missed from first commit - * decl2.c (finish_anon_union): Copy context. - -2001-05-30 Nathan Sidwell - - PR g++/2936 - * optimize.c (remap_decl): Remap anonymous aggregate members too. - -2001-05-26 Nathan Sidwell - - PR g++/2823 - * semantics.c (expand_body): Don't optimize thunks. - -2001-05-25 Sam TH - - * cp-tree.h lex.h: Fix header include guards. - -2001-05-25 Mark Mitchell - - * decl.c (init_decl_processing): Tweak. - -2001-05-24 Mark Mitchell - - * decl.c (duplicate_decls): Tidy. - (init_decl_processing): Always set flag_no_builtin. - -2001-05-24 Nathan Sidwell - - PR c++/2184 - * decl2.c (do_local_using_decl): Push the decls, even in a - template. - -2001-05-22 Mark Mitchell - - * optimize.c (initialize_inlined_parameters): Don't set - TREE_READONLY for a VAR_DECL taking the place of an inlined - PARM_DECL. - -2001-05-22 Jason Merrill - - * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support. - * tree.c (cp_valid_lang_attribute): Warn about use of com_interface - attribute. - -2001-05-22 Joseph S. Myers - - * parse.y: Refer to compound literals as such, not as - constructor-expressions. - -2001-05-21 Mark Mitchell - - * call.c (build_op_delete_call): Ignore exception-specifications - when looking for matching delete operators. - * init.c (build_new_1): Compute whether or not the allocation - function used is a placement allocation function or not, and - communicate this information to build_op_delete_call. - -2001-05-21 Jason Merrill - - * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi. - (build_vtbl_ref): Adjust. - (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address. - * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks. - Re-add vtable-gc. - (unsupported_options): Correspondingly. - - * decl2.c (maybe_make_one_only): Check flag_weak, not - supports_one_only(). - - * cp-tree.def (START_CATCH_STMT): Lose. - * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS. - * tree.c (cp_statement_code_p): Don't case it. - * semantics.c (cp_expand_stmt): Likewise. - * cp-tree.h (START_CATCH_TYPE): Lose. - (HANDLER_TYPE): New. - * except.c (expand_start_catch_block): Don't start any blocks. - Return the type. - (expand_end_catch_block): Don't end any blocks. - * parse.y (handler): Don't pass anything from finish_handler_parms - to finish_handler. - * pt.c (tsubst_expr): Likewise. - * semantics.c (begin_handler): Call note_level_for_catch here. - (finish_handler_parms): Don't return anything. - (genrtl_catch_block, begin_catch_block): Lose. - (genrtl_handler): Call expand_start_catch here. - -2001-05-18 Jason Merrill - - * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here. - (get_vtable_decl, build_vtt): Not here. - -2001-05-20 Nathan Sidwell - - PR c++/2781 - * optimize.c (update_cloned_parm): Copy addressability and other - flags. - -2001-05-20 Kriang Lerdsuwanakij - - * pt.c (determine_specialization): Ignore artificial functions. - -2001-05-20 Neil Booth - - * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. - (C_RID_CODE): Remove. - * lex.c (cxx_init_options): Call set_identifier_size. Update. - (init_parse): Don't do it here. - -2001-05-18 Diego Novillo - - * decl2.c (finish_objects): Use the original SYMBOL_REF from the - function declaration to avoid stripping the symbol's attributes. - -2001-05-18 Nathan Sidwell - - * decl.c (pushdecl): Adjust error string. - (xref_tag): Adjust friend class injection warning. Remove the - inherited name from the class shadowed scope. - -2001-05-17 Mark Mitchell - - * except.c (cp_protect_cleanup_actions): New function. - (init_exception_processing): Don't set protect_cleanup_actions - here. Do set lang_protect_cleanup_actions. - -2001-05-16 Nathan Sidwell - - * spew.c (read_token): Call yyerror on all unexpected tokens. - -2001-05-16 Nathan Sidwell - - * init.c (member_init_ok_or_else): Take a tree rather than - string for name. - (expand_member_init): Adjust. - -2001-05-14 Nick Clifton - - * decl.c (duplicate_decls): Suppress warning about duplicate - decls if the first decl is a friend. - -2001-05-12 Zack Weinberg - - * except.c (choose_personality_routine): Export. Add - explanatory comment. Take an enum languages, not a boolean. - (initialize_handler_parm): Adjust to match. - * cp-tree.h: Prototype choose_personality_routine. - * lex.c (handle_pragma_java_exceptions): New function. - (init_cp_pragma): Register #pragma GCC java_exceptions. - -2001-05-12 Neil Booth - - * method.c (build_mangled_C99_name): Remove unused prototype. - -2001-05-12 Alexandre Oliva - - * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type. - * typeck.c (get_member_function_from_ptrfunc, - build_ptrmemfunc, expand_ptrmemfunc_cst): Take - TARGET_PTRMEMFUNC_VBIT_LOCATION into account. - - Reverted Geoff Keating's 2001-05-03's patch. - -2001-05-11 Ira Ruben - - * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h. - -2001-05-11 Neil Booth - - * cp-tree.h (finish_label_expr, lookup_label): Delete. - * parse.y: Update for '&&'; don't issue warning here. - * semantics.c (finish_label_expr): Delete. - -2001-05-07 Mark Mitchell - - * splay-tree.h (splay_tree_max): New function. - (splay_tree_min): Likewise. - -2001-05-03 Geoffrey Keating - - * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER. - (pfn_vflag_identifier): Define. - Update comment about layout of pointer functions. - (build_ptrmemfunc1): Update prototype. - (expand_ptrmemfunc_cst): Update prototype. - * decl.c (initialize_predefined_identifiers): Initialize - pfn_vflag_identifier. - (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add - an extra field to the type. - * expr.c (cplus_expand_constant): Pass 'flag' between - expand_ptrmemfunc_cst and build_ptrmemfunc1. - * typeck.c (get_member_function_from_ptrfunc): When - FUNCTION_BOUNDARY < 16, look at additional field to determine - if a pointer-to-member is a real pointer or a vtable offset. - (build_ptrmemfunc1): Add new parameter to contain extra field. - (build_ptrmemfunc): Pass the extra field around. - (expand_ptrmemfunc_cst): Add new parameter to return extra field. - (pfn_from_ptrmemfunc): Ignore the extra field. - -2001-05-03 Mark Mitchell - - * cp-tree.h (flag_inline_trees): Update documentation. - * decl.c (init_decl_processing): Adjust handling of - flag_inline_functions and flag_inline_trees to support -O3. - (grokfndecl): Set DECL_INLINE on all functions if that's what - the user requested. - (save_function_data): Clear DECL_INLINE in - current_function_cannot_inline is non-NULL. - * decl2.c (flag_inline_trees): Update documentation. - -2001-05-03 Nathan Sidwell - - * dump.c (cp_dump_tree, USING_STMT case): New case. - * tree.c (cp_statement_code_p): Add USING_STMT. - * decl2.c (do_using_directive): Add the using directive statement. - - * tree.c (walk_tree): Reformat an if block. - -2001-05-02 Mark Mitchell - - * decl.c (compute_array_index_type): Don't try to do anything with - the indices when processing a template. - -2001-05-02 Kaveh R. Ghazi - - * call.c: NULL_PTR -> NULL. - * class.c: Likewise. - * cvt.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * init.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2001-05-02 Mark Mitchell - - * decl2.c (do_using_directive): Revert previous patch. - -2001-05-01 Nathan Sidwell - - * cp-tree.def (USING_STMT): New statement node. - * cp-tree.h (USING_STMT_NAMESPACE): New macro. - * decl2.c (do_using_directive): Add USING_STMT to statement - tree. Don't emit errors when processing template decl. - * pt.c (tsubst_expr, USING_STMT case): New case. - * semantics.c (cp_expand_stmt, USING_STMT case): New case. - -2001-05-01 Nathan Sidwell - - * call.c (build_new_op): Convert args from reference here. - (build_conditional_expr): Don't convert here. - -2001-05-01 Nathan Sidwell - - * spew.c (last_token_id): New static variable. - (read_token): Set it here. - (yyerror): Use it here. - -2001-04-30 Richard Henderson - - * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations. - * decl.c: Likewise. - -2001-04-30 Mark Mitchell - - * gxxint.texi: Remove. - * Make-lang.in: Remove all traces of gxxint.texi. - -2001-04-30 Mark P Mitchell - - * decl2.c (start_static_initialization_or_destruction): Correct - logic to handle the -fno-use-cxa-atexit case. - -2001-04-30 Mark Mitchell - - * optimize.c (update_cloned_parm): New function. - (maybe_clone_body): Use it. Update the `this' parameter too. - -2001-04-29 Joseph S. Myers - - * decl2.c (unsupported_options): Add new-abi. - * lang-options.h: Remove no longer supported options. - -2001-04-27 Nathan Sidwell - - * except.c (can_convert_eh): Don't check template parms, - typename types etc. - -2001-04-27 Nathan Sidwell - - * optimize.c (maybe_clone_body): Copy parameter names and locations. - -2001-04-27 Nathan Sidwell - - * cp-tree.h (adjust_clone_args): Prototype new function. - * class.c (adjust_clone_args): New function. - * decl.c (start_function): Call it for in charge ctors. - -2001-04-26 Mark Mitchell - - * method.c (use_thunk): Make sure that thunks really are emitted - when requested. - -2001-04-26 Nathan Sidwell - - * mangle.c (write_chars): New macro. - (hwint_to_ascii): New function - (write_number): Use it. - (write_integer_cst): Deal with really big numbers. - -2001-04-25 Mark Mitchell - - * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting - the clone. - -2001-04-25 Nathan Sidwell - - * decl.c (grokdeclarator): Set context of namespace scope - TYPE_DECLS. - -2001-04-24 Zack Weinberg - - * cp/optimize.c: Include hashtab.h. - (struct inline_data): Add tree_pruner. - (expand_call_inline, expand_calls_inline): Use it when calling - walk_tree. - (optimize_function): Initialize and free tree_pruner. - -2001-04-24 Nathan Sidwell - - Lazy __FUNCTION__ generation. - * cp-tree.def (FUNCTION_NAME): Remove. - * cp-tree.h (function_name_declared_p): Remove. - (cp_fname_init): Prototype. - * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids, - don't call declare_function_name. Call start_fname_decls. - (cp_make_fname_decl): Adjust parameters. Generate the name. Don't - clobber the line number. - (cp_fname_init): New function. - (start_function): Call start_fname_decls. - (finish_function): Call finish_fname_decls. - * lex.c (reswords): Add slots for __FUNCTION__ et al. - (rid_to_yy): Add mappings for __FUNCTION__ et al. - * optimize.c (maybe_clone_body): Remove function_name_declared_p. - * parse.y (VAR_FUNC_NAME): New token. - (primary): Add VAR_FUNC_NAME. - * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's - generation. - (tsubst, FUNCTION_NAME case): Remove. - (tsubst_copy, FUNCTION_NAME case): Remove. - (tsubst_expr, DECL_STMT case): Be careful with a - DECL_PRETTY_FUNCTION_P. - (instantiate_decl): Remove function_name_declared_p. - * semantics.c (begin_compound_statement): Don't call - declare_function_name here. - (setup_vtbl_ptr). Don't save & restore function_name_declared_p. - (finish_translation_unit): Call finish_fname_decls. - (expand_body): Remove function_name_declared_p. - * typeck2.c (digest_init): Allow any ERROR_MARK. - -2001-04-24 Nathan Sidwell - - * pt.c (tsubst_decl): Use VOID_TYPE_P. - * semantics.c: Fix some typos. - -2001-04-23 Phil Edwards - - * cp/decl2.c (flag_honor_std): Always initialize to 1. - -2001-04-22 Kaveh R. Ghazi - - * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf. - -2001-04-23 Jason Merrill - - * except.c (build_throw): Wrap the initialization of the exception - object in a MUST_NOT_THROW_EXPR. - (do_free_exception): #if 0. - -2001-04-20 Mark Mitchell - - * cp-tree.h (finish_enum): Change prototype. - * decl.c (finish_enum): Reorganize. - * parse.y (structsp): Adjust calls to finish_enum. - -2001-04-20 Nathan Sidwell - - * tree.c (cp_tree_equal): Adjust final switch formatting. Add - 't' case. - -2001-04-20 Nathan Sidwell - - * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED. - (layout_empty_base): Return at end flag. - (build_base_field): Likewise. - (build_base_fields): Likewise. - (layout_virtual_bases): Don't add 1 to eoc value. - (end_of_class): Use full size for empty bases. - (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended - empty bases. Don't add 1 to eoc value. Only add trailing padding - if we're an empty class with no empty bases. - (dump_class_hierarchy): Dump size and alignment. - -2001-04-20 Jakub Jelinek - - * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and - ICS_BAD_FLAG. - -2001-04-20 Jakub Jelinek - - * search.c (lookup_field_r): If looking for type and non-TYPE_DECL - is found, look first if name does not match the structure name. - -2001-04-19 Mark Mitchell - - * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is - set. - (SET_DECL_LANGUAGE): New macro. - * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE. - (pushdecl): Likewise. - (build_library_fn_1): Likewise. - (build_cp_library_fn): Likewise. - (grokfndecl): Likewise. - (grokvardecl): Mark `extern "C"' variables as having C linkage. - * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE. - * lex.c (retrofit_lang_decl): Likewise. - * mangle.c (mangle_decl_string): Don't mangle the names of - variables declared with C language linkage. - * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE. - -2001-04-18 John David Anglin - - * semantics.c (simplify_aggr_init_exprs_r): Don't restore - flag_access_control from uninitialized storage. - -2001-04-15 Mark Mitchell - - * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation. - * mangle.c (write_pointer_to_member_type): Fix mangling of - pointers to cv-qualified member function types. - - * init.c (build_delete): Create a SAVE_EXPR for the address if - we're going to use it more than once. - -2001-04-13 Mark Mitchell - - * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove. - (expand_ptremfunc_cst): Change prototype. - (delta2_from_ptrmemfunc): Remove. - * expr.c (cplus_expand_constant): Adjust call to - expand_ptrmemfunc_cst. - * typeck.c (build_ptrmemfunc1): Simplify. - (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still - results in a constant. - (expand_ptrmemfunc_cst): Remove idx and delta2 parameters. - (delta2_from_ptrmemfunc): Remove. - (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst. - -2001-04-12 Jason Merrill - - * cp-tree.h (decl_namespace_list): New macro. - (struct saved_scope): Add decl_ns_list. - * decl.c (mark_saved_scope): Mark it. - * decl2.c: Lose static decl_namespace_list. - (init_decl2): Don't save it. - -2001-04-12 Kaveh R. Ghazi - - * cp-tree.h (warn_return_type, yylex): Delete redundant - declarations. - - * decl.c (current_class_depth, global_namespace): Likewise. - - * decl2.c (current_class_depth, flag_gnu_xref): Likewise - - * repo.c (flag_use_repository): Likewise. - -2001-04-12 Kaveh R. Ghazi - - * cp-tree.h (pedantic, convert, global_bindings_p, insert_block, - set_block, pushdecl, getdecls, gettags, init_decl_processing, - maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p, - lvalue_or_else, print_lang_statistics, comp_target_types, - unsigned_type, signed_type, signed_or_unsigned_type, - build_function_call, mark_addressable, incomplete_type_error): - Delete redundant declarations. - -2001-04-11 Jason Merrill - - * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro. - (TYPE_ANONYMOUS_P): New macro. - (TAGGED_TYPE_P): New macro. - * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P. - (grokfndecl, grokvardecl, grokdeclarator): Likewise. - * tree.c (no_linkage_helper): Likewise. - * semantics.c (begin_class_definition): Likewise. - * pt.c (convert_template_argument): Likewise. - * lex.c (check_for_missing_semicolon): Likewise. - -2001-04-12 Nathan Sidwell - - * class.c (dfs_unshared_virtual_bases): New function. - (mark_primary_bases): Call it. - (check_bases): Ignore virtual bases when determining - nearly-emptiness. - -2001-04-12 Nathan Sidwell - - * method.c (make_thunk): Clear DECL_CLONED_FUNCTION. - -2001-04-11 Mark Mitchell - - * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the - cloned function to the clone. - -2001-04-11 Kaveh R. Ghazi - - * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). - - * semantics.c: Include expr.h. - -2001-04-11 Nathan Sidwell - - * method.c (implicitly_declare_fn): Commonize code for copy ctor - and assignment op. Set TREE_USED for parameter. - -2001-04-10 Mark Mitchell - - * class.c (find_final_overrider_data): Add `candidates'. - (dfs_find_final_overrider): Don't issue error messages - prematurely. - (find_final_overrider): Issue error messages here. - (build_base_field): Don't warn about amgibuous direct bases here. - (warn_about_ambiguous_direct_bases): New function. - (layout_class_type): Use it. - -2001-04-10 Richard Henderson - - * typeck.c (build_array_ref): Push the array reference inside - COMPOUND_EXPR and COND_EXPR. - -2001-04-05 Mark Mitchell - - * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P. - * decl.c (duplicate_decls): Adjust accordingly. - (maybe_commonize_var): Likewise. - (grokfndecl): Likewise. - (start_function): Likewise. - (start_method): Likewise. - * decl2.c (key_method): Likewise. - (import_export_decl): Likewise. - * method.c (implicitly_declare_fn): Likewise. - * optimize.c (maybe_clone_body): Likewise. - -2001-04-05 Benjamin Kosnik - - * lang-specs.h: Add __DEPRECATED. - -2001-04-05 J"orn Rennecke - - * search.c (get_dynamic_cast_base_type): When building a new - constant, set its type to ssizetype. - -2001-04-04 Jakub Jelinek - - * optimize.c (expand_call_inline): Only add newly inlined statements - into inlined_stmts. - -2001-04-03 Mark Mitchell - - * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove. - (OPERATOR_FORMAT): Likewise. - (OPERATOR_TYPENAME_FORMAT): Likewise. - * operators.def: Remove old name-mangling information. - * decl.c (grok_op_properties): Adjust accordingly. - * lex.c (init_operators): Likewise. - * rtti.c (get_tinfo_decl): Issue error messages about types that - have variable size. - -2001-04-03 Mark Mitchell - - * decl2.c (import_export_decl): Don't call import_export_class - when processing an inline member function. - * semantics.c (expand_body): Call import_export_decl before - emitting inline functions. - -2001-03-28 Richard Henderson - - IA-64 ABI Exception Handling: - * cp-tree.def (EH_SPEC_BLOCK): New. - (MUST_NOT_THROW_EXPR): New. - * cp-tree.h: Update changed function declarations. - (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove. - (CPTI_CALL_UNEXPECTED): New. - (struct cp_language_function): Rename x_eh_spec_try_block - to x_eh_spec_block. - (EH_SPEC_STMTS, EH_SPEC_RAISES): New. - * decl.c (current_binding_level): If no current function - bindings, revert to scope_chain. - (initialize_predefined_identifiers): Remove __cp_push_exception. - (store_parm_decls): Use begin_eh_spec_block. - (finish_function): Use finish_eh_spec_block. - (mark_lang_function): Update for name changes. - * decl2.c (finish_file): No mark_all_runtime_matches. - * dump.c (cp_dump_tree): Handle new tree codes. - * error.c (dump_expr) [BIND_EXPR]: Fix typo. - * except.c (catch_language_init, catch_language): Remove. - (init_exception_processing): Don't set language code. - Initialize call_unexpected_node, protect_cleanup_actions, - eh_personality_libfunc, lang_eh_runtime_type. - (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove. - (get_eh_type, get_eh_caught, get_eh_handlers): Remove. - (prepare_eh_type): Split out type canonicalizations ... - (build_eh_type_type): ... from here. - (build_eh_type_type_ref): Remove. - (mark_all_runtime_matches): Remove. - (build_exc_ptr): New. - (do_begin_catch, do_end_catch): New. - (do_pop_exception): Remove. - (build_terminate_handler): Remove. - (choose_personality_routine): Split out language choice from ... - (initialize_handler_parm): ... here. - Use MUST_NOT_THROW_EXPR. - (expand_start_catch_block): Use do_begin_catch. Simplify Java - exception object handling. - (expand_start_eh_spec, expand_end_eh_spec): Remove. - (expand_exception_blocks, alloc_eh_object): Remove. - (begin_eh_spec_block, finish_eh_spec_block): New. - (do_allocate_exception, do_free_exception): New. - (expand_throw): Merge into ... - (build_throw): ... here. Update for abi. - * expr.c (cplus_expand_expr): No expand_internal_throw. - Handle MUST_NOT_THROW_EXPR. - * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK. - * semantics.c (*) Update for except.h name changes. - (genrtl_try_block): No protect_with_terminate. - (genrtl_eh_spec_block): New. - (genrtl_handler): Don't emit the goto here. - (cp_expand_stmt): Handle EH_SPEC_BLOCK. - (genrtl_finish_function): Don't expand_exception_blocks. - * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK. - -2001-03-28 Richard Henderson - - * decl.c (struct named_label_list): Rename eh_region to - in_try_scope, add in_catch_scope. - (struct binding_level): Rename eh_region to is_try_scope, - add is_catch_scope. - (note_level_for_try): Rename from note_level_for_eh. - (note_level_for_catch): New. - (poplevel): Copy both is_try_scope and is_catch_scope to - the named_label_list struct. - (check_previous_goto_1): Don't check for catch block via - DECL_ARTIFICIAL; use in_try_scope instead. - (check_goto): Likewise. - * cp-tree.h (note_level_for_try, note_level_for_catch): Declare. - * except.c (expand_start_catch_block): Call note_level_for_catch. - * semantics.c (begin_compound_stmt): Update for note_level_for_try. - -2001-03-27 Richard Henderson - - * except.c: Use USING_SJLJ_EXCEPTIONS instead of - exceptions_via_longjmp. - -2001-03-27 Phil Edwards - - * pt.c (check_default_tmpl_args): Make error messages clearer. - -2001-03-26 Phil Edwards - - * error.c: Also undefine 'A' macro used for cp_printers definition. - -2001-03-27 Kaveh R. Ghazi - - * Make-lang.in: Depend on $(SYSTEM_H), not system.h. - -2001-03-26 Mike Yang - Mark Mitchell - - * dump.c (dump_access): New function. - (cp_dump_tree): Use it. Dump basetype information for class - types. - -2001-03-26 Mark Mitchell - - * Makefile.in (optimize.o): Depend on params.h. - (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. - (init_decl_processing): Set flag_no_inline when doing - inlining-on-trees. - * optimize.c: Include params.h. - (struct inline_data): Improve documentation of FNS. Add - FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. - (INSNS_PER_STMT): New macro. - (remap_block): Use CLONING_P. - (inlinable_function_p): Don't inline big functions. - (expand_call_inline): Keep track of how much inlining we've done. - (optimize_function): Set FIRST_INLINED_FN. - (maybe_clone_body): Set CLONING_P. - * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in - tree nodes. - (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling - rest_of_compilation. Clear DECL_RTL for local variables - afterwards. - (clear_decl_rtl): New function. - -2001-03-26 Nathan Sidwell - - Implement DR 209 - * cp-tree.h (skip_type_access_control, - reset_type_access_control): Prototype. - * decl.c (grokdeclarator): Access of friends is not checked. - * parse.y (component_decl_list): Reset type access control. - * semantics.c (decl_type_access_control): Clear - current_type_lookups. - (save_type_access_control): Don't save if not deferring. - (skip_type_access_control, reset_type_access_control): New - functions. - (begin_class_definition): Do type access control for basetypes. - Start deferred access control. - (finish_class_definition): Resume immediate access control if - this is a local class. - -2001-03-25 Kaveh R. Ghazi - - * class.c (add_method): Use memcpy/memmove, not bcopy. - - * decl.c (duplicate_decls): Likewise. - -2001-03-23 Jakub Jelinek - - * mangle.c (write_discriminator): Use `_0' for discriminator 1, - not `_'. - -2001-03-23 Jakub Jelinek - - * decl.c (local_names): Define. - (push_local_name): New. - (grok_reference_init): Return init if initializing static reference - variable with non-constant instead of emitting it. - Move expand_static_init call to cp_finish_decl. - (layout_var_decl): Call push_local_name. - (maybe_commonize_var): Allow inlining functions even if they have - static local variables, use comdat_linkage for them if flag_weak. - (check_initializer): Call obscure_complex_init if - grok_reference_init returned nonzero. - (save_function_data): Clear x_local_names. - (pop_cp_function_context): Free x_local_names. - (mark_inlined_fns): Remove. - (mark_lang_function): Mark x_local_names. - (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P. - Mark inlined_fns as tree, remove call to mark_inlined_fns. - * class.c (alter_access): Ensure DECL_ACCESS is never set if - DECL_DISCRIMINATOR_P. - * cp-tree.h (cp_language_function): Add x_local_names. - (lang_decl_flags): Add discriminator into u2. - (lang_decl_inlined_fns): Remove. - (lang_decl): inlined_fns is now a TREE_VEC. - (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define. - * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a - TREE_VEC, not a custom structure. - (optimize_function): Likewise. - * mangle.c (discriminator_for_local_entity): Discriminate among - VAR_DECL local entities. - * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS - is not valid. - -2001-03-22 Bryce McKinlay - - Add support for Java interface method calls. - * cp-tree.h (struct lang_type): Add java_interface flag. - (TYPE_JAVA_INTERFACE): New macro. - * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute - by setting TYPE_JAVA_INTERFACE. - * call.c (java_iface_lookup_fn): New static. - (build_over_call): If calling a method declared in a - TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the - expression which resolves the function address. - (build_java_interface_fn_ref): New function. - -2001-03-22 Richard Henderson - - * Make-lang.in (cp/except.o): Don't depend on insn-flags.h. - * except.c: Don't include it. - -2001-03-22 Gerald Pfeifer - based on an idea from Joe Buck - - * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore): - New nonterminals. - (data_def, component_decl): Add reductions to bad_decl. - -2001-03-22 Jakub Jelinek - - * method.c (do_build_assign_ref): Don't use build_modify_expr for - anonymous aggregates, since they don't have assignment operator - method. - * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy - assignment operators for anonymous structure fields. - -2001-03-21 Jason Merrill - - * pt.c (instantiate_decl): Abort if we see a member constant - instantiation that doesn't already have its initializer. - Downgrade explicit instantiation without definition to pedwarn. - - * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove. - * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P. - (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P. - - * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove. - (pending_vtables): Remove. - * decl2.c (pending_vtables): Remove. - (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not - CLASSTYPE_VTABLE_NEEDS_WRITING. - (import_export_class): Likewise. - (init_decl2): Don't mark pending_vtables. - * lex.c (handle_pragma_vtable): Just sorry. - * pt.c (instantiate_class_template): Don't mess with - CLASSTYPE_VTABLE_NEEDS_WRITING. - (mark_class_instantiated): Likewise. - * ptree.c (print_lang_type): Don't print it. - * semantics.c (begin_class_definition): Don't set it. - - * pt.c (template_tail): Replace with last_pending_template. - (maybe_templates, maybe_template_tail): Remove. - (add_pending_template): Adjust. - (instantiate_pending_templates): Adjust. - - * cp-tree.h (struct saved_scope): Remove lang_stack field. - (current_lang_stack): Remove. - * decl.c (maybe_push_to_top_level): Don't initialize it. - (duplicate_decls): Use current_lang_depth. - (xref_basetypes): Likewise. - * class.c (current_lang_depth): New fn. - (push_lang_context): Use more varray functionality. - (pop_lang_context): Likewise. - - * error.c (GLOBAL_THING): Always use '__'. - -2001-03-21 Mark Mitchell - - * class.c (build_clone): Clear DECL_ASSEMBLER_NAME. - - * mangle.c (mangle_decl_string): Mangle the names of overloaded - operators, even when they have `extern "C"' linkage. - -2001-03-19 Mark Mitchell - - * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (add_method): Remove optimization involving comparison of - DECL_ASSEMBLER_NAME. - (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (check_methods): Likewise. - (build_clone): Likewise. - (built_vtt): Likewise. - * cp-tree.h (DECL_NEEDED_P): Likewise. - * decl.c (pushtag): Likewise. - (duplicate_decls): Likewise. - (pushdecl): Likewise. - (builtin_function): Likewise. - (build_library_fn_1): Set DECL_LANGUAGE for library functions. - (build_cp_library_fn): Likewise. - (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (make_rtl_for_nonlocal_decl): Likewise. - (cp_finish_decl): Likewise. - (grokfndecl): Likewise. - (grokvardecl): Likewise. - (grokdeclarator): Likewise. - (start_function): Likewise. - (cp_missing_return_ok_p): Likewise. - * decl2.c (grokclassfn): Likewise. - (check_classfn): Likewise. - (finish_static_data_member_decl): Likewise. - (grokfield): Likewise. - * error.c (GLOBAL_IORD_P): Remove. - (dump_global_iord): Improve output. - (dump_decl): Avoid using DECL_ASSEMBLER_NAME. - * except.c (nothrow_libfn_p): Summarily reject any function not in - namespace-scope. - * init.c (build_java_class_ref): Don't explicitly set - DECL_ASSEMBLER_NAME after calling mangle_decl. - * mangle.c (mangle_decl_string): Handle extern "C" functions. - (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl. - * method.c (set_mangled_name_for_decl): Don't explicitly set - DECL_ASSEMBLER_NAME after calling mangle_decl. - (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and - IDENTIFIER_GLOBAL_VALUE for the thunk. - * pt.c (set_mangled_name_for_template_decl): Remove. - (check_explicit_specialization): Don't use it. - (looup_template_class): Don't set DECL_ASSEMBLER_NAME. - (tsubst_friend_function): Likewise. - (tsubst_decl): Likewise. - (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME. - * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (tinfo_base_init): Likewise. - (create_real_tinfo_var): Likewise. - * search.c (looup_field_1): Likewise. - * semantics.c (finish_named_return_value): Likewise. - * tree.c (init_tree): Set lang_set_decl_assembler_name. - -2001-03-15 Gabriel Dos Reis - - Correct semantics restrictions checking in throw-expression. - * except.c (is_admissible_throw_operand): New function. - (build_throw): Use it. - -2001-03-14 Mark Mitchell - - * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ - and its ilk. - -2001-03-14 Mark Mitchell - - * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. - * cp-tree.h (DECL_IN_MEMORY_P): Likewise. - * decl.c (duplicate_decls): Likewise. - (builtin_function): Likewise. - (build_library_fn): Likewise. - (build_cp_library_fn): Likewise. - (check_initializer): Likewise. - (cp_finish_decl): Likewise. - * decl2.c (grokfield): Likewise. - (grok_function_init): Remove #if 0'd code. - (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. - * friend.c (do_friend): Likewise. - * init.c (get_temp_regvar): Likewise. - * method.c (make_thunk): Likewise. - * pt.c (tsubst_friend_function): Likewise. - (tsubst_decl): Likewise. - (regenerate_decl_from_template): Likewise. - * semantics.c (genrtl_named_return_value): Likewise. - (expand_body): Likewise. - (genrtl_finish_function): Likewise. - * tree.c (cp_tree_equal): Likewise. - -2001-03-12 Nathan Sidwell - - * call.c (convert_like_real): Add extra semantics to INNER - parameter. Don't convert to temporary if a user conversion - gives us an lvalue that we're about to bind to a reference. - Set INNER to indicate pending reference binding on recursive - calls. - -2001-03-10 Neil Booth - - * cp/lex.c: Delete duplicate pending_lang_change. - -2001-03-10 Neil Booth - - * cp/lex.c (handle_pragma_interface, handle_pragma_implementation): - Similarly. - * cp/repo.c (get_base_filename, open_repo_file): Similarly. - * cp/cp-tree.h: Remove file_name_nondirectory prototype. - -2001-03-09 Zack Weinberg - - * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. - -2001-03-08 Stan Shebs - - * cp-tree.h (set_identifier_local_value): Remove unused decl. - -2001-03-06 Zack Weinberg - - * spew.c: Remove references to CPP_OSTRING. - -2001-03-06 Andrew Haley - - * typeck.c (convert_arguments): Check that we have an fndecl. - -2001-03-05 Andrew Haley - - * typeck.c (convert_arguments): Don't do ellipsis conversion for - __built_in_constant_p. - -2001-03-02 Nathan Sidwell - - * typeck.c (build_static_cast): Allow enum to enum conversions - as per DR 128. - -2001-03-02 Nathan Sidwell - - * class.c (check_field_decls): Pointers to member do not a - non-pod struct make, as per DR 148. - -2001-03-02 Nathan Sidwell - - * call.c (joust): cp_pedwarn when using gnu extension concerning - worst conversion sequences. - -2001-03-01 Zack Weinberg - - * decl.c: Replace all uses of 'boolean' with 'bool'. - -2001-03-01 Zack Weinberg - - * lang-specs.h: Add zero initializer for cpp_spec field to - all array elements that need one. Don't put an #ifdef inside - the initializer list; set a default for CPLUSPLUS_CPP_SPEC and - use it. - -2001-03-01 Nathan Sidwell - - Implement using decls inside template functions. - * decl2.c (validate_nonmember_using_decl): Don't special case - fake_std_node in the global namespace. Don't reject early when - processing a template. - (do_local_using_decl): Add to statement tree. Don't do further - processing when building a template. - * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs. - -2001-03-01 Nathan Sidwell - - * decl2.c (do_nonmember_using_decl): Don't complain if we find - same function. Do complain about ambiguating extern "C" - declarations. - -2001-02-28 Nathan Sidwell - - Remove floating point and complex type template constant parms. - * pt.c (convert_nontype_argument): Remove REAL_TYPE and - COMPLEX_TYPE extensions. - (invalid_nontype_parm_type_p): Likewise. - -2001-02-27 Jeffrey Oldham - - * except.c (call_eh_info): Revert "match_function"'s type. - -2001-02-27 Nathan Sidwell - - Fix ctor vtable vcall offsets. - * class.c (struct vtbl_init_data_s): Add rtti_binfo member. - (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter. - (get_matching_base): Remove. - (get_original_base): New function. - (build_vtbl_initializer): Initialize vid.rtti_binfo. - Use a virtual thunk for a ctor vtable with an index - (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a - primary base within a constructor vtable. Only set - BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset - when primary base has been lost. - * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment. - -2001-02-26 Jeffrey Oldham - - * call.c (joust): Ensure more_specialized()'s argument length - parameter has correct value for constructors. - -2001-02-26 Nathan Sidwell - - * except.c (call_eh_info): Cleanup generation of cp_eh_info struct. - - * decl.c (mark_inlined_fns): Prototype. - -2001-02-22 Mark Mitchell - - * spew.c (yylex): Correct handling of friends. - -2001-02-22 Mark Mitchell - - * mangle.c (write_encoding): Pass write_function_type the - FUNCTION_DECL for the function being encoded. - (write_function_type): Pass it along to write_bare_function_type. - (write_bare_function_type): Pass it along to write_method_parms. - (write_method_parms): Don't mangle the compiler-generated - parameters to a constructor or destructor. - -2001-02-22 Andreas Jaeger - - * optimize.c: Include toplev.h for - note_deferral_of_defined_inline_function prototype. - -2001-02-22 Jakub Jelinek - - * cp-tree.h (struct lang_decl_inlined_fns): New. - (struct lang_decls): Add inlined_fns. - (DECL_INLINED_FNS): New macro. - * optimize.c (struct inline_data): Add inlined_fns. - (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro. - (inlinable_function_p): Likewise, fix typo in comment, - function is not inlinable if it already inlined function currently - being optimized. - (expand_call_inline): Add fn to inlined_fns if necessary. - (optimize_function): Initialize inlined_fns. - Save inlined_fns into DECL_INLINED_FNS after expanding inlines. - * decl.c (mark_inlined_fns): New function. - (lang_mark_tree): Call it. - -2001-02-21 Jason Merrill - - * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag. - (DECL_UNINLINABLE): Move to middle-end. - - * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn. - * decl.c (duplicate_decls): Preserve DECL_ABSTRACT. - * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone. - * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the - parms and outer BLOCK. note_deferral_of_defined_inline_function. - - * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on - second parm of op=. - -2001-02-19 Mark Mitchell - - * decl2.c (set_decl_namespace): Allow explicit instantiations in - any namespace. - -2001-02-18 Kriang Lerdsuwanakij - - * optimize.c (expand_call_inline): Don't walk subtrees of type - nodes. - -2001-02-18 Mark Mitchell - - * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry - for a destructor. - -2001-02-18 Jason Merrill - - Do put the VTT parameter in DECL_ARGUMENTS. - * cp-tree.h (struct cp_language_function): Add x_vtt_parm. - (current_vtt_parm): New macro. - (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm. - (DECL_HAS_VTT_PARM_P): New macro. - (DECL_VTT_PARM): Remove. - (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros. - * decl.c (duplicate_decls): Only copy the operator code if - appropriate. - (start_function): Set current_vtt_parm. - (lang_mark_tree): Don't mark vtt_parm. - * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to - DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P. - * class.c (build_clone): Maybe remove the VTT parm. - * optimize.c (maybe_clone_body): Set up the VTT parm. - * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm. - * call.c (build_over_call): Just allow the VTT arg. - * method.c (make_thunk): Don't set DECL_VTT_PARM. - (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM. - (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE. - * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise. - * error.c (dump_function_decl): Likewise. - * call.c (build_user_type_conversion_1, convert_like_real): Abort - if we try to call a constructor with in-charge or VTT parms. - * method.c (skip_artificial_parms_for): New fn. - * call.c (add_function_candidate, build_over_call): Call it. - * call.c (build_new_method_call): Use current_vtt_parm. - * init.c (expand_virtual_init): Likewise. - * class.c (same_signature_p): No longer static. - * cp-tree.h: Declare it. - * search.c (look_for_overrides_r): Use it. - -2001-02-17 Mark Mitchell - - * cp-tree.h (new_abi_rtti_p): Remove. - (name_mangling_version): Likewise. - (flag_do_squangling): Likewise. - * class.c (build_rtti_vtbl_entries): Remove old ABI support. - * decl.c (grokfndecl): Likewise. - * decl2.c (name_mangling_version): Remove. - (flag_do_squangling): Likewise. - (lang_f_options): Remove `squangle'. - (unsupported_options): Add `squangle'. - (cxx_decode_option): Issue a warning about uses of - -fname-mangling-version. - (finish_file): Remove old ABI support. - * pt.c (check_explicit_specialization): Likewise. - (tsubst_decl): Likewise. - * rtti.c (init_rtti_processing): Likewise. - (build_headof): Likewise. - (get_tinfo_decl_dynamic): Likewise. - (tinfo_from_decl): Likewise. - (build_dynamic_cast_1): Likewise. - (synthesize_tinfo_var): Likewise. - * init.c (build_new): Allow enumeration types for the array-bounds - in a direct-new-declarator. - - * semantics.c (finish_typeof): Resolve OFFSET_REFs. - - * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and - TREE_PROTECTED from the template being specialized. - -2001-02-17 Jason Merrill - - * decl2.c (build_artificial_parm): Set TREE_READONLY. - - * decl.c (bad_specifiers): Allow throw specs on things with - pointer-to-function or -member-function type. - * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize - a pmf. - -2001-02-17 Mark Mitchell - - * call.c (check_dtor_name): Handle template names correctly. - -2001-02-16 Jason Merrill - - * cp-tree.h (DECL_USE_VTT_PARM): Remove. - * decl2.c (maybe_retrofit_in_chrg): Don't create it. - * optimize.c (maybe_clone_body): Don't substitute it. - * call.c (build_new_method_call): Check in_chrg instead. - * init.c (expand_virtual_init): Likewise. - -2001-02-16 Gabriel Dos Reis - - * decl.c (check_tag_decl): Make sure a typedef for an anonymous - class-type introduces at least a type-name. - -2001-02-16 Jakub Jelinek - - * call.c (convert_like_real): Create a temporary for non-lvalue. - -2001-02-16 Jeffrey Oldham - - * cp-tree.h: Fix typos in comments. - -2001-02-16 Jason Merrill - - * optimize.c (remap_block): If we're compiling a clone, pass the - new block to insert_block. - -2001-02-16 Mark Mitchell - - * semantics.c (finish_asm_stmt): Robustify. - -2001-02-15 Mark Mitchell - - * pt.c (push_template_decl_real): Don't remangle the name of a - class template. - -2001-02-15 Jim Meyering - - * Make-lang.in (c++.install-common): Depend on installdirs. - (c++.install-info): Likewise. - (c++.install-man): Likewise. - -2001-02-15 Mark Mitchell - - * typeck2.c (build_m_component_ref): Robustify. - -2001-02-15 Alexandre Oliva - - * friend.c (do_friend): Don't take the nested [template] class - into account when deciding whether to warn about the friend - function not referring to a template function. - -2001-02-14 Jakub Jelinek - - * typeck.c (build_unary_op): Clarify error message. - -2001-02-08 Aldy Hernandez - - * parse.y (component_constructor_declarator): allow optional - parentheses around constructor class name. - -2001-02-14 Nathan Sidwell - - * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c - section. - * init.c (emit_base_init): Remove incorrect comment about - virtual bases. - * method.c (make_thunk): Fix comment alignment. - -2001-02-14 Nathan Sidwell - - Kill remnants of this is variable. - * cp-tree.h (flag_this_is_variable): Remove. - * decl2.c (flag_this_is_variable): Remove. - * class.c (fixed_type_or_null): Add cdtor parm. Adjust. - (build_vbase_path): The path is non-static, even in a cdtor. - (resolves_to_fixed_type_p): Add additional return value. - * search.c (init_vbase_pointers): Adjust. - * tree.c (lvalue_p_1): Adjust. - * typeck.c (mark_addressable): Adjust. - -2001-02-14 Nathan Sidwell - - * pt.c (unify): Don't check cv quals of array types. - -2001-02-14 Nathan Sidwell - - * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to - check whether we already have the type. - -2001-02-13 Mark Mitchell - - * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment. - * call.c (build_op_delete_call): Simplify to remove duplicate - code. - * class.c (clone_function_decl): Don't build the deleting variant - of a non-virtual destructor. - * decl.c (finish_destructor_body): Don't call delete if this is a - non-virtual destructor. - * init.c (build_delete): Explicitly call `operator delete' when - deleting an object with a non-virtual destructor. - -2001-02-13 Jason Merrill - - * lang-specs.h: Add more __EXCEPTIONS. - -2001-02-12 Nathan Sidwell - - * typeck2.c (process_init_constructor): Check - TREE_HAS_CONSTRUCTOR before issuing missing init warning. - -2001-02-12 Nathan Sidwell - - * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case): - Remove spurious information in comment. Allow further - adjustments of REFERENCE_TYPE args. - -2001-02-12 Nathan Sidwell - - * errfn.c (cp_deprecated): Tweak diagnostic text. - * parse.y (new_initializer): Deprecate initializer lists - extension. - -2001-02-12 Mark Mitchell - - Remove old ABI support. - -2001-02-11 Mark Mitchell - - * decl2.c (flag_vtable_thunks): Always set it to 1. - (flag_new_abi): Likewise. - * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI. - - * Makefile.in (g++spec.o): Fix typo. - -2001-02-09 Jason Merrill - - * lang-specs.h: Restore definition of __EXCEPTIONS. - -2001-02-08 Jason Merrill - - * search.c (shared_member_p): New function. - (lookup_field_r): Use it. - * cp-tree.h (SHARED_MEMBER_P): Remove. - - * method.c (process_overload_item): Handle template-dependent array - bounds. - * pt.c (type_unification_real): If we end up with undeduced nontype - parms, try again. - - * decl.c (lookup_name_real): Tweak warning to refer to decls, not - types. - - * typeck2.c (friendly_abort): Don't say anything if we have - earlier errors or sorries. - - * decl.c (check_tag_decl): Notice attempts to redefine bool and - wchar_t. Ignore if in_system_header. - - * decl.c (maybe_push_cleanup_level): New fn... - (start_decl_1): ...split out from here. - * cvt.c (build_up_reference): Use it. - * cp-tree.h: Declare it. - -2001-02-07 Mark Mitchell - - * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor - spec. - -2001-02-06 Nathan Sidwell - - * pt.c (lookup_template_class): Make sure it's a primary - template or template_template_parm when called from the parser. - (instantiate_template_class): Add assertion. - -2001-02-05 Alexandre Oliva - - * method.c (build_mangled_name) [old abi]: Protect flush_repeats() - from error_mark_node. - -2001-02-05 Nathan Sidwell - - Fix specification and implementation bugs in V3 ABI - construction vtables. - * cp-tree.h (flag_dump_class_layout): New flag. - (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove. - (BINFO_LOST_PRIMARY_P): New flag. - (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts. - (BINFO_PRIMARY_MARKED_P): Rename to ... - (BINFO_PRIMARY_P): ... here. - (binfo_via_virtual): New prototype. - * decl2.c (flag_dump_class_layout): New flag. - (cxx_decode_option): Set it. Adjust -fdump-translation-unit to - use `=' as a file name separator. - * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary - bases. - (build_vtbl_address): If this is a virtual primary base, then - get the vtbl of what it is ultimately primary for. - * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust - for BINFO_PRIMARY_P. - (dfs_skip_nonprimary_vbases_markedp): Likewise. - (get_shared_vbase_if_not_primary): Likewise. - (dfs_get_pure_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - (fixup_virtual_upcast_offsets): Likewise. - (dfs_find_vbase_instance): Likewise. - (find_vbase_instance): Likewise. - (binfo_from_vbase): Adjust comment to reflect reality. - (binfo_via_virtual): New function. - * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros - for binfo walking during VTT construction. - (dfs_mark_primary_bases): Remove. - (force_canonical_binfo_r): New function. - (force_canonical_binfo): New function. - (mark_primary_virtual_base): New function. - (mark_primary_bases): Walk in inheritance graph order, use - mark_primary_virtual_base. - (determine_primary_base): Use some more intermediate variables. - (dfs_find_final_overrider): Don't check for overriding along a - virtual path. - (dfs_modify_vtables): Walk into primary virtual bases too. - (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P. - (build_base_fields): Likewise. - (dfs_set_offset_for_unshared_vbases): Likewise. - (layout_virtual_bases): Likewise. - (end_of_class): Likewise. - (finish_struct_1): Call dump_class_hierarchy, if requested. - (dfs_get_primary_binfo): Use BINFO_TYPE for binfos. - (dump_class_hierarchy_r): Add stream parameter. Emit more information. - (dump_class_hierarchy): Add file parameter. Append to file, if - required. - (finish_vtbls): Adjust accumulate_vtbl_inits call. - Use canonical base for virtual bases. - (build_vtt): Add more comments. Adjust build_vtt_inits call. - (build_vtt_inits): Remove VIRTUAL_VTTS_P parm. - Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P, - VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for - virtual VTTs. - (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P - from DATA. We want virtual primary bases and all bases via virtual. - Only set BINFO_VPTR_INDEX for top level. Look up from a primary - virtual base when not a construction vtable. - (dfs_ctor_vtable_bases_queue_p): New DFS predicate. - (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call. - Use canonical bases when processing virtual bases. - (accumulate_vtbl_inits): We're interested in any base via a - virtual path. - (dfs_accumulate_vtbl_inits): If this is a primary virtual base - within a construction vtable, determine what is being overridden. - (build_vtbl_initializer): Add more comments - (add_vcall_offset_vtbl_entries_1): Adjust comment. - (build_rtti_vtbl_entries): Check if the base has lost its - primary. - -2001-02-05 Mark Mitchell - - * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES. - -2001-02-04 Richard Kenner - - * decl.c (pushdecl): Call abort instead of fatal. - * except.c (decl_is_java_type): Call fatal_error instead of fatal. - * init.c (build_new_1): Likewise. - (build_java_class_ref): Call internal_error and fatal_error, not fatal. - * decl.c (build_typename_type): hash_table_init now returns void. - decl.c (init_decl_processing): Make an error non-fatal. - -2001-02-04 Mark Mitchell - - * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting. - Document. - (CLASSTYPE_INTERFACE_KNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. - * decl.c (maybe_commonize_var): Use the new name-mangling where - appropriate. - * decl2.c (comdat_linkage): Enhance comments. Make all - compiler-generated things static, if COMDAT is not available. - (get_tinfo_decl): Do not make typeinfo objects that belong in the - library COMDAT. - (tinfo_base_init): Use the correct mangled name for typeinfo - strings, and push them into the global scope. - (typeinfo_in_lib_p): New function. - (synthesize_tinfo_var): Use it. - (create_real_tinfo_var): Likewise. - -2001-02-03 Jakub Jelinek - - * decl.c (push_class_binding): Use context_for_name_lookup instead - of CP_DECL_CONTEXT. - * search.c (context_for_name_lookup): Remove static. Check for NULL - context in the loop. - * cp-tree.h (context_for_name_lookup): Add prototype. - -2001-02-02 Jakub Jelinek - - * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. - * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): - Remove. - * call.c (convert_class_to_reference, build_user_type_conversion_1, - add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. - -2001-02-02 Mark Mitchell - - * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list - of macros used when compiling g++spec.c. - * g++spec.c (lang_specific_driver): Link with the shared - libgcc by default. - -2001-01-29 Joseph S. Myers - - * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator, - make_reference_declarator, make_call_declarator), method.c - (implicitly_declare_fn), parse.y (namespace_using_decl, - notype_unqualified_id, expr_or_declarator, new_type_id, - after_type_declarator, direct_after_type_declarator, - notype_declarator, complex_notype_declarator, - complex_direct_notype_declarator, qualified_id, - notype_qualified_id, overqualified_id, direct_new_declarator, - absdcl, direct_abstract_declarator, conversion_declarator), pt.c - (tsubst), semantics.c (begin_constructor_declarator): Use build_nt - instead of build_parse_node. - -2001-01-28 Kaveh R. Ghazi - - * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE. - (minus_one_node): Moved to top level gcc directory. Renamed - to integer_minus_one_node. - - * init.c (init_init_processing): Don't set minus_one_node. - (build_vec_init): Use integer_minus_one_node. - - * rtti.c (get_tinfo_decl_dynamic): Likewise. - -2001-01-28 Jakub Jelinek - - * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments - identical and they would be replaced with constant, remove - MODIFY_EXPR from the tree. - -2001-01-27 Kaveh R. Ghazi - - * Make-lang.in: Remove all dependencies on defaults.h. - * call.c: Don't include defaults.h. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2001-01-25 Jakub Jelinek - - * mangle.c (write_mangled_name, write_encoding): Mangle overloaded - operators even in "C" linkage. - * method.c (set_mangled_name_for_decl): Likewise. - * decl.c (grokfndecl): Call set_mangled_name_for_decl even for - overloaded operators in "C" linkage. - -2001-01-24 Nathan Sidwell - - * pt.c (tsubst_decl): Remove IN_DECL parameter. - (tsubst_arg_types): Check parameter is not void. - (tsubst): Adjust tsubst_decl call. - -2001-01-24 Nathan Sidwell - - * call.c (add_builtin_candidate): Quote std properly, from - previous change. - -2001-01-23 Kriang Lerdsuwanakij - - * pt.c (check_explicit_specialization): Clone constructors and - destructors. - -2001-01-23 Nathan Sidwell - - * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC - indicates anything special about template depth. Make sure we - only count the user visible template classes. - -2001-01-23 Nathan Sidwell - - * call.c (build_conv): Typo in comment. - (add_builtin_candidate): Add more explanation. - Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR. - Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates - when we have enumeral types. - (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE - candidates for relops and eqops. - (joust): Simplify control flow. Allow a non-template user - function to hide a builtin. - -2001-01-22 Nathan Sidwell - - * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER. - (more_specialized): Add deduction parameter. - * call.c (joust): Adjust more_specialized call. - * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL, - UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags. - (get_bindings_order): Remove. - (get_bindings_real): Add DEDUCE parameter. - (maybe_adjust_types_for_deduction): Return extra unify flags. Do - REFERENCE_TYPE jig for DEDUCE_ORDER. - (type_unification_real): Deal with DEDUCE_ORDER. Use result of - maybe_adjust_types_for_deduction. - (more_specialized): Add DEDUCE parameter. Call get_bindings_real - directly. - (try_one_overload): Use result of maybe_adjust_types_for_deduction. - (check_cv_quals_for_unify): Use new unify qualifier flags. - (unify): Clear new unify qualifier flags. - (get_bindings_real): Add DEDUCE parameter. - (get_bindings): Adjust call to get_bindings_real. - (get_bindings_overload): Likewise. - (most_specialized_instantiation): Adjust call to - more_specialized. - -2001-01-19 Jason Merrill - - * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI. - - * decl.c (init_decl_processing): Just force -fvtable-thunks on if - -fnew-abi. - -2001-01-19 Ute Pelkmann - - * decl2.c (arg_assoc_class): Fix double iteration logic. - -2001-01-19 Jason Merrill - - * init.c (build_delete): Always call convert_force to strip cv-quals. - - * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI. - * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI. - * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI. - -2001-01-19 Nathan Sidwell - - * search.c (get_vbase_1): Count only virtual bases. - -2001-01-19 Nathan Sidwell - - * class.c (duplicate_tag_error): Robustify flag clearing. - -2001-01-19 Nathan Sidwell - - * cp-tree.h (lookup_template_class): Add complain parm. - * decl.c (lookup_namespace_name): Adjust call to - lookup_template_class. - (make_typename_type): Likewise. - * semantics.c (finish_template_type): Likewise. - * pt.c (lookup_template_class): Add complain parm. Adjust. - (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class. - (tsubst): Likewise. - -2001-01-19 Nathan Sidwell - - * pt.c (copy_default_args_to_explicit_spec): Preserve - object's CV quals. Reorganize. - -2001-01-18 Nathan Sidwell - - * typeck.c (build_modify_expr): Say `initialization' for - INIT_EXPRs. - * init.c (build_default_init): Convert to enumeral type, if - needed. - -2001-01-18 Jakub Jelinek - - * parse.y (nomods_initdcl0): Properly set things up for - initdcl0_innards. - -2001-01-18 Nathan Sidwell - - * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag. - (type_unification_real): Set it. - (unify): Use it. - -2001-01-18 Nathan Sidwell - - * decl.c (finish_destructor_body): Convert to vbase pointer here. - -2001-01-18 Nathan Sidwell - - * semantics.c (begin_class_definition): Check we're not inside a - template parm list. - -2001-01-18 Nathan Sidwell - - * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of - BASELINK_P. - -2001-01-16 Kriang Lerdsuwanakij - - * typeck.c (build_function_call_real): Call fold on the CALL_EXPR. - * call.c (build_over_call): Add comment. - -2001-01-16 Daniel Berlin - - * cvt.c (ocp_convert): Handle vector type conversion - * typeck2.c (digest_init): Handle vector type initializations - -2001-01-16 Phil Edwards - - * g++spec.c: Don't add libraries needlessly if -fsyntax-only - was given. - -2001-01-15 Nathan Sidwell - - * pt.c (check_nontype_parm): Rename to ... - (invalid_nontype_parm_type_p): ... here. - (process_template_parm): Adjust. - (convert_template_argument): Adjust. - -2001-01-15 Nathan Sidwell - - * pt.c (check_nontype_parm): New function. - (process_template_parm): Use it. - (convert_template_argument): Use it. - (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to - member. - -2001-01-14 Jeffrey Oldham - - * tree.c: Add defaults.h - (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY. - * Make-lang.in (cp/tree.o): Add defaults.h. - -2001-01-13 Joseph S. Myers - - * Make-lang.in (CXX_C_OBJS): Add c-format.o. - -2001-01-13 Joseph S. Myers - - * g++.1: Change to be ".so man1/gcc.1". - -2001-01-13 Joseph S. Myers - - * Make-lang.in (c++.info, c++.install-info): Build and install g++ - internals info. - (c++.uninstall, c++.maintainer-clean): Remove g++ internals info. - ($(srcdir)/cp/g++int.info): New target. - * gxxint.texi: Add info directory entry. Use @@ in email address. - * .cvsignore: Update. - -2001-01-12 Nathan Sidwell - - * typeck.c (build_c_cast): Do template processing earlier. - Always pedwarn on array casts. - -2001-01-12 Nathan Sidwell - - * friend.c (make_friend_class): Make sure a templated class is - actually a template. - -2001-01-11 Nathan Sidwell - - * decl2.c (get_guard): Set linkage from guarded decl. - -2001-01-11 Nathan Sidwell - - * call.c (convert_default_arg): Check for unprocessed - DEFAULT_ARG. - * cp-tree.h (replace_defarg): Move to spew.c. - (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to - spew.c, which is where they really are. - (done_pending_defargs): Declare. - (unprocessed_defarg_fn): Declare. - * decl.c (replace_defarg): Move to spew.c - * parse.y (structsp): Call done_pending_defargs. - * spew.c (defarg_fns): Rearrange list structure. - (defarg_fnsdone): New static variable. - (defarg_depfns): New static variable. - (init_spew): Adjust. - (add_defarg_fn): Store the type in TREE_TYPE. - (do_pending_defargs): Detect and deal with ordering constraints - and circularity. - (done_pending_defargs): New function. - (unprocessed_defarg_fn): New function. - (replace_defarg): Moved from decl.c. Robustify. Don't save - if circularity detected. - -2001-01-11 Nathan Sidwell - - * pt.c (unify): Check array has a domain, before checking - whether it is variable sized. - -2001-01-11 Nathan Sidwell - - * decl.c (grokparms): Unobfuscate and get correct diagnostic for - parameters with pointers to arrays of unknown bound. - -2001-01-11 Nathan Sidwell - - * parse.y (template_parm_header, template_spec_header): New - reductions. Split out from ... - (template_header): ... here. Use them. - (template_template_parm): Use template_parm_header. - * semantics.c (finish_template_template_parm): Add assert. - -2001-01-10 Mark Mitchell - - * mangle.c (write_builtin_type): Fix thinko. - - * pt.c (copy_default_args_to_explicit_spec_1): New function. - (copy_default_args_to_explicit_spec): Likewise. - (check_explicit_specialization): Use it. - - * class.c (finish_struct_1): Remove last argument in call to - make_decl_rtl; use make_function_rtl instead of make_decl_rtl. - * decl.c (builtin_function): Likewise. - (build_cp_library_fn): Likewise. - (check_initializer): Likewise. - (make_rtl_for_nonlocal_decl): Likewise. - (cp_finish_decl): Likewise. - (start_function): Likewise. - * decl2.c (finish_anon_union): Likewise. - * friend.c (do_friend): Likewise. - * init.c (build_java_class_ref): Likewise. - * method.c (make_thunk): Likewise. - * pt.c (tsubst_friend_function): Likewise. - * semantics.c (expand_body): Likewise. - -2001-01-10 Mark Mitchell - - * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not - looking at DECL_CLONED_FUNCTION for non-functions. - -2001-01-10 Nathan Sidwell - - * error.c (dump_template_parameter): Use parm to determine how - to print default value. - -2001-01-10 Nathan Sidwell - - * class.c (duplicate_tag_error): Clear more flags. - -2001-01-10 Nathan Sidwell - - * call.c (build_new_method_call): Use binfo_for_vbase. - -2001-01-10 Joseph S. Myers - - * cp-tree.h (flag_cond_mismatch): Don't declare. - * decl2.c (flag_cond_mismatch): Don't define. - (lang_f_options): Remove cond-mismatch. - (unsupported_options): Add cond-mismatch. - -2001-01-09 Nathan Sidwell - - * class.c (handle_using_decl): Reject using of constructor name - of sourcing class. Allow injecting of a method with same name as - nested class. Fixup error messages. - -2001-01-09 Joseph S. Myers - - * decl2.c (lang_decode_option): Handle -Wformat=2. - -2001-01-08 Nathan Sidwell - - * cp-tree.h (lang_decl_flags): Rename defined_in_class to - initialized_in_class. - (DECL_DEFINED_IN_CLASS_P): Rename to ... - (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning. - * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P. - (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P. - * pt.c (check_default_tmpl_args): Adjust for - DECL_INITIALIZED_IN_CLASS_P. - (instantiate_class_template): Likewise. - (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P. - - * class.c (finish_struct): Constify saved_filename. - -2001-01-08 Nathan Sidwell - - * class.c (duplicate_tag_error): Adjust diagnostic. - (finish_struct): Locally set location to start of struct. - * decl.c (fixup_anonymous_aggr): Use cp_error_at. - -2001-01-08 Nathan Sidwell - - * decl.c (struct binding_level): Adjust class_shadowed comments - to reflect reality. - (push_class_level_binding): Adjust comments to reflect reality. - Set IDENTIFIER_CLASS_VALUE when replacing an existing binding. - Don't set TREE_VALUE on the class_shadowed list. - -2001-01-07 Alexandre Petit-Bianco - - * decl2.c (acceptable_java_type): Allow references too. - * init.c (build_java_class_ref): When using the new ABI, search - `class$' and have it mangled with `mangle_decl.' - * mangle.c (write_java_integer_type_codes): New function. - (write_builtin_type): Detect and mangle Java integer and real - types. - -2001-01-07 Mark Mitchell - - * decl2.c (grokfield): Don't accept `asm' specifiers for - non-static data members. - -2001-01-07 Kaveh R. Ghazi - - * expr.c (cplus_expand_expr): Don't reset `target'. - -2001-01-07 Neil Booth - - * cp/decl2.c (cxx_post_options): Call cpp_post_options. - -2001-01-05 Nathan Sidwell - - * parse.y (template_datadef): Check for error_mark_node. - -2001-01-05 Nathan Sidwell - - * cp-tree.def (DEFAULT_ARG): Make `x' class. - -2001-01-04 Joseph S. Myers - - * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define. - (record_builtin_type): Make non-static. - (flag_short_double): Don't declare. - (init_decl_processing): Remove the creation of many tree nodes now - in c_common_nodes_and_builtins. - (build_void_list_node): New function. - * decl2.c (flag_short_double, flag_short_wchar): Don't define. - * cp-tree.h (flag_short_wchar): Don't declare. - -2001-01-04 Mark Mitchell - - * call.c (build_conv): Don't use build1 for USER_CONV. - * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes. - -2001-01-03 Joseph S. Myers - - * lex.c (lang_init): Call c_common_lang_init. - -2001-01-03 Nathan Sidwell - - * search.c (lookup_fnfields_here): Remove. - (look_for_overrides_r): Use lookup_fnfields_1. - Ignore functions from using declarations. - -2001-01-03 Nathan Sidwell - - Implement exceptions specifiers for implicit member functions. - * cp-tree.h (merge_exceptions_specifiers): Declare new function. - * method.c (synthesize_exception_spec): New function. - (locate_dtor, locate_ctor, locate_copy): New functions. - (implicitly_declare_fn): Generate the exception spec too. - * search.c (check_final_overrider): Check artificial functions - too. - * typeck2.c (merge_exception_specifiers): New function. - -2001-01-03 Jason Merrill - - * init.c (build_default_init): New fn. - (perform_member_init): Split out from here. - (build_new_1): Use it. Simplify initialization logic. - (build_vec_init): Take an array, rather than a pointer and maxindex. - Speed up simple initializations. Don't clean up if we're assigning. - * cp-tree.h: Adjust. - * decl2.c (do_static_initialization): Remove TREE_VEC case. - * parse.y (new_initializer): Return void_zero_node for (). - * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR. - * typeck2.c (digest_init): Only complain about user-written - CONSTRUCTORs. - -2000-12-22 Mike Stump - - * decl2.c: (max_tinst_depth): Increase to 50. - -2001-01-02 Mark Mitchell - - * class.c (invalidate_class_lookup_cache): Zero the - previous_class_values. - * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not - TREE_INT_CST_HIGH. - (CLASSTYPE_TEMPLATE_LEVEL): Likewise. - * decl.c (free_bindings): New variable. - (push_binding): Don't create a new binding if we have one on the - free list. - (pop_binding): Put old bindings on the free list. - (init_decl_processing): Use size_int, not build_int_2. - Register free_bindings as a GC root. - (cp_make_fname_decl): Use size_int, not build_int_2. - (push_inline_template_parms_recursive): Likewise. - (end_template_parm_list): Likewise. - (for_each_template_parm): Do not use walk_tree_without_duplicates. - (tsubst_template_parms): Use size_int, not build_int_2. - (tsubst): Likewise. - * rtti.c (get_vmi_pseudo_type_info): Likewise. - -2001-01-02 Richard Henderson - - * parse.y (asm): Set ASM_INPUT_P. - -2001-01-02 Jason Merrill - - * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE - for v3 ABI. - - * typeck.c (cp_truthvalue_conversion): New fn. - * cvt.c (ocp_convert): Use it. - - * cp-tree.h: Lose c-common.c decls. - - * typeck.c (build_unary_op): Restore old &a.f diagnostic code. - * cvt.c (convert_to_void): Use type_unknown_p. - - * typeck.c (strip_all_pointer_quals): Also strip quals from - pointer-to-member types. - - * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat - parse.y as C. - - * call.c (build_new_method_call): Do evaluate the object parameter - when accessing a static member. - * typeck.c (build_component_ref): Likewise. - -2001-01-02 Andreas Jaeger - - * decl.c (cp_missing_noreturn_ok_p): New. - (init_decl_processing): Set lang_missing_noreturn_ok_p. - -2000-12-29 Jakub Jelinek - - * decl.c (init_decl_processing): Fix sign of wchar_type_node. - -2000-12-29 Mark Mitchell - - * class.c (pushclass): Remove #if 0'd code. - * cp-tree.h (overload_template_name): Remove. - * decl.c (store_bindings): Simplify. - (pop_from_top_level): Likewise. - * pt.c (overload_template_name): Remove. - (instantiate_decl): Don't call push_to_top_level if it's not - needed. - -2000-12-28 Mark Mitchell - - * pt.c (register_local_specialization): Don't return a value. - (lookup_template_class): Use move-to-front heuristic when looking - up template instantiations. - (instantiate_decl): Only push_to_top_level when we're actually - going to instantiate the template. - -2000-12-29 Hans-Peter Nilsson - - * search.c (binfo_for_vtable): Return least derived class, not - most. Handle secondary vtables. - -2000-12-22 Jason Merrill - - * pt.c (more_specialized): Don't optimize len==0. - (fn_type_unification): If we're adding the return type, increase len. - - * typeck.c (build_binary_op): Fix pmf comparison logic. - - * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not - DECL_STATIC_FUNCTION_P. - - * semantics.c (genrtl_finish_function): Don't try to jump to - return_label unless it exists. - - In partial ordering for a call, ignore parms for which we don't have - a real argument. - * call.c (joust): Pass len to more_specialized. - (add_template_candidate_real): Strip 'this', pass len. - * pt.c (more_specialized): Pass len down. Lose explicit_args parm. - (get_bindings_order): New fn. Pass len down. - (get_bindings_real): Strip 'this', pass len. - (fn_type_unification): Likewise. - (type_unification_real): Succeed after checking 'len' args. - (most_specialized_instantiation): Lose explicit_args parm. - * class.c (resolve_address_of_overloaded_function): Strip 'this', - pass len. - -2000-12-21 Jason Merrill - - * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not - DECL_TEMPLATE_RESULT. - - * search.c (lookup_field_r): Call lookup_fnfields_1, not - lookup_fnfields_here. - - * parse.y (typename_sub2): Return the TYPE_DECL, not the type. - - * call.c (build_object_call): Also allow conversions that return - reference to pointer to function. - (add_conv_candidate): Handle totype being ref to ptr to fn. - (build_field_call): Also allow members of type reference to function. - Lose support for calling pointer to METHOD_TYPE fields. - - * error.c (dump_expr): Handle *_CAST_EXPR. - - * typeck2.c (build_scoped_ref): Always convert to the naming class. - - * tree.c (break_out_cleanups): Lose. - * cp-tree.h: Remove prototype. - * typeck.c (build_component_ref): Don't break_out_cleanups. - (build_compound_expr): Likewise. - * semantics.c (finish_expr_stmt): Likewise. - -2000-12-20 Richard Henderson - - * cp-tree.h: Update declarations. - * decl.c (finish_case_label): Return the new stmt node. - * semantics.c (finish_goto_stmt): Likewise. - (finish_expr_stmt, finish_return_stmt): Likewise. - (finish_break_stmt, finish_continue_stmt): Likewise. - (finish_asm_stmt): Likewise. - * parse.y (already_scoped_stmt): Set STMT_LINENO. - (compstmt, implicitly_scoped_stmt, stmt): Likewise. - (simple_if, simple_stmt): Return the new stmt node. - (save_lineno): New. - -2000-12-18 Joseph S. Myers - - * cp-tree.h: Don't declare warn_long_long. - -2000-12-15 Kriang Lerdsuwanakij - - * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of - IS_AGGR_TYPE. - -2000-12-15 Kriang Lerdsuwanakij - - * pt.c (unify): Handle when both ARG and PARM are - BOUND_TEMPLATE_TEMPLATE_PARM. - -2000-12-15 Kriang Lerdsuwanakij - - * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and - DECL_TEMPLATE_PARM_P. - -2000-12-15 Jason Merrill - - * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs! - - * init.c (build_new_1): Don't strip quals from type. - - * decl.c (pushdecl): Don't check for linkage on a non-decl. - - * call.c (build_op_delete_call): See through ARRAY_TYPEs. - - * call.c (build_new_function_call): Lose space before paren in - error message. - (build_new_method_call): Likewise. - - * typeck2.c (build_m_component_ref): Propagate quals from datum. - -2000-12-14 Kriang Lerdsuwanakij - - * pt.c (check_explicit_specialization): Propagate default - function arguments to explicit specializations. - -2000-12-13 DJ Delorie - - * typeck.c (build_binary_op): Do signed/unsigned warnings for >? - and - - * error.c (dump_function_name): Don't let the user see __comp_ctor. - - Clean up copy-initialization in overloading code. - * call.c (build_user_type_conversion_1): Die if we are asked to - convert to the same or a base type. - (implicit_conversion): Avoid doing so. Lose reference binding code. - (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit - direct-initialization. Also do direct-init part of copy-init. - (build_user_type_conversion): Don't provide context to convert_like. - * cvt.c (ocp_convert): build_user_type_conversion will now provide - the constructor call for copy-init. - - * pt.c (tsubst_decl): Call clone_function_decl here if this is an - instantiation of a member template. - (do_decl_instantiation): Not here. - -2000-12-07 Nathan Sidwell - - * class.c (check_field_decls): Don't special case anonymous - fields in error messages. - (note_name_declared_in_class): Use %D on diagnostic. - - * tree.c (pod_type_p): Use strip_array_types. - (cp_valid_lang_attribute): Likewise. - * typeck.c (cp_type_quals): Strip arrays separately, to avoid - multiple evaluations. - (cp_has_mutable_p): Use strip_array_types. - -2000-12-07 Nathan Sidwell - - * cp-tree.h (sufficient_parms_p): Declare new function. - * call.c (sufficient_parms_p): New function, broken out of ... - (add_function_candidate): ... here. Use it. - (add_conv_candidate): Use it. - * decl.c (grok_ctor_properties): Use it. - -2000-12-07 Jakub Jelinek - - * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. - -2000-12-07 Joseph S. Myers - - * decl2.c (lang_decode_option): Handle -Wformat-security. - -2000-12-06 Kriang Lerdsuwanakij - - * pt.c (verify_class_unification): New function. - (get_class_bindings): Use it. - (try_class_unification): Tidy. - (unify): Handle when argument of a template-id is not - template parameter dependent. - (template_args_equal): Handle when TREE_CODE's do not match. - -2000-12-06 Alexandre Oliva - - * lang-specs.h (c++): When invoking the stand-alone preprocessor - for -save-temps, pass all relevant -Defines to it, and then don't - pass them to cc1plus. - -2000-12-05 Will Cohen - - * decl.c (finish_case_label): Cleared - more_cleanups_ok in surrounding function scopes. - (define_label): Likewise. - -2000-12-05 Nathan Sidwell - - * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document. - (get_matching_virtual): Remove. - (look_for_overrides): Declare new function. - * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or - DECL_VINDEX here. - * class.c (check_for_override): Move base class iteration code - to look_for_overrides. - * search.c (next_baselink): Remove. - (get_virtuals_named_this): Remove. - (get_virtual_destructor): Remove. - (tree_has_any_destructors_p): Remove. - (struct gvnt_info): Remove. - (check_final_overrider): Remove `virtual' from error messages. - (get_matching_virtuals): Remove. Move functionality to ... - (look_for_overrides): ... here, and ... - (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found - to be overriding. - -2000-12-05 Nathan Sidwell - - * typeck.c (get_delta_difference): If via a virtual base, - return zero. - * cvt.c (cp_convert_to_pointer): If via a virtual base, do no - adjustment. - -2000-12-04 Richard Henderson - - * error.c (dump_tree): Use output_add_string not OB_PUTS. - -2000-12-04 Jason Merrill - - * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". - (write_builtin_type): Pass intSI_type_node and the like through - type_for_mode. - * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. - Pass intSI_type_node and the like through type_for_mode. - * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. - * pt.c (tsubst, unify): Likewise. - * tree.c (walk_tree): Likewise. - * error.c (dump_type): Likewise. - (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. - - * Make-lang.in: Tweak top comment for emacs. - (cp/TAGS): Restore. - - * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. - - * class.c (clone_function_decl): Robustify. - -2000-12-04 Michael Matz - - * decl.c (store_bindings): Only search in the non modified - old_bindings for duplicates. - -2000-12-04 Nathan Sidwell - - * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not - TYPE_POLYMORPHIC_P. - - * typeck.c (build_static_cast): Remove unused variable. - -2000-12-01 Kriang Lerdsuwanakij - - * pt.c: Fix typo in comment. - -2000-12-01 Joseph S. Myers - - * decl2.c (warn_format): Remove definition. - (lang_decode_option): Handle -Wformat-nonliteral, - -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat. - -2000-12-01 Joseph S. Myers - - * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. - (init_decl_processing): Don't create string_type_node, - const_string_type_node, wint_type_node, intmax_type_node, - uintmax_type_node, default_function_type, ptrdiff_type_node and - unsigned_ptrdiff_type_node. Adjust position of call to - c_common_nodes_and_builtins. - (identifier_global_value): New function. - -2000-12-01 Nathan Sidwell - - * call.c (standard_conversion): Reject pointer to member - conversions from ambiguous, inaccessible or virtual bases. - * typeck.c (build_static_cast): Don't check pointers to members - specially. - -2000-11-30 Nathan Sidwell - - * method.c (do_build_copy_constructor): Preserve cv - qualifications when accessing source object members. - (do_build_assign_ref): Likewise. Remove separate diagnostics for - unnamed fields. - -2000-11-30 Nathan Sidwell - - * method.c (do_build_assign_ref): Construct appropriately - CV-qualified base reference. Don't allow const casts in base - conversion. - -2000-11-30 Nathan Sidwell - - * call.c (build_over_call): Use VOID_TYPE_P. Don't die on - incomplete return type. - -2000-11-28 Nathan Sidwell - - * parse.y (base_class.1): Produce a _TYPE not a _DECL. - * semantics.c (finish_base_specifier): Accept a _TYPE not a - _DECL. - -2000-11-28 Nathan Sidwell - - * spew.c (yyerror): Cope if yylval.ttype is NULL. - -2000-11-28 Nathan Sidwell - - * decl.c (grokdeclarator): Diagnose undefined template contexts. - -2000-11-28 Nathan Sidwell - - * decl.c (grokdeclarator): Do type access control on friend - class. - -2000-11-27 Nathan Sidwell - - * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by - bison parser ickiness. - * pt.c (tsubst_friend_function): Enter namespace scope when - tsubsting the function name. - * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. - -2000-11-27 Nathan Sidwell - - * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo. - * cvt.c (cp_convert_to_pointer): Add force parameter. - Allow conversions via virtual base if forced. - (convert_to_pointer_force): Adjust call to cp_convert_to_pointer. - (ocp_convert): Likewise. - * search.c (binfo_from_vbase): Return the virtual base's binfo. - * typeck.c (get_delta_difference): Adjust handling of virtual - bases. - -2000-11-26 Mark Mitchell - - * tree.c (struct list_hash): Remove. - (list_hash_table): Make it be an htab. - (struct list_proxy): New type. - (list_hash_eq): New function. - (list_hash_pieces): Renamed from ... - (list_hash): ... this. - (list_hash_lookup): Remove. - (list_hash_add): Remove. - (hash_tree_cons): Use the generic hashtable. - (mark_list_hash): Remove. - (init_tree): Create the hashtable. - -2000-11-25 Joseph S. Myers - - * method.c (build_mangled_C9x_name): Rename to - build_mangled_C99_name. Change C9X references in comments to - refer to C99. - -2000-11-24 Nathan Sidwell - - * parse.y (unary_expr): Move VA_ARG from here ... - (primary): ... to here. - -2000-11-24 Nathan Sidwell - - * semantics.c (finish_id_expr): If type is error_mark, return - error_mark. - -2000-11-23 Nathan Sidwell - - * pt.c (lookup_template_class): Simplify loop exit constructs. - Cope when there is no partial instantiation of a template - template member. - -2000-11-23 J"orn Rennecke - - * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). - -2000-11-22 Mark Mitchell - - * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' - prefix. - - * pt.c (do_decl_instantiate): Explicitly clone constructors and - destructors that haven't already been cloned. - -2000-11-20 Richard Henderson - - * parse.y (yyparse_1): Rename the parser entry point. - -2000-11-20 Alex Samuel - - * mangle.c (write_name): Use for names directly in - function scope. - (write_unscoped_name): Accept names directly in function scope. - -2000-11-20 Nathan Sidwell - - * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. - * parse.y (extdef): Add EXPORT reduction. - * spew.c (yylex): Don't skip export here. - -2000-11-19 Mark Mitchell - - * decl.c (init_decl_processing): Correct name of pure virtual - function under the new ABI. - * rtti.c (throw_bad_cast): Likewise, for bad cast function. - (throw_bad_typeid): Likewise for bad typeid function. - -2000-11-18 Mark Mitchell - - * decl.c (grokparms): Don't even function types of `void' type, - either. - * mangle.c (write_type): Don't crash when confronted with the - error_mark_node. - - * decl.c (grokparms): Don't create parameters of `void' type. - -2000-11-17 Zack Weinberg - - * lex.c (mark_impl_file_chain): Delete. - (init_parse): Remove call to ggc_add_string_root. No need to - ggc_strdup a string constant. Do not add impl_file_chain to GC - roots. - (handle_pragma_implementation): No need to ggc_strdup main_filename. - -2000-11-17 Nathan Sidwell - - * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. - -2000-11-17 Nathan Sidwell - - * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. - * decl.c (grokdeclarator): Don't reject void parms here. - (require_complete_types_for_parms): Simplify, use - complete_type_or_else. - (grokparms): Remove bitrot. Remove funcdef parm. - Deal with ellipsis parm lists here. - * semantics.c (finish_parmlist): Don't append void_list_node - here. Set PARMLIST_ELLIPSIS_P. - -2000-11-17 Nathan Sidwell - - * typeck2.c (incomplete_type_error): Reorganize to avoid - excessive diagnostics. - -2000-11-16 Zack Weinberg - - * lex.c (struct impl_files, internal_filename): Constify a char *. - -2000-11-16 Mark Mitchell - - * mangle.c (write_special_name_constructor): Don't generate - assembler junk when confronted with an old-style constructor. - (write_special_name_destructor): Likewise. - (mangle_decl_string): Do it here instead. - -2000-11-16 Nathan Sidwell - - * call.c (op_error): Make error messages clearer. - -2000-11-15 Mark Mitchell - - * decl.c (wrapup_globals_for_namespace): Don't mark things - TREE_ASM_WRITTEN when they're not. - -2000-11-15 Jason Merrill - - * typeck2.c (friendly_abort): Uncount the error before handing - off to fancy_abort. - -2000-11-15 Nathan Sidwell - - * typeck.c (lookup_anon_field): Cope with qv qualifiers. - -2000-11-14 Mark Mitchell - - * class.c (build_vtbl_initializer): Fix typo in comment. - * typeck.c (expr_sizeof): Don't crash on errors. - -2000-11-14 Jim Wilson - - * lang-specs.h: Add %2 after %(cc1_options). - -2000-11-14 Richard Henderson - - * typeck.c (c_sizeof): Be strict about casting result value - back to c_size_type_node. - (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise. - -2000-11-13 Joseph S. Myers - - * typeck.c (build_unary_op): Use boolean_increment from - c-common.c, moving the relevant code there. - -2000-11-11 Jason Merrill - - * typeck.c (mark_addressable): Don't call put_var_into_stack. - - * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics - in inlines. - -2000-11-10 Kaveh R. Ghazi - - * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. - * lex.c (copy_lang_decl): Likewise. - -2000-11-09 Mark Mitchell - - * dump.c (cp_dump_tree): Don't dump function bodies here. - - * Make-lang.in (CXX_C_OBJS): Add c-dump.o. - (dump.o): Update dependency list. - * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. - (flag_dump_translation_unit): Likewise. - (CP_TYPE_QUALS): Adjust definition. - (DECL_C_BIT_FIELD): Remove. - (SET_DECL_C_BIT_FIELD): Likewise. - (CLEAR_DECL_C_BIT_FIELD): Likewise. - (add_maybe_template): Likewise. - (strip_array_types): Likewise. - (dump_node_to_file): Likewise. - (cp_dump_tree): New function. - * decl.c (init_decl_processing): Set lang_dump_tree. - * decl2.c (flag_dump_translation_unit): Remove. - * dump.c: Move most of it to ../c-dump.c. - (cp_dump_tree): New function. - * pt.c (add_maybe_template): Remove. - * typeck.c (strip_array_types): Likewise. - -2000-11-07 Eric Christopher - - * decl.c (init_decl_processing): Change definition of - __wchar_t to wchar_t. Remove artificial declaration of - wchar_t. - * lex.c: Change instances of __wchar_t to wchar_t. - -2000-11-09 Nathan Sidwell - - * lex.c (do_identifier): Don't lookup_name for operators. - * parse.y (operator): Save looking_for_typename. - (unoperator): Restore it. - * spew.c (frob_opname): Use nth_token for lookahead. - -2000-11-08 Nathan Sidwell - - * decl.c (grok_op_properties): Always use coerce_new_type and - coerce_delete_type. - * decl2.c (coerce_new_type): Use c_size_type_node. Preserve - exception specification. Tidy up. - (coerce_delete_type): Preserve exception specification. Tidy up. - -2000-11-07 Joseph S. Myers - - * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c - (push_binding_level), error.c (cp_tree_printer), pt.c - (process_partial_specialization, tsubst_template_arg_vector), - search.c (lookup_member): Use memset () instead of bzero (). - -2000-11-07 Nathan Sidwell - - * decl.c (build_ptrmemfunc_type): Allow error_mark_node. - -2000-11-05 Joseph S. Myers - - * Make-lang.in (c++.distdir): Remove. - -2000-11-04 Mark Mitchell - - * decl2.c (do_nonmember_using_decl): Allow `extern "C"' - declarations from different namespaces to be combined. - -2000-11-03 Zack Weinberg - - * decl.c: Include tm_p.h. - -2000-11-03 Joseph S. Myers - - * tree.c (cp_tree_equal): Use memcmp () instead of bcmp (). - -2000-11-02 Joseph S. Myers - - * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c - (build_overload_value), repo.c (open_repo_file), xref.c - (open_xref_file): Use strchr () and strrchr () instead of index () - and rindex (). - -2000-11-01 Bernd Schmidt - - * call.c (build_over_call): Call fold on the CALL_EXPR. - -2000-11-01 Gabriel Dos Reis - - * error.c (dump_template_decl): Separate template hearders with - space not comma. - -2000-10-31 Gabriel Dos Reis - - * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace - TS_* flags with corresponding TFF_*. Adjust prototypes of - functions (which used to take a tree_string_flags) to take an int. - - * cp-tree.h (enum tree_string_flags): Remove - (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, - TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, - TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, - TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, - TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, - TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. - (type_as_string, decl_as_string, expr_as_string, - context_as_string): Adjust prototype. - - * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER - instead of TS_PLAIN. - - * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF - instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of - plain `0'. - -2000-10-30 Mark Mitchell - - * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. - (linkage_kind): New enumeration. - (decl_linkage): New function. - * decl2.c (comdat_linkage): Extend comment. - * error.c (dump_function_decl): Print the arguments used to - instantiate a template, even when not printing the type of the - function. - * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, - not TREE_PUBLIC, to test for external linkage. - * tree.c (decl_linkage): New function. - -2000-10-28 Mark Mitchell - - * pt.c (instantiate_decl): Always instantiate static data members - initialized in-class. - -2000-10-27 Zack Weinberg - - * Make-lang.in: Move all build rules here from Makefile.in, - adapt to new context. Wrap all rules that change the current - directory in parentheses. Expunge all references to $(P). - When one command depends on another and they're run all at - once, use && to separate them, not ;. Add OUTPUT_OPTION to - all object-file generation rules. Delete obsolete variables. - - * Makefile.in: Delete. - * config-lang.in: Delete outputs= line. - -2000-10-26 Gabriel Dos Reis - - * error.c (dump_function_decl): Print no space between - `ptr-operator' the `type-specifier' of the return type. - (dump_type_prefix): Make sure we put space at the appropriate - place. - -2000-10-23 Jason Merrill - - * call.c (equal_functions): Also call decls_match for extern "C" fns. - -2000-10-22 Jason Merrill - - * call.c (build_conditional_expr): Use ocp_convert to force - rvalue conversion. - -2000-10-22 Mark Mitchell - - * call.c (standard_conversion): Use RVALUE_CONVs for all - expressions that satisfy lvalue_p, not just those that satisfy - real_lvalue_p. - - * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. - - * typeck.c (c_sizeof): Return an expression of `size_t' type, - not one with TYPE_IS_SIZETYPE set. - (dubious_conversion_warnings): Remove special-case code. - -2000-10-21 Geoffrey Keating - - * decl2.c (arg_assoc_type): Handle VECTOR_TYPE. - * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. - (dump_type_prefix): Print vector-of-int as 'int vector'. - (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. - * tree.c (walk_tree): Handle VECTOR_TYPE. - - * decl.c (init_decl_processing): Call MD_INIT_BUILTINS. - -2000-10-21 Jason Merrill - - * parse.y (operator): Set got_object from got_scope. - Set looking_for_typename. - * decl.c (lookup_name_real): Clear val after setting from_obj. - Reorganize diagnostic. - -2000-10-20 Jason Merrill - - * tree.c (walk_tree): Don't walk into default args. - - * error.c (dump_expr): Use host_integerp. - -2000-10-20 David Edelsohn - - * typeck2.c (abstract_virtuals_error): Use "because" instead of - "since" in error message. - -2000-10-20 Richard Kenner - - * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. - -2000-10-20 Jeffrey Oldham - - * decl.c (revert_static_member_fn): Fixed typo. - -2000-10-19 Mark Mitchell - - * class.c (subobject_offset_fn): New type. - (dfs_record_base_offsets): Remove. - (record_base_offsets): Likewise. - (dfs_search_base_offsets): Likewise. - (record_subobject_offset): New function. - (check_subobject_offset): Likewise. - (walk_subobject_offsets): Likewise. - (record_subobject_offsets): Likewise. - (layout_conflict_p): Reimplement. - (layout_nonempty_base_or_field): Correct handling of type - conflicts during layout. - (layout_empty_base): Likewise. - (build_base_field): Adjust to handle new representation of empty - base offset table. - (build_base_fields): Likewise. - (layout_virtual_bases): Likewise. - (splay_tree_compare_integer_csts): New function. - (layout_class_type): Use a splay_tree, rather than a varray, to - represent the offsets of empty bases. - - * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. - * decl.c (select_decl): Don't return declarations that are - DECL_ANTICIPATED. - -2000-10-18 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. - (fake_std_node): New macro. - * decl.c (in_std): Rename to ... - (in_fake_std): ... this. - (flag_no_builtin): Remove. - (flag_no_nonansi_builtin): Likewise. - (walk_namespaces_r): Use fake_std_node. - (push_namespace): Use std_identifier. - (pop_namespace): Use in_fake_std. - (lookup_name_real): Use fake_std_node. - (init_decl_processing): When -fhonor-std, create the `std' - namespace. Don't create a dummy fake_std_node in that case. - Adjust call to c_common_nodes_and_builtins. Use std_identifier. - (builtin_function): Put builtins whose names don't begin - with `_' in the std namespace. - * decl2.c (flag_no_builtin): Remove. - (flag_no_nonansi_builtin): Likewise. - (set_decl_namespace): Use fake_std_node. - (validate_nonmember_using_decl): Likewise. - (do_using_directive): Likewise. - (handle_class_head): Likewise. - * dump.c (dequeue_and_dump): Likewise. - * except.c (init_exception_processing): Use std_identifier. - * init.c (build_member_call): Use fake_std_node. - * rtti.c (init_rtti_processing): Use std_identifier. - -2000-10-17 Mark Mitchell - - * cp-tree.h (back_end_hook): Remove declaration. - * decl2.c (back_end_hook): Remove definition. - - * dump.c (dequeue_and_dump): Dump TREE_USED. - -2000-10-17 Brad Lucier - - * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int). - -2000-10-17 Joseph S. Myers - - * decl.c (WINT_TYPE): Define. - (init_decl_processing): Create types unsigned_ptrdiff_type_node, - c_size_type_node, signed_size_type_node and wint_type_node. - -2000-10-17 Joseph S. Myers - - * decl2.c (warn_missing_format_attribute): New variable. - (lang_decode_option): Decode -Wmissing-format-attribute. - -2000-10-16 Mark Mitchell - - * typeck.c (qualify_type): Remove. - (composite_pointer_type): Fix handling of conversions to `cv void*'. - -2000-10-14 Kaveh R. Ghazi - - * Makefile.in (parse.c, parse.h): Fix think-o in last patch. - -2000-10-13 Kaveh R. Ghazi - - * Makefile.in (parse.c, parse.h): Create atomically. - -2000-10-12 Mark Mitchell - - * class.c (current_obstack): Remove. - * decl.c (ggc_p): Remove. - (start_decl): Don't use decl_tree_cons. - (grokdeclarator): Don't use build_decl_list. - (start_function): Don't use decl_tree_cons. - (finish_function): Don't mess with obstacks. - * decl2.c (grok_x_components): Don't use build_decl_list. - * lex.c (make_call_declarator): Don't call decl_tree_cons. - (implicitly_declare_fn): Don't call build_decl_list. - * parse.y (frob_specs): Don't call build_decl_list or - decl_tree_cons. - (expr_or_declarator_intern): Don't call decl_tree_cons. - (primary): Don't call build_decl_list. - (fcast_or_absdcl): Likewise. - (typed_declspecs): Don't call decl_tree_cons. - (reserved_declspecs): Don't call build_decl_list. - (declmods): Likewise. - (reserved_typespecquals): Likewise. - (aggr): Likewise. - (new_type_id): Likewise. - (cv_qualifiers): Likewise. - (after_type_declarator_intern): Likewise. - (notype_declarator_intern): Likewise. - (absdcl_intern): Likewise. - (named_parm): Likewise. - * pt.c (most_specialized_class): Likewise. - * repo.c (temporary_obstack): Make it a structure, not a pointer. - (init_repo): Initialize it. - * search.c (current_obstack): Remove. - * typeck2.c (add_exception_specifier): Don't call build_decl_list. - -2000-10-09 Richard Henderson - - * Make-lang.in (CXX_EXTRA_HEADERS): Remove. - (c++ language support bits for libgcc): Remove. - (c++.clean): Remove cplib2.txt cleanup. - * config-lang.in (headers, lib2funcs): Remove. - - * exception.cc, new.cc, new1.cc, new2.cc: Remove files. - * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. - * inc/cxxabi.h, inc/exception, inc/new: Remove files. - * inc/new.h, inc/typeinfo: Remove files. - -2000-10-08 Joseph S. Myers - - * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already - defined. - (init_decl_processing): Initialize intmax_type_node and - uintmax_type_node. - -2000-10-06 Richard Henderson - - * cp-tree.h (struct cp_language_function): Remove x_result_rtx. - (original_result_rtx): Remove. - * decl.c (save_function_data): Don't clear x_result_rtx. - (mark_lang_function): Don't mark it either. - * expr.c (fixup_result_decl): Remove. - * semantics.c (genrtl_named_return_value): Frob the return decl - before calling emit_local_var. - (genrtl_finish_function): Don't call fixup_result_decl. - Always emit the jump to return_label. - -2000-10-06 Nathan Sidwell - - * pt.c (lookup_template_class): Set current access for enum. - (tsubst_enum): Set file & line for enum decl. - - * spew.c (yylex): Remove unused variable. - -2000-10-05 Richard Henderson - - * semantics.c (genrtl_finish_function): Don't init or check - can_reach_end; remove noreturn and return value checks. - -2000-10-05 Tom Tromey - - * init.c (build_java_class_ref): Use `build_static_name' with a - suffix, not a prefix, to build the class object's name. - -2000-10-05 Nathan Sidwell - - * cp-tree.h (access_kind): Fix comment typo. - * decl2.c (grokfield): Fix diagnostic typo. - * semantics.c (finish_template_type): Fix comment typo. - (finish_qualified_object_call_expr): Likewise. - -2000-10-05 Nathan Sidwell - - * pt.c (tsubst_expr, DECL_STMT case): Don't process if - tsubsting fails. - -2000-10-05 Nathan Sidwell - - * spew.c (frob_id): New static function. - (frob_opname): Use it. - (yylex): Use it. - -2000-10-01 Mark Mitchell - - * decl.c (lang_mark_false_label_stack): Remove. - * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. - -2000-09-30 Joseph S. Myers - - * gxxint.texi: Use @email for formatting email addresses. - -2000-09-29 Gabriel Dos Reis - - * error.c: Remove direct obstack manipulation. Replace with - output_buffer-based formatting. Adjust calls to removed macros. - (obstack_chunk_alloc, obstack_chunk_free): Remove. - (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, - OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. - -2000-09-24 Mark Mitchell - - * ir.texi: Move to ../c-tree.texi. - -2000-09-20 Jason Merrill - - * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P. - -2000-09-21 Andreas Jaeger - - * errfn.c: Move declaration of cp_printer and cp_printers to ... - * cp-tree.h: ... here. - - * error.c: Remove declaration of cp_printer. - -2000-09-20 Mark Mitchell - - * tree.c (mark_local_for_remap_r): Handle CASE_LABELs. - -2000-09-20 Hans-Peter Nilsson - - * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and - users. - -2000-09-18 Mark Mitchell - - * decl.c (start_function): Robustify. - -2000-09-18 Kaveh R. Ghazi - - * cp-tree.h (check_function_format): Accept a `status' parameter. - - * call.c, typeck.c: Updates calls to `check_function_format'. - -2000-09-17 Geoffrey Keating - - * decl2.c (handle_class_head): Always push some scope even - in the error case. - -2000-09-16 Mark Mitchell - - * cp-tree.h (struct cp_language_function): Remove - x_scope_stmt_stack and name_declared. - (current_scope_stmt_stack): Remove. - (function_name_declared_p): New macro. - (struct lang_decl_flags): Use c_lang_decl as a base class. - (context): Remove. - (struct lang_decl): Replace saved_tree with context. - (DECL_FRIEND_CONTEXT): Adjust accordingly. - (SET_DECL_FRIEND_CONTEXT): Likewise. - (DECL_VIRTUAL_CONTEXT): Likewise. - (DECL_SAVED_TREE): Remove. - (C_DECLARED_LABEL_FLAG): Likewise. - (cplus_expand_expr_stmt): Don't declare. - (add_decl_stmt): Likewise. - (add_scope_stmt): Likewise. - * decl.c (mark_stmt_tree): Remove. - (case_compare): Likewise. - (finish_case_label): Use c_add_case_label. - (init_decl_processing): Set more language-specific hooks. - (build_enumerator): Fix typo in comment. - (cplus_expand_expr_stmt): Remove. - (mark_lang_function): Use mark_c_language_function. - (lang_mark_tree): Use c_mark_lang_decl. - * decl2.c: Change order of inclusion. - * except.c: Likewise. - * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall - back on c_expand_expr. - * friend.c: Include expr.h. - * init.c: Change order of inclusion. - * Makefile.in: Update dependencies. - * lex.h (free_lang_decl_chain): Remove. - * optimize.c (maybe_clone_body): Use function_name_declared_p. - * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if - it doesn't exist. - (instantiate_decl): Use function_name_declared_p. - * semantics.c (lang_expand_expr_stmt): Remove. - (set_current_function_name_declared): Likewise. - (current_function_name_declared): Likewise. - (begin_compound_stmt): Use function_name_declared_p. - (add_decl_stmt): Remove. - (setup_vtbl_ptr): Use function_name_declared_p. - (add_scope_stmt): Remove. - (current_scope_stmt_stack): New function. - (cp_expand_stmt): Don't handle SCOPE_STMTs. - (expand_body): Use function_name_declared_p. - * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. - * typeck.c: Change order of includes. - (convert_sequence): Remove. - -2000-09-14 Joseph S. Myers - - * lex.c (reswords): Add _Complex. - -2000-09-14 Richard Kenner - - * Make-lang.in (cplib2.txt): Depend on cp/Makefile. - -2000-09-13 J. David Anglin - - * init.c (begin_init_stmts): Don't use // comments. - -2000-09-12 Jason Merrill - - * decl.c (maybe_deduce_size_from_array_init): Set do_default for - all non-extern arrays. - - * decl.c (grokdeclarator): Complain about 'friend T' for implicit - typenames, too. Downgrade complaint to pedwarn. - (xref_tag): Warn about surprising behavior of 'friend struct T'. - * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for - 'class This::Inherited'. - -2000-09-12 Mark Mitchell - - * decl.c (finish_case_label): Given the LABEL_DECL a - DECL_CONTEXT. - -2000-09-12 Gabriel Dos Reis - - * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, - TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF, - TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, - TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, - TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE): - New macros. - (sorry_for_unsupported_tree, print_scope_operator, - print_left_paren, print_right_paren, print_left_bracket, - print_right_bracket, print_whitespace): Likewise. - (aggr_variety): Rename to class_key_or_enum. - (print_type): Rename to print_type_id. - (print_type_specifier_seq, print_simple_type_specifier, - print_elaborated_type_specifier, - print_rest_of_abstract_declarator, - print_parameter_declaration_clause, print_exception_specification, - print_nested_name_specifier, print_template_id, - typedef_original_name, print_template_argument_list_start, - print_template_argument_list_end): New functions. - -2000-09-11 Gabriel Dos Reis - - * ir.texi: Add more documentation. - -2000-09-11 Mark Mitchell - - * cp-tree.h (struct saved_scope): Remove x_function_parms. - (current_function_parms): Don't define. - (struct cp_language_function): Remove parms_stored. - (current_function_just_assigned_this): Don't define. - (current_function_parms_stored): Likewise. - (static_ctors): Declare. - (static_dtors): Likewise. - (SF_EXPAND): Don't define. - (expand_start_early_try_stmts): Remove declaration. - (store_parm_decls): Likewise. - * decl.c (static_ctors): Don't declare. - (static_dtors): Likewise. - (struct binding_level): Remove this_block. - (poplevel): Remove dead code. - (set_block): Likewise. - (mark_binding_level): Don't mark this_block. - (mark_saved_scope): Don't mark x_function_parms. - (init_decl_processing): Don't add current_function_parms as a GC - root. - (check_function_type): Change prototype. - (start_function): Remove RTL-generation code. - (expand_start_early_try_stmts): Remove. - (store_parm_decls): Give it internal linkage. Remove - RTL-generation code. - (finish_function): Remove RTL-generation code. - * decl2.c (static_ctors): Fix formatting. - (static_dtors): Likewise. - * method.c (use_thunk): Don't call store_parm_decls. - (synthesize_method): Likewise. - * optimize.c (maybe_clone_body): Likewise. - * parse.y (fn.def2): Likewise. - (.set_base_init): Likewise. - (nodecls): Likewise. - * pt.c (instantiate_decl): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - * semantics.c (genrtl_try_block): Simplify. - (expand_body): Use genrtl_start_function and - genrtl_finish_function. - (genrtl_start_function): New function. - (genrtl_finish_function): Likewise. - -2000-09-11 Nathan Sidwell - - * error.c (cp_tree_printer, case 'P'): Append break. - -2000-09-11 Nathan Sidwell - - * cp-tree.h (frob_opname): Declare. - * parse.y (saved_scopes): New static variable. - (cp_parse_init): Adjust. - (do_id): If lastiddecl is NULL, do do_identifier. - (operator): Save scope information. - (unoperator): New reduction. Restore scope information. - (operator_name): Append unoperator. Call frob_opname. - * spew.c (frob_opname): Define. - -2000-09-10 Zack Weinberg - - * decl.c, rtti.c: Include defaults.h if not already included. - Don't define the *_TYPE_SIZE macros. - -2000-09-09 Mark Mitchell - - * cp-tree.h (push_switch): Change prototype. - (check_cp_case_value): Remove declaration. - (decl_constant_value): Likewise. - * decl.c (struct cp_switch): Add switch_stmt and cases. - (case_compare): New function. - (push_switch): Set switch_stmt. Initialize cases. - (pop_switch): Clean up cases. - (define_case_label): Rename to ... - (finish_case_label): ... this. Do semantic analysis for case - labels here. - (start_function): Correct comment. - * decl2.c (check_cp_case_value): Remove. - * expr.c (do_case): Remove. - * pt.c (tsubst_expr): Adjust call to finish_case_label. - * semantics.c (genrtl_do_poplevel): Remove declaration. - (RECHAIN_STMTS): Remove. - (finish_break_stmt): Use build_break_stmt. - (finish_continue_stmt): Use build_continue_stmt. - (finish_switch_cond): Adjust condition here, rater than in - c_expand_start_case. - (finish_case_label): Remove. - * typeck.c (c_expand_return): Remove. - (c_expand_start_case): Likewise. - -2000-09-07 Gabriel Dos Reis - - * ir.texi: Document type nodes. - -2000-09-06 Mark Mitchell - - * cp-tree.h (init_cp_semantics): Declare. - (genrtl_try_block): Don't declare. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_named_return_value): Likewise. - * lex.c (init_parse): Call init_cp_semantics. - * semantics.c (genrtl_try_block): Give it internal linkage. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_named_return_value): Likewise. - (lang_expand_stmt): Rename to ... - (cp_expand_stmt): ... this. Only handle C++-specific nodes. - (init_cp_semantics): Define. - - * decl.c (initialize_local_var): Remove RTL-generating code. - * semantics.c (genrtl_try_block): Fix formatting. - - Move statement-tree facilities from C++ to C front-end. - * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO. - (void_zero_node): Remove. - (stmt_tree): Likewise. - (scope_chain): Adjust. - (language_function): Rename to cp_language_function. - (cp_function_chain): Adjust. - (current_stmt_tree): Remove. - (last_tree): Likewise. - (last_expr_type): Likewise. - (struct lang_decl): Adjust. - (STMT_IS_FULL_EXPR_P): Remove. - (add_tree): Remove. - (begin_stmt_tree): Likewise. - (finish_stmt_tree): Likewise. - (walk_tree_fn): Likewise. - (walk_stmt_tree): Likewise. - * class.c (finish_struct): Replace use of add_tree with add_stmt. - * decl.c (mark_stmt_tree): Adjust type. - (init_decl_processing): Don't build void_zero_node. - (initialize_local_var): Adjust usage of current_stmt_tree. - (finish_enum): Use add_stmt, not add_tree. - (save_function_data): Adjust use of language_function. - (finish_constructor_body): Use add_stmt, not add_tree. - (finish_destructor_body): Likewise. - (push_cp_function_context): Adjust use of language_function. - (pop_cp_function_context): Likewise. - (mark_lang_function): Likewise. - (mark_cp_function_context): Likewise. - * init.c (build_aggr_init): Adjust use of current_stmt_tree. - (build_vec_init): Likewise. - * semantics.c (SET_LAST_STMT): Remove. - (RECHAIN_STMTS): Don't use it. - (stmts_are_full_exprs_p): Adjust use of current_stmt_tree. - (current_stmt_tree): Define. - (add_tree): Remove. - (finish_goto_stmt): Use add_stmt, not add_tree. - (finish_expr_stmt): Likewise. - (begin_if_stmt): Likewise. - (finish_then_clause): Likewise. - (begin_while_stmt): Likewise. - (begin_do_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_break_stmt): Likewise. - (finish_continue_stmt): Likewise. - (begin_switch_stmt): Likewise. - (finish_case_label): Likewise. - (begin_try_block): Likewise. - (begin_function_try_block): Likewise. - (begin_handler): Likewise. - (begin_catch_block): Likewise. - (begin_compound_stmt): Likewise. - (begin_asm_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (add_decl_stmt): Likewise. - (finish_subobject): Likewise. - (finish_decl_cleanup): Likewise. - (finish_named_return_value): Likewise. - (setup_vtbl_ptr): Likewise. - (add_scope_stmt): Likewise. - (finish_stmt_expr): Likewise. - (prune_unused_decls): Remove. - (begin_stmt_tree): Likewise. - (finish_stmt_tree): Likewise. - (prep_stmt): Adjust use of current_stmt_tree. - (lang_expand_stmt): Likewise. - * tree.c (statement_code_p): Remove. - (cp_statement_code_p): New function. - (walk_stmt_tree): Remove. - (init_tree): Set lang_statement_code_p. - -2000-09-06 Zack Weinberg - - Integrated preprocessor. - - * Make-lang.in, Makefile.in: Remove all references to input.c, - gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. - * gxx.gperf, hash.h, input.c: Delete. - * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is - initialized properly. - - * class.c (fixup_pending_inline): Take a tree, not a - struct pending_inline *. All callers changed. - (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, - RID_PROTECTED entries in ridpointers[] array here. - * decl.c (duplicate_decls): Do not refer to struct - pending_inline. - (record_builtin_type, init_decl_processing): Use RID_MAX not - CP_RID_MAX. - (grokdeclarator): Use C_IS_RESERVED_WORD. - * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of - cpplib. - (grok_x_components): Do not inspect pending_inlines chain. - - * cp-tree.h (struct lang_identifier): Add rid_code entry. - (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. - (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. - (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, - TIME_IDENTIFIER_FILEINFO): Kill. - Update prototypes. - * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a - single 32-bit word. - * parse.y: Call do_pending_inlines unconditionally. - reinit_parse_for_method is now snarf_method. fn.defpen is no - longer necessary. Remove unnecessary annotation on - SCOPE. Do not refer to end_of_file or struct pending_inline. - * semantics.c (begin_inline_definitions): Call - do_pending_inlines unconditionally. - - * lex.c: Remove all code now shared with C front end. - Initialize cpplib properly if USE_CPPLIB. Put reserved words - into the get_identifier table. Rewrite pragma handling to - work with the registry. Move code to save tokens for later - processing to spew.c. - - * spew.c: Rewrite everything in terms of token streams instead - of text. Move routines here from lex.c / input.c as - appropriate. GC-mark trees hanging off the pending inlines - chain. - -2000-09-06 Mark Mitchell - - * NEWS: Mention that the named return value extension has been - deprecated. - * cp-tree.h (original_result_rtx): Define. - (TREE_REFERENCE_EXPR): Remove. - (DECL_VPARENT): Likewise. - (pushdecl_nonclass_level): Likewise. - (store_return_init): Likewise. - (reinit_lang_specific): Likewise. - (genrtl_named_return_value): Change prototype. - * decl.c (original_result_rtx): Remove. - (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. - Do not generate RTL for local variables here. - (store_return_init): Remove. - * semantics.c (genrtl_named_return_value): Simplify. Fold in - store_return_init. - (finish_named_return_value): Adjust accordingly. Warn that this - extension is deprecated. - (lang_expand_stmt): Adjust call to genrtl_named_return_value. - -2000-09-06 Nathan Sidwell - - * pt.c (type_unification_real): Replace switch with if. - (unify): Tsubst non-type parms before comparing. - -2000-09-06 Nathan Sidwell - - * error.c (dump_typename): New function, broken out of ... - (dump_type): ... here. Use it. - * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE. - -2000-09-06 Nathan Sidwell - - * init.c (build_offset_ref): Deal with namespace scoped - TEMPLATE_ID_EXPRs. - -2000-09-06 Nathan Sidwell - - * class.c (resolve_address_of_overloaded_function): Add - explanation message. - * decl.c (define_case_label): Reformat explanation. - * decl2.c (finish_static_data_member_decl): Likewise. - (grokfield): Likewise. - * friend.c (do_friend): Likewise. - -2000-09-05 Zack Weinberg - - * tree.c (walk_tree): Expose tail recursion. - (walk_stmt_tree): New function. - * cp-tree.h: Prototype walk_stmt_tree. - * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not - the BLOCKs directly. If a BLOCK has no variables after - pruning, discard it. - (finish_stmt_tree): Use walk_stmt_tree. No need to save and - restore the line number. - -2000-09-05 Mark Mitchell - - * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. - (pt.o): Remove dependency on HTAB_H. - * cp-tree.h: Include hashtab.h. - (walk_tree): Change prototype. - (walk_tree_without_duplicates): New function. - * decl.c (check_default_argument): Use it. - * optimize.c (remap_decl): Adjust calls to walk_tree. - (copy_body): Likewise. - (expand_calls_inline): Likewise. - (calls_setjmp_p): Use walk_tree_without_duplicates. - * pt.c: Don't include hashtab.h. - (for_each_template_parm): Use walk_tree_without_duplicates. - * semantics.c (finish-stmt_tree): Likewise. - (expand_body): Likewise. - * tree.c (walk_tree): Add additional parameter. - (walk_tree_without_duplicates): New function. - (count_trees): Use it. - (verify_stmt_tree): Adjust call to walk_tree. - (find_tree): Use walk_tree_without_duplicates. - (no_linkage_check): Likewise. - (break_out_target_exprs): Adjust call to walk_tree. - (cp_unsave): Likewise. - -2000-09-04 Kriang Lerdsuwanakij - - * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code. - (TEMPLATE_TEMPLATE_PARM): Adjust comment. - * cp-tree.h (TYPE_BINFO): Adjust comment. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. - (TEMPLATE_TYPE_PARM_INDEX): Likewise. - (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. - (TYPE_TEMPLATE_INFO): Likewise. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise. - * class.c (push_nested_class): Likewise. - * decl.c (lookup_name_real): Likewise. - (grokdeclarator): Likewise. - (grok_op_properties): Likewise. - (xref_tag): Likewise. - (xref_basetypes): Likewise. - * decl2.c (constructor_name_full): Likewise. - (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case. - (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. - * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case. - (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (dump_type_suffix): Likewise. - * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM - instead. - (get_aggr_from_typedef): Likewise. - * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case. - (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (write_template_parm): Likewise. - (write_template_template_parm): Check tree code instead of - using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - * method.c (build_overload_nested_name): Add - BOUND_TEMPLATE_TEMPLATE_PARM. - (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case. - * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM. - * pt.c (convert_template_argument): Check tree code instead of - using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case. - (for_each_template_parm): Adjust comment. - (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. - (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use - template_args_equal to compare template template parameter cases. - * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM. - * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM - instead. - * tree.c (copy_template_template_parm): Decide whether to create - a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node. - (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (copy_tree_r): Likewise. - * typeck.c (comptypes): Likewise. Check tree code instead of - using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - -2000-09-04 Mark Elbrecht - - * decl.c (finish_function): Move the code for handling functions - marked with the constructor and destructor attributes inside the - expand_p block. - -2000-09-04 Nathan Sidwell - - * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR. - -2000-09-04 Nathan Sidwell - - * pt.c (lookup_template_class): Remove abort. - * tree.c (get_type_decl): Allow error_mark_node. - -2000-09-04 Nathan Sidwell - - * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside - TEMPLATE_ID_EXPRs. - -2000-09-03 Mark Mitchell - - * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change - new ABI mangling. - -2000-09-01 Nathan Sidwell - - * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify - union tag mismatch error reporting. - -2000-09-01 Nathan Sidwell - - * call.c (build_scoped_method_call): Check it is not a namespace. - -2000-08-30 Jason Merrill - - * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context. - - * tree.c (bot_manip): Check TREE_CONSTANT rather than - !TREE_SIDE_EFFECTS. Call break_out_target_exprs and - build_target_expr_with_type for the non-AGGR_INIT_EXPR case. - - * decl.c (start_function): Always call make_function_rtl. - -2000-08-29 Zack Weinberg - - * semantics.c (prune_unused_decls): New function. - (finish_stmt_tree): Call it via walk_tree. - -2000-08-29 Zack Weinberg - - * class.c (build_secondary_vtable): Constify a char *. - * decl.c (init_decl_processing): Initialize function_id_node, - pretty_function_id_node, and func_id_node. - * input.c (struct input_source): Constify 'str'. - (feed_input): Constify first argument. - * mangle.c (write_identifier): Constify argument. - * pt.c (mangle_class_name_for_template): Constify argument. - -2000-08-29 Mark Mitchell - - * typeck.c (mark_addressable): Remove code that pokes around in - RTL. - -2000-08-28 Jason Merrill - - * lex.c (file_name_nondirectory): Move to toplev.c. - - * cp-tree.h (LOCAL_CLASS_P): New macro. - * class.c (finish_struct_1): Use it. - -2000-08-27 Alex Samuel - - * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. - (write_encoding): Pass another argument to write_name. - (write_name): Add ignore_local_scope parameter. Fix handling of - local names. - (write_nested_name): Use write_unqualified_name. - (write_prefix): Likewise. Skip out on FUNCTION_DECLs. - (write_template_prefix): Use write_unqualified_name. - (write_component): Remove. - (write_local_name): Add parameter. Use direct local entity to - discriminator calculation. - (write_class_enum_type): Pass another argument to write_name. - (write_template_template_arg): Likewise. - (make_guard_variable): Likewise. - -2000-08-27 Jason Merrill - - * decl.c (pushdecl): Matching decls for local externs are found in - the current level. Propagate linkage information from previous - declarations. - -2000-08-26 Gabriel Dos Reis - - * ir.texi (Expressions): Fix typo. - -2000-08-25 Greg McGary - - * tree.c (init_tree): Use ARRAY_SIZE. - -2000-08-25 Gabriel Dos Reis - - * error.c (cp_tree_printer): Rework. - -2000-08-25 Mark Mitchell - - * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and - dyn-string.o. - (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c. - (cp-demangle.o): Remove target. - (dyn-string.o): Likewise. - - * decl.c (grokfndecl): Require that `main' return an `int'. - * mangle.c (write_encoding): Don't mangle return types for - conversion functions. - -2000-08-25 Gabriel Dos Reis - - * error.c (tree_formatting_info): New data type. - (tree_being_formatted): New macro. - (tree_formatting_flags): Likewise. - (put_whitespace): Likewise. - (print_tree_identifier): Likewise. - (print_identifier): Likewise. - (cp_tree_printer, print_function_argument_list, print_declaration, - print_expression, print_function_declaration, - print_function_parameter, print_type, print_cv_qualifier): New - functions. - (init_error): Initialize lang_printer. - -2000-08-24 Jason Merrill - - * typeck.c (build_ptrmemfunc): Just reinterpret if there's no - adjustment necessary. - -2000-08-24 Greg McGary - - * cp-tree.h (MAIN_NAME_P): Remove macro. - -2000-08-24 Gabriel Dos Reis - - * error.c (print_instantiation_context): Don't forget to flush the - buffer. - -2000-08-23 Jason Merrill - - * typeck.c (build_ptrmemfunc): Save the input pmf. - - * method.c (process_modifiers): Use same_type_p. - -2000-08-23 Mark Mitchell - - * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. - * mangle.c (write_function_type): Change prototype. - (write_encoding): Don't mangle return types for - constructors or destructors. - (write_type): Adjust call to write_function_type. - * pt.c (instantiate_template): Instantiate alternate entry points - when instantiating the main function. - -2000-08-23 Gabriel Dos Reis - - * error.c (cp_print_error_function): Don't use embedded '\n' in - output_printf. - -2000-08-23 Gabriel Dos Reis - - * decl.c (init_decl_processing): Remove bogus initialization. - * error.c (lang_print_error_function): Restore here. - (init_error): Initialize print_error_function. - -2000-08-22 Theodore Papadopoulo - - * decl2.c (arg_assoc): Revert my 2000-08-11 change. - -2000-08-22 Gabriel Dos Reis - - * Makefile.in (error.o): Depends on diagnostic.h - - * cp-tree.h (problematic_instantiation_changed, - record_last_problematic_instantiation, current_instantiation, - print_instantiation_context): Declare. - (maybe_print_template_context): Remove. - - * decl.c (init_decl_processing): Set print_error_function to NULL. - (lang_print_error_function): Remove, since we're using a new - machinery. - - * error.c: #include diagnostic.h - (function_category): New function. - (cp_diagnostic_starter): Likewise. - (cp_diagnostic_finalizer): Likewise. - (cp_print_error_function): Likewise. - (maybe_print_instantiation_context): Likewise. - (print_instantiation_full_context): Likewise. - (print_instantiation_partial_context): Likewise. - (print_instantiation_context): Define. - (init_error): Initialize diagnostic pager and finalizer. - - * pt.c (problematic_instantiation_changed): Define. - (record_last_problematic_instantiation): Likewise. - (current_instantiation): Likewise. - (maybe_print_template_context): Remove. - (print_template_context): Likewise. - (current_tinst_level): Make static to reflect Brendan Kehoe's - change of 1995-04-13. - (push_tinst_level): Call print_instantiation_context. - -2000-08-21 Nix - - * lang-specs.h: Do not process -o or run the assembler if - -fsyntax-only. - -2000-08-21 Joseph S. Myers - - * decl.c (flag_hosted, flag_noniso_default_format_attributes): New - variables. - * decl2.c (lang_decode_option): Disable gettext attributes for - -ansi. - -2000-08-21 Gabriel Dos Reis - - * lex.c (lang_init_options): Default diagnostic message maximum - length to 80, when line-wrapping. - -2000-08-20 Mark Mitchell - - * class.c (build_vtbl_initializer): Clear the entire - vtbl_init_data. Start keeping track of the functions for which we - have created vcall offsets here. - (dfs_build_vcall_offset_vtbl_entries): Remove. - (build_vcall_offset_vtbl_entries): Reimplement. - (add_vcall_offset_vtbl_entries_r): New function. - (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for - computing when vcall offsets are necessary. - -2000-08-18 Nathan Sidwell - - * decl.c (member_function_or_else): Use cp_error ... %T. - (grokdeclarator): Likewise. - (start_method): Likewise. - * friend.c (make_friend_class): Use cp_pedwarn ... %T. - -2000-08-18 Nathan Sidwell - - * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class - TYPE_DECLs. - -2000-08-18 Nathan Sidwell - - * cp-tree.h (PTRMEM_OK_P): New macro. - (itf_ptrmem_ok): New enumeration value. - * class.c (resolve_address_of_overloaded_function): Add PTRMEM - argument. Diagnose implicit pointer to member. - (instantiate_type): Don't diagnose implicit pointer to member - here. Pass itf_ptrmem_ok if ok. Adjust calls to - resolve_address_of_overloaded_function. - * init.c (build_offset_ref): Set PTRMEM_OK_P. - (resolve_offset_ref): Don't diagnose implicit pointer to member here. - * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here. - * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P. - (build_unary_op): Deal with single non-static member in - microsoft-land. - -2000-08-18 Nathan Sidwell - - * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE. - -2000-08-18 Nathan Sidwell - - * cp-tree.h (enum_name_string): Remove prototype. - (report_case_error): Remove prototype. - * cp/typeck2.c (enum_name_string): Remove. - (report_case_error): Remove. - * error.c (dump_expr): Deal with enum values directly. - Correctly negate integer constant. - -2000-08-17 Nathan Sidwell - - * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare. - (__cxa_vec_delete2, __cxa_vec_delete3): Declare. - * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement. - (__cxa_vec_delete2, __cxa_vec_delete3): Implement. - (__cxa_vec_new): Use __cxa_vec_new2. - (__cxa_vec_delete): Use __cxa_vec_delete2. - -2000-08-17 Nathan Sidwell - - * vec.cc (__cxa_vec_new): Set "C" linkage. - (__cxa_vec_ctor): Likewise. - (__cxa_vec_cctor): Likewise. - (__cxa_vec_dtor): Likewise. - (__cxa_vec_delete): Likewise. - * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage. - (__cxa_vec_ctor): Likewise. - (__cxa_vec_cctor): Likewise. - (__cxa_vec_dtor): Likewise. - (__cxa_vec_delete): Likewise. - -2000-08-17 Nathan Sidwell - - * class.c (instantiate_type): Reinstate local variable - deleted in previous change. - - * cvt.c (cp_convert_to_pointer): Pass itf_complain, not - itf_no_attributes. - -2000-08-17 Nathan Sidwell - - * cp-tree.h (instantiate_type_flags): New enumeration. - (instantiate_type): Change parameter. - * class.c (instantiate_type): Adjust prototype. Adjust. - * call.c (standard_conversion): Adjust instantiate_type call. - (reference_binding): Likewise. - (build_op_delete_call): Likewise. - (convert_like_real): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_reference): Likewise. - * pt.c (convert_nontype_argument): Likewise. - * typeck.c (build_binary_op): Likewise. - (build_ptrmemfunc): Likewise. - (convert_for_assignment): Likewise. - -2000-08-17 Nathan Sidwell - - * cp-tree.h (CPTR_AGGR_TAG): New global tree node. - (current_aggr): Define. - * decl.c (grokdeclarator): Make sure a friend class is an - elaborated type specifier. - * parse.y (current_aggr): Remove static definition. - (cp_parse_init): Adjust. - (structsp): Clear and restore current_aggr. - (component_decl_list): Clear current_aggr. - - * error.c (dump_type, case TYPENAME_TYPE): Don't emit the - aggregate tag on the typename's context. - - * pt.c (tsubst_friend_class): Return error_mark_node, if - parms becomes NULL. - (instantiate_class_template): Ignore error_mark_node friend types. - -2000-08-14 Nathan Sidwell - - * cvt.c (warn_ref_binding): New static function, broken out of ... - (convert_to_reference): ... here. Use it. - -2000-08-11 Kriang Lerdsuwanakij - - * parse.y (template_arg): Add rule for template qualified with - global scope. - -2000-08-11 Theodore Papadopoulo - - * decl2.c (add_function): Reorganize. - (arg_assoc): Do not consider function template decls. - -2000-08-11 Jason Merrill - - * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're - looking inside. - -2000-08-11 Nathan Sidwell - - * cp-tree.h (resolve_scope_to_name): Remove unused prototype. - (lookup_nested_tag): Likewise. - - * decl2.c (grokfield): Fix comment to reflect many types of _DECLs - can be produced. - -2000-08-11 Nathan Sidwell - - * parse.y (named_complex_class_head_sans_basetype): Remove - always true if. - -2000-08-11 Nathan Sidwell - - * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build - explicit TEMPLATE_ID_EXPR args. - (build_expr_from_tree, case CALL_EXPR): Likewise. - -2000-08-11 Nathan Sidwell - - * decl.c (check_tag_decl): Diagnose typename's which don't - declare anything. - -2000-08-10 Nathan Sidwell - - * init.c (build_aggr_init): Reject bogus array initializers - early. - -2000-08-09 Nathan Sidwell - - * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi - runtime. - * cp/tinfo.cc (__dynamic_cast): Likewise. - * cp/inc/cxxabi.h (__dynamic_cast): Likewise. - -2000-08-09 Nathan Sidwell - - * cvt.c (convert_to_pointer_force): Fix error message when - attempting to cast from ambiguous base. - -2000-08-08 Jason Merrill - - * pt.c (tsubst_aggr_type): Bail if creating the argvec fails. - (tsubst_template_arg_vector): Likewise. - - * decl2.c (build_anon_union_vars): Choose the largest field; don't - assume that one will be as large as the union. - -2000-08-07 Kazu Hirata - - * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo. - * decl.c (pop_labels): Likewise. - -2000-08-04 Jeffrey Oldham - - * inc/cxxabi.h (__pbase_type_info): Changed member names to match - specifications. - (__pointer_to_member_type_info): Likewise. - (__base_class_info): Likewise. - (__class_type_info): Likewise. - (__si_class_type_info): Likewise. - (__vmi_class_type_info): Likewise. - * tinfo.cc (__si_class_type_info::__do_find_public_src): - Changed member names to match specifications. - (__vmi_class_type_info::__do_find_public_src): Likewise. - (__si_class_type_info::__do_dyncast): Likewise. - (__vmi_class_type_info::__do_dyncast): Likewise. - (__si_class_type_info::__do_upcast): Likewise. - (__vmi_class_type_info::__do_upcast): Likewise. - * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. - (__pbase_type_info::__pointer_catch): Likewise. - (__pointer_type_info::__pointer_catch): Likewise. - (__pointer_to_member_type_info::__pointer_catch): Likewise. - -2000-08-04 Zack Weinberg - - * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. - * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. - (cc1plus): Link with $(BACKEND) and $(C_OBJS). - -2000-08-04 Mark Mitchell - - * cp-tree.h (add_method): Change prototype. - * class.c (add_method): Remove FIELDS parameter. Add ERROR_P. - Don't double the size of the method vector in the error case. - (handle_using_decl): Adjust call to add_method. - (add_implicitly_declared_members): Likewise. - (clone_function_decl): Likewise. - * decl2.c (check_classfn): Likewise. - * semantics.c (finish_member_declaration): Likewise. - -2000-08-04 Joseph S. Myers - - * decl.c (flag_isoc94): New variable. - -2000-08-02 Jason Merrill - - * pt.c (do_type_instantiation): Add complain parm; don't complain - if called recursively. - * cp-tree.h, parse.y: Adjust. - -2000-08-02 Zack Weinberg - - * decl2.c: Silently ignore -Wstrict-prototypes; warn about - -Wno-strict-prototypes. - - * g++spec.c: Adjust type of second argument to - lang_specific_driver, and update code as necessary. - - * cp-tree.h: Don't prototype min_precision here. - (my_friendly_assert): Cast expression to void. - * semantics.c (do_poplevel): Initialize scope_stmts. - -2000-08-02 Mark Mitchell - - * cp-tree.h (DECL_NEEDED_P): Tweak. - -2000-07-28 Jason Merrill - - * lang-specs.h: Use %i in rule for .ii files. - -2000-07-31 Zack Weinberg - - * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. - -2000-07-30 Mark Mitchell - - Allow indirect primary bases. - * cp-tree.h (struct lang_type): Remove vfield_parent. Add - primary_base. - (CLASSTYPE_VFIELD_PARENT): Remove. - (CLASSTYPE_PRIMARY_BINFO): Reimplement. - (BINFO_PRIMARY_BINFO): Remove. - (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement. - (BINFO_VBASE_PRIMARY_P): Likewise. - (BINFO_PRIMARY_BASE_OF): New macro. - (BINFO_INDIRECT_PRIMARY_P): Likewise. - (get_primary_binfo): New function. - * decl.c (lang_mark_tree): Make lang_type::primary_base. - * class.c (vcall_offset_data_s): Rename to ... - (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p, - and add ctor_vtbl_p. - (get_derived_offset): Use get_primary_binfo. - (dfs_mark_primary_bases): Adjust handling of virtual primary - bases. - (mark_primary_bases): Likewise. - (set_primary_base): Take a binfo, not an integer, as a - representation of the primary base. - (indirect_primary_base_p): Remove. - (determine_primary_base): Adjust for indirect primary bases. - (dfs_find_final_overrider): Fix typo in coment. - (update_vtable_entry_for_fn): Use get_primary_binfo. - (layout_nonempty_base_or_field): Tweak. - (build_base_fields): Adjust for new primary base semantics. - (dfs_propagate_binfo_offsets): Remove. - (propagate_binfo_offsets): Rewrite. - (dfs_set_offset_for_shared_vbases): Remove. - (layout_virtual_bases): Don't use it. - (layout_class_type): Set CLASSTYPE_SIZE correctly under the new - ABI. - (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not - CLASSTYPE_VFIELD_PARENT. - (dfs_get_primary_binfo): New function. - (get_primary_binfo): Likewise. - (dump_class_hierarchy_r): Tweak printing of primary bases. - (build_vtbl_initializer): Fix typo in comments. Use - vtbl_init_data. - (build_vcall_and_vbase_vtbl_entries): Likewise. - (build_vbaes_offset_vtbl_entries): Likewise. - (dfs_build_vcall_offset_vtbl_entries): Adjust setting of - BV_VCALL_INDEX to handle indirect primary bases. - (build_vcall_offset_vtbl_entries): Use vtbl_init_data. - (build_rtti_vtbl_entries): Likewise. - * search.c (get_shared_vbase_if_not_primary): Tweak. - (find_vbase_instance): Likewise. - (binfo_for_vtable): Simplify. - * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF. - (make_binfo): Make it have 11 entries. - -2000-07-30 Alex Samuel - - * mangle.c (DECL_TEMPLATE_ID_P): Remove. - (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when - ascertaining primaryness. - (G): Remove template_args. - (decl_is_template_id): New function. - (write_encoding): Use decl_is_template_id. - (write_name): Likewise. Handle type_decls. Get main variant of - type decls. - (write_nested_name): Likewise. - (write_prefix): Likewise. - (write_template_prefix): Likewise. - (write_special_name_constructor): Remove defunct production from - comment. - (write_bare_function_type): Remove comment about absent parameter. - (write_template_template_arg): Add missing grammar production to - comment. - -2000-07-27 Jason Merrill - - * decl.c (duplicate_decls): If common_type produces a non-typedef - type for a typedef, just use the old type. - -2000-07-27 Mark Mitchell - - * cp-tree.h (function_depth): Declare. - (verify_stmt_tree): Likewise. - (find_tree): Likewise. - * decl.c (function_depth): Give it external linkage. - * optimize.c (optimize_function): Increment and decrement it. - * tree.c (verify_stmt_tree_r): New function. - (verify_stmt_tree): Likewise. - (find_tree_r): Likewise. - (find_tree): Likewise. - -2000-07-27 Jason Merrill - - * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use - TYPE_PTRMEMFUNC_P. - * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC. - -2000-07-26 Mark Mitchell - - * decl.c (start_cleanup_fn): Mark the function as `inline'. - * decl2.c (get_guard): Call cp_finish_decl, not - rest_of_decl_compilation, for local guards. - * lex.c (do_identifier): Remove unused variable. - -2000-07-26 Marc Espie - - * parse.y: Add missing ';'. - -2000-07-26 Mark Mitchell - - * parse.y (empty_parms): Use `()', not `(...)', when in the scope - of `extern "C++"'. - -2000-07-25 Nathan Sidwell - - Kill strict_prototype. Backwards compatibility only for - non NO_IMPLICIT_EXTERN_C systems. - * cp-tree.h (flag_strict_prototype): Remove. - (strict_prototype): Remove. - (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. - * decl.c (maybe_push_to_top_level): Adjust. - (pop_from_top_level): Adjust. - (decls_match): Only allow sloppy parm matching for ancient - system headers. - (init_decl_processing): Adjust. - (grokdeclarator): Adjust. - * decl2.c (flag_strict_prototype): Remove. - (strict_prototype): Remove. - (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. - (lang_f_options): Remove "strict-prototype". - (unsupported-options): Add "strict-prototype". - * lex.c (do_identifier): Adjust. - (do_scoped_id): Adjust. - * parse.y (empty_parms): Adjust. - * class.c (push_lang_context): Adjust. - (pop_lang_context): Adjust. - * typeck.c (comp_target_parms): Adjust. - -2000-07-25 Nathan Sidwell - - * decl.c (poplevel): Deal with anonymous variables at for scope. - (maybe_inject_for_scope_var): Likewise. - -2000-07-25 Zack Weinberg - - * decl.c: Remove all signal handling code, now done in toplev.c. - -2000-07-23 Mark Mitchell - - * decl.c (make_rtl_for_nonlocal_decl): Rework. - - * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set - correctly. - -2000-07-20 Zack Weinberg - - * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. - Define my_friendly_assert and my_friendly_abort as macros - which may call friendly_abort. Prototype friendly abort, not - my_friendly_abort or my_friendly_assert. - * decl.c (signal_catch): Report the signal caught in the error - message. Call fatal directly. - * typeck2.c (ack, my_friendly_assert): Delete. - (my_friendly_abort): Rename to friendly_abort. Expect file, - line, and function parameters. Report the abort code, then - call fancy_abort. Do not mask an abort if errors have - already occurred. - -2000-07-18 Nathan Sidwell - - * typeck.c (comp_target_parms): Remove obsolete parameter. - (comp_target_types): Adjust. - -2000-07-17 Jason Merrill - - * typeck.c (mark_addressable): Never set TREE_USED. - * call.c (build_call): Don't abort on calls to library functions - that have been declared normally. - - * typeck.c (build_binary_op): Fix grammar in warning. - - * exception.cc (__eh_free): Fix prototype. - - * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR. - - * decl.c (pushdecl): Handle seeing an OVERLOAD in - IDENTIFIER_NAMESPACE_VALUE. - -2000-07-16 Mark Mitchell - - * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation. - * method.c (use_thunk): Correct handling of vcall offsets. - -2000-07-14 Zack Weinberg - - * .cvsignore: parse.h and parse.c have no cp- prefix. - -2000-07-13 Mark Mitchell - - * .cvsignore: New file. - -2000-07-13 Zack Weinberg - - * lang-specs.h: Use the new named specs. Remove unnecessary braces. - -2000-07-12 Mark Mitchell - - * Makefile.in ($(PARSE_H)): Depend directly on parse.y. - * parse.c: Remove. - * parse.h: Likewise. - -2000-07-11 Mark Mitchell - - * class.c (layout_class_type): Add pointers to virtual bases after - base classes under the old ABI. - -2000-07-10 Benjamin Chelf - - * semantics.c (finish_for_stmt): Remove call to emit_line_note. - (finish_continue_stmt): Likewise. - (begin_for_stmt): Remove call to note_level_for_for. - (finish_goto_stmt): Change call from build_min_nt - to build_stmt. - (finish_expr_stmt): Likewise. - (begin_if_stmt): Likewise. - (begin_while_stmt): Likewise. - (finish_while_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_for_stmt): Likewise. - (finish_break_stmt): Likewise. - (begin_switch_stmt): Likewise. - (finish_case_label): Likewise. - (genrtl_try_block): Likewise. - (begin_try_block): Likewise. - (begin_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (add_decl_stmt): Likewise. - (finish_subobject): Likewise. - (finish_decl_cleanup): Likewise. - (finish_named_return_value): Likewise. - (setup_vtbl_ptr): Likewise. - (add_scope_stmt): Likewise. - * decl.c (finish_constructor_body): Likewise. - (finish_destructor_body): Likewise. - * optimize.c (copy_body_r): Likewise. - (initialize_inlined_parameters): Likewise. - (declare_return_variable): Likewise. - (expand_call_inline): Likewise. - -2000-07-10 Jakub Jelinek - - * semantics.c (expand_body): Sync interface information - at the end of function body expansion. - -2000-07-09 Jason Merrill - - * init.c (build_new_1): Bail early if the call to new fails. - - * decl.c (compute_array_index_type): Check specifically for - an INTEGER_CST, not just TREE_CONSTANT. - - * decl.c (duplicate_decls): Don't call duplicate_decls on - the DECL_TEMPLATE_RESULT. - (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different - codes. - - * error.c (dump_template_bindings): Don't crash if we had an - invalid argument list. - - * typeck.c (c_expand_start_case): Do narrowing here. - * semantics.c (finish_switch_cond): Not here. - -2000-07-09 Hidvegi Zoli - - * parse.y (asm_clobbers): Do string concatenation. - -2000-07-09 Mark Mitchell - - * decl.c (pushtag): Don't put local classes in template functions - on the local_classes list. - -2000-07-04 Scott Snyder - - * decl2.c (get_guard): Add missing return for old ABI local - variable case. - -2000-07-09 Mark Mitchell - - * cp-tree.h (char_type_p): New function. - * decl.c (init_decl_processing): Don't initialize - signed_wchar_type_node or unsigned_wchar_type_node. - (complete_array_type): Handle brace-enclosed string-constants. - * rtti.c (emit_support_tinfos): Remove #if 0'd code. - * tree.c (char_type_p): New function. - * typeck2.c (digest_init): Use char_type_p. - -2000-07-06 Nathan Sidwell - - * pt.c (tsubst): Don't layout type, if it's error_mark. - -2000-07-06 Nathan Sidwell - - * pt.c (instantiate_pending_templates): Reset template level. - -2000-07-05 Jason Merrill - - * call.c (joust): Don't complain about `operator char *()' beating - `operator const char *() const'. - -2000-07-04 scott snyder - Jason Merrill - - * repo.c (repo_get_id): Handle the case where a class with virtual - bases has a null TYPE_BINFO_VTABLE. - -2000-07-04 Kevin Buhr - Jason Merrill - - * parse.y (member_init): Just pass in the type. - * init.c (expand_member_init): Handle getting a type. - -2000-07-04 Martin v. Löwis - Jason Merrill - - * decl.c (finish_function): Warn if a function has no return - statement. - Suggested by Andrew Koenig. - * typeck.c (check_return_expr): Do set current_function_returns_value - if we got an error_mark_node. - -2000-07-03 Nathan Sidwell - - * decl2.c (push_decl_namespace): Push the original namespace. - -2000-07-03 Nathan Sidwell - - * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES. - * semantics.c (begin_class_definition): Clear it. - -2000-07-02 Benjamin Chelf - - * cp-tree.h (genrtl_goto_stmt): Remove declaration. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - - * init.c (begin_init_stmts): Remove call to - genrtl_begin_compound_stmt. - (finish_init_stmts): Remove call to genrtl_finish_compound_stmt. - - * semantics.c (lang_expand_stmt): Changed call to - genrtl_compound_stmt to ignore return value. - -2000-07-02 Mark Mitchell - - * mangle.c (canonicalize_for_substitution): Return the canonical - variant of a type. - - * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a - TYPE_DECL. - * typeck.c (commonparms): Remove obstack manipulations. - -2000-07-01 Benjamin Chelf - - * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o. - - * Makefile.in (OBJS): Added ../c-semantics.o. - (OBJDEPS): Likewise. - - * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to - ../c-common.h. - (struct stmt_tree): Added comment. - (current_function_name_declared): Removed. - (stmts_are_full_exprs_p): Likewise. - (genrtl_do_pushlevel): Likewise. - (genrtl_clear_out_block): Likewise. - (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h. - (DECL_ANON_UNION_ELEMS): Likewise. - (emit_local_var): Likewise. - (make_rtl_for_local_static): Likewise. - (do_case): Likewise. - (expand_stmt): Likewise. - (genrtl_decl_cleanup): Likewise. - (c_expand_asm_operands): Likewise. - (c_expand_return): Likewise. - (c_expand_start_case): Likewise. - - * decl.c (make_rtl_for_local_static): Moved to c-semantics.c. - (emit_local_var): Likewise. - (initialize_local_var): Change reference to - stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). - Change reference to stmts_are_full_exprs_p to - current_stmt_tree->stmts_are_full_exprs_p. - (push_cp_function_context): Likewise. - - * expect.c (expand_throw): Change reference to - stmts_are_full_exprs_p. - - * init.c (build_aggr_init): Change reference to - stmts_are_full_exprs_p. - (build_vec_init): Likewise. - - * optimize.c (maybe_clone_body): Change reference to - current_function_name_declared to - cp_function_chain->name_declared. - - * pt.c (instantiate_decl): Change reference to - current_function_name_declared to - cp_function_chain->name_declared. - - * semantics.c (expand_cond): Moved declaration to c-common.h. - (genrtl_do_pushlevel): Moved to c-semantics.c. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (gerntl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_decl_cleanup): Likewise. - (expand_cond): Likewise. - (expand_stmt): Renamed to ... - (lang_expand_stmt): ... this. - (lang_expand_expr_stmt): Initialize. - (set_current_function_name_declared): Likewise. - (stmts_are_full_exprs_p): Likewise. - (current_function_name_declared): Likewise. - (anon_aggr_type_p): Likewise. - (do_poplevel): Change reference to - stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). - Change reference to stmts_are_full_exprs_p to - current_stmt_tree->stmts_are_full_exprs_p. - (add_tree): Likewise. - (finish_expr_stmt): Likewise. - (prep_stmt): Likewise. - (lang_expand_stmt): Likewise. - (begin_compound_stmt): Change reference to - current_function_name_declared to - cp_function_chain->name_declared and call to - current_function_name_declared(). - (setup_vtbl_ptr): Likewise. - (genrtl_do_poplevel): Removed. - -2000-06-30 Jason Merrill - - * init.c (init_init_processing): Go back to aligning like - double_type_node for old ABI. - (get_cookie_size): Make cookie larger if we get a type that needs - more alignment. - (build_vec_delete): Call it. - - * typeck.c (qualify_type_recursive): New fn. - (composite_pointer_type): Use it. - (build_binary_op): Use composite_pointer_type. - -2000-06-24 Carlos O'Ryan - Jason Merrill - - * typeck.c (check_return_expr): Don't complain about returning - NULL from operator new if -fcheck-new. - * cp-tree.h: Declare flag_check_new here. - * init.c: Not here. - -2000-06-28 Alex Samuel - - * mangle.c (find_substitution): Use same_type_p. - (write_encoding): Don't check for substitutions. - -2000-06-30 Nathan Sidwell - - * parse.y (expr_no_comma_rangle): New non-terminal. - (template_parm): Use it for default parameter case. - (template_arg): Use it. - (expr_no_commas): Remove commented out undefined extensions. - * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. - * parse.h, parse.c: Rebuilt. - -2000-06-30 Mark Mitchell - - * semantics.c (genrtl_asm_stmt): Don't decay input operands here. - (finish_asm_stmt): Do it here, instead. - - * cp-tree.h (ridpointers): Don't declare. - * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX. - (record_builtin_java_type): Likewise. - (init_decl_processing): Likewise. - * lex.c: Move inclusion of lex.h. - (ridpointers): Don't define. - (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of - RID_MAX. - * lex.h (enum rid): Rename to ... - (enum cp_rid): ... this. - (ridpointers): Don't declare. - * parse.y: Move inclusion of lex.h. - * parse.c: Regenerated. - * spew.c: Move inclusion of lex.h. - - * cp-tree.h (struct language_function): Remove temp_name_counter. - (temp_name_counter): Remove. - (get_temp_name): Change prototype. - (get_guard): New function. - (get_guard_cond): Likewise. - (set_guard): Likewise. - * cvt.c (build_up_reference): Adjust call to get_temp_name. - * decl.c (expand_static_init): Use get_guard and friends to - implement guard variables. - * decl2.c (get_temp_name): Assume that the variables created are - always static. - (get_sentry): Rename to ... - (get_guard): ... this. Implement new ABI guard variables. - (get_guard_bits): New function. - (get_guard_cond): Likewise. - (set_guard): Likewise. - (start_static_initialization_or_destruction): Use them. - (do_static_initialization): Replace sentry with guard throughout. - (do_static_destruction): Likewise. - * init.c (create_temporary_var): Add comment. - -2000-06-28 Alex Samuel - - * mangle.c (find_substitution): Use same_type_p. - (write_encoding): Don't check for substitutions. - -2000-06-30 Nathan Sidwell - - * parse.y (expr_no_comma_rangle): New non-terminal. - (template_parm): Use it for default parameter case. - (template_arg): Use it. - (expr_no_commas): Remove commented out undefined extensions. - * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. - * parse.h, parse.c: Rebuilt. - -2000-06-29 Mark Mitchell - - * cp-tree.h (flag_const_strings): Remove. - (warn_parentheses): Likewise. - (warn_format): Likewise. - (common_type): Likewise. - (default_conversion): Likewise. - (build_binary_op): Likewise. - (cp_build_binary_op): New macro. - * call.c (build_new_op): Use cp_build_binary_op instead of - build_binary_op. - * class.c (build_vtable_entry_ref): Likewise. - * decl.c (expand_static_init): Likewise. - (compute_array_index_type): Likewise. - (build_enumerator): Likewise. - * decl2.c (delete_sanity): Likewise. - (start_static_initialization_or_destruction): Likewise. - * error.c (dump_type_suffix): Likewise. - * init.c (resolve_offset_ref): Likewise. - (build_new): Likewise. - (build_new_1): Likewise. - (build_vec_delete_1): Likewise. - (build_vec_init): Likewise. - (build_delete): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - (synthesize_tinfo_var): Likewise. - * search.c (expand_upcast_fixups): Likewise. - (fixup_all_virtual_upcast_offsets): Likewise. - * typeck.c (build_array_ref): Likewise. - (get_member_function_from_ptrfunc): Likewise. - (build_binary_op): Add parameter. - (pointer_int_sum): Use cp_build_binary_op. - (pointer_diff): Likewise. - (build_modify_expr): Likewise. - (get_delta_difference): Likewise. - (build_ptrmemfunc): Likewise. - -2000-06-29 Nathan Sidwell - - * cp-tree.h (SET_DECL_ARTIFICIAL): Remove. - * decl.c (create_implicit_typedef): Adjust. - * decl2.c (build_artificial_parm): Adjust. - * method.c (implicitly_declare_fn): Adjust. - * pt.c (push_inline_template_parms_recursive): Adjust. - (process_template_parm): Adjust. - (overloaded_template_name): Adjust. - * semantics.c (finish_template_template_parm): Adjust. - -2000-06-28 Mark Mitchell - - * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove. - * class.c (update_vtable_entry_for_fn): Correct logic for deciding - where to emit thunks. - (build_vtt): Adjust call to build_vtt_inits. - (build_vtt_inits): Add parameter to indicate whether or not - sub-VTTs for virtual bases should be included. Adjust handling of - construction vtables. - (get_matching_base): New function. - (dfs_build_vtt_inits): Rename to ... - (dfs_build_secondary_vptr_vtt_inits): Adjust handling of - construction vtables. - (dfs_fixup_binfo_vtbls): Likewise. - (build_ctor_vtbl_groups): Build construction vtables for virtual - bases, too. - (accumulate_vtbl_inits): Tweak logic for deciding whether or not - to build construction vtbls. - (dfs_accumulate_vtbl_inits): Adjust handling of - construction vtables. - - * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified - types correctly. - -2000-06-27 Mark Mitchell - - * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. - -2000-06-26 Nathan Sidwell - - * search.c (hides): Remove. - (is_subobject_of_p): Add most_derived parameter. Use - CANONICAL_BINFO. - (lookup_field_queue_p): Adjust. - (lookup_field_r): Adjust. - -2000-06-26 Nathan Sidwell - - * decl2.c (handle_class_head): Bash typedefs to the type's main - decl. - -2000-06-25 Mark Mitchell - - * cp-tree.h (genrtl_begin_stmt_expr): Rename to ... - (begin_global_stmt_expr): ... this. - (genrtl_finish_stmt_expr): Rename to ... - (finish_global_stmt_expr): ... this. - * init.c (begin_init_stmts): Adjust calls. - (finish_init_stmts): Likewise. - * semantics.c (genrtl_begin_stmt_expr): Rename to ... - (begin_global_stmt_expr): ... this. - (genrtl_finish_stmt_expr): Rename to ... - (finish_global_stmt_expr): ... this. - -2000-06-25 Theodore Papadopoulo - - * search.c (lookup_member): Fix typo in comment. - -2000-06-24 Jason Merrill - - * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace. - (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL. - -2000-06-24 Martin v. Löwis - - * parse.y (complex_direct_notype_declarator): Support global_scope. - * Makefile.in: Adjust conflict count. - -2000-06-23 Kriang Lerdsuwanakij - - * parse.y (template_arg): Convert TEMPLATE_DECL - that is a template template parameter to - TEMPLATE_TEMPLATE_PARM here. - - * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment. - * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro. - (copy_template_template_parm): Adjust prototype. - * decl.c (grokdeclarator): Remove dead code. - * pt.c (process_template_parm): Tidy. - (lookup_template_class): Construct nodes in - copy_template_template_parm. - (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to - lookup_template_class. Use TYPE_TI_TEMPLATE. - * tree.c (copy_template_template_parm): Add NEWARGS - parameter. - (mapcar): Adjust call to copy_template_template_parm. - * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. - * method.c (build_template_template_parm_names): Change error - code to avoid compilation warning. - - * gxxint.texi: Document template template parameter - name mangling. - -2000-06-21 Alex Samuel - - * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. - (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. - (cp-demangle.o): New rule. - (dyn-string.o): Likewise. - * inc/cxxabi.h (__cxa_demangle): New declaration. - -2000-06-22 Mark Mitchell - - * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro. - (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. - (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset - a tree, not an int. - (THUNK_GENERATE_WITH_VTABLE_P): New macro. - (make_thunk): Change prototype. - (emit_thunk): Rename to use_thunk. - (mangle_thunk): Change prototype. - * class.c (get_derived_offset): Simplify. - (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and - BV_GENERATE_THUNK_WITH_VTABLE_P. - (build_primary_vtable): Simplify. - (add_virtual_function): Use BV_FN, rather than TREE_VALUE. - (dfs_find_base): Remove. - (update_vtable_entry_for_fn): Correct bug in finding the base - where a virtual function was first declared. Figure out whether - or not to emit a vcall-thunk with the vtables in which it appears. - Correct logic for deciding whether to use an ordinary thunk, or a - vcall thunk. - (finish_struct_1): Remove unnecssary code. - (build_vtbl_initializer): Use ssize_int for the running counter of - negative indices. - (build_vtbl_initializer): Only use vcall thunks where necessary. - Mark thunks as needing to be emitted with their vtables, or not. - (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in - indices. Use size_binop. - (dfs_build_vcall_offset_vtbl_entries): Don't rely on - BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use - size_binop. - (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. - (build_vtable_entry): Mark thunks as needing to be emitted with - their vtables, or not. - * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. - * decl2.c (mark_vtable_entries): Use use_thunk instead of - emit_thunk. - * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk - information. - * error.c (dump_expr): Use BV_FN. - * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, - not an int. - * method.c (make_thunk): Likewise. - (emit_thunk): Rename to use_thunk. Allow callers to decide - whether or not to actually emit the thunk. Adjust for changes in - representation of vcall offsets. - * search.c (dfs_get_pure_virtuals): Use BV_FN. - * semantics.c (emit_associated_thunks): New function. - (expand_body): Use it. - * ir.texi: Adjust descriptions of thunks. - -2000-06-22 Jason Merrill - - * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. - (tsubst_friend_function): Copy it here. - - * decl.c (grok_op_properties): Fix typo. - - * decl2.c (delete_sanity): Clarify warning, avoid failure on - deleting void*. - - * pt.c (check_explicit_specialization): Clarify error. - - * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from - an old OVERLOAD when we're declaring a non-function. - (pushdecl, destroy_local_var): Check for error_mark_node. - (warn_extern_redeclared_static): Also bail early if - we're a CONST_DECL. - (push_overloaded_decl): Ignore an old error_mark_node. - -2000-06-22 Nathan Sidwell - - * call.c (build_x_va_arg): Check if in a template decl. - * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. - -2000-06-20 Alexandre Petit-Bianco - - * class.c (push_lang_context): TYPE_NAME gets you to the Java - types DECLs. - * decl.c (check_goto): Computed gotos assumed OK. - -2000-06-20 Jason Merrill - - * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs - for which we don't need to look for instantiations. - -2000-06-21 Nathan Sidwell - - * parse.y (program): Always call finish_translation_unit. - * parse.c, parse.h: Rebuilt. - -2000-06-20 Zack Weinberg - - * method.c: Don't include hard-reg-set.h. - -2000-06-20 Nathan Sidwell - - * rtti.c (get_base_offset): Cope when vbase field is in a base. - -2000-06-20 Nathan Sidwell - - * call.c (build_conditional_expr): Use VOID_TYPE_P. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_void): Likewise. - * error.c (dump_expr): Likewise. - * except.c (complete_ptr_ref_or_void_ptr_p): Likewise. - * init.c (build_delete): Likewise. - * method.c (emit_thunk): Likewise. - * optmize.c (declare_return_variable): Likewise. - * rtti.c (get_tinfo_decl_dynamic): Likewise. - (get_typeid): Likewise. - (build_dynamic_cast_1): Likewise. - * typeck.c (composite_pointer_type): Likewise. - (common_type): Likewise. - (build_indirect_ref): Likewise. - (build_binary_op): Likewise. - (build_x_compound_expr): Likewise. - (check_return_expr): Likewise. - * typeck2.c (add_exception_specifier): Likewise. - - * mangle.c (write_method_parms): Use direct comparison for end - of parmlist. - -2000-06-19 Benjamin Chelf - - * cp-tree.h (genrtl_try_block): Declare function. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_decl_cleanup): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_do_pushlevel): Likewise. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_named_return_value): Likewise. - (genrtl_begin_stmt_expr): Likewise. - (genrtl_finish_stmt_expr): Likewise. - (finish_for_stmt): Removed first argument. - (finish_switch_stmt): Likewise. - - * semantics.c (genrtl_try_block): Define function. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_decl_cleanup): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_do_pushlevel): Likewise. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_named_return_value): Likewise. - (genrtl_begin_stmt_expr): Likewise. - (genrtl_finish_stmt_expr): Likewise. - (finish_for_stmt): Removed first argument and generate rtl - specific code. - (finish_switch_stmt): Likewise. - (do_poplevel): Removed generate rtl specific code. - (do_pushlevel): Likewise. - (add_tree): Likewise. - (finish_goto_stmt): Likewise. - (finish_expr_stmt): Likewise. - (begin_if_stmt): Likewise. - (finish_if_stmt_cond): Likewise. - (finish_then_clause): Likewise. - (begin_else_clause): Likewise. - (finish_else_clause): Likewise. - (finish_if_stmt): Likewise. - (clear_out_block): Likewise. - (begin_while_stmt): Likewise. - (finish_while_stmt_cond): Likewise. - (finish_while_stmt): Likewise. - (begin_do_stmt): Likewise. - (finish_do_body): Likewise. - (finish_do_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_for_init_stmt): Likewise. - (finish_for_cond): Likewise. - (finish_for_expr): Likewise. - (finish_break_stmt): Likewise. - (finish_continue_stmt): Likewise. - (begin_switch_stmt): Likewise. - (finish_switch_cond): Likewise. - (finish_case_label): Likewise. - (begin_try_block): Likewise. - (begin_function_try_block): Likewise. - (finish_try_block): Likewise. - (finish_cleanup_try_block): Likewise. - (finish_cleanup): Likewise. - (finish_function_try_block): Likewise. - (finish_handler_sequence): Likewise. - (finish_function_handler_sequence): Likewise. - (begin_handler): Likewise. - (finish_handler_parms): Likewise. - (begin_catch_block): Likewise. - (finish_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_compound_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (finish_label_decl): Likewise. - (finish_subobject): Likewise. - (finish_decl_cleanup): Likewise. - (finish_named_return_value): Likewise. - (begin_stmt_expr): Likewise. - (finish_stmt_expr): Likewise. - - * decl.c (initialize_local_var): Changed call to finish_expr_stmt - to call genrtl_expr_stmt when appropriate. - - * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and - begin_compound_expr to call genrtl_begin_stmt_expr and - genrtl_begin_compound_expr when appropriate. - (finish_init_stmts): Changed calls to finish_compound_expr and - finish_stmt_expr to call genrtl_finish_compound_expr and - genrtl_finish_stmt_expr when appropriate. - (expand_default_init): Changed call to finish_expr_stmt to call - genrtl_expr_stmt when appropriate. - (build_vec_init): Likewise. - - * parse.y (simple_stmt): Removed first argument from call to - finish_for_stmt. Removed first argument from call to - finish_switch_stmt. - - * parse.c: Regenerated. - - * pt.c (tsubst_expr): Removed first argument from call to - finish_for_stmt. Removed first argument from call to - finish_switch_stmt. - -2000-06-16 Benjamin Chelf - - * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to - CP_DUMMY_TREE_CODE. Remove #include "c-common.def". - - * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def". - (cplus_tree_code_length[]): Likewise. - (cplus_tree_code_name[]): Likewise. - (init_parse): Added call to add_c_tree_codes. Changed - LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE. - -2000-06-16 Mark Mitchell - - * cp-tree.h (finish_mem_initializers): Declare. - (count_trees): Likewise. - * parse.y (base_init): Use finish_mem_initializers. - * semantics.c (finish_mem_initializers): New function. - - * tree.c (count_trees_r): Prototype. Use DATA parameter to store - the number of trees. - (n_trees): Remove. - (count_trees): Don't use it. - -2000-06-15 Jason Merrill - - * tree.c (count_trees): New debugging function. - - * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P. - * init.c (build_member_call): Pull out the name of a DECL. - - * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H. - * semantics.c (expand_body): Push to TV_INTEGRATION here. - * optimize.c (optimize_function): Not here. - * pt.c (instantiate_decl): Push to TV_PARSE. - -2000-06-15 Mark Mitchell - - * cp-tree.h (struct language_function): Remove x_base_init_list - and x_member_init_list. - (current_base_init_list): Remove. - (current_member_init_list): Likewise. - (setup_vtbl_ptr): Change prototype. - (emit_base_init): Likewise. - (expand_member_init): Likewise. - (reinit_parse_for_function): Remove. - * decl.c (save_function_data): Don't clear x_base_init_list and - x_member_init_list. - (mark_language_function): Don't mark them. - * init.c (perform_member_init): Tweak comment. - (sort_member_init): Take the list of initializers as an argument. - (sort_base_init): Likewise. - (emit_base_init): Likewise. - (expand_member_init): Return the initializer. Don't use global - variables. - * lex.c (reinit_parse_for_function): Remove. - * method.c (build_template_parm_names): Correct substitution. - (do_build_copy_constructor): Don't use current_member_init_list - and current_base_init_list. - (synthesize_method): Likewise. - * parse.y (base_init): Split mem-initializers into - base-initializers and field-initializers. - (member_init_list): Build up the list here. - (member_init): Return the initializer. - (fn.depfn): Don't use reinit_parse_for_function. - * parse.c: Regenerated. - * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the - ERROR_MARK. - (tsubst_expr): Don't use current_member_init_list - and current_base_init_list. - (tsubst_expr_values): Rename to ... - (tsubst_initializer_list): ... this. Use convert_from_reference. - * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list - and current_base_init_list. - (begin_function_definition): Don't call reinit_parse_for_function. - - * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors. - - * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE - correctly. - - * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking. - -2000-06-14 Benjamin Chelf - - * cp-tree.h (IF_COND): Move to c-common.h. - (THEN_CLAUSE): Likewise. - (ELSE_CLAUSE): Likewise. - (WHILE_COND): Likewise. - (WHILE_BODY): Likewise. - (DO_COND): Likewise. - (DO_BODY): Likewise. - (RETURN_EXPR): Likewise. - (EXPR_STMT_EXPR): Likewise. - (FOR_INIT_STMT): Likewise. - (FOR_COND): Likewise. - (FOR_EXPR): Likewise. - (FOR_BODY): Likewise. - (SWITCH_COND): Likewise. - (SWITCH_BODY): Likewise. - (CASE_LOW): Likewise. - (CASE_HIGH): Likewise. - (GOTO_DESTINATION): Likewise. - (COMPOUND_BODY): Likewise. - (ASM_CV_QUAL): Likewise. - (ASM_STRING): Likewise. - (ASM_OUTPUTS): Likewise. - (ASM_INPUTS): Likewise. - (ASM_CLOBBERS): Likewise. - (DECL_STMT_DECL): Likewise. - (STMT_EXPR_STMT): Likewise. - (LABEL_STMT_LABEL): Likewise. - (SCOPE_BEGIN_P): Likewise. - (SCOPE_END_P): Likewise. - (SCOPE_STMT_BLOCK): Likewise. - (SCOPE_NULLIFIED_P): Likewise. - (SCOPE_NO_CLEANUPS_P): Likewise. - (SCOPE_PARTIAL_P): Likewise. - (ASM_VOLATILE_P): Likewise. - (STMT_LINENO): Likewise. - (STMT_LINENO_FOR_FN_P): Likewise. - - * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR, - ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, - FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, - CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, - SCOPE_STMT, CASE_LABEL, STMT_EXPR. - - * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def. - - * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def. - (cc1plus$(exeext)): Added $(srcdir)/c-common.def. - - * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'. - (cplus_tree_code_length[]): Added '#include "c-common.def"'. - (cplus_tree_code_name[]): Added '#include "c-common.def"'. - -2000-06-14 Mark Mitchell - - * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. - * class.c (dfs_find_final_overrider): Set it appropriately. - (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to - avoid unneeded secondary vptrs. - -2000-06-13 Jakub Jelinek - - * class.c (build_secondary_vtable): Set DECL_USER_ALIGN. - (check_bitfield_decl, check_field_decl): Likewise. - (build_vtbl_or_vbase_field, build_base_field): Likewise. - (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN. - * decl.c (record_unknown_type): Set TYPE_USER_ALIGN. - (xfer_tag, finish_enum): Likewise. - * decl2.c (finish_builtin_type): Likewise. - * init.c (init_init_processing): Likewise. - * pt.c (instantiate_class_template): Likewise. - * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN. - * cp-tree.h (struct lang_type): Add user_align member. - (CLASSTYPE_USER_ALIGN): Define. - -2000-06-13 Maciej W. Rozycki - - * Make-lang.in (c++.install-common): Install g++-cross in - $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as - $(target_alias)-g++ and $(target_alias)-c++. - -2000-06-12 Mark Mitchell - - * class.c (vcall_offset_data_s): Add last_init and fns. - (overrides): Rename to same_signature_p. - (dfs_find_final_overrider): Adjust accordingly. - (mark_overriders): Likewise. - (warn_hidden): Likewise. - (build_vtbl_initializer): Reorganize machinery for building things - at negative offsets. - (build_vcall_and_vbase_vtbl_entries): Likewise. - (build_vbase_offset_vtbl_entries): Likewise. - (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall - offset entries. Do not create two entries for functions with the - same signature. - (build_vcall_offset_vtbl_entries): Initialize vod->fns. - (build_rtti_vtbl_entries): Reorganize machinery for building things - at negative offsets. - - * optimize.c (expand_call_inline): Don't recurse into the code - used to initialize the parameters more than once. - -2000-06-11 Mark Mitchell - - * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment. - (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here. - (find_substitution): Only use the `Sa' substitution for - std::allocator, not instantiations of it. - (write_template_prefix): Move comment. Only use a TREE_LIST to - represent substitutions for a member template. - (write_array_type): Mangle array dimensions correctly. - * optimize.c (maybe_clone_body): Copy more information from the - cloned function. - * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE - on the regenerated declaration. - -2000-06-11 Chip Salzenberg - Mark Mitchell - - * class.c (build_vtable): Clarify comment. - (build_ctor_vtbl_group): Pass the most derived type to - build_vtable. - -2000-06-11 Kaveh R. Ghazi - - * decl2.c (compare_options): Don't needlessly cast away const-ness. - -2000-06-10 Mark Mitchell - - * decl.c (add_binding): Handle duplicate declarations of external - variables. - -2000-06-09 Chip Salzenberg - Mark Mitchell - - * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an - argument. - (write_signed_number): New macro. - (write_unsigned_number): Likewise. - (write_source_name): Use them. - (write_number): Handle signed and unsigned values. - (write_integer_cst): Use tree_int_cst_sgn, and use - write_unsigned_number or write_signed_number as appropriate. - (write_discriminator): Use write_unsigned_number or - write_signed_number as appropriate. - (write_template_arg_literal): Likewise. - (write_array_type): Use tree_low_cst. - (write_template_parm): Use write_unsigned_number or - write_signed_number as appropriate. - (write_substitution): Adjust call to write_number. - (write_type): Get the TYPE_MAIN_VARIANT before mangling it. - (write_expression): Handle non-type template arguments of - reference type correctly. - (mangle_thunk): Use write_signed_number. - -2000-06-09 Chip Salzenberg - - * mangle.c (find_substition): Don't mangle objects with typename - substitutions (e.g. "cin" as "Si"). - -2000-06-09 Zack Weinberg - - * call.c (add_candidate): Use ggc_alloc_cleared. - * decl.c (lookup_label): Likewise. - * lex.c (retrofit_lang_decl): Likewise. - -2000-06-09 Jason Merrill - - * semantics.c (expand_body): Push to TV_EXPAND. - * optimize.c (optimize_function): Push to TV_INTEGRATION. - * decl.c (start_function): Always call announce_function. - - * tinfo2.cc: Just declare abort. - -2000-06-09 Gabriel Dos Reis - - * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @' - whenever @ is a symbolic name. - -2000-06-08 Jakub Jelinek - - * method.c (make_thunk): Clear DECL_VTT_PARM in thunk. - -2000-06-07 Mark Mitchell - - * decl.c (pushdecl): Look up functions by DECL_NAME, not - DECL_ASSEMBLER_NAME. - -2000-06-06 Mark Mitchell - - * decl2.c (c_language): Define. - -2000-06-06 Gabriel Dos Reis - - * lex.c (lang_init_options): Tweak. - - * decl2.c: Remove #inclusion of diagnostic.h - (lang_decode_option): Move diagnostic formatting options to - toplevel. - - * lang-options.h: Remove documentation for diagnostic options. - - * Makefile.in (lex.o): Depends upon diagnostic.h - -2000-06-06 Mark Mitchell - - * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have - the same DECL_RESULT, it's not a redefinition. - * pt.c (tsubst_decl): Remove code to handle illegal - specializations. - -2000-06-06 Nathan Sidwell - - * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c - -2000-06-05 Jason Merrill - - * search.c (maybe_suppress_debug_info): Don't check - CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set. - - * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION - here if extern_p. - - Remember instantiation context in deferred instantiations. - * cp-tree.h (struct tinst_level): Remove. - (TINST_DECL, TINST_LINE, TINST_FILE): New macros. - * pt.c (current_tinst_level): Now a tree. - (print_template_context, push_tinst_level, pop_tinst_level, - tinst_for_decl): Adjust. - (reopen_tinst_level): New fn. - (init_pt): Register current_tinst_level as a root. - (add_pending_template): Put current_tinst_level in TREE_PURPOSE - of the pending templates list. - (instantiate_pending_templates): Adjust. Call reopen_tinst_level. - * lex.c (extract_interface_info): Adjust. - * decl2.c (warn_if_unknown_interface): Adjust. - -2000-06-05 Mark Mitchell - - * class.c (indirect_primary_base_p): New function. - (determine_primary_base): Use it. - -2000-06-05 Nathan Sidwell - - Update new-abi dynamic cast algorithm. - * tinfo.cc (__class_type_info::__dyncast_result): Add - whole_details. Adjust constructor. - (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags. - Avoid unnecessary searching. - (__dynamic_cast): Adjust for __dyncast_result::whole_details. - -2000-06-05 Richard Kenner - - * decl.c (init_decl_processing): Don't call record_component_aliases. - * tree.c (build_cplus_array_type_1): Likewise. - -2000-06-04 Mark Mitchell - - * ir.texi: Correct typo. - * mangle.c (write_expression): Handle non-type template arguments - with reference type. - * method.c (build_overload_value): Likewise. - * pt.c (convert_nontype_argument): Explicitly represent conversion - to a reference with an ADDR_EXPR. - (unify): Always unify arguments in left-to-right order. - -2000-06-03 Alex Samuel - Mark Mitchell - - * Make-lang.in (CXX_SRCS): Add mangle.c. - * Makefile.in (CXX_OBJS): Add mangle.o. - (mangle.o): New rule. - - * class.c (local_classes): New variable. - * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI. - (get_vtt_name): Use mangle_vtt_name for new ABI. - (init_class_processing): Initialize local_classes. - (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI. - * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER. - (std_identifier): New macro. - (DECL_VOLATILE_MEMFUNC_P): New macro. - (DECL_NAMESPACE_STD_P): Likewise. - (local_classes): Declare. - (get_mostly_instantiated_function_type): Declare. - (init_mangle): Declare. - (mangle_decl): Likewise. - (mangle_type_string): Likewise. - (mangle_type): Likewise. - (mangle_typeinfo_for_type): Likewise. - (mangle_typeinfo_string_for_type): Likewise. - (mangle_vtbl_for_type): Likewise. - (mangle_vtt_for_type): Likewise. - (mangle_ctor_vtbl_for_type): Likewise. - (mangle_thunk): Likewise. - (mangle_conv_op_name_for_type): Likewise. - (mangle_guard_variable): Likewise. - * decl.c (pushtag): Keep track of local classes. - (initialize_predefined_identifiers): Initialize std_identifier. - (init_decl_processing): Use std_identifier. - (start_decl): Don't treat instantiations as specializations. - (grokdeclarator): Likewise. - (grokvardecl): Call mangle_decl for new ABI. Only set mangled - name for fully-instantiated templates. - * decl2.c (grokclassfn): Use set_mangled_name_for_decl for - destructors with the new ABI. - (finish_static_data_member_decl): Use mangle_decl under the new ABI. - (grokfield): Use mangle_type for new ABI. - (grokoptypename): Use mangle_conv_op_for_type for new ABI. - (get_sentry): Use mangle_guard_variable for new ABI. - (start_static_initialization_or_destruction): Likewise. - * expr.c (extract_aggr_init): Remove. - (extract_scalar_init): Likewise. - (extract_init): Remove #if 0'd code. - * mangle.c: New function. - * method.c (build_mangled_name): Assert not flag_new_abi. - (build_static_name): Likewise. - (build_decl_overload_real): Likewise. - (build_typename_overload): Likewise. - (build_overload_with_type): Likewise. - (build_overload_name): Likewise. - (get_ctor_vtbl_name): Likewise. - (start_squangling): Likewise. - (get_id_2): Likewise. - (set_mangled_name_for_decl): Call mangle_decl for new ABI. - (init_method): Call init_mangle for new ABI. - (make_thunk): Call mangle_thunk for new ABI. - * operators.def: Correct new ABI manglings for the `%' operator. - Add `::' operator. - * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and - DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL. - (lookup_template_class): Call mangle_decl for new ABI. - (get_mostly_instantiated_function_type): New function. - (set_mangled_name_for_template_decl): Use it. - (tsubst_decl): Use set_mangled_name_for_decl for destructors with - the new ABI. Use mangle_conv_op_name_for_type for instantiated - conversion op names. - * rtti.c (tinfo_name): Call mangle_type_string for new ABI. - (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI. - (tinfo_base_init): Likewise. Mangle typeinfo string name with - mangle_typeinfo_string_for_type. - -2000-06-03 Mark Mitchell - - * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment. - (INNERMOST_TEMPLATE_ARGS): New macro. - (innermost_args): Remove. - (get_innermost_template_args): New function. - * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS. - * error.c (dump_function_decl): Be caution when using - most_general_template. - * method.c (build_template_parm_names): Use - INNERMOST_TEMPLATE_ARGS. - * pt.c (add_to_template_args): Tidy comment - (get_innermost_template_args): New function. - (check_explicit_specialization): Clear DECL_INITIAL for a new - specialization. - (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS. - Tidy. - (push_template_decl): Always register specializations of the most - general template. - (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS. - (coerce_template_parms): Likewise. - (lookup_template_class): Likewise. - (innermost_args): Remove. - (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS. - (tsubst_decl): Handle tricky specializations. Use - get_innermost_template_args. - (instantiate_template): Simplify handling of partial - instantiations. - (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS. - (most_general_template): Reimplement, in a more straightforward - manner. - (regenerate_decl_from_template): Tweak formatting. Use - TMPL_ARGS_DEPTH for clarity. - (set_mangled_name_for_template_decl): Use INNERMOST_ARGS. - - * dump.c (dequeue_and_dump): Dump information about thunks. - -2000-06-01 Richard Henderson - - * decl.c (init_decl_processing): Set lang_get_alias_set first thing. - -2000-06-01 Richard Henderson - - * decl2.c (unsupported_options): Fix typo, make const. - (lang_decode_option): Fix bsearch argument order. - -2000-06-01 Mark Mitchell - - * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE - on FIELD_DECLs. - -2000-05-31 Richard Kenner - - * cp-tree.h (c_get_alias_set): Deleted. - * Makefile.in (decl.o): Include ../expr.h. - * decl.c (expr.h): Include. - (init_decl_processing): Call record_component_aliases for arrays. - (grokdeclarator): Likewise. - Set TREE_ADDRESSABLE for fields that aren't bitfields. - * tree.c (build_cplus_array_type_1): Call record_component_aliases. - -2000-05-31 Mark Mitchell - - Remove guiding declaration support. - * cp/cp-tree.h (flag_dump_translation_unit): Make it const. - (flag_guiding_decls): Remove. - * call.c (build_user_type_conversion_1): Remove support for - guiding decls. - (build_new_function_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - * decl.c (start_function): Likewise. - * friend.c (is_friend): Likewise. - (do_friend): Likewise. - * decl2.c ((flag_dump_translation_unit): Make it const. - (flag_guiding_decls): Remove. - (unsupported_options): New variable - (compare_options): New function. - (lang_decode_option): Use them. - - * decl.c (build_cp_library_fn): Set DECL_CONTEXT. - - * method.c (mangle_expression): Adjust test for legal expression - operators. - - * pt.c (instantiate_decl): Save and restore the local - specializations list. - -2000-05-30 Jason Merrill - - * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING. - -2000-05-30 Mark Mitchell - - * call.c (add_template_candidate_real): Handle member template - constructors for classes with virtual bases. - (build_user_type_conversion_1): Use in_charge_arg_for_name. - (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. - - * ir.texi: Update thunk documentation. - - * call.c (joust): Fix handling of overloaded builtin operators. - -2000-05-30 Zack Weinberg - - * cp-tree.h (DECL_ANTICIPATED): New macro. - Document new use of DECL_LANG_FLAG_7. - * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins - in the user namespace. - * lex.c (do_identifier): If the identifier's declaration has - DECL_ANTICIPATED on, it has not yet been declared. But do not - replace it with an ordinary implicit declaration. - - * tinfo2.cc: Include stdlib.h. - -2000-05-29 Mark Mitchell - - * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. - * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not - CLASSTYPE_ALIGN. - -2000-05-28 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Use skip_leading_substring instead - of plain strncmp. - -2000-05-28 Alexandre Oliva - - * operators.def (?): this. Fixed. - -2000-05-27 Alex Samuel - Mark Mitchell - - * cp-tree.h (ansi_opname): Make it a macro. - (ansi_assopname): Likewise. - (struct lang_decl_flags): Add assignment_operator_p. - (struct lang_decl): Add operator_code. - (DECL_VTT_PARM): Adjust. - (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an - overloaded operator. - (SET_OVERLOADED_OPERATOR_CODE): New macro. - (DECL_ASSIGNMENT_OPERATOR_P): New macro. - (DECL_ARRAY_DELETE_OPERATOR_P): Adjust. - (opname_tab): Remove. - (assignop_tab): Likewise. - (operator_name_info_t): New type. - (operator_name_info): New variable. - (assignment_operator_name_info): Likewise. - (build_cp_library_fn): Remove declaration. - (push_cp_library_fn): Likewise. - (operator_name_string): Likewise. - (build_decl_overload): Likewise. - * call.c (print_z_candidates): Simplify. - (build_object_call): Adjust usage of ansi_opname. Use - DECL_OVERLOADED_OPERATOR_P. - (op_error): Adjust operator name lookup. - (build_conditional_expr): Adjust usage of ansi_opname. - (build_new_op): Likewise. - (build_op_delete_call): Likewise. - (build_over_call): Likewise. - (joust): Use DECL_OVERLOADED_OPERATOR_P. - * decl.c (duplicate_decls): Copy operator_code. - (init_decl_processing): Adjust parameters to push_cp_library_fn. - (builtin_function): Adjust parameters to build_library_fn_1. - (build_library_fn_1): Accept an overloaded operator code. - (build_library_fn): Pass ERROR_MARK. - (build_cp_library_fn): Accept an overloaded operator code. - (push_cp_library_fn): Likewise. - (grokfndecl): Tweak. - (grokdeclarator): Simplify code to compute names of overloaded - operators. Adjust use of ansi_opname. - (ambi_op_p): Work on tree_codes, not identifiers. - (unary_op_p): Likewise. - (grok_op_properties): Likewise. - (start_function): Use DECL_OVERLOADED_OPERATOR_P. - (lang_mark_tree): Don't try to mark the operator_code. - * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P. - * error.c (dump_decl): Remove special handling for operator - names. - (dump_function_name): Likewise. - (dump_expr): Adjust name lookup of operators. - (op_to_string): Simplify. - (assop_to_string): Likewise. - * init.c (build_new_1): Adjust use of ansi_opname. - * lex.c (opname_tab): Remove. - (assignop_tab): Likewise. - (ansi_opname): Likewise. - (ansi_assopname): Likewise. - (operator_name_string): Likewise. - (reinit_lang_specific): Likewise. - (operator_name_info): New variable. - (assignment_operator_name_info): Likewise. - (init_operators): New function. - (init_parse): Use it. - (do_identifier): Adjust use of ansi_opname. - * method.c (mangle_expression): Don't use ansi_opname for - mangling. - (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P. - (build_decl_overload): Remove. - (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly. - (do_build_assign_ref): Adjust use of ansi_opname. - (synthesize_method): Likewise. - (implicitly_declare_fn): Likewise. - * operators.def: New file. - * parse.y (operator): Adjust use of ansi_opname. - * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P. - (set_mangled_name_for_template_decl): Don't play games with - current_namespace. - (special_function_p): Adjust use of ansi_opname. - * typeck.c (check_return_expr): Likewise. - * Make-lang.in (cc1plus): Depend on operators.def. - * Makefile.in (lex.o): Likewise. - (decl.o): Likewise. - -2000-05-27 Zack Weinberg - - * Make-lang.in (cplib2.ready): Eradicate. - -2000-05-27 Richard Kenner - - * method.c (mangle_expression): Use TREE_CODE_LENGTH. - * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. - (built_min, cp_tree_equal): Likewise. - -2000-05-26 Mark Mitchell - - * class.c (layout_nonempty_base_or_field): Replace - `record_layout_info' with `record_layout_info_s'. - -2000-05-26 Jason Merrill - - Fix goto checking. - * cp-tree.h (struct language_function): x_named_labels is now - a struct named_label_list*. - * decl.c (struct named_label_use_list): Renamed from... - (struct named_label_list): ...this. New struct. - (push_binding_level): Don't set eh_region. - (note_level_for_eh): New fn. - (pop_label): Take label and old value directly. - (pop_labels): Adjust for new named_labels format. - (lookup_label): Likewise. - (poplevel): Note characteristics of a binding level containing a - named label. Mess with named label lists earlier. - (mark_named_label_lists): New fn. - (mark_lang_function): Call it. - (use_label): New fn, split out from... - (make_label_decl): ...here. Don't call it. - (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, - check_previous_gotos): New fns, split out from... - (define_label): ...here. - (check_switch_goto): New fn. - (define_case_label): Call it. - (check_goto): New fn. - * semantics.c (finish_goto_stmt): Call it and use_label. - (begin_compound_stmt): If we're a try block, call note_level_for_eh. - (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings. - -2000-05-26 Mark Mitchell - - * class.c (build_vtable_entry_ref): Correct usage of - get_vtbl_decl_for_binfo. - - * decl2.c (grokclassfn): Set DECL_LANGUAGE here. - * method.c (implicitly_declare_fn): Not here. - -2000-05-26 Nathan Sidwell - - * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ... - (CPTI_PTMD_DESC_TYPE): ... here. - (ptmd_desc_type_node): Rename to ... - (ptm_desc_type_node): ... here. - * decl.c: Likewise. - * rtti.c (ptmd_initializer): Rename to ... - (ptm_initializer): ... here. - (sythesize_tinfo_var): Adjust. Deal with pointer to member - function. - (create_tinfo_types): Adjust. - -2000-05-25 Mark Mitchell - - Finish implementation of VTTs. - * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and - CPTI_VTT_PARM_IDENTIFIER. - (vtt_parm_identifier): New macro. - (vtt_parm_type): Likewise. - (BINFO_SUBVTT_INDEX): Likewise. - (BINFO_VPTR_INDEX): Likewise. - (struct lang_decl): Add vtt_parm. - (DECL_VTT_PARM): New macro. - (DECL_USE_VTT_PARM): Likewise. - (DECL_NEEDS_VTT_PARM_P): Likewise. - (get_vtt_name): Declare. - (build_artificial_parm): Likewise. - (fixup_all_virtual_upcast_offsets): Likewise. - (expand_indirect_vtbls_init): Remove. - * call.c (build_new_method_call): Pass the vtt to subobject - constructors and destructors. - * class.c (get_vtt_name): Give it external linkage. - (build_clone): Handle the magic VTT parameters for clones. - (clone_function_decl): Fix typo in comment. - (build_vtt): Keep track of the indices in the VTTs where various - entities are stored. - (build_vtt_inits): Likewise. - (dfs_build_vtt_inits): Likewise. - (build_ctor_vtbl_group): Tweak type of construction vtables. - (dfs_accumulate_vtbl_inits): Build vtables for all bases, even - primary bases, when building construction vtables. - * decl.c (duplicate_decls): Handle DECL_VTT_PARM. - (initialize_predefined_identifiers): Add vtt_parm_identifier. - (init_decl_processing): Initialize vtt_parm_type. - (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P. - (lang_mark_tree): Make vtt_parm. - * decl2.c (build_artificial_parm): New function. - (maybe_retrofit_in_chrg): Use it. Add VTT parameters. - (grokclassfn): Use build_artificial_parm. - * init.c (initialize_vtbl_ptrs): Call - fixup_all_virtual_upcast_offsets directly. - (perform_member_init): Use the complete subobject destructor for - member cleanups. - (build_vtbl_address): New function. - (expand_virtual_init): Handle VTTs. - * optimize (maybe_clone_body): Likewise. - * search.c (fixup_all_virtual_upcast_offsets): Give it external - linkage. - (expand_indirect_vtbls_init): Remove. - * semantics.c (setup_vtbl_ptr): Fix typos in comment. - * tree.c (make_binfo): Make them bigger. - -2000-05-25 Nathan Sidwell - - * inc/cxxabi.h (__pbase_type_info): Define, based on - __pointer_type_info. - (__pointer_type_info): Derive from __pbase_type_info. Adjust. - (__pointer_to_member_type_info): Likewise. - * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement. - (__pointer_to_member_type_info::__is_pointer_p): Remove. - (__pointer_type_info::__do_catch): Rename to ... - (__pbase_type_info::__do_catch): ... here. Adjust. - (__pbase_type_info::__pointer_catch): Implement. - (__pointer_type_info::__pointer_catch): Adjust. - (__pointer_to_member_type_info::__pointer_catch): Adjust. - -2000-05-25 Nathan Sidwell - - * tinfo.h (__user_type_info::contained_virtual_p): New - predicate. - * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond - shaped hierarchy. - (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to - diamond shaped hierarchy. Add early out for mixed diamond and - duplicate shaped hierarchy. - -2000-05-24 Mark Mitchell - - * cp-tree.h (build_delete): Change prototype. - (build_vec_delete): Likewise. - * call.c (build_scoped_method_call): Use special_function_kind - values to indicate the kind of destruction to be done. - (build_method_call): Likewise. - * decl.c (finish_destructor_body): Likewise. - (maybe_build_cleanup_1): Likewise. Rename to ... - (maybe_build_cleanup): ... this. - * decl2.c (delete_sanity): Use special_function_kind - values to indicate the kind of destruction to be done. - (build_cleanup): Likewise. - * init.c (perform_member_init): Likewise. - (build_vec_delete_1): Likewise. - (build_dtor_call): Simplify. - (build_delete): Use special_function_kind - values to indicate the kind of destruction to be done. - (build_vbase_delete): Likewise. - (build_vec_delete): Likewise. - - * init.c (sort_member_init): Fix typo in error message generation - code. - -2000-05-15 Donald Lindsay - - * semantics.c (begin_class_definition): make the packed - attribute be sensitive to the "-fpack-struct" command line flag - -2000-05-24 Nathan Sidwell - - Update new-abi upcast algorithm. - * inc/cxxabi.h (__class_type_info::__do_upcast): Change - prototype and meaning of return value. - (__si_class_type_info::__do_upcast): Likewise. - (__vmi_class_type_info::__do_upcast): Likewise. - * tinfo.cc (__class_type_info::__upcast_result): Replace - whole2dst with part2dst. Adjust ctor. - (__class_type_info::__do_upcast): Adjust call of worker function. - (__class_type_info::__do_upcast): Adjust. - (__si_class_type_info::__do_upcast): Adjust. Use parent's - __do_upcast. - (__vmi_class_type_info::__do_upcast): Likewise. Fix private - virtual base in diamond hierarchy bug. - -2000-05-23 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable - and bitfield to tinfo_fn_p. - (DECL_TINFO_FN_P): Adjust. - (SET_DECL_TINFO_FN_P): Likewise. - (DECL_MUTABLE_P): Likewise. - (DECL_C_BIT_FIELD): Likewise. - (SET_DECL_C_BIT_FIELD): Likewise. - (CLEAR_DECL_C_BIT_FIELD): Likewise. - (DECL_UNINLINABLE): Likewise. - * class.c (alter_access): Call retrofit_lang_decl if ncessary. - (handle_using_decl): Remove assertion. - (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl, - to build FIELD_DECLs. - (build_base_field): Likewise. - (layout_class_type): Likewise. - * decl.c (init_decl_processing): Likewise. - (build_ptrmemfunc_type): Likewise. - (grokdeclarator): Likewise. - * decl2.c (grok_x_components): Likewise. - * except.c (call_eh_info): Likewise. - * init.c (init_init_processing): Likewise. - * rtti.c (expand_class_desc): Likewise. - (create_pseudo_type_info): Likewise. - (get_vmi_pseudo_type_info): Likewise. - (create_tinfo_types): Likewise. - * ptree.c (print_lang_decl): Adjust. - * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC - before checking DECL_MUTABLE_P. - - * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge - parameters for template functions. - * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for - destructors as well as constructors. - -2000-05-22 Mark Mitchell - - * class.c (build_ctor_vtbl_group): Set inits. - * optimize.c (maybe_clone_body): Set DECL_INLINE and - DECL_THIS_INLINE appropriately for clones. - - * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. - (DECL_CONV_FN_P): Simplify. - (DECL_OPERATOR): Remove. - (language_to_string): Declare. - * decl.c (duplicate_decls): Fix typo in comment. - (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. - (grok_op_properties): Use DECL_CONV_FN_P instead of - IDENTIFIER_TYPENAME_P. - * dump.c (dequeue_and_dump): Dump the language linkage of - declarations. - * error.c (language_to_string): Give it external linkage. - * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. - (implicitly_declare_fn): Set DECL_LANGUAGE. - * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not - IDENTIFIER_TYPENAME_P. - (tsubst_decl): Likewise. - (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. - * semantics.c (finish_member_declaration): Don't mark members of - classes declared in an extern "C" region as extern "C". - -2000-05-22 Martin v. Löwis - - * decl2.c (qualified_lookup_using_namespace): Look through - namespace aliases. - - * decl.c (push_using_decl): Return the old decl on namespace level. - -2000-05-21 Mark Mitchell - - * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. - (VTT_NAME_PREFIX): New macro. - (CTOR_VTBL_NAME_PREFIX): Likewise. - (get_ctor_vtbl_name): New function. - * class.c (get_vtable_name): Simplify. - (get_vtt_name): New function. - (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. - (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list - when a virtual base becomes primary. - (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build - VTTs. - (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in - additional parameters. - (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. - (initialize_array): New function. - (build_vtt): Likewise. - (build_vtt_inits): Likewise. - (dfs_build_vtt_inits): Likewise. - (dfs_fixup_binfo_vtbls): Likewise. - (build_ctor_vtbl_group): Likewise. - (initialize_vtable): Use initialize_array. - (accumulate_vtbl_inits): Reimplement to handle construction - vtables. - (dfs_accumulate_vtbl_inits): Likewise. - (bulid_vtbl_initializer): Adjust parameter name. - * method.c (build_typename_overload): Remove #if 0'd code. - (get_ctor_vtbl_name): New function. - * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. - (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. - - * cp-tree.h (struct lang_type): Remove search_slot. - (CLASSTYPE_SEARCH_SLOT): Remove. - (emit_base_init): Change prototype. - (initialize_vtbl_ptrs): Likewise. - (expand_indirect_vtbls_init): Likewise. - (clear_search_slots): Remove. - * decl.c (lang_mark_tree): Don't mark search_slot. - * init.c (initialize_vtbl_ptrs): Simplify. - (emit_base_init): Likewise. - * search.c (struct vbase_info): Document decl_ptr. - (convert_pointer_to_single_level): Remove. - (dfs_find_vbases): Remove. - (dfs_init_base_pointers): Simplify. - (dfs_clear_vbase_slots): Remove. - (dfs_vtable_path_unmark): New function. - (init_vbase_pointers): Simplify. - (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT. - (expand_indirect_vtbls_init): Simplify. Don't call - mark_all_temps_used. - * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and - initialize_vtbl_ptrs. - -2000-05-20 Zack Weinberg - - * except.c: Add static prototypes. - -2000-05-20 H.J. Lu - - * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext). - -2000-05-19 Mark Mitchell - - Don't create a separate copy of virtual bases for the - CLASSTYPE_VBASECLASSES list. - * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. - (BINFO_FOR_VBASE): Remove. - (CANONICAL_BINFO): Adjust. - (binfo_for_vbase): New function. - * class.c (build_vbase_pointer_fields): Use binfo_for_vbase - instead of BINFO_FOR_VBASE. - (build_vbase_pointer): Likewise. - (build_secondary_vtable): Likewise. - (dfs_mark_primary_bases): Likewise. - (mark_primary_bases): Likewise. - (layout_nonempty_base_or_field): Likewise. - (dfs_set_offset_for_shared_vbases): Likewise. - (dfs_set_offset_for_unshared_vbases): Likewise. - (layout_virtual_bases): Likewise. Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (dump_class_hierarchy_r): Use binfo_for_vbase - instead of BINFO_FOR_VBASE. - (dump_class_hierarchy): Likewise. - (finish_vtbls): Likewise. - (build_vtbl_initializer): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. - * decl.c (finish_destructor_body): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - * init.c (sort_base_init): Use binfo_for_vbase. - (construct_virtual_bases): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (expand_member_init): Use binfo_for_vbase. - (build_vbase_delete): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - * method.c (do_build_copy_constructor): Likewise. - * rtti.c (get_base_offset): Use binfo_for_vbase. - (expand_class_desc): Remove #if 0'd code. - * search.c (struct vbase_info): Remove vbase_types. - (get_base_distance): Use binfo_for_vbase. - (lookup_field_queue_p): Use CANONICAL_BINFO. - (get_shared_vbase_if_not_primary): Use binfo_for_vbase. - (get_pure_virtuals): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (dfs_find_vbases): Use binfo_for_vbase. - (dfs_init_vbase_pointers): Likewise. - (init_vbase_pointers): Don't initialize vi.vbase_types. - (virtual_context): Use binfo_for_vbase. - (fixup_all_virtual_upcast_offsets): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (expand_indirect_vtbls_init): Simplify. - (dfs_get_vbase_types): Don't replicate virtual bases. - (find_vbase_instance): Use binfo_for_vbase. - (binfo_for_vbase): New function. - * typeck.c (get_delta_difference): Use binfo_for_vbase. - -2000-05-17 Mark Mitchell - - * decl2.c (finish_anon_union): Generalize error messages to handle - anonymous structures. - * init.c (perform_member_init): Remove `name' parameter. - (build_field_list): New function. - (sort_member_init): Handle anonymous union initialization order - correctly. Check for multiple initializations of the same union. - (emit_base_init): Don't look up fields by name here. - (expand_member_init): Record the result of name lookup for future - reference. - * typeck.c (build_component_ref): Fix formatting. - -2000-05-17 Andrew Cagney - - * decl.c (pop_label): Replace warn_unused with warn_unused_label. - * typeck.c (build_x_compound_expr): Replace warn_unused with - warn_unused_value. - - * decl2.c (lang_decode_option): Update -Wall unused flags by - calling set_Wunused. - -2000-05-16 Mark Mitchell - - * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation. - * init.c (dfs_vtable_path_unmark): Remove. - * search.c (marked_new_vtable_p): Likewise. - (unmarked_new_vtable_p): Likewise. - (dfs_search_slot_nonempty_p): Likewise. - (dfs_mark): Likewise. - (dfs_vtable_path_unmark): Likewise. - (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED. - (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED. - (dfs_init_vbase_pointers): Remove special-case new ABI code. - (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED. - (init_vbase_pointers): Simplify. - (expand_indirect_vtbls_init): Likewise. - - * class.c (copy_virtuals): New function. - (build_primary_table): Use it. - (build_secondary_vtable): Likewise. - (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to - indicate that no vcall offset is required. - (add_virtual_function): Likewise. - (modify_all_vtables): Likewise. - (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. - (dfs_accumulate_vtbl_inits): Likewise. - (build_vtbl_initializer): Make changes to handle construction - vtables. - (dfs_build_vcall_offset_vtbl_entries): Likewise. - (build_rtti_vtbl_entries): Likewise. - (build_vtable_entries): Handle a NULL vcall_index. - -2000-05-15 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Fix thinko. - -2000-05-14 Jason Merrill - - * except.c (check_handlers): New fn. - * cp-tree.h: Declare it. - * semantics.c (finish_handler_sequence): Call it. - (finish_function_handler_sequence): Likewise. - (finish_handler_parms): Set TREE_TYPE on the handler. - * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro. - * search.c (get_base_distance_recursive): If protect>1, ignore - special access. - (get_base_distance): Don't reduce watch_access. - -2000-05-13 Gabriel Dos Reis - - * lex.c: #include diagnostic.h. - (lang_init_options): Set default prefixing rules. - - * lang-options.h: Add -fdiagnostics-show-location=. - - * decl2.c: #include diagnostic.h. - (lang_decode_option): Handle -fdiagnostics-show-location=. - -2000-05-12 Nathan Sidwell - - * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes. - * vec.cc: Revert my 2000-05-07 change. - -2000-05-11 Jason Merrill - - * class.c (check_field_decls): Complain about non-static data - members with same name as class in class with constructor. - -2000-05-10 Jason Merrill - - * decl.c (grokdeclarator): Allow non-static data members with - same name as class. - -2000-05-09 Zack Weinberg - - * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, - and pending_inline.filename. Update prototypes. - * decl.c (define_label): Constify filename parameter. - * decl2.c (warn_if_unknown_interface): Constify local char *. - * input.c Constify input_source.filename. Don't declare - input_filename or lineno. Constify filename parameter to feed_input. - * lex.c (init_parse): Constify parameter and return value. - (cp_pragma_interface, cp_pragma_implementation): Constify - filename argument. - (reinit_parse_for_method, reinit_parse_for_block, - reinit_parse_for_expr, feed_defarg, handle_cp_pragma): - Constify local char *. - * pt.c: Don't declare lineno or input_filename. - (print_template_context, tsubst_friend_function, tsubst_decl, - tsubst, instantiate_decl): Constify local char *. - * semantics.c (expand_body): Constify local char *. - * tree.c (build_srcloc): Constify filename parameter. - * typeck.c (c_expand_asm_operands): Constify filename - parameter. - -2000-05-08 Nathan Sidwell - - * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix - offsetof expansion. - -2000-05-08 Branko Cibej - - * inc/cxxabi.h: Fix typos in comment. - (__base_class_info::__offset): Use a static_cast. - -2000-05-07 Nathan Sidwell - - * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place - of std::size_t and std::ptrdiff_t respectively. - * tinfo.cc: Likewise. - * vec.cc: Likewise. - -2000-05-06 Richard Henderson - - * typeck.c (build_c_cast): Don't warn integer->pointer size - mismatch for constants. - -2000-05-06 Nathan Sidwell - - * rtti.c (ptmd_initializer): Set non-public, if class is - incomplete. - - * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++". - (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, - __cxa_vec_delete): Likewise. - * tinfo.cc (__dynamic_cast): Likewise. - * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, - __cxa_vec_delete): Likewise. - -2000-05-04 Mark Mitchell - - * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove. - (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise. - (lang_decl_flags): Add vcall_offset. - (THUNK_VCALL_OFFSET): Use it. - * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk. - * method.c (make_thunk): Create the lang_decl here, not in - emit_thunk. - (emit_thunk): Make generic thunks into ordinary functions once - they have been fed to expand_body. - * semantics.c (expand_body): Set current_function_is_thunk here. - -2000-05-04 Kaveh R. Ghazi - - * class.c (update_vtable_entry_for_fn): Prototype. - - * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl' - and `tmpl'. - - * search.c (dfs_build_inheritance_graph_order): Prototype. - -2000-05-04 Mark Mitchell - - * cp-tree.h (special_function_kind): Add various kinds of - destructors. - (special_function_p): New function. - * class.c (overrides): Don't let one kind of destructor override - another. - * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding - whether or not to instantiate a template. - * tree.c (special_function_p): Define. - -2000-05-03 Mark Mitchell - - * cp-tree.def (THUNK_DECL): Remove. - * cp-tree.h (DECL_THUNK_P): New macro. - (DECL_NON_THUNK_FUNCTION_P): Likewise. - (DECL_EXTERN_C_FUNCTION_P): Likewise. - (SET_DECL_THUNK_P): Likewise. - (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P. - (FNADDR_FROM_VTABLE_ENTRY): Likewise. - (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P. - * decl.c (decls_match): Use DECL_EXTERN_C_P. - (duplicate_decls): Likewise. - (pushdecl): Likewise. Adjust thunk handling. - (grokfndecl): Use DECL_EXTERN_C_P. - * decl2.c (mark_vtable_entries): Use DECL_THUNK_P. - * dump.c (dequeue_and_dump): Remove THUNK_DECL handling. - * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P. - * expr.c (cplus_expand_expr): Remove THUNK_DECL handling. - * method.c (make_thunk): Use SET_DECL_THUNK_P. Set - DECL_NO_STATIC_CHAIN. - (emit_thunk): Don't play games with TREE_CODE on thunks. Don't - set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk. - * search.c (covariant_return_p): Remove THUNK_DECL handling. - * ir.texi: Update. - -2000-05-01 Jason Merrill - - * tree.c (walk_tree): Set lineno. - -2000-05-01 Mark Mitchell - - * exception.cc: Update license notice. - * new.cc: Likewise. - * new1.cc: Likewise. - * new2.cc: Likewise. - * tinfo.cc: Likewise. - * tinfo2.cc: Likewise. - * vec.cc: Likewise. - * inc/cxxabi.h: Likewise. - * inc/exception: Likewise. - * inc/new: Likewise. - * inc/new.h: Likewise. - * inc/typeinfo: Likewise. - -2000-05-01 Jason Merrill - - * tree.c (build_target_expr_with_type): If we already have a - TARGET_EXPR, just return it. - - * optimize.c (initialize_inlined_parameters): Don't generate an - EXPR_STMT if we can just use DECL_INITIAL. - * decl.c (emit_local_var): Only make the initialization a - full-expression if stmts_are_full_exprs_p. - -2000-05-01 Mark Mitchell - - * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New - macro. - * call.c (standard_conversion): Use it. - (direct_reference_binding): Likewise. - (build_over_call): Likewise. - (is_properly_derived_from): Likewise. - (compare_ics): Likewise. - * class.c (resolves_to_fixed_type_p): Likewise. - * optimize.c (declare_return_variable): Likewise. - * pt.c (is_specialization_of): Likewise. - (unify): Likewise. - * typeck.c (comp_target_parms): Likeiwse. - (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (comp_ptr_ttypes_real): Likewise. - (comp_ptr_ttypes_const): Likewise. - * typeck2.c (process_init_constructor): Likewise. - -2000-04-30 Scott Snyder - - * decl.c (finish_destructor_body): Use the base destructor when - destroying virtual bases. - -2000-04-30 Mark Mitchell - - * expr.c (cplus_expand_expr): Preserve temporaries when expanding - STMT_EXPRs. - * optimize.c (struct inline_data): Add target_exprs field. - (declare_return_variable): When a function returns an aggregate, - use the variable declared in the TARGET_EXPR as the remapped - DECL_RESULT. - (expand_call_inline): Update the pending target_exprs stack. - (optimize_function): Initialize the stack. - - * decl2.c (finish_file): Fix typo in comment. - - * method.c (emit_thunk): Don't try to return a `void' value. - - * optimize.c (initialize_inlined_parameters): If the parameter is - addressable, we need to make a new VAR_DECL, even if the - initializer is constant. - -2000-04-28 Cosmin Truta - - * decl.c (grok_op_properties): Add an extra check of argtypes. - -2000-04-27 Mark Mitchell - - * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying - variables. - (initialize_inlined_parameters): Try to avoid creating new - VAR_DECLs. - -2000-04-27 Alex Samuel - - * lex.c (my_get_run_time): Remove. - (init_filename_times): Use get_run_time instead of my_get_run_time. - (check_newline): Likewise. - (dump_time_statistics): Likewise. - * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead - of computing elapsed time explicitly. - -2000-04-26 Mark Mitchell - - * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. - * init.c (decl_constant_value): Check TREE_READONLY_DECL_P. - * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P - before calling decl_constant_value. - * class.c (check_bitfield_decl): Likewise. - * cvt.c (ocp_convert): Likewise. - (convert): Likewise. - * decl.c (compute_array_index_type): Likewise. - (build_enumerator): Likewise. - * decl2.c (check_cp_case_value): Likewise. - * pt.c (convert_nontype_argument): Likewise. - (tsubst): Likewise. - * typeck.c (decay_conversion): Likewise. - (build_compound_expr): Likewise. - (build_reinterpret_cast): Likewise. - (build_c_cast): Likewise. - (convert_for_assignment): Likewise. - -2000-04-26 Jason Merrill - - * decl.c (finish_function): Don't play games with DECL_INLINE. - -2000-04-25 Gabriel Dos Reis - - * ir.texi: Correct typo. - -2000-04-25 Martin v. Löwis - - * decl.c (grokdeclarator): Reject VLAs as members. - -2000-04-24 Gabriel Dos Reis - - * call.c (standard_conversion): Accept conversion between - COMPLEX_TYPEs. - - * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. - -2000-04-24 Zack Weinberg - - * decl2.c (finish_file): Remove double setup for accounting - compile time. - -2000-04-24 Robert Lipe - - * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. - -2000-04-23 Benjamin Kosnik - - * new.cc (set_new_handler): Needs to be in std::. - -2000-04-23 Mark Mitchell - - * cp-tree.h (lang_decl): Remove pretty_function_p. - (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the - language-specific node. - * decl.c (cp_make_fname_decl): Use build_decl, not - build_lang_decl, to build the variables. - (grokvardecl): Don't call build_lang_decl for local variables in - templates. - (grokdeclarator): Don't call build_lang_decl for local type - declarations in templates. - * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated - zero'd memory, rather than calling memset. - * pt.c: Include hashtab.h. - (local_specializations): New variable. - (retrieve_local_specialization): Use it. - (register_local_specialization): Likewise. - (tsubst_decl): Don't assume local variables have - DECL_LANG_SPECIFIC. - (instantiate_decl): Set up local_specializations. - * Makefile.in (HTAB_H): New variable. - -2000-04-23 Richard Henderson - - * typeck.c (c_expand_asm_operands): Restore the original - contents of the output list. - -2000-04-22 Gabriel Dos Reis - - * ir.texi: Document complex number representation. - -2000-04-20 Nathan Sidwell - - * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi. - (target_incomplete_p): New function. - (tinfo_base_init): Create comdat NTBS name variable. - (ptr_initializer): Add non_public parameter. Calculate it. - (ptmd_initializer): Likewise. - (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo. - (create_real_tinfo_var): Add non_public parameter. Use it. - Push proxy into global namespace. - * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask): - New enumeration. - * inc/typeinfo (type_info::before, type_info::operator==): - Compare __name addresses. - - * tinfo2.cc: Remove new-abi builtins comment. - -2000-04-20 Jason Merrill - - * typeck.c (build_x_function_call): Resolve an OFFSET_REF. - - * call.c (joust): Exit early if we get the same function, too. - - * decl2.c (key_method): Return NULL_TREE for template classes. - (import_export_class): Don't need to check for template classes. - -2000-04-18 Zack Weinberg - - * lex.c: Remove references to cccp.c. - -2000-04-18 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove const_memfunc and - volatile_memfunc. Add destructor_attr. Adjust dummy. - (DECL_DESTRUCTOR_P): Use destructor_attr. - (DECL_CONST_MEMFUNC_P): Reimplement. - (DECL_VOLATILE_MEMFUNC_P): Remove. - * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS. - (overrides): Use DECL_DESTRUCTOR_P. - (check_for_override): Likewise. - * decl.c (start_function): Likewise. - * decl2.c (grokfclassfn): Likewise. - (check_classfn): Likewise. - (grok_function_init): Likewise. - -2000-04-17 Mark Mitchell - - * decl2.c (grokfield): Issue error on illegal data member - declaration. - -2000-04-17 Mark P Mitchell - - * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL. - -2000-04-16 Mark Mitchell - - * class.c (build_vtable_entry): Don't build thunks for type-info - functions. - -2000-04-16 Jason Merrill - - * decl.c (decls_match): Allow a redeclaration of a builtin to - specify args while the builtin did not. - -2000-04-15 Mark Mitchell - - * cp-tree.def (THUNK_DECL): Add to documentation. - * cp-tree.h (flag_huge_objects): Declare. - * class.c (modify_vtable_entry): Tidy. - (update_vtable_entry_for_fn): Split out from dfs_modify_vtables. - Calculate delta appropriately for the new ABI. - (dfs_modify_vtables): Use it. - (modify_all_vtables): Fix thinko in code to add overriding copies - of functions to primary vtables. - (build_clone): Fix typo in comment. - (clone_function_decl): Correct order of destructors in vtable. - (build_vbase_offset_vtbl_entries): Adjust comment. - (dfs_vcall_offset_queue_p): Remove. - (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX. - (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases. - (build_vtable_entry): Correct check for pure virtual functions. - Don't declare flag_huge_objects. - * decl.c (flag_huge_objects): Remove declaration. - * method.c (make_thunk): Tweak mangling for vcall offset thunks. - Use int_size_in_bytes. - (emit_thunk): Handle vcall offset thunks. - -2000-04-15 Richard Kenner - - * decl2.c (parse_time, varconst_time): Delete declarations. - (finish_file): Delete LINENO declaration. - START_TIME and THIS_TIME now long. - -2000-04-13 Nathan Sidwell - - * class.c (build_base_field): Reformat comment. - - * inc/cxxabi.h (stddef.h): Comment inclusion. - (__base_class_info::__offset): Comment shift. - -2000-04-12 Mark Mitchell - - * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. - (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. - (cp_push_exception_identifier): New macro. - (DECL_COMPLETE_DESTRUCTOR_P): New macro. - (DECL_BASE_DESTRUCTOR_P): Likewise. - (DECL_DELETING_DESTRUCTOR_P): Likewise. - (get_vtbl_decl_for_binfo): Fix formatting. - (in_charge_arg_for_name): New macro. - (maybe_build_cleanup_and_delete): Remove declaration. - * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. - (in_charge_arg_for_name): New function. - (build_new_method_call): Use it. Handle cloned destructors. - (build_clone): Don't make the base constructor virtual. - Automatically defer generated functions. - (clone_function_decl): Handle destructors, too. - (clone_constructors_and_destructors): Likewise. - (create_vtable_ptr): Don't create a vtable entry for a cloned - function. - * decl.c (predefined_identifier): Add ctor_or_dtor_p. - (initialize_predefined_identifiers): Update appropriately. - (finish_destructor_body): Simplify. - (maybe_build_cleanup_and_delete): Remove. - * except.c (expand_throw): Handle new-ABI destructors. - * init.c (expand_cleanup_for_base): Use base_dtor_identifier. - (build_dtor_call): New function. - (build_delete): Use it. Simplify. - * optimize.c (maybe_clone_body): Handle destructors. - * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. - - * exception.cc (cleanup_fn): New typedef. - (CALL_CLEANUP): New macro. - (cp_eh_info): Use them. - (__cp_push_exception): Likewise. - (__cp_pop_exception): Likewise. - -2000-04-11 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER. - (complete_dtor_identifier): New macro. - (CLASSTYPE_FIRST_CONVERSION): Remove. - (CLASSTYPE_CONSTRUCTOR_SLOT): New macro. - (CLASSTYPE_DESTRUCTOR_SLOT): Likewise. - (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise. - (CLASSTYPE_CONSTRUCTORS): Likewise. - (CLASSTYPE_DESTRUCTORS): Likewise. - (lang_decl): Add cloned_function. - (DECL_COMPLETE_CONSTRUCTOR_P): New macro. - (DECL_BASE_CONSTRUCTOR_P): Likewise. - (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. - (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. - (DECL_CLONED_FUNCTION_P): Likewise. - (DECL_CLONED_FUNCTION): Likewise. - (clone_function_decl): Declare. - (maybe_clone_body): Likewise. - * call.c (build_user_type_conversion_1): Call complete object - constructors in the new ABI. - (build_new_method_call): Don't add in-charge parameters under the - new ABI. - * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, - DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and - CLASSTYPE_DESTRUCTOR_SLOT. - (build_clone): New function. - (clone_function_decl): Likewise. - (clone_constructors_and_destructors): Likewise. - (check_bases_and_members): Use it. - * decl.c (iniitialize_predefined_identifiers): Initialize - complete_dtor_identifier. - (finish_function): Don't add extra code to a clone. - (lang_mark_tree): Mark cloned_function. - * decl2.c (mark_used): Don't bother trying to instantiate things - we synthesized. - * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice. - * method.c (set_mangled_name_for_decl): Don't treat clones as - constructors. - (synthesize_method): Sythesize cloned functions, not the clones. - * optimize.c (inline_data): Update comment on ret_label. - (remap_block): Don't assume DECL_INITIAL exists. - (copy_body_r): Allow ret_label to be NULL. - (maybe_clone_body): Define. - * pt.c (tsubst_decl): Handle clones. - (instantiate_clone): New function. - (instantiate_template): Use it. - (set_mangled_name_for_template_decl): Don't treat clones as - constructors. - * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT, - CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT. - * semantics.c (expand_body): Clone function bodies as necessary. - - * optimize.c (remap_decl): Avoid sharing structure for arrays - whose size is only known at run-time. - * tree.c (copy_tree_r): Don't copy PARM_DECLs. - - * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr - to has_in_charge_parm_p. - (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ... - (DECL_HAS_IN_CHARGE_PARM_P): ... this. - (DECL_COPY_CONSTRUCTOR_P): New macro. - * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P. - (build_user_type_conversion_1): Likewise. - (convert_like_real): Likewise. - (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P. - * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P. - (copy_args_p): Likewise. - (grok_ctor_properties): Likewise. - (start_function): Likewise. - * decl2.c (maybe_retrofit_in_charge): Likewise. Set it. - * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P. - * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P. - * method.c (do_build_copy_constructor): Use - DECL_HAS_IN_CHARGE_PARM_P. - (synthesize_method): Likewise. - * pt.c (instantiate_template): Remove goto. - * tree.c (build_cplus_method_type): Remove mention of obstacks in - comment. - - * cp-tre.h (finish_function): Change prototype. - * decl.c (end_cleanup_fn): Adjust caller. - (finish_function): Take only one parameter. - * decl2.c (finish_objects): Adjust caller. - (finish_static_storage_duration_function): Likewise. - * method.c (emit_thunk): Likewise. - * parse.y: Likewise. - * parse.c: Regenerated. - * pt.c (instantiate_decl): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - * semantics.c (expand_body): Likewise. - - * cp-tree.h (copy_decl): New function. - * class.c (finish_struct_1): Use it. - * lex.c (copy_decl): Define it. - * pt.c (tsubst_decl): Likewise. - * tree.c (copy_template_template_parm): Likewise. - - * cp-tree.h (lang_type): Remove has_nonpublic_ctor and - has_nonpublic_assign_ref. - (TYPE_HAS_NONPUBLIC_CTOR): Don't declare. - (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise. - * class.c (finish_struct_methods): Don't set - TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF. - (interface_only): Don't declare. - (interface_unknown): Likewise. - -2000-04-11 Martin v. Löwis - - * tree.h (HAVE_TEMPLATES): Remove definition. - * lang-options.h (-fthis-is-variable): Remove documentation. - -2000-04-10 Jason Merrill - - * class.c (instantiate_type): Handle object-relative template-id. - - * semantics.c (finish_expr_stmt): Call convert_to_void here. - * decl.c (cplus_expand_expr_stmt): Not here. - - * rtti.c (build_dynamic_cast_1): Call non_lvalue. - Initialize exprtype earlier. - - * parse.y (fn.def1): Check for defining types in return types. - - * decl.c (check_tag_decl): Notice extra fundamental types. - Diagnose empty decls in classes, too. - - * decl.c (grokdeclarator): Don't override an anonymous name if no - declarator was given. - - * cvt.c (convert_to_void): Call resolve_offset_ref. - - * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. - - * decl2.c (decl_namespace): Handle getting a type. - - * typeck.c (build_c_cast): Re-enable warning for cast between - pointer and integer of different size. - -2000-04-10 Nathan Sidwell - - * inc/cxxabi.h (__pointer_type_info): Add restrict and - incomplete flags. - (__pointer_type_info::__pointer_catch): New virtual function. - (__pointer_to_member_type_info): Derive from - __pointer_type_info. Adjust. - (__pointer_to_member_type_info::__do_catch): Remove. - (__pointer_to_member_type_info::__is_pointer_p): Declare. - (__pointer_to_member_type_info::__pointer_catch): Declare. - * rtti.c (qualifier_flags): Add restrict flag. - (ptmd_initializer): Reorder members. - (create_tinfo_types): Expand comments. Reorder - ptmd_desc_type_node members. - * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): - Implement. - (__pointer_type_info::__do_catch): Move specific code into - __pointer_catch. Call it. - (__pointer_type_info::__pointer_catch): Non-pointer-to-member - specific catch checking. Fix void conversion check. - (__pointer_to_member_type_info::__do_catch): Remove. - (__pointer_to_member_type_info::__pointer_catch): Implement. - -2000-04-10 Martin v. Löwis - - * lex.c (init_parse): Remove traces of classof and headof. - * decl2.c (flag_operator_names): Default to 1. - (lang_decode_option): Do not set it for -ansi. - -2000-04-09 Mark Mitchell - - * cp-tree.h (struct lang_decl): Remove main_decl_variant. - (DECL_MAIN_VARIANT): Remove. - * decl.c (duplicate_decls): Don't set it. - (start_function): Likewise. - (lang_mark_tree): Don't mark it. - * decl2.c (defer_fn): Don't use it. - * lex.c (retrofit_lang_decl): Don't set it. - * pt.c (tsubst_decl): Likewise. - * ptree.c (print_lang_decl): Don't print it. - * typeck.c (mark_addressable): Don't use it. - -2000-04-09 Nathan Sidwell - - * vec.cc: Include and . - (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup. - (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or - terminate. - (__cxa_vec_delete): Catch dtor exceptions. - -2000-04-09 Nathan Sidwell - - Prepend __ to implementation defined names. - * inc/typeinfo (type_info): Rename _name to __name. - (type_info::type_info): Rename parameter. - (type_info::operator==, type_info::operator!=, - type_info::before): Likewise. - (type_info::is_pointer_p, type_info::is_function_p, - type_info::do_catch, type_info::do_upcast): Prepend __. Rename - parameters. - * inc/cxxabi.h - (__fundamental_type_info::__fundamental_type_info) Rename parameters. - (__pointer_type_info::__pointer_type_info): Likewise. - (__pointer_type_info::is_pointer_p, - __pointer_type_info::do_catch): Prepend __. Rename parameters. - (__array_type_info::__array_type_info): Rename parameters. - (__function_type_info::__function_type_info): Likewise. - (__function_type_info::is_function_p): Prepend __. - (__enum_type_info::__enum_type_info): Rename parameters. - (__pointer_to_member_type_info::__pointer_to_member_type_info): - Likewise. - (__pointer_to_member_type_info::do_catch): Prepend __. Rename - parameters. - (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. - (__class_type_info::__class_type_info): Rename parameters. - (__class_type_info::sub_kind): Prepend __. Adjust member names. - (__class_type_info::upcast_result, - __class_type_info::dyncast_result): Prepend __. Move definition - into tinfo.cc. - (__class_type_info::do_upcast, __class_type_info::do_catch, - __class_type_info::find_public_src, - __class_type_info::do_dyncast, - __class_type_info::do_find_public_src): Prepend __. Rename - parameters. - (__si_class_type_info::__si_class_type_info): Rename parameters. - (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, - __si_class_type_info::do_find_public_src): Prepent __. Rename - parameters. - (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. - (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, - __vmi_class_type_info::do_find_public_src): Prepent __. Rename - parameters. - (__dynamic_cast): Rename parameters. - * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, - type_info::do_catch, type_info::do_upcast): Prepend __. - (contained_p, public_p, virtual_p, contained_public_p, - contained_nonpublic_p, contained_nonvirtual_p): Adjust. - (__class_type_info::do_catch, - __class_type_info::do_upcast): Prepend __. Adjust. - (__class_type_info::__upcast_result, - __class_type_info::__dyncast_result): Move from inc/cxxabi.h. - Adjust. - (__class_type_info::find_public_src): Prepend __. Adjust. - (__class_type_info::do_find_public_src, - __si_class_type_info::do_find_public_src, - __vmi_class_type_info::do_find_public_src): Likewise. - (__class_type_info::do_dyncast, - __si_class_type_info::do_dyncast, - __vmi_class_type_info::do_dyncast): Likewise. - (__class_type_info::do_upcast, - __si_class_type_info::do_upcast, - __vmi_class_type_info::do_upcast): Likewise. - (__dynamic_cast): Adjust. - * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. - (__function_type_info::is_function_p): Likewise. - (__pointer_type_info::do_catch): Likewise. Adjust. - (__pointer_to_member_type_info::do_catch): Likewise. Adjust. - (__throw_type_match_rtti_2): Adjust. - (__is_pointer): Adjust. - -2000-04-08 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER. - (complete_ctor_identifier): New macro. - (special_function_kind): Add sfk_copy_constructor and - sfk_assignment_operator. - (LOOKUP_HAS_IN_CHARGE): Remove. - (cons_up_default_function): Rename to ... - (implicitly_declare_fn): ... this. - * call.c (build_new_method_call): Add in-charge parameters for - constructors here. - * class.c (add_implicitly_declared_members): Change parameter name - from cant_have_assignment to cant_have_const_assignment. - Replace calls to cons_up_default_function to implicitly_declare_fn. - * cvt.c (ocp_convert): Use complete_ctor_identifier. - * decl.c (initialize_predefined_identifiers): Initialize it. - (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of - complex expression. - * init.c (expand_default_init): Don't calculate the in-charge - parameter here. - (build_new_1): Likewise. - * lex.c (cons_up_default_function): Move to method.c. - * method.c (synthesize_method): Use DECL_DESTRUCTOR_P. - (implicitly_declare_fn): New function. - * typeck.c (build_static_cast): Use complete_ctor_identifier. - (build_modify_expr): Likewise. - * typeck2.c (build_functional_cast): Likewise. - - Under the new ABI, constructors don't return `this'. - * cp-tree.h (warn_reorder): Declare. - (special_function_kind): New enum. - (global_base_init_list): Remove declaration. - (emit_base_init): Don't return a value. - (check_base_init): Don't declare. - (is_aggr_typedef): Likewise. - * decl.c (check_special_function_return_type): New function. - (return_types): Remove. - (grokdeclarator): Use check_special_function_return_type. - (start_function): Don't initialize ctor_label under the new ABI. - (finish_construtor_body): Don't create a corresponding LABEL_STMT. - * init.c (begin_init_stmts): Move to top of file. - (finish_init_stmts): Likewise. - (warn_reorder): Don't declare. - (emit_base_init): Don't create a STMT_EXPR here. Don't return a - value. - (check_base_init): Remove. - (is_aggr_typedef): Likewise. - (build_new_1): Don't use the return value of a constructor. - * semantics.c (setup_vtbl_ptr): Don't use the return value - of emit_base_init. - * typeck.c (check_return_expr): Don't magically convert return - statements into `return this' in constructors under the new ABI. - - * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER, - CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER. - (base_ctor_identifier): New macro. - (base_dtor_identifier): Likewise. - (deleting_dtor_identifier): Likewise. - * decl.c: Don't include obstack.h. - (obstack_chunk_alloc): Don't define. - (obstack_chunk_free): Likewise. - (struct predefined_identifier): New type. - (initialize_predefined_identifiers): New function. - (init_decl_processing): Use it. - (debug_temp_inits): Remove. - (start_method): Don't call preserve_data. - (hack_incomplete_structures): Update comment. - * init.c (init_init_processing): Don't initialize - nelts_identifier. - (build_offset_rf): Remove dead code. - (build_delete): Use CLASSTYPE_N_BASECLASSES. - * search.c (init_search_processing): Don't initialize - vptr_identifier. - -2000-04-08 Kaveh R. Ghazi - - * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide - some sign_compare warnings. - -2000-04-07 Nathan Sidwell - - Rename abi::__vmi_class_type_info members. - * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, - base_list, detail_masks members to vmi_flags, vmi_base_count, - vmi_bases and vmi_flags_masks respectively. - (__vmi_class_type_info::vmi_flags_masks): Rename - details_unknown_mask to flags_unknown_mask. - * tinfo.cc (__class_type_info::do_upcast): Adjust. - (__vmi_class_type_info::do_find_public_src): Adjust. - (__vmi_class_type_info::do_dyncast): Adjust. - (__vmi_class_type_info::do_upcast): Adjust. - -2000-04-07 Nathan Sidwell - - * tinfo.cc (convert_to_base): New function. - (get_vbase_offset): Remove. Move into convert_to_base. - (__vmi_class_type_info::do_find_public_src): Adjust. - (__vmi_class_type_info::do_dyncast): Adjust. - (__vmi_class_type_info::do_upcast): Adjust. - -2000-04-06 Jason Merrill - - * tinfo.cc (operator=): Use __builtin_strcmp. - * tinfo2.cc (before): Likewise. - -2000-04-06 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred. - (DECL_SAVED_INLINE): Rename to ... - (DECL_DEFERRED_FN): ... this. - (in_function_p): Remove declaration. - (mark_inline_for_output): Rename to ... - (defer_fn): ... this. - * decl.c (finish_function): Adjust call to mark_inline_for_output. - (in_function_p): Remove definition. - * decl2.c (saved_inlines): Rename to ... - (deferred_fns): ... this. - (saved_inlines_used): Rename to ... - (deferred_fns_used): ... this. - (mark_inline_for_output): Rename to ... - (defer_fn): ... this. - (finish_file): Adjust accordingly. - (init_decl2): Likewise. - * lex.c (cons_up_default_function): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any - circumstances. - * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output. - * semantics.c (expand_body): Defer more functions. - -2000-04-06 Nathan Sidwell - - * vec.cc: New file. - * Make-lang.in (CXX_LIB2FUNCS): Add it. - (vec.o): Build it. - * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, - __cxa_vec_delete): Declare. - -2000-04-06 Nathan Sidwell - - * rtti.c (dfs_class_hint_mark): New static function. - (dfs_class_hint_unmark): New static function. - (class_hint_flags): Use them. - -2000-04-05 Benjamin Kosnik - - * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE. - -2000-04-05 Mark Mitchell - - * cp-tree.h (instantiate_decl): Change prototype. - * decl2.c (mark_used): Adjust call. - * optimize.c (inlinable_function_p): Adjust handling of templates. - * pt.c (do_decl_instantiation): Adjust call to instantiate_decl. - (do_type_instantiation): Likewise. - (instantiate_decl): Defer more templates. - (instantiate_pending_templates): Adjust logic to handle inline - friend functions. - - * Makefile.in (GGC_H): New variable. Use it throughout in place - of ggc.h. - - * call.c: Don't include obstack.h. Include ggc.h. - (obstack_chunk_alloc): Don't define. - (obstack_chunk_free): Likewise. - (add_candidate): Allocate the z_candidate with ggc_alloc_obj. - * decl.c (push_switch): Use xmalloc to allocate the cp_switch. - (pop_switch): Free it. - - * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. - - * dump.c (dequeue_and_dump): Don't try to print the bit_position - if we don't have a DECL_FIELD_OFFSET. - -Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka - - * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of - special_function_p. - -2000-04-04 Kaveh R. Ghazi - - * cfns.gperf (hash, libc_name_p): Prototype. - - * rtti.c (build_dynamic_cast_1): Constification. - - * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes. - - * semantics.c (deferred_type_access_control): Prototype. - -2000-04-04 Mark Mitchell - - Correct many new ABI issues regarding vbase and vcall offset - layout. - * cp-tree.h (BINFO_VTABLE): Document. - (struct lang_type): Tweak formatting. - (BINFO_PRIMARY_BINFO): Add to documentation. - (CLASSTYPE_VSIZE): Fix typo in comment. - (CLASSTYPE_VBASECLASSES): Update documentation. - (BINFO_VBASE_MARKED): Remove. - (SET_BINFO_VBASE_MARKED): Likewise. - (CLEAR_BINFO_VBASE_MARKED): Likewise. - (BINFO_FIELDS_MARKED): Remove. - (SET_BINFO_FIELDS_MARKED): Likewise. - (CLEAR_BINFO_FIELDS_MARKED): Likewise. - (enum access_kind): New enumeration. - (num_extra_vtbl_entries): Remove declaration. - (size_extra_vtbl_entries): Likewise. - (get_vtbl_decl_for_binfo): New function. - (dfs_vbase_unmark): Remove declaration. - (mark_primary_bases): Likewise. - * class.c (SAME_FN): Remove. - (struct vcall_offset_data_s): Move definition. - (build_vbase_pointer): Use `build', not `build_binary_op', to - access the vbase pointer under the new ABI. - (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo. - (build_primary_vtable): Likewise. - (dfs_mark_primary_bases): Move here from search.c. - (mark_primary_bases): Likewise. - (determine_primary_bases): Under the new ABI, don't make a base - class a primary base just because we don't yet have any virtual - functions. - (layout_vtable_decl): Use get_vtbl_decl_for_binfo. - (num_vfun_entries): Remove. - (dfs_count_virtuals): Likewise. - (num_extra_vtbl_entries): Likewise. - (size_extra_vtbl_entries): Likewise. - (layout_virtual_bases): Iterate in inheritance graph order under - the new ABI. - (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to - indicate that a vfield is present. - (init_class_processing): Initialize access_public_node, etc., from - ak_public, etc. - (get_vtbl_decl_for_binfo): New function. - (dump_class_hierarchy_r): Likewise. - (dump_class_hierarchy): Use it. - (finish_vtbls): Build the vtbls in inheritance graph order. - (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. - (initialize_vtable): Use get_vtbl_decl_for_binfo. - (accumulate_vtbl_inits): Add comments explaining why a pre-order - walk is required. - (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location - where the vptr points, even for primary vtables. - (build_vtbl_initializer): Adjust handling of vbase and vcall - offsets. - (build_vcall_and_vbase_vtable_entries): New function. - (dfs_build_vbase_offset_vtbl_entries): Remove. - (build_vbase_offset_vtbl_entries): Reimplement. - (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that - were already handled in a primary base class vtable. - (build_vcall_offset_vtbl_entries): Adjust. - (build_rtti_vtbl_entries): Adjust. - * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo. - * init.c (expand_virtual_init): Simplify. - * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo. - * rtti.c (create_pseudo_type_info): Adjust calculation of vptr. - * search.c (BINFO_ACCESS): New macro. - (SET_BINFO_ACCESS): Likewise. - (dfs_access_in_type): Manipulate access_kinds, not access nodes. - (access_in_type): Likewise. - (dfs_accessible_p): Likewise. - (protected_accessible_p): Likewise. - (lookup_fnfields_1): Adjust documentation. - (dfs_mark_primary_bases): Move to class.c - (mark_primary_bases): Likewise. - (dfs_vbase_unmark): Remove. - (virtual_context): Use BINFO_FOR_VBASE. - (dfs_get_vbase_types): Simplify. - (dfs_build_inheritance_graph_order): New function. - (get_vbase_types): Use it. - * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo. - - * tinfo.cc (get_vbase_offset): New function. - (__vmi_class_type_info::do_find_public_src): Use it. - (__vmi_class_type_info::do_dyncast): Likewise. - (__vmi_class_type_info::do_upcast): Likewise. - -2000-04-03 Zack Weinberg - - * lang-specs.h: Pass -fno-show-column to the preprocessor. - -2000-03-30 Nathan Sidwell - - * rtti.c (class_hint_flags): Rename flags. - (class_initializer): Remove flags. - (synthesize_tinfo_var): Combine offset and flags. Add flags - for __vmi_class_type_info. - (create_tinfo_types): Remove flags from __class_type_info and - __si_class_type_info. Merge flags and offset from - base_class_type_info. - * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags. - (__base_class_info::is_virtual_p): Adjust. - (__base_class_info::is_public_p): Adjust. - (__base_class_info::offset): New accessor. - (__class_type_info::details): Remove member. - (__class_type_info::__class_type_info): Lose details. - (__class_type_info::detail_masks): Remove. - (__si_class_type_info::__si_class_type_info): Lose details. - (__vmi_class_type_info::details): New member. - (__vmi_class_type_info::__vmi_class_type_info): Adjust. - (__vmi_class_type_info::detail_masks): New member. - * tinfo.cc (__class_type_info::do_upcast): Initialize result - with unknown_details_mask. - (__vmi_class_type_info::do_find_public_src): Adjust - (__vmi_class_type_info::do_dyncast): Adjust. - (__vmi_class_type_info::do_upcast): Set result details, if - needed. Adjust. - (__dynamic_cast): Temporarily #if out optimization. - -2000-03-29 Nathan Sidwell - - * rtti.c (get_tinfo_decl): Mark used. - (emit_tinfo_decl): Don't optimize polymorphic type_info. Only - mark as dealt with, if we output it. - -2000-03-28 Mark Mitchell - - * class.c: Reorganize to put virtual function table initialization - machinery at the end of the file. - -2000-03-28 Jason Merrill - - * class.c (finish_struct): Use bitsize_zero_node. - * pt.c (instantiate_class_template): Likewise. - -2000-03-28 Mark Mitchell - - Put RTTI entries at negative offsets in new ABI. - * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first - vbase offset at index -3, not -1. - (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not - dfs_vtable_path_unmarked_real_bases_queue_p to walk bases. - (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff. - (build_rtti_vtbl_entries): New function. - (set_rtti_entry): Remove. - (build_primary_vtable): Don't use it. - (build_secondary_vtable): Likewise. - (start_vtable): Remove. - (first_vfun_index): New function. - (set_vindex): Likewise. - (add_virtual_function): Don't call start_vtable. Do call - set_vindex. - (set_primary_base): Rename parameter. - (determine_primary_base): Likewise. - (num_vfun_entries): Don't use skip_rtti_stuff. - (num_extra_vtbl_entries): Include RTTI information. - (build_vtbl_initializer): Use build_rtti_vtbl_entries. - (skip_rtti_stuff): Remove. - (dfs_modify_vtables): Don't use it. - (modify_all_vtables): Don't use start_vtable. Do use set_vindex. - (layout_nonempty_base_or_field): Update size handling. - (create_vtable_ptr): Tweak. - (layout_class_type): Adjust parameter names. - (finish_struct_1): Simplify. - * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation. - (skip_rtti_stuff): Remove. - (first_vfun_index): New function. - (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. - (dfs_vtable_path_marked_real_bases_queue_p): Remove. - (marked_vtable_pathp): Declare. - (unmarked_vtable_pathp): Likewise. - * error.c (dump_expr): Use first_vfun_index to calculate vtable - offsets. - * rtti.c (build_headof): Look for RTTI at negative offsets. - (get_tinfo_decl_dynamic): Likewise. - (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL - here. - (create_pseudo_type_info): Do it here instead. Adjust so that - vptr points at first virtual function. - * search.c (marked_vtable_pathp): Make it global. - (unmarked_vtable_pathp): Likewise. - (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. - (dfs_vtable_path_marked_real_bases_queue_p): Likewise. - (dfs_get_pure_virtuals): Don't use skip_rtti_stuff. - (get_pure_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate - negative offset. - -2000-03-26 Richard Kenner - - * class.c (check_field_decl): Fix typo. - (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. - (check_methods): Likewise. - (check_field_decls): Likewise. - Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. - * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): - Use DECL_RESULT_FLD, not DECL_RESULT. - * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. - * lex.c (identifier_type): Likewise. - * pt.c (determine_specialization, lookup_template_class): Likewise. - (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. - (resolve_overloaded_unification, more_specialized): Likewise. - * semantics.c (finish_member_declaration): Likewise. - * typeck.c (build_x_function_call): Likewise. - -2000-03-26 Mark Mitchell - - * class.c (layout_empty_base): Handle empty bases with non-byte - alignment. - (build_base_field): Likewise. - (layout_virtual_bases): Likewise. - - * class.c (finish_struct_1): Fix typo in this change: - - Sat Mar 25 09:12:10 2000 Richard Kenner - -2000-03-25 Mark Mitchell - - * decl.c (grokdeclarator): Count partial specializations when - keeping track of how many template classes have been seen. - - * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. - -2000-03-25 Richard Kenner - - * class.c (build_vbase_pointer_fields): layout_field now place_field. - (get_vfield_offset): Use byte_position. - (set_rtti_entry): Set OFFSET to ssizetype zero. - (get_binfo_offset_as_int): Deleted. - (dfs_record_base_offsets): Use tree_low_cst. - (dfs_search_base_offsets): Likewise. - (layout_nonempty_base_or_field): Reflect changes in RLI format - and call byte_position. - (layout_empty_base): Convert offset to ssizetype. - (build_base_field): use rli_size_unit_so_far. - (dfs_propagate_binfo_offsets): Do computation in proper type. - (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. - (layout_class_type): Reflect changes in RLI names and fields. - (finish_struct_1): Set DECL_FIELD_OFFSET. - * dump.c (dequeue_and_dump): Call bit_position. - * expr.c (cplus_expand_constant): Use byte_position. - * rtti.c (expand_class_desc): Use bitsize_one_node. - * typeck.c (build_component_addr): Use byte_position and don't - special case for zero offset. - -2000-03-24 Nathan Sidwell - - * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P. - - * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi - tinfo object. - (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting - vtable. - -2000-03-20 Theodore Papadopoulo - - * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and - DECL_P macros. - * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name, - make_typename_type, check_initializer, cp_finish_decl, - xref_tag): Likewise. - * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree, - decl_namespace, arg_assoc_template_arg, arg_assoc, - validate_nonmember_using_decl, do_class_using_decl): Likewise. - * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of, - args_to_string): Likewise. - * friend.c (is_friend): Likewise. - * lex.c (note_got_semicolon, note_list_got_semicolon, - is_global): Likewise. - * method.c (build_overload_nested_name, build_overload_value, - build_qualified_name, build_qualified_name, hack_identifier): Likewise. - * parse.y (typename_sub, typename_sub1): Likewise. - * pt.c (push_inline_template_parms_recursive, check_template_shadow, - process_partial_specialization, convert_template_argument, - template_args_equal, add_pending_template, lookup_template_class, - for_each_template_parm_r, maybe_fold_nontype_arg, - tsubst, instantiate_template, type_unification_real, unify, - instantiate_pending_templates, set_mangled_name_for_template_decl): - Likewise. - * repo.c (repo_get_id, repo_template_used): Likewise. - * search.c (lookup_field_1): Likewise. - * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise. - * xref.c (classname): Likewise. - -2000-03-22 Mark Mitchell - - * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation. - (CANONICAL_BINFO): New macro. - (BINFO_NEW_VTABLE_MARKED): Use it. - (SET_BINFO_NEW_VTABLE_MARKED): Likewise. - (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise. - * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE, - not TREE_TYPE. - (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED. - (build_secondary_vtable): Likewise. - (dfs_finish_vtbls): Likewise. - (dfs_accumulate_vtbl_inits): Likewise. - (accumulate_vtbl_inits): New function. - (finish_vtbls): Make sure that virtual bases come after - non-virtual bases in the vtable group. - (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL. - (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED. - * search.c (struct vbase_info): Move definition. - (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED. - (unmarked_new_vtable_p): Likewise. - (dfs_mark_vtable_path): Remove. - (dfs_mark_new_vtable): Remove. - (dfs_unmark_new_vtable): Likewise. - (dfs_clear_search_slot): Likewise. - (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED. - (dfs_clear_vbase_slots): Likewise. - (init_vbase_pointers): LIkewise. - -2000-03-22 Jason Merrill - - * typeck.c (type_after_usual_arithmetic_conversions): Prefer a - SIZETYPE to a non-SIZETYPE. - -2000-03-21 Mark Mitchell - - * class.c (layout_virtual_bases): Adjust names in conditionally - compiled code. - - * class.c (record_base_offsets): New function. - (layout_conflict_p): Likewise. - (layout_nonempty_base_or_field): Use it. - (layout_empty_base): New function. - (build_base_field): Use it. - (build_base_fields): Update comment. - (layout_virtual_bases): Fold in a little code form - layout_basetypes. Use layout_empty_base. - (layout_basetypes): Remove. - (end_of_class): New function. - (layout_class_type): Use it. Adjust. - - * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment. - (fntype_p): Remove. - * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in - comment. - (dfs_skip_nonprimary_vbases_markedp): Likewise. - * typeck.c (fntype_p): Remove. - - * cp-tree.h (TI_SPEC_INFO): Remove. - (CLASSTYPE_TI_SPEC_INFO): Likewise. - * pt.c (process_partial_specialization): Likewise. - - * class.c (build_base_field): Fix thinko in computation of binfo - offsets. - - * tree.c (mark_local_for_remap_p): Mark variables declared in - TARGET_EXPRs as well. - -2000-03-21 Nathan Sidwell - - * typeck.c (require_complete_type, complete_type, - complete_type_or_else, c_sizeof, c_sizeof_nowarn, - build_array_ref, convert_arguments, pointer_diff, - build_x_unary_op, build_unary_op, build_c_cast, - build_modify_expr): Use COMPLETE_TYPE_P etc. - * call.c (is_complete, convert_like_real, - build_new_method_call): Likewise. - * class.c (build_vbase_pointer_fields, check_bases, - build_base_field, finish_struct_1, pushclass): Likewise. - * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. - * decl.c (maybe_process_template_type_declaration, pushtag, - pushdecl, redeclaration_error_message, start_decl, start_decl_1, - layout_var_decl, check_initializer, cp_finish_decl, - grokdeclarator, require_complete_types_for_parms, - grok_op_properties, xref_tag, xref_basetypes, - check_function_type): Likewise. - * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. - * friend.c (do_friend): Likewise. - * init.c (build_offset_ref): Likewise. - * parse.y (structsp): Likewise. - * pt.c (maybe_process_partial_specialization, - tsubst_friend_function, instantiate_class_template, tsubst, - do_type_instantiation, instantiate_pending_templates): Likewise. - * repo.c (repo_get_id): Likewise. - * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, - synthesize_tinfo_var, emit_support_tinfos): Likewise. - * search.c (lookup_fnfields_1, lookup_conversions): Likewise. - * semantics.c (begin_class_definition): Likewise. - * tree.c (build_cplus_method_type): Likewise. - * typeck2.c (digest_init, build_functional_cast, - add_exception_specifier): Likewise. - * parse.h, parse.c: Regenerated. - -2000-03-21 Nathan Sidwell - - * inc/cxxabi.h: New header file. Define new-abi entry points. - (__pointer_type_info::target): Rename member to ... - (__pointer_type_info::type): ... here. - (__base_class_info::type): Rename member to ... - (__base_class_info::base): ... here. - * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h - * cp-tree.h (CPTI_ABI): New global tree enumeration. - (abi_node): New global tree node. - * decl.c (abi_node): Document. - (init_decl_processing): Initialize abi_node. - * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi. - (get_vmi_pseudo_type_info): Likewise. - (create_tinfo_types): Likewise. - (emit_support_tinfos): Likewise. - * tinfo.h (cxxabi.h): Include for new-abi. - Move rtti class definitions to new header file. - * tinfo.cc (abi): Use the namespace. - (std): Move new abi rtti classes from here ... - (__cxxabiv1): ... to here. - * tinfo2.cc (cxxabi.h): Include for new-abi. - Move rtti class definitions to new header file. - (std): Move new abi rtti classes from here ... - (__cxxabiv1): ... to here. - * inc/typeinfo (__class_type_info): Move into __cxxabiv1 - namespace. - -2000-03-20 Jed Wing - Jason Merrill - - * method.c (build_overload_int): Use host_integerp. - -2000-03-20 Theodore Papadopoulo - - * init.c (build_offset_ref): Handle the case of a templated member - function. - -2000-03-19 Martin v. Löwis - - * except.c (expand_exception_blocks): Clear catch_clauses_last. - -2000-03-18 Mark Mitchell - - * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro. - * class.c (check_bitfield_decl): Turn illegal bitfields into - non-bitfields. - (dfs_propagate_binfo_offsets): Adjust for new size_binop - semantics. - (dfs_offset_for_unshared_vbases): Likewise. - * cvt.c (cp_convert_to_pointer): Convert NULL to a - pointer-to-member correctly under the new ABI. - * expr.c (cplus_expand_constant): Don't use cp_convert when - turning an offset into a pointer-to-member. - * init.c (resolve_offset_ref): Don't adjust pointers-to-members - when dereferencing them under the new ABI. - * typeck.c (get_member_function_from_ptrfunc): Tweak calculation - of pointers-to-members under the new ABI. - - * class.c (check_bitfield_decl): Remove restriction on really long - bitfields. - (layout_class_type): Implement new ABI handling of bitfields - longer than their types. - -2000-03-18 Martin v. Löwis - - * parse.y (extdefs): Call ggc_collect. - * parse.c: Regenerated. - -2000-03-18 Nathan Sidwell - - * class.c (build_base_field): Use TYPE_ALIGN to examine a type. - (note_name_declared_in_class): Use OVL_CURRENT to get at a - potential overload. - -2000-03-17 Richard Kenner - - * class.c (build_vbase_path): Use integer_zerop. - (build_vtable_entry): Use tree_low_cst. - (get_vfield_offset): Use bit_position. - (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. - Use tree_low_cst. - (check_bitfield_decl): Set DECL_SIZE using convert. - (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. - (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. - Use tree_low_cst. - (finish_struct_1): Use bit_position. - (dump_class_hierarchy): Use tree_low_cst. - * cp-tree.h (min_precision): Add declaration. - * decl.c (xref_tag, xref_basetypes): Use tree_low_cst. - * error.c (dump_type_suffix): Use host_integerp and tree_low_cst. - (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. - * expr.c (cplus_expand_constant): Use bit_position. - * init.c (build_vec_init): Use host_integerp and tree_low_cst. - * rtti.c (get_base_offset): Use bit_position. - * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, - host_integerp, and tree_low_cst. - (pointer_int_sum): Use integer_zerop. - (build_component_addr): Use bit_position. - -2000-03-17 Nathan Sidwell - - * typeck.c (require_complete_type): Don't assume size_zero_node. - (complete_type_or_else): Likewise. - -2000-03-16 Steven Grady - Jason Merrill - - * rtti.c (build_dynamic_cast_1): Improve diagnostics. - -2000-03-16 Nathan Sidwell - - * decl2.c (grokfield): Bail out if type is error_mark_node. - -2000-03-15 Nathan Sidwell - - * tinfo2.cc (__ptr_to_member_data): Rename to ... - (__pointer_to_member_data): ... here. Adjust. - * rtti.c (create_tinfo_types): Adjust. - -2000-03-15 Nathan Sidwell - - * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove. - * decl.c (ref_desc_type_node): Undocument. - * rtti.c (ptr_ref_initializer): Rename to ... - (ptr_initializer): ... here. Adjust comments. - (ptmd_initializer): Fix comment thinko. - (synthesize_tinfo_var): Remove REFERENCE_TYPE case. - (create_tinfo_types): Remove ref_desc_type_node init. - * tinfo2.cc (__reference_type_info): Remove. - -2000-03-15 Nathan Sidwell - - * decl.c (cp_finish_decl): Remove obsolete comment. - - * typeck.c (build_ptrmemfunc1): Kill uninitialized warning. - -2000-03-14 Mark Mitchell - - * cp-tree.h: Tweak documentation. - * class.c (build_vbase_pointer_fields): Layout the fields, too. - (avoid_overlap): Remove. - (get_binfo_offset_as_int): New function. - (dfs_serach_base_offsets): Likewise. - (layout_nonempty_base_or_field): Likewise. - (build_base_field): Layout fields here. Avoid placing two objects - of the same type at the same address, under the new ABI. - (build_base_fields): Adjust accordingly. - (create_vtable_ptr): Return the new field, but don't attach it to - TYPE_FIELDS. - (remove_base_field): Remove. - (remove_base_fields): Remove. - (layout_basetypes): Adjust accordingly. - (layout_class_type): Call layout_field for each field, rather than - just making a wholesale call to layout_type. - -2000-03-14 Jeff Sturm - - * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw. - -2000-03-13 Jason Merrill - - * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P. - - * except.c (dtor_nothrow): New fn. - (do_pop_exception): Use it. Take type parm. - (push_eh_cleanup): Take type parm. - (expand_start_catch_block): Pass it. - (build_eh_type_type_ref): Accept null type. - -2000-03-12 Mark Mitchell - - * cp-tree.h (revert_static_member_fn): Change prototype. - * decl.c (grokfndecl): Adjust call to revert_static_member_fn. - (grok_op_properties): Likewise. - (start_function): Likewise. - (revert_static_member_fn): Simplify. - * pt.c (check_explicit_specialization): Adjust call to - revert_static_member_fn. - -2000-03-11 Mark Mitchell - - * cp-tree.h (scope_kind): New type. - (tmpl_spec_kind): Likewise. - (declare_pseudo_global_level): Remove. - (pseudo_global_level_p): Rename to template_parm_scope_p. - (pushlevel): Remove declaration. - (begin_scope): New function. - (finish_scope): Likewise. - (current_tmpl_spec_kind): Likewise. - * decl.c (struct binding_level): Shorten parm_flag to 2 bits. - Shorten keep to 2 bits. Rename pseudo_global to template_parms_p. - Add template_spec_p. - (toplevel_bindings_p): Adjust. - (declare_pseudo_global_level): Remove. - (pseudo_global_level_p): Rename to template_parm_scope_p. - (current_tmpl_spec_kind): New function. - (begin_scope): Likewise. - (finish_scope): Likewise. - (maybe_push_to_top_level): Adjust. - (maybe_process_template_type_declaration): Likewise. - (pushtag): Likewise. - (pushdecl_nonclass_level): Likewise. - (lookup_tag): Likewise. - (grokfndecl): Handle member template specializations. Share - constructor and non-constructor code. - * decl2.c (check_classfn): Handle member template specializations. - * pt.c (begin_template_parm_list): Use begin_scope. - (begin_specialization): Likewise. - (end_specialization): Likewise. - (check_explicit_specialization): Use current_tmpl_spec_kind. - Handle member template specializations. - (end_template_decl): Use finish_scope. Remove call to - get_pending_sizes. - (push_template_decl_real): Remove bogus error message. - (tsubst_decl): Fix typo in code contained in comment. - (instantiate_template): Handle member template specializations. - (most_general_template): Likewise. - -2000-03-11 Gabriel Dos Reis - - * lex.c (whitespace_cr): Compress consecutive calls to warning(). - (do_identifier): Ditto for error(). - - * pt.c (convert_nontype_argument): Ditto for cp_error(). - (convert_template_argument): Ditto for cp_pedwarn(). - -2000-03-11 Jason Merrill - - * exception.cc (__check_null_eh_spec): New fn. - * except.c (expand_end_eh_spec): Call it if the spec is throw(). - -2000-03-10 Jason Merrill - - * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE. - * except.c (expand_end_eh_spec): Add the return type. - * rtti.c (throw_bad_cast): Add the parmtypes. - (throw_bad_typeid): Likewise. - - * semantics.c (expand_stmt): Only leave out rtl for unused - artificials, and set DECL_IGNORED_P on them as well. - * decl.c (wrapup_globals_for_namespace): Likewise. - -2000-03-09 Nathan Sidwell - - * decl.c (maybe_commonize_var): Skip all artificial decls. - * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN. - -2000-03-10 Jason Merrill - - * lang-options.h, decl2.c: Add -fno-enforce-eh-specs. - * cp-tree.h: Declare flag_enforce_eh_specs. - * decl.c (store_parm_decls, finish_function): Check it. - - C library functions don't throw. - * Makefile.in (cfns.h): New target. - (except.o): Depend on it. - * Make-lang.in (cc1plus): Depend on cfns.gperf. - * cfns.gperf: New file. - * cfns.h: Generated. - * except.c: Include it. - (nothrow_libfn_p): New fn. - * decl.c (grokfndecl): Use it. - * cp-tree.h: Declare it. - - * decl.c (push_overloaded_decl_1, auto_function, - define_function): Lose. - (build_library_fn_1): New static fn. - (builtin_function): Use it. - (get_atexit_node): Use build_library_fn_ptr. - (build_library_fn, build_cp_library_fn, build_library_fn_ptr, - build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn, - push_void_library_fn, push_throw_library_fn): New fns. - * cp-tree.h: Declare them. - (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID. - (throw_bad_cast_node, throw_bad_typeid_node): Lose. - * except.c (init_exception_processing, call_eh_info, do_pop_exception, - (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns. - * rtti.c (build_runtime_decl): Lose. - (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, - build_dynamic_cast_1, expand_si_desc, expand_class_desc, - expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns. - - * call.c (build_call): Remove result_type parm. - Call mark_used on unused artificial fns. - * init.c, method.c, typeck.c, except.c, rtti.c: Adjust. - -2000-03-09 Jason Merrill - - * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as - appropriate. - * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL. - * except.c (call_eh_info, alloc_eh_object, expand_throw): Set - TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate. - * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1, - expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, - expand_generic_desc): Likewise. - -2000-03-08 Nathan Sidwell - - * exception.cc (__cp_pop_exception): Cleanup the original object. - -2000-03-08 Nathan Sidwell - - * decl.c (grok_op_properties): Merge conversion to void warning - with other silly op warnings. - -2000-03-08 Jason Merrill - - * typeck2.c (process_init_constructor): Set TREE_PURPOSE of - array CONSTRUCTOR elements. Don't use expr_tree_cons. - -2000-03-08 Nathan Sidwell - - * decl.c (cp_make_fname_decl): New function. - (wrapup_globals_for_namespace): Don't emit unused static vars. - (init_decl_processing): Remove comment about use of - array_domain_type. Set make_fname_decl. - (cp_finish_decl): Remove __FUNCTION__ nadgering. - * semantics.c (begin_compound_stmt): Remove - current_function_name_declared flagging. - (expand_stmt): Don't emit unused local statics. - * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls - specially. - -2000-03-08 Nathan Sidwell - - * typeck.c (convert_for_assignment): Don't look at array - initializer. - * call.c (convert_like_real): Likewise. - -2000-03-07 Jason Merrill - - Add initial support for '\uNNNN' specifier. - * lex.c (read_ucs): New fn. - (readescape, skip_white_space): Call it. - (is_extended_char, is_extended_char_1): New fns. - (utf8_extend_token): New fn, #if 0'd out. - (real_yylex): Treat extended chars like letters. - - * search.c (note_debug_info_needed): Walk the bases even if we - weren't deferring the type itself. - -2000-03-07 Kaveh R. Ghazi - - * decl2.c (finish_objects): Constify a char*. - - * method.c (emit_thunk): Likewise. - -2000-03-06 Nathan Sidwell - - * typeck.c (dubious_conversion_warnings): Look through - REFERENCE_TYPE. - -2000-03-06 Richard Kenner - - * class.c (dfs_modify_vtables): I is now unsigned. - (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. - (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. - * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. - * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. - * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. - * typeck.c (build_binary_op, case TRUNC_DIV_EXPR): - Call integer_all_onesp. - * typeck2.c (process_init_constructor): Use compare_tree_int. - - * lang-specs.h (as): Don't call if -syntax-only. - -2000-03-06 Mark Mitchell - - * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set - RTL_EXPR_HAS_NO_SCOPE after all. - -2000-03-05 Mark Mitchell - - * expr.c (cplus_expand_expr, case STMT_EXPR): Use - expand_start_stmt_expr and expand_end_stmt_expr directly. Set - RTL_EXPR_HAS_NO_SCOPE. - - * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little - later. - - * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P. - -2000-03-05 Nathan Sidwell - - * call.c (convert_like): Macrofy. - (convert_like_with_context): New macro. - (convert_like_real): Renamed from convert_like. Add calling - context parameters, for diagnostics. Add recursive flag. Call - dubious_conversion_warnings for outer conversion. - (build_user_type_conversion): Use convert_like_with_context. - (build_over_call): Likewise. Don't warn about dubious - conversions here. Adjust convert_default_arg calls. - (convert_default_arg): Add context parameters for diagnostics. - Pass through to convert_like_with_context. - * cp-tree.h (convert_default_arg): Add context parameters. - (dubious_conversion_warnings): Prototype new function. - * typeck.c (convert_arguments): Adjust convert_default_arg call. - (dubious_conversion_warnings): New function, broken - out of convert_for_assignment. - (convert_for_assignment): Adjust. - -2000-03-03 Jason Merrill - - * decl2.c (key_method): Break out from... - (import_export_vtable, import_export_class): ...here. - - * decl.c (finish_function): Don't mess with flag_keep_inline_functions. - * decl2.c (finish_vtable_vardecl): Don't check decl_function_context. - - * search.c (note_debug_info_needed, dfs_debug_mark, - dfs_debug_unmarkedp): Uncomment. Adjust for new scheme. - * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed. - -2000-03-03 Nathan Sidwell - - * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix - typos. - -2000-03-02 Mark Mitchell - - * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ... - (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this. - (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro. - (lang_type): Split gets_new into has_new and has_array_new. - (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (TYPE_GETS_NEW): Split into ... - (TYPE_HAS_NEW_OPERATOR): ... this, and ... - (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this. - (DECL_ARRAY_DELETE_OPERATOR_P): New macro - (build_op_new_call): Don't declare. - (build_new_1): Likewise. - * call.c (build_op_new_call): Remove. - * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR - instead of TYPE_NEEDS_DESTRUCTOR. - (finish_struct_bits): Likewise. - (add_implicitly_declared_members): Likewise. - (check_field_decl): Likewise. - (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it - correctly under the new ABI. - * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR - instead of TYPE_NEEDS_DESTRUCTOR. - (initialize_local_var): Likewise. - (destroy_local_var): Likewise. - (cp_finish_decl): Likewise. - (register_dtor_fn): Likewise. - (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and - TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set - TYPE_VEC_DELETE_TAKES_SIZE here. - (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and - TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. - (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (finish_destructor_body): Likewise. - (maybe_build_cleanup_1): Likewise. - * decl2.c (do_static_destruction): Likewise. - * init.c (build_new_1): Make it static. - (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (expand_cleanup_for_base): Likewise. - (get_cookie_size): New function. - (build_new_1): Handle array-new cookies correctly under the new - ABI. - (build_vec_delete_1): Likewise. - (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (build_delete): Likewise. - (build_vec_delete): Handle array-new cookies correctly under the new - ABI. - * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and - TYPE_HAS_ARRAY_NEW_OPERATOR. - * ptree.c (print_lang_type): Check them. - * search.c (context_for_name_lookup): Fix typo in comment. - (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - * tree.c (break_out_cleanups): Likewise. - (build_cplus_array_test_1): Likewise. - (cp_build_qualified_type_real): Likewise. - * typeck.c (complete_type): Likewise. - - * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of - the command-line, not the end. - -2000-03-01 Jason Merrill - - * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG. - -2000-03-02 Tom Tromey - - * cp-tree.h (build_java_class_ref): Declare. - * init.c (build_java_class_ref): No longer static. - * except.c (expand_throw): Generate a Java-style `throw' if the - thrown object is a "Java" object. - (initialize_handler_parm): Generate a Java-style lookup of - exception info if the caught object is a "Java" object. - (catch_language, catch_language_init): New globals. - (decl_is_java_type): New function. - (expand_start_catch_block): Don't call push_eh_info() or - push_eh_cleanup() when handling a Java-style "catch". Pass Java - class reference to build_catch_block. - -2000-03-02 Richard Kenner - - * typeck.c (comptypes): Treat sizetype like its language equivalent. - -2000-03-01 Bernd Schmidt - - * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize - to merge reference/pointer code and fix incorrect warnings. - -2000-02-29 Jason Merrill - - * search.c (protected_accessible_p): Use context_for_name_lookup. - - * init.c (construct_virtual_bases): Fix thinko. - * typeck.c (expand_ptrmemfunc_cst): Fix thinko. - -2000-03-01 Martin von Loewis - - * decl.c (current_function_decl): Move to toplev.c. - -2000-02-29 Nathan Sidwell - - * pt.c (fn_type_unification): Unify return type, whenever - provided. - (get_bindings_real): Only pass return type when necessary. - Remove explicit return type check. - * class.c (resolve_address_of_overloaded_function): Pass desired - return type to fn_type_unification. - -2000-02-28 Richard Kenner - - * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear - DECL_FIELD_SIZE. - (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not - DECL_FIELD_SIZE. - * rtti.c (expand_class_desc): Likewise. - * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. - (THUNK_VCALL_OFFSET): Likewise. - (THUNK_DELTA): Reflect changes in ../tree.h. - -2000-02-28 Jason Merrill - - * search.c (protected_accessible_p): Also allow the access if - the member is public in DERIVED. Lose TYPE parm. - (friend_accessible_p): Lose TYPE parm. - (accessible_p): Adjust. - -2000-02-27 Richard Kenner - - * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop - on things that are not sizes; ssize_binop deleted. - Call size_diffop when appropriate. - (dfs_build_vcall_offset_vtbl_entries): Likewise. - (build_primary_vtable, build_secondary_vtable): Likewise. - (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. - Variable I is HOST_WIDE_INT. - (get_vfield_offset): Pass proper types to size_binop. - (size_extra_vtbl_entries, layout_virtual_bases): Likewise. - (finish_struct_1): Likewise. - (skip_rtti_stuff): Arg N is now pointer to signed. - (layout_class_type): Use size_zero_node. - * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. - * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. - * decl.c (complete_arry_type): Pass proper types to size_binop. - (xref_basetypes): BINFO_OFFSET is sizetype. - * error.c (dump_expr): Don't use size_binop non-sizes. - * expr.c (cplus_expand_constant): Pass proper types to size_binop. - * init.c (construct_virtual_bases): Fix type error. - (build_vec_delete_1): Pass proper type to size_binop and don't - fold result. - * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. - * rtti.c (get_base_offset): Pass proper type to size_binop. - * search.c (dfs_find_vbases): Fix type error. - (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. - (dfs_get_vbase_types): BINFO_OFFSET is sizetype. - * tree.c (debug_binfo): Variable N is signed. - Use HOST_WIDE_INT_PRINT_DEC. - * typeck.c (comptypes): sizetype is same as equivalent integer type. - (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, - size_one_node and size_zero_node. - (c_alignof): Use size_one_node. - (build_component_addr): Pass proper types to size_binop. - (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. - -2000-02-26 Jason Merrill - - Implement class scope using-declarations for functions. - * class.c (handle_using_decl): Call add_method for used functions. - Use IDENTIFIER_CLASS_VALUE to check for conflicts. - (add_method): Used functions are hidden by local functions. - (check_bases_and_members): Handle using-decls before finalizing - CLASSTYPE_METHOD_VEC. - * call.c (add_function_candidate): Add ctype parm; if nonzero, - override the type of 'this' accordingly. - (add_template_candidate, add_template_candidate_real): Add ctype parm. - (convert_class_to_reference, build_user_type_conversion_1, - build_new_function_call, build_object_call, build_new_op, - build_new_method_call): Pass ctype parm. - - * search.c (lookup_member): Put rval_binfo, not basetype_path, in - the baselink. - * call.c (convert_class_to_reference, build_user_type_conversion_1, - build_new_function_call, build_object_call, build_new_op, - build_new_method_call, build_op_delete_call): Don't get basetype_path - from a baselink. - * typeck.c (build_component_ref): Likewise. - * init.c (build_offset_ref): Likewise. - (resolve_offset_ref): Don't call enforce_access. - Call build_scoped_ref. - * typeck2.c (build_scoped_ref): Simplify. Do nothing if it - would cause an error or if -pedantic. - * class.c (alter_access): Lose binfo parm. - -2000-02-26 Mark Mitchell - - * semantics.c (simplify_aggr_init_exprs_p): Don't walk into - types. - -2000-02-25 Alfred Minarik - - * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info - pseudo_type_info creation into the std namespace - -2000-02-26 Mark Mitchell - - * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF. - (import_export_class): Remove declaration. - * decl2.c (import_export_class): Make it static. - * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR, - PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, - EXPR_WITH_FILE_LOCATION. - * lex.c (check_newline): Tweak filename/lineno setting. - * semantics.c (begin_while_stmt): Fix typo in comment. - -2000-02-26 Richard Kenner - - * lang-options.h (-fmessage-length=): Add missing option. - - * Make-lang.in (CXX_SRCS): Add .h files and sort list. - -2000-02-26 Zack Weinberg - - * Make-lang.in: Delete refs to LIBGCC2_DEPS. - -2000-02-25 Jim Wilson - - * optimize.c (expand_call_inline): Emit the return label before - evaluating the return value. - -2000-02-24 Mark Mitchell - - * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather - than duplicating functionality here. - * optimize.c: Include input.h. - (expand_call_inline): Use push_srcloc and pop_srcloc. - * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note. - * parse.c: Regenerated. - * Makefile.in (lex.o): Depend on input.h. - (optimize.o): Likewise. - -2000-02-24 Nathan Sidwell - - * decl.c (grokdeclarator): Diagnose qualifiers on non-member - function type, rather than ICE. - -2000-02-23 Jason Merrill - - * decl.c (grokdeclarator): Call decl_type_access_control. - * parse.y (parse_end_decl): Don't call decl_type_access_control if - decl is null. - -2000-02-23 Nathan Sidwell - - * decl.c (decls_match): Remove obsolete static member nadgering. - -2000-02-21 Martin v. Löwis - - * decl.c (grokdeclarator): Change ANSI to ISO. - * lex.c (consume_string, readescape, do_identifier): Likewise. - (parse_float, real_yylex): Likewise. - * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise. - (unary_expr, new_initializer, cast_expr, primary, primary_no_id, - new_type_id, maybe_label_decls, simple_stmt, - for.init.statement): Likewise. - * pt.c (do_decl_instantiation, do_type_instantiation): Likewise. - * semantics.c (finish_named_return_value): Likewise. - * parse.c: Regenerate. - -2000-02-21 Mark Mitchell - - * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro. - (CPTI_CLASS_STAR_TYPE): Remove. - (vtable_index_type): Likewise. - (class_star_type_node): Remove. - (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI. - (build_binary_op_nodefault): Remove. - * call.c (build_new_op): Use build_binary_op instead of - build_binary_op_nodefault. - * decl.c (init_decl_processing): Remove class_star_type_node - initialization. Make delta_type_node ptrdiff_type_node under the - new ABI. Initialize vtable_index_type. - (build_ptrmemfunc_type): Build different structures for the new - ABI. - (build_enumerator): Use build_binary_op instead of - build_binary_op_nodefault. - * method.c (build_overload_value): Mangle pointers-to-members - appropriately under the new ABI. - * typeck.c (build_array_ref): Use build_binary_op instead of - build_binary_op_nodefault. - (get_member_function_from_ptrfunc): Adjust for the new ABI. - (build_binary_op_nodefault): Rename to ... - (build_binary_op): ... this. Remove old version. Adjust for - pointer-to-member comparisons under the new ABI. - (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI. - (build_ptrmemfunc): Adjust for the new ABI. - (expand_ptrmemfunc_cst): Likewise. - (delta2_from_ptrmemfunc): Assert that we're not using the new ABI. - (pfn_from_ptrmemfunc): Adjust for the new ABI. - -2000-02-21 Gabriel Dos Reis - - * call.c (build_object_call): Compress consecutive calls to - cp_error. - (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'. - (build_op_delete_call): Adjust message formatting. - - * class.c (check_bases): Compress consecutive calls to - cp_pedwarn. - (finish_struct_anon): Say 'ISO C++'. - - * decl.c (start_decl): Same here. - (grok_reference_init): Likewise. - (grokfndecl): Correct message formatting. - (grokfndecl): Improve diagnostic. - (check_static_variable_definition): Likewise. Say 'ISO C++' - (compute_array_index_type): Say 'ISO C++' - (create_array_type_for_decl): Compress consecutive calls to - cp_error. - (grokdeclarator): Say 'ISO C++' - (grok_op_properties): Likewise. - - * decl2.c (delete_sanity): Clairify diagnostic. - (check_member_template): Same here. - (grok_function_init): Use consistent terminology. - - * expr.c (do_case): Say 'ISO C++' - - * friend.c (do_friend): Compress consecutive calls to warning. - -2000-02-20 Mark Mitchell - - * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro. - * class.c (build_secondary_vtable): Reorganize. Don't create a - new vtable under the new ABI. - (layout_vtable_decl): Don't add num_extra_vtbl_entries when - computing the size. - (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return - the initializing elements. - (initialize_vtable): New function. - (dfs_finish_vtbls): Use it. - (dfs_accumulate_vtbl_inits): New function. - (finish_vtbls): Merge primary and secondary vtables under the new - ABI. - (finish_struct_1): Remove redundant call to layout_vtable_decl. - * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that - aren't VAR_DECLs. - - * class.c (build_vtable): New function, split out from ... - (get_vtable_decl): ... here, and ... - (build_secondary_vtable): ... here. - - * pt.c (tsubst_decl): Fix formatting. - -2000-02-19 Richard Kenner - - * class.c (build_primary_vtable, layout_vtable_decl): Likewise. - (avoid_overlap, build_base_field): Likewise. - (build_base_field, build_base_fields, is_empty_class): - Test DECL_SIZE with integer_zero. - (layout_class_type): Set CLASSTYPE_SIZE_UNIT. - * cp-tree.h (struct lang_type): New field size_unit. - (CLASSTYPE_SIZE_UNIT): New macro. - * decl.c (init_decl_processing): Set DECL_SIZE_UNIT. - (cp_finish_decl): Delete -Wlarger-than processing. - * optimize.c (remap_decl): Walk DECL_SIZE_UNIT. - * pt.c (tsubst_decl): Set DECL_SIZE_UNIT. - * tree.c (make_binfo): binfo vector is one entry longer. - (walk_tree): Walk DECL_SIZE_UNIT. - -2000-02-19 Mark Mitchell - - * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in - comment. - (build_vtable_entry): Don't assume all vtable entries are - functions. - (build_vtbl_initializer): Adjust accordingly. - (get_vtable_decl): Fix formatting. - -2000-02-18 Jason Merrill - - * semantics.c (deferred_type_access_control): Walk the entire - type_lookups list. - (save_type_access_control): Rename from - initial_deferred_type_access_control. Just remember the value. - (decl_type_access_control): New fn. - (begin_function_definition): Use deferred_type_access_control, after - we've started the function. Set type_lookups to error_mark_node. - * parse.y (frob_specs, fn.def1): Adjust. - (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns. - (parse_end_decl, parse_bitfield0, parse_method): New fns. - (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them. - (after_type_component_declarator0): Likewise. - (after_type_component_declarator): Likewise. - (notype_component_declarator): Likewise. - * cp-tree.h: Adjust. - - * decl.c (redeclaration_error_message): Allow redeclaration of - namespace-scope decls. - -2000-02-18 Martin von Loewis - - * typeck2.c (my_friendly_abort): Use GCCBUGURL. - -2000-02-17 Mark Mitchell - - * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. - * decl2.c (grokclassfn): Likewise. - - * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. - - * decl2.c (lang_decode_option): Don't set default message length - here. - * lex.c (lang_init_options): Set it here. - -2000-02-16 Mark Mitchell - - Make DECL_CONTEXT mean the class in which a member function was - declared, even for a virtual function. - * cp-tree.h (DECL_CLASS_CONTEXT): Adjust. - (DECL_FRIEND_CONTEXT): New macro. - (DECL_REAL_CONTEXT): Remove. - (SET_DECL_FRIEND_CONTEXT): Likewise. - (DECL_VIRTUAL_CONTEXT): Adjust. - (DECL_CLASS_SCOPE_P): Use TYPE_P. - (add_friends): Remove. - (hack_decl_function_context): Likewise. - * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with - CP_DECL_CONTEXT. - (build_over_call): Fix indentation. Use DECL_CONTEXT - instead of DECL_CLASS_CONTEXT. - * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise. - (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. - (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT. - (build_base_field): Likewise. - (finish_struct_1): Likewise. - (build_self_reference): Likewise. - * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (pushtag): Use decl_function_context, not - hack_decl_function_context. - (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. - (duplicate_decls): Use DECL_VIRTUAL_CONTEXT. - (pushdecl): Remove bogus code. - (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT. - (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. - (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - Use decl_function_context, nothack_decl_function_context. - (grokvardecl): Don't set DECL_CLASS_CONTEXT. - (grokdeclarator): Likewise. Use decl_function_context, not - hack_decl_function_context. - (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT. - (start_function): Use DECL_FRIEND_CONTEXT, not - DECL_CLASS_CONTEXT. Use decl_function_context, not - hack_decl_function_context. - (finish_function): Use decl_function_context, not - hack_decl_function_context. - (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT. - (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT. - (grokfield): Likewise. - (finish_builtin_type): Likewise. - (finish_vtable_vardec): Use decl_function_context, not - hack_decl_function_context. - (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (start_static_initialization_or_destruction): Likewise. - (finish_static_initialization_or_destruction): Likewise. - (mark_used): Adjust logic for deciding when to synthesize methods. - * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - * error.c (dump_function_decl): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - * friend.c (is_friend): Likewise. - (add_friends): Remove. - (do_friend): Use SET_DECL_FRIEND_CONTEXT. - * lex.c (begin_definition_of_inclass_inline): Use - decl_function_context, not hack_decl_function_context. - (process_next_inline): Likewise. - (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. - * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not - DECL_CLASSS_CONTEXT. - (hack_identifier): Likewise. - (synthesize_method): Use decl_function_context, not - hack_decl_function_context. - * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (is_member_template): Use decl_function_context, not - hack_decl_function_context. Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not - DECL_CLASS_CONTEXT. - (check_default_tmpl_args): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (push_template_decl_real): Likewise. - (instantiate_class_template): Don't call add_friends. - (tsubst_default_argument): Use DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. - Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - * repo.c (repo_inline_used): Likewise. - * search.c (current_scope): Adjust for new _CONTEXT macros. - (context_for_name_lookup): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (lookup_fnfields_here):Likewise. - (check_final_overrider): Likewise. - (init_vbase_pointers): Likewise. - (virtual_context): Likewise. - * semantics.c (finish_member_declaration): Just set DECL_CONTEXT. - (expand_body): Use decl_function_context, not - hack_decl_function_context. - * tree.c (hack_decl_function_context): Remove. - * typeck.c (build_x_function_call): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - * typeck2.c (error_not_base_type): Likewise. - -2000-02-15 Jason Merrill - - * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE. - -2000-02-16 Kaveh R. Ghazi - - * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h. - -2000-02-15 Jonathan Larmour - - * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. - -2000-01-16 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Enable automatic line wrapping. - -2000-02-13 Jason Merrill - - * parse.y (frob_specs): Split out... - (parse_decl): From here. - (fn.def2): Call initial_deferred_type_access_control. - (after_type_component_declarator0): Call frob_specs. - (notype_component_declarator0): Likewise. - * search.c (friend_accessible_p): Nested classes are friends of their - enclosing classes. - -2000-02-10 Mark Mitchell - - * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be - used to create an implicit temporary. - - * class.c (dfs_modify_vtables): Tweak calculation of functions to - override. - -2000-02-08 Nathan Sidwell - - * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to - strip array element qualifiers too. - -2000-02-07 Mark Mitchell - - * decl.c (store_parm_decls): Don't build cleanups for parameters - while processing_template_decl. - -2000-02-07 Jason Merrill - - * cp-tree.h (struct saved_scope): Add incomplete field. - (namespace_scope_incomplete): New macro. - * decl.c (pushdecl): Use it. - (hack_incomplete_structures): Use it. See through artificial - binding levels. - (mark_saved_scope): Mark it. - - Implement access control for nested types. - * search.c (type_access_control): New fn. - (accessible_p): Now we do perform access control for types. - * semantics.c (deferred_type_access_control): New fn. - (initial_deferred_type_access_control): New fn. - (begin_function_definition): Call it. Add lookups parm. - * decl.c (struct binding_level): Add this_class field. - (pushlevel_class): Set it. - (mark_binding_level): Mark it. - (lookup_name_real): Use it. Call type_access_control. - (mark_saved_scope): Mark lookups field. - * cp-tree.h (flagged_type_tree): Add lookups field. - (struct saved_scope): Add lookups field. - (type_lookups): New macro. - * parse.y (declmods): Now . - (parse_decl): Add lookups parm. Call - initial_deferred_type_access_control. - (lang_extdef): Clear type_lookups. - (typed_declspecs, declmods, typespec): Set lookups field. - (initdcl): Call deferred_type_access_control. - (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0, - component_decl_1, named_parm): Adjust. - * friend.c (is_friend): Nested classes are friends of their - enclosing classes. - - * class.c (currently_open_derived_class): New fn. - * method.c (hack_identifier): Use it. - - * lex.c (do_identifier): Remove obsolete code. - - * parse.y (typed_typespecs): Propagate new_type_flag properly. - -2000-02-05 Zack Weinberg - - * tinfo.h: Remove apostrophes from C++ comment (xgettext - thinks this file is plain C). - -2000-02-05 Kaveh R. Ghazi - - * Makefile.in (call.o): Depend on $(EXPR_H). - - * call.c: Include "expr.h". - - * class.c (dump_class_hierarchy): Add prototype. - - * search.c (dfs_get_pure_virtuals): Likewise. - -2000-02-1 Ulrich Drepper - - * parse.y (simple_stmt): Allow :: token in asm parameter list. - * parse.c: Rebuilt. - -2000-01-31 Jim Wilson - - * class.c (build_vtbl_or_vbase_field): New parameter fcontext. - Store it in DECL_FCONTEXT. - (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. - -2000-01-31 Jason Merrill - - * tinfo.h (old abi): #include "tconfig.h". - * tinfo.cc (convert_to_base): Move into old abi section. - -2000-01-31 Mark Mitchell - - * cp-tree.h (BINFO_VIRTUALS): Tweak documentation. - (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO. - (BINFO_PRIMARY_BINFO): New macro. - (BF_DELTA): Rename to ... - (BV_DELTA): ... this. - (BF_VCALL_INDEX): Rename to ... - (BV_VCALL_INDEX): ... this. - (BF_FN): Rename to ... - (BV_FN): ... this. - * class.c (build_vbase_path): Adjust for changes to reverse_path. - (set_rtti_entry): Rename BF_ macros to BV_ variants. - (modify_vtable_entry): Simplify. - (add_virtual_function): Rename BF_ macros to BV_ variants. - (build_vtable_initializer): Likewise. - (get_class_offset_1): Remove. - (dfs_get_class_offset): Likewise. - (get_class_offset): Likewise. - (dfs_find_final_overrider): New function. - (find_final_overrider): Likewise. - (modify_one_vtable): Remove. - (dfs_find_base): New function. - (dfs_modify_vtables): Fold modify_one_vtable in here. Use - find_final_overrider. - (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new - virtuals. - (dfs_fixup_vtable_deltas): Remove. - (override_one_vtable): Remove. - (merge_overrides): Likewise. - (layout_virtual_bases): Make sure BINFO_OFFSET is set right for - unreal chilren of virtual bases. - (finish_struct_1): Don't use merge_overrides. Don't use - dfs_fixup_vtable_deltas. - * tree.c (reverse_path): Return a TREE_LIST, not a chain of - BINFOs. - -2000-01-31 Herman A.J. ten Brugge - Jason Merrill - - * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT. - -2000-01-31 Alfred Minarik - - * exception.cc (__throw_bad_typeid): Add missing std::. - -2000-01-31 Kaveh R. Ghazi - - * cp-tree.h (make_thunk): PROTO -> PARAMS. - -2000-01-31 Nathan Sidwell - - * cp-tree.h (new_abi_rtti_p): Use flag_new_abi. - - Runtime support for new-abi rtti. - * inc/typeinfo (type_info::operator!=): Define in class. - (type_info::before, type_info::name, type_info::operator==, - type_info::operator!=): Define new ABI implementations. - (type_info::is_pointer_p, type_info::is_function_p): Declare - new virtual functions. - (type_info::do_catch, type_info::do_upcast): Likewise. - - * tinfo.h (__base_class_info): Define new class. - (__class_type_info): Likewise. - (__si_class_type_info): Likewise. - (__vmi_class_type_info): Likewise. - (__dynamic_cast): Prototype. - - * tinfo.cc: Conditionalize old and new rtti mechanisms. - (type_info::is_pointer_p): Define new function. - (type_info::is_function_p): Likewise. - (type_info::do_catch): Likewise. - (type_info::do_upcast): Likewise. - (vtable_prefix): New structure for vtable access. - (adjust_pointer): Define new template function. - (contained_p, public_p, virtual_p, contained_public_p, - contained_nonpublic_p, contained_nonvirtual_p): Define new - functions. - (nonvirtual_base_type): New local variable. - (__class_type_info::~__class_type_info): Define. - (__si_class_type_info::~__si_class_type_info): Likewise. - (__vmi_class_type_info::~__vmi_class_type_info): Likewise. - (__class_type_info::do_catch): Define new function. - (__class_type_info::do_upcast): Likewise. - (__class_type_info::find_public_src): Likewise. - (__class_type_info::do_find_public_src): Likewise. - (__si_class_type_info::do_find_public_src): Likewise. - (__vmi_class_type_info::do_find_public_src): Likewise. - (__class_type_info::do_dyncast): Likewise. - (__si_class_type_info::do_dyncast): Likewise. - (__vmi_class_type_info::do_dyncast): Likewise. - (__class_type_info::do_upcast): Likewise. - (__si_class_type_info::do_upcast): Likewise. - (__vmi_class_type_info::do_upcast): Likewise. - (__dynamic_cast): Likewise. - - * tinfo2.cc (__fundamental_type_info): Define new class. - (__pointer_type_info): Likewise. - (__reference_type_info): Likewise. - (__array_type_info): Likewise. - (__function_type_info): Likewise. - (__enum_type_info): Likewise. - (__ptr_to_member_type_info): Likewise. - (__fundamental_type_info::~__fundamental_type_info): Define. - (__pointer_type_info::~__pointer_type_info): Likewise. - (__reference_type_info::~__reference_type_info): Likewise. - (__array_type_info::~__array_type_info): Likewise. - (__function_type_info::~__function_type_info): Likewise. - (__enum_type_info::~__enum_type_info): Likewise. - (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise. - (__pointer_type_info::do_catch): Define new function. - (__ptr_to_member_type_info::do_catch): Define new function. - - (__throw_type_match_rtti_2): Use new ABI interface, if enabled. - (__is_pointer): Likewise. - - * exception.cc (__cplus_type_matcher): Deal with new-abi rtti. - -2000-01-30 Mark Mitchell - - * cp/class.c (build_vtable): Rename to build_primary_vtable. - (prepare_fresh_vtable): Rename to build_secondary_vtable. - (make_new_vtable): New function. - (modify_vtable_entry): Handle generation of new vtables correctly. - (modify_one_vtable): Remove unused parameter. - (dfs_fixup_vtable_deltas): Likewise. - (override_one_vtable): Use build_secondary_vtable. - (finish_struct_1): Use build_primary_vtable and - build_secondary_vtable. - -2000-01-28 Ulrich Drepper - - * cp/decl.c: Adjust variable names, comments, help strings. - -2000-01-29 Nathan Sidwell - - * new2.cc (operator delete[]): Use operator delete, don't assume - implementation. - -2000-01-29 Nathan Sidwell - - * class.c (build_vtbl_initializer): Add argument to - build_vtable_entry call. - -2000-01-27 Mark Mitchell - - * cp-tree.def (THUNK_DECL): Discuss vcall indices. - * cp-tree.h (BINFO_VIRTUALS): Update documentation. - (BF_DELTA): New macro. - (BF_VCALL_INDEX): Likewise. - (BF_FN): Likewise. - (THUNK_VCALL_OFFSET): Likewise. - (make_thunk): Change prototype. - * class.c (build_vtable_entry): Integrate - build_vtable_entry_for_fn. Handle vcall indices. - (build_vtable_entry_for_fn): Remove. - (set_rtti_entry): Handle vcall indices. Use BF_DELTA, - BF_VCALL_INDEX, BF_FN. - (modify_vtable_entry): Integrate common code from - modify_one_vtable and dfs_fixup_vtable_deltas. - (add_virtual_function): Set BF_VCALL_INDEX. - (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX, - and BF_FN. - (modify_one_vtable): Simplify. - (dfs_fixup_vtable_deltas): Likewise. - (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. - * method.c (make_thunk): Handle vcall indices. - -2000-01-28 Nathan Sidwell - - Compiler side new abi rtti (not enabled). - * cp-tree.h (new_abi_rtti_p): New macro. - (emit_support_tinfos): Prototype new function. - (tinfo_decl_p): Likewise. - (emit_tinfo_decl): Likwise. - * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor - macros. - (doing_runtime): New local static. - (init_rtti_processing): Add new-abi initializer. - (get_tinfo_decl): Add new-abi logic. - (tinfo_from_decl): Likewise. - (build_dynamic_cast_1): Likewise. - (qualifier_flags): New static function. - (tinfo_base_init): Likewise. - (generic_initializer): Likewise. - (ptr_ref_initializer): Likewise. - (ptmd_initializer): Likewise. - (class_hint_flags): Likewise. - (class_initializer): Likewise. - (synthesize_tinfo_var): Likewise. - (create_real_tinfo_var): Likewise. - (create_pseudo_type_info): Likewise. - (get_vmi_pseudo_type_info): Likewise. - (create_tinfo_types): Likewise. - (emit_support_tinfos): New global function. - (tinfo_decl_p): New global predicate. - (emit_tinfo_decl): New global function. - * class.c (set_rtti_entry): Generalize for old and new rtti. - (build_vtbl_initializer): Likewise. - * decl2.c (finish_file): Likewise. - -2000-01-27 Jim Wilson - - * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t) - and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))). - -2000-01-27 Mike Stump - - * decl.c (pushdecl): Fix up shadow warnings with respect to implicit - for scopes. - -2000-01-26 Jason Merrill - - * pt.c (unify): Use fold, not maybe_fold_nontype_arg. - -2000-01-26 J"orn Rennecke - - * optimize.c (calls_setjmp_r): Supply new argument - to special_function_p. - -2000-01-26 Kaveh R. Ghazi - - * call.c: PROTO -> PARAMS. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * decl.c: Likewise. - * decl.h: Likewise. - * decl2.c: Likewise. - * dump.c: Likewise. - * errfn.c: Likewise. - * error.c: Likewise. - * except.c: Likewise. - * expr.c: Likewise. - * init.c: Likewise. - * input.c: Likewise. - * lex.c: Likewise. - * lex.h: Likewise. - * method.c: Likewise. - * optimize.c: Likewise. - * parse.y: Likewise. - * pt.c: Likewise. - * repo.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - * xref.c: Likewise. - -2000-01-25 Richard Henderson - - * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. - -2000-01-25 Mark Mitchell - - * cp-tree.h (vcall_offset_in_vtable_p): New macro. - * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment. - (struct vcall_offset_data_s): New type. - (dfs_vcall_offset_queue_p): New function. - (dfs_build_vcall_offset_vtbl_entries): Likewise. - (build_vcall_offset_vtbl_entries): Likewise. - (layout_vtable_decl): Likewise. - (num_vfun_entries): Likewise. - (num_extra_vtbl_entries): Add the entries for vcall offsets. - (build_vtbl_initializer): Likewise. - (dfs_finish_vtabls): Use layout_vtable_decl. - (modify_one_vtables): Always duplicate vtables under the new ABI. - (finish_struct_1): Use layout_vtable_decl. - -2000-01-25 Kaveh R. Ghazi - - * decl.c (member_function_or_else): Change third arg from a format - specifier to an `enum overload_flags'. Callers changed. - -2000-01-25 Gabriel Dos Reis - - * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof, - build_binary_op_nodefault, build_unary_op, build_reinterpret_cast, - build_const_cast, get_delta_difference, check_return_expr): Avoid - ANSI string concatenation usage. - -2000-01-24 Mark Mitchell - - * class.c (layout_class_type): Put the fields required to make a - class non-empty at the end, not the beginning, of the TYPE_FIELDs - list. - -2000-01-24 Jason Merrill - - * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a - template. - - * decl2.c (mark_used): Do instantiate inlines that have been - explicitly instantiated. - -2000-01-24 Richard Henderson - - * call.c (build_over_call): Use expand_tree_builtin. - * typeck.c (build_function_call_real): Likewise. - (build_binary_op_nodefault): Handle unordered compares. - -2000-01-24 Nathan Sidwell - - * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New - cp_tree_index values. - (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node): - New global node #defines for them. - * rtti.c (call_void_fn): Replace with ... - (build_runtime_decl): ... new static function. - (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl. - (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl. - (build_dynamic_cast_1): Always produce correctly typed result. - Explicitly produce type_info addresses. Use dynamic_cast_node. - * exception.cc (__throw_bad_cast): Return `void *'. - (__throw_bad_typeid): Return `const type_info &'. - -2000-01-24 Nathan Sidwell - - * cp-tree.h (get_vtable_decl): Prototype new function. - * class.c (get_vtable_decl): New function. Broken out from ... - (build_vtable): ... here. Use it. - * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created - by get_vtable_decl. - -2000-01-24 Nathan Sidwell - - * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE, - CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE, - CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations. - (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE, - CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, - CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations. - (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ... - (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here. - (CPTI_TINFO_VAR_ID): New enumeration. - (__tp_desc_type_node, __access_mode_type_node, - __bltn_desc_type_node, __user_desc_type_node, - __class_desc_type_node, __ptr_desc_type_node, - __attr_desc_type_node, __func_desc_type_node, - __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines. - (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, - ref_desc_type_node, ary_desc_type_node, func_desc_type_node, - enum_desc_type_node, class_desc_type_node, - si_class_desc_type_node, vmi_class_desc_type_node, - ptmd_desc_type_node, base_desc_type_node): New #defines. - (tinfo_fn_id, tinfo_fn_type): Rename to ... - (tinfo_decl_id, tinfo_decl_type): ... here. Adjust. - (tinfo_var_id): New enumeration. - (DECL_TINFO_FN_P): Augment comment. - * decl.c (cp_global_trees): Adjust documentation. - * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id, - tinfo_decl_type and tinfo_var_id. - (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type. - (build_typeid): Remove unused variable. - (get_tinfo_var): Use tinfo_var_id. - (tinfo_name): New static function. - (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type. - (tinfo_from_decl): Likewise. - (get_base_offset): New static function, broken out of - expand_class_desc. - (expand_si_desc): Use tinfo_name. - (expand_class_desc): Likewise. Lose local static variable. - Use base_desc_type_node. Use get_base_offset. - (expand_ptr_desc): Use tinfo_name. - (expand_attr_desc): Likewise. - (expand_generic_desc): Likewise. - - * tinfo.cc (__GXX_ABI_VERSION): Test value and existence. - * tinfo.h (__GXX_ABI_VERSION): Test value and existence. - -2000-01-23 Mark Mitchell - - * cp-tree.h (__eprintf): Remove declaration. - * tree.c (__eprintf): Remove definition. - -2000-01-23 Zack Weinberg - Mark Mitchell - - * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, - CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings. - -2000-01-23 Brad Lucier - - * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. - -2000-01-23 Mark Mitchell - - * cp-tree.h (register_dtor_fn): New function. - * decl.c (destroy_local_static): Rename to ... - (register_dtor_fn): ... this. Give it external linkage. - (expand_static_init): Use it. - * decl2.c (do_static_initialization): Likewise, if using - __cxa_atexit. - (do_static_destruction): Check that __cxa_atexit is not in use. - (finish_file): Don't call do_static_destruction if using - __cxa_atexit. - - * typeck.c (convert_arguments): Restore two-message error - reporting. - -2000-01-20 Nathan Sidwell - - Remap dynamic cast hint values to be consistent across ABIs. - * search.c (dynamic_cast_base_recurse): Remap generated value. - (get_dynamic_cast_base_type): Adjust documentation. - * tinfo.h (__user_type_info::dyncast): Likewise. - (__user_type_info::find_public_subobj): Remap BOFF meaning. - * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning. - (__class_type_info::do_dyncast): Likewise. - (__class_type_info::do_find_public_subobj): Likewise. - * tinfo2.cc (__dynamic_cast): Remap BOFF parameter. - -2000-01-19 Gabriel Dos Reis - - * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. - - * typeck2.c (incomplete_type_error): Restore previous - cp_error and cp_error_at call sequence. - -2000-01-20 Brad Lucier - - * class.c (dump_class_hierarchy): Make format agree with argument; - cast pointer to unsigned long and print with %lx. - -2000-01-19 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Set default line-wrap length to 72. - - * typeck.c (composite_pointer_type, common_type, - comp_target_parms, c_sizeof, expr_sizeof, build_array_ref, - build_function_call_real, convert_arguments, - build_binary_op_nodefault, pointer_int_sum, pointer_diff, - build_unary_op, mark_addressable, build_compound_expr, - build_static_cast, build_reinterpret_cast, build_const_cast, - build_c_cast, build_modify_expr, get_delta_difference, - build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with - 'ISO C++'. Fusion consecutive calls to diagnostic message routines - into a single one. - * typeck2.c (readonly_error, abstract_virtuals_error, - process_init_constructor, check_for_new_type): Likewise. - -2000-01-19 Mark Mitchell - - * tree.c (bot_manip): Set DECL_CONTEXT for newly created - VAR_DECLs. - -2000-01-18 Nathan Sidwell - - * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype. - (build_x_typeid): Likewise. - (get_tinfo_fn): Likewise. - (get_tinfo_fn_unused): Rename to ... - (get_tinfo_decl): ... here. - * rtti.c (build_headof): Replace logic error with assertion. - (get_tinfo_fn_dynamic): Rename to ... - (get_tinfo_decl_dynamic): ... here. Make static. Use - complete_type_or_else. - (build_x_typeid): Move into ... - (build_typeid): ... here. Adjust call to - get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify - throw_bad_typeid expression. - (get_tinfo_fn_unused): Rename to ... - (get_tinfo_decl): ... here. Adjust comment. - (get_tinfo_fn): Delete. - (tinfo_from_decl): New static function. - (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl. - (get_typeid): Use complete_type_or_else. - (build_dynamic_cast_1): Adjust calls to - get_tinfo_decl_dynamic. Simplify throw_bad_cast expression. - * parse.y (primary): Adjust call to build_typeid. - * except.c (build_eh_type_type_ref): Adjust call to - get_tinfo_decl. Mark as used. - * class.c (set_rtti_entry): Adjust call to get_tinfo_decl. - * decl2.c (build_expr_from_tree): Adjust call to build_typeid. - * parse.c: Regenerated. - -2000-01-17 Mark Mitchell - - * class.c (fixed_type_or_null): Don't clear NONNULL. Document - calling convention. - (resolves_to_fixed_type_p): Document calling convention. - * rtti.c (build_x_typeid): Initialize NONNULL. - - * cp-tree.h (build_shared_int_cst): New function. - * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity. - * class.c (modify_vtable_entry): Likewise. - (add_virtual_function): Split out code to generated shared - INTEGER_CSTs to build_share_int_cst. - (modify_all_vtables): Handle all the overridden functions here. - Add overridden functions from non-primary virtual bases to the - primary vtable. - (finish_struct_1): Adjust call to modify_all_vtables. Add - overridden functions from non-primary bases to the vtable. - * tree.c (build_shared_int_cst): New function. - - * cp-tree.h (scratchalloc): Remove. - (build_scratch_list): Likewise. - * call.c (convert_class_to_reference): Replace build_scratch_list - and build_expr_list with build_tree_list. - (add_candidate): Replace scratchalloc with expralloc. Note memory - leak. - (build_user_type_conversion_1): Replace build_scratch_list - and build_expr_list with build_tree_list. - (build_new_op): Likewise. - (build_op_delete_call): Likewise. - (convert_like): Likewise. - * cvt.c (ocp_convert): Likewise. - * decl.c (start_decl): Likewise. - (start_function): Likewise. - (finish_destructor_body): Likewise. - (maybe_build_cleanup_1): Likewise. - * decl2.c (reparse_decl_as_expr): Likewise. - * init.c (perform_member_init): Likewise. - (expand_cleanup_for_base): Likewise. - (build_builtin_delete_call): Likewise. - (build_new_1): Likewise. - (build_delete): Likewise. - * method.c (do_build_assign_ref): Likewise. - * parse.y (already_scoped_stmt): Likewise. - (nontrivial_exprlist): Likewise. - (net_initializer): Likewise. - (initlist): Likewise. - * parse.c: Regenerated. - * rtti.c (build_x_typeid): Likewise. - (build_dynamic_cast_1): Likewise. - * typeck.c (build_x_compound_expr): Likewise. - (build_static_cast): Likewise. - (build_modify_expr): Likewise. - - * cp-tree.h (DECL_VINDEX): Add documentation. - * class.c (build_vtable_entry): Likewise. - (start_vtable): Add comment. - (add_virtual_function): Replace pending_hard_virtuals with - overridden_virtuals and pending_virtuals with new_virtuals. - Replace redundant assignments with assertions. - (check_for_override): Add comment. - (check_bases_and_members): Replace pending_hard_virtuals with - overridden_virtuals and pending_virtuals with new_virtuals. - (create_vtbl_ptr): Likewise. - (layout_class_type): Likewise. - (finish_struct_1): Likewise. Add comments. - -2000-01-16 Mark Mitchell - - * class.c (finish_struct_1): Replace redundant code with - assertions. - - * cp-tree.h (flag_new_abi): Move. - (flag_use_cxa_atexit): Likewise. - (flag_honor_std): Likewise. - (flag_rtti): Likewise. - (vbase_offsets_in_vtable_p): Define. - (vptrs_present_everywhere_p): Likewise. - (TYPE_CONTAINS_VPTR_P): Likewise. - (dfs_walk_real): Declare. - * class.c (build_vbase_pointer_fields): Check - vbase_offsets_in_vtable_p. - (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in - BINFO_VPTR_FIELD. - (build_vbase_offset_vtbl_entries): Simplify. - (build_vbase_offset_vtbl_entries): Adjust. - (build_vbase_pointer): Add ability to look up vbase offsets in - vtable. - (start_vtable): New function. - (add_virtual_function): Use it. - (determine_primary_base): Use TYPE_CONTAINS_VPTR_P. - (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p. - (build_vtbl_initializer): Take the type of the complete object as - input. Use it to correctly calculate vbase offsets. - (dfs_finish_vtbls): Pass the complete type to - build_vtbl_initializer. - (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. - (create_vtable_ptr): Create a vtable even if there are no - new virtual functions, under the new ABI. - (finish_struct_1): Likewise. - (get_vfield_name): Use TYPE_CONTAINS_VPTR_P. - * decl.c (exapnd_static_init): Remove call to - preserve_initializer. - * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in - vtables. - * init.c (initialize_vtbl_ptrs): Initialize them in pre-order. - (expand_virtual_init): Use vbase_offsets_in_vtable_p. - (construct_virtual_bases): Don't initialize virtual base pointers - under the new ABI. - (build_aggr_init): Clean up comment. - (expand_aggr_init_1): Likewise. - * rtti.c (expand_class_desc): Store the virtual function table - index where the vbase offset lives in the offset field. - * search.c (dfs_walk_real): Make it global. - (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P. - * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD. - - * tinfo.h (USItype): Make it signed under the new ABI. - * tinfo.cc (convert_to_base): New function. Encapsulate base - conversion logic here. - (__class_type_info::do_upcast): Use it. - (__class_type_info::do_dyncast): Likewise. - (__class_type_info::do_find_public_subobj): Likewise. - - * init.c (construct_virtual_bases): Don't look up the addresses of - virtual bases at run-time. - - * class.c (build_vbase_pointer): Relocate. - (build_vbase_pointer_fields): Likewise. - (dfs_build_vbase_offset_vtbl_entries): Likewise. - (build_vbase_offset_vtbl_entries): Likewise. - - * decl.c (init_decl_processing): Complain if -fnew-abi - -fno-vtable-thunks is used. - - * decl2.c (lang_decode_option): Don't couple flag_honor_std to - flag_new_abi. - -2000-01-15 Mark Mitchell - - * cp-tree.h (num_extra_vtbl_entries): New function. - (size_extra_vtbl_entries): Likewise. - (dfs_vtable_path_unmark): Likewise. - (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise. - (dfs_vtable_path_marked_real_bases_queue_p): Likewise. - * class.c (num_extra_vtbl_entries): New function. - (size_extra_vtbl_entries): Likewise. - (dfs_build_vbase_offset_vtbl_entries): New function. - (build_vbase_offset_vtbl_entries): Likewise. - (build_vtbl_initializer): Use it. - (finish_struct_1): Adjust vtable sizes (using - num_extra_vtbl_entries). - * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a - THUNK_DECL is non-NULL before expanding it. - * init.c (expand_virtual_init): Adjust the vtable pointer by - size_extra_vtbl_entries before storing it. - * search.c (get_shared_vase_if_not_primary): Adjust prototype. - Handle TREE_LIST parameters here, not in the dfs_* functions. - (dfs_unmarked_real_bases_queue_p): Adjust. - (dfs_marked_real_bases_queue_p): Likewise. - (dfs_vtable_path_unmarked_real_bases_queue_p): New function. - (dfs_vtable_path_marked_real_bases_queue_p): New function. - (dfs_vtable_path_unmark): Likewise. - -2000-01-14 Mark Mitchell - - * optimize.c (copy_body_r): Clear the operand three of a - TARGET_EXPR when copying it. - -2000-01-14 Martin v. Löwis - - * method.c (build_decl_overload_real): Check whether we are in :: - before returning __builtin_new/delete. - -2000-01-13 Mark Mitchell - - * pt.c (tsubst_friend_function): Improve comment. - (instantiate_decl): Avoid crashing when a "nested" function is - instantiated from the top level. - - * dump.c (dqeueue_and_dump): Dump - DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION. - -2000-01-13 Kaveh R. Ghazi - - * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. - -2000-01-13 Nathan Sidwell - - * g++spec.c (lang_specific_driver): Add -fnew-abi if - ENABLE_NEW_GXX_ABI defined. - * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o, - opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o, - opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch. - -2000-01-12 Mark Mitchell - - * decl.c (start_cleanup_fn): Call pushdecl. - - * call.c (convert_class_to_reference): Fix typos. - (build_conditional_expr): Handle errors gracefully. - * class.c (push_nested_class): Likewise. - * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro. - (DECL_THIS_EXTERN): Use it. - (DECL_THIS_STATIC): Likewise. - * cvt.c (convert_to_void): Handle errors gracefully. - (build_expr_type_conversion): Likewise. - * decl.c (maybe_push_decl): Likewise. - (start_decl_1): Likewise. - (require_complete_types_for_parms): Likewise. - * parse.y (structsp): Likewise. - (base_class): Likewise. - * parse.c: Regenerated. - * pt.c (finish_member_template_decl): Likewise. - * typeck.c (decay_conversion): Likewise. - - * cp-tree.h (dfs_skip_vbases): New function. - (find_vbase_instance): Likewise. - * class.c (determine_primary_base): Allow a nearly empty base to - serve as a primary base class under the new ABI. - (get_class_offset_1): Rename to ... - (dfs_get_class_offset): ... this. Simplify. Don't issue error - messages here. - (get_class_offset): Use it. Issue error messages here. - (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to - find the right copies of virtual bases. - (fixup_vtable_deltas1): Rename to ... - (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual - bases as primary bases. - (fixup_vtable_deltas): Remove. - (override_one_vtable): Handle virtual bases as primary bases. - (merge_overrides): Likewise. - (finish_struct_1): Likewise. - (dump_class_hierarchy): Dump primary-ness of bases as well. - * search.c (mark_primary_bases): Use a pre-order traversal to - handle primary virtual bases. - (dfs_skip_vbases): New fiunction. - (expand_upcast_fixups): Adjust to handle primary virtual bases. - (fixup_virtual_upcast_offsets): Likewise. - (fixup_all_virtual_upcast_offsets): Likewise. - (dfs_find_vbase_instances): New function. - (find_vbase_instance): Likewise. - -2000-01-11 Mumit Khan - - * lex.c (DIR_SEPARATOR): Delete macro. - -2000-01-12 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Handle automatic line wrapping - option. - -2000-01-11 Mark Mitchell - - * friend.c (do_friend): Don't resolve scopes when processing - template declarations, even if the qualifying scope doesn't - involve template parameters. - -2000-01-10 Mark Mitchell - - * class.c (dfs_modify_vtables_queue_p): Remove. - (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p - and dfs_marked_real_bases_queue_p instead of - dfs_modify_vtables_queue_p. - - * class.c (build_vbase_path): Simplify. - (dfs_propagate_binfo_offsets): New function. - (propagate_binfo_offsets): Use it. - (remove_base_field): Simplify. - (dfs_set_offset_for_vbases): Remove. - (dfs_set_offset_for_shared_vbases): New function. - (dfs_set_offset_for_unshared_vbases): Likewise. - (layout_virtual_bases): Use them. - (layout_basetypes): Don't call propagate_binfo_offsets. - * search.c (dfs_get_vbase_types): Clone completely fresh binfos - for the vbases. - - * class.c (build_base_field): New function, split out from ... - (build_base_fields): ... here. Use it. Allocate primary bases - first, under the new ABI. - (get_vtable_entry): Remove. - (remove_base_field): New function, split out from ... - (remove_base_fields): ... here. Adjust since primary bases come - first under the new ABI. - - * cp-tree.h (expand_direct_vtbls_init): Remove declaration. - (initialize_vtbl_ptrs): New function. - (expand_indirect_vtbls_init): Change prototype. - (convert_pointer_to_vbase): Declare. - * init.c (expand_direct_vtbls_init): Remove. - (dfs_initialize_vtbl_ptrs): New function. - (initialize_vtbl_ptrs): Likewise. - (emit_base_init): Use initialize_vtbl_ptrs. - * search.c (convert_pointer_to_vbase): Make it global. - (expand_indirect_vtbls_init): Remove vtable initialization code. - * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs. - - * class.c (dfs_finish_vtbls): New function. - (finish_vtbls): Use it. - (dump_class_hierarchy): New function. - - * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition. - (BINFO_VBASE_PRIMARY_P): New macro. - (BINFO_VIRTUALS): Add to documentation. - (SET_BINFO_PRIMARY_MARKED_P): Remove. - (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. - (dfs_mark_primary_bases_queue_p): Likewise. - (dfs_unmarked_real_bases_queue_p): New function. - (dfs_marked_real_bases_queue_p): Likewise. - * search.c (dfs_mark_primary_bases): Adjust. - (mark_primary_bases): Likewise. - (get_shared_vbase_if_not_primary): New function. - (dfs_unmarked_real_bases_queue_p): Likewise. - (dfs_marked_real_bases_queue_p): Likewise. - (dfs_get_pure_virtuals): Simplify. - (get_pure_virtuals): Likewise. - -2000-01-10 Kaveh R. Ghazi - - * lex.c: Include tm_p.h. - -2000-01-07 Nathan Sidwell - - * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro. - -2000-01-06 Jason Merrill - - * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT. - * pt.c (instantiate_decl): Defer comdat templates that might not be - needed. - - * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT. - * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT. - (finish_file): Likewise. - - * decl2.c (import_export_class): Undo 12/14 change. - - * error.c (dump_decl): operator new, not operatornew. - - * class.c (field_decl_cmp): A nontype is "greater" than a type. - * search.c (lookup_field_1): Look for the last field with the - desired name. - -2000-01-05 Nathan Sidwell - - * decl2.c (lookup_arg_dependent): Deal with FNS not being a - FUNCTION_DECL. - -2000-01-05 Nathan Sidwell - - * typeck.c (build_static_cast): Don't strip target qualifiers - when casting from a class. - -2000-01-04 Kaveh R. Ghazi - - * class.c (warn_hidden): Initialize variable `fndecl'. - -2000-01-03 Ulrich Drepper - - * decl.c (flag_isoc9x): New variable to be able to use code in - c-common.c. For now always zero. - -2000-01-03 Mark Mitchell - - * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. - * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN - or unshare_base_binfos for virtual bases here. - * search.c (dfs_get_vbase_types): Do it here. - (get_vbase_types): Adjust. - -2000-01-02 Mark Mitchell - - * cp-tree.h (CLASSTYPE_VFIELDS): Move definition. - (BINFO_PRIMARY_MARKED_P): Use flag 5. - (SET_BINFO_PRIMARY_MARKED_P): Likewise. - (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. - (unmark_primary_bases): Remove declaration. - (unmarkedp): Declare. - (dfs_vbase_unmark): Likewise. - * class.c (determine_primary_base): Return immediately if there - are no base classes. Call mark_primary_bases here. - (modify_all_direct_vtables): Remove. - (modify_all_indirect_vtables): Remove. - (dfs_modify_vtables_queue_p): New function. - (dfs_modify_vtables): New function. - (modify_all_vtables): Use them. - (build_base_fields): Build FIELD_DECLs for primary virtual base - classes. - (create_vtable_ptr): Don't call determine_primary_base here. - (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ... - (dfs_set_offset_for_vbases): ... this. - (layout_virtual_bases): Use it. - (layout_class_type): Call determine_primary_base here. - * search.c (unmarkedp): Make it global. - (shared_marked_p): Simplify. - (shared_unmarked_p): Likewise. - (dfs_primary_bases_queue_p): Remove. - (dfs_unmark_primary_bases): Likewise. - (unmark_primary_bases): Likewise. - (mark_primary_bases): Simplify. - (get_pure_virtuals): Don't call mark_primary_bases here. - (dfs_vbase_unmark): New function. - (get_vbase_types): Simplify. - - * class.c (struct base_info): Remove. - (determine_primary_base): Take has_virtual_p rather than a - base_info as input. Don't calculate max_has_virtual. - (finish_struct_bits): Remove max_has_virtual argument. - (create_vtable_ptr): Remove max_has_virtual_p argument. - (layout_virtual_bases): Remove max argument. - (layout_basetypes): Likewise. - (layout_class_type): Remove max_has_virtual_p argument. - (finish_struct_1): Remove max_has_virtual. - - * cp-tree.h (dfs_mark_primary_bases_queue_p): New function. - (layout_basetypes): Remove. - * class.c (propagate_binfo_offsets): Moved here from tree.c. - Update to handle primary virtual bases. - (remove_base_fields): New function, split out from - layout_basetypes. - (dfs_mark_primary_bases_and_set_vbase_offsets): New function. - (layout_virtual_bases): New function, split out from - layout_basetypes. Update to handle primary virtual bases. - (layout_basetypes): Moved here from tree.c. Use - remove_base_fields and layout_virtual_bases. - * search.c (dfs_mark_primary_bases_queue_p): New function. - (mark_primary_bases): Use it. - * tree.c (CEIL): Remove. - (propagate_binfo_offsets): Remove. - (layout_basetypes): Remove. - -2000-01-01 Mark Mitchell - - * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES. - (BINFO_PRIMARY_MARKED_P): New macro. - (SET_BINFO_PRIMARY_MARKED_P): Likewise. - (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. - (mark_primary_bases): New function. - (unmark_primary_bases): Likewise. - * search.c (get_abstract_virtuals_1): Remove. - (dfs_mark_primary_bases): New function. - (mark_primary_bases): Likewise. - (dfs_unmark_primary_bases): Likewise. - (unmark_primary_bases): Likewise. - (dfs_get_pure_virtuals): Likewise. - -2000-01-01 Mark Mitchell - - * cp-tree.h (skip_rtti_stuff): Adjust prototype. - * class.c (skip_rtti_stuff): Reorganize parameters and return value. - (modify_one_vtable): Adjust. - (fixup_vtable_deltas1): Likewise. - (override_one_vtable): Likewise. - * search.c (get_abstract_virtuals_1): Likewise. - (get_pure_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - - * class.c (build_vtable): Don't return a value. Don't rebuild - vtables for bases that have already been handled. - (prepare_fresh_vtable): Don't rebuild vtables for bases that have - already been handled. - (modify_one_vtable): Adjust accordingly. - (fixup_vtable_deltas1): Likewise. - (finish_struct_1): Likewise. - -2000-01-01 Martin v. Löwis - - * call.c (build_new_method_call): Also check destructors. - -See ChangeLog.2 for earlier changes. diff --git a/gcc/cp/ChangeLog.egcs b/gcc/cp/ChangeLog.egcs deleted file mode 100644 index ddefd5c..0000000 --- a/gcc/cp/ChangeLog.egcs +++ /dev/null @@ -1,4 +0,0 @@ -Wed Sep 10 16:39:26 1997 Jim Wilson - - * Make-lang.in (LN, LN_S): New macros, use where appropriate. -